/* Matomo Javascript - cb=f0aea864f95b88e2ad6c32436cfaf39a*/

(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 i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="plugins/CoreHome/vue/dist/",i(i.s="fae3")}({2342:function(e,t,i){"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,i){t.exports=e},fae3:function(e,t,i){"use strict";if(i.r(t),i.d(t,"createVueApp",(function(){return ve})),i.d(t,"importPluginUmd",(function(){return Se})),i.d(t,"useExternalPluginComponent",(function(){return Ce})),i.d(t,"DirectiveUtilities",(function(){return De})),i.d(t,"debounce",(function(){return Pe})),i.d(t,"clone",(function(){return Te})),i.d(t,"VueEntryContainer",(function(){return Be})),i.d(t,"ActivityIndicator",(function(){return We})),i.d(t,"MatomoLoader",(function(){return Ue})),i.d(t,"translate",(function(){return a})),i.d(t,"translateOrDefault",(function(){return r})),i.d(t,"externalRawLink",(function(){return ue})),i.d(t,"externalLink",(function(){return me})),i.d(t,"Alert",(function(){return Ke})),i.d(t,"AjaxHelper",(function(){return te})),i.d(t,"setCookie",(function(){return q})),i.d(t,"getCookie",(function(){return W})),i.d(t,"deleteCookie",(function(){return z})),i.d(t,"MatomoUrl",(function(){return U})),i.d(t,"Matomo",(function(){return M})),i.d(t,"Periods",(function(){return c})),i.d(t,"Day",(function(){return f})),i.d(t,"Week",(function(){return O})),i.d(t,"Month",(function(){return j})),i.d(t,"Year",(function(){return S})),i.d(t,"Range",(function(){return k})),i.d(t,"format",(function(){return d})),i.d(t,"getToday",(function(){return u})),i.d(t,"parseDate",(function(){return m})),i.d(t,"todayIsInRange",(function(){return p})),i.d(t,"getWeekNumber",(function(){return h})),i.d(t,"datesAreInTheSamePeriod",(function(){return g})),i.d(t,"NumberFormatter",(function(){return ae})),i.d(t,"formatNumber",(function(){return pe})),i.d(t,"formatPercent",(function(){return he})),i.d(t,"formatCurrency",(function(){return ge})),i.d(t,"formatEvolution",(function(){return be})),i.d(t,"calculateAndFormatEvolution",(function(){return fe})),i.d(t,"DropdownMenu",(function(){return Ye})),i.d(t,"FocusAnywhereButHere",(function(){return tt})),i.d(t,"FocusIf",(function(){return ot})),i.d(t,"Tooltips",(function(){return st})),i.d(t,"MatomoDialog",(function(){return ut})),i.d(t,"ExpandOnClick",(function(){return yt})),i.d(t,"ExpandOnHover",(function(){return Dt})),i.d(t,"ShowSensitiveData",(function(){return Pt})),i.d(t,"DropdownButton",(function(){return Vt})),i.d(t,"SelectOnFocus",(function(){return Mt})),i.d(t,"CopyToClipboard",(function(){return Rt})),i.d(t,"SideNav",(function(){return Ht})),i.d(t,"EnrichedHeadline",(function(){return ni})),i.d(t,"ContentBlock",(function(){return gi})),i.d(t,"Comparisons",(function(){return Fi})),i.d(t,"ComparisonsStore",(function(){return Bi})),i.d(t,"ComparisonsStoreInstance",(function(){return Ii})),i.d(t,"MenuItemsDropdown",(function(){return Yi})),i.d(t,"DatePicker",(function(){return to})),i.d(t,"DateRangePicker",(function(){return po})),i.d(t,"PeriodDatePicker",(function(){return Co})),i.d(t,"Notification",(function(){return Io})),i.d(t,"NotificationGroup",(function(){return qo})),i.d(t,"NotificationsStore",(function(){return $o})),i.d(t,"ShowHelpLink",(function(){return Qo})),i.d(t,"SitesStore",(function(){return Zo})),i.d(t,"SiteSelector",(function(){return jn})),i.d(t,"QuickAccess",(function(){return Rn})),i.d(t,"FieldArray",(function(){return Wn})),i.d(t,"MultiPairField",(function(){return ea})),i.d(t,"PeriodSelector",(function(){return Er})),i.d(t,"ReportingMenu",(function(){return cs})),i.d(t,"ReportingMenuStore",(function(){return is})),i.d(t,"ReportingPagesStore",(function(){return Yr})),i.d(t,"ReportMetadataStore",(function(){return ms})),i.d(t,"WidgetsStore",(function(){return rs})),i.d(t,"WidgetLoader",(function(){return Cs})),i.d(t,"ClientWidgetRenderer",(function(){return Es})),i.d(t,"WidgetContainer",(function(){return Ns})),i.d(t,"WidgetByDimensionContainer",(function(){return $s})),i.d(t,"Widget",(function(){return Ys})),i.d(t,"ReportingPage",(function(){return ll})),i.d(t,"ReportExport",(function(){return Ll})),i.d(t,"Sparkline",(function(){return Hl})),i.d(t,"Progressbar",(function(){return Gl})),i.d(t,"ContentIntro",(function(){return Kl})),i.d(t,"ContentTable",(function(){return ac})),i.d(t,"AjaxForm",(function(){return dc})),i.d(t,"Passthrough",(function(){return pc})),i.d(t,"DataTableActions",(function(){return pd})),i.d(t,"VersionInfoHeaderMessage",(function(){return Dd})),i.d(t,"MobileLeftMenu",(function(){return Md})),i.d(t,"scrollToAnchorInUrl",(function(){return Ud})),i.d(t,"SearchFiltersPersistenceStore",(function(){return ws})),i.d(t,"AutoClearPassword",(function(){return zd})),i.d(t,"PasswordStrength",(function(){return Qd})),i.d(t,"EntityDuplicatorModal",(function(){return bu})),i.d(t,"EntityDuplicatorAction",(function(){return yu})),i.d(t,"EntityDuplicatorStore",(function(){return Cu})),i.d(t,"BaseDuplicatorAdapter",(function(){return wu})),"undefined"!==typeof window){var o=window.document.currentScript,n=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(i.p=n[1])}i("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 i=t;return 1===t.length&&t[0]&&Array.isArray(t[0])&&([i]=t),window._pk_translate(e,i)}function r(e,...t){return e&&window.piwik_translations[e]?a(e,...t):e}function s(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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 m(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 p(e){return 2===e.length&&(u()>=e[0]&&u()<=e[1])}function h(e){const t=new Date(e.valueOf()),i=(e.getDay()+6)%7;t.setDate(t.getDate()-i+3);const o=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((o-t.valueOf())/6048e5)}function g(e,t,i){const o=e.getFullYear(),n=e.getMonth(),a=e.getDate(),r=h(e),s=t.getFullYear(),l=t.getMonth(),c=t.getDate(),d=h(t);switch(i){case"day":return o===s&&n===l&&a===c;case"week":return o===s&&r===d;case"month":return o===s&&n===l;case"year":return o===s;default:return!1}}function b(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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(m(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 p(this.getDateRange())}}function v(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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(m(e))}static getDisplayText(){return a("Intl_PeriodWeek")}getPrettyString(){const e=this.getDateRange(),t=d(e[0]),i=d(e[1]);return a("General_DateRangeFromTo",[t,i])}getDateRange(){const e=(this.dateInPeriod.getDay()+6)%7,t=new Date(this.dateInPeriod.getTime());t.setDate(this.dateInPeriod.getDate()-e);const i=new Date(t.getTime());return i.setDate(t.getDate()+6),[t,i]}containsToday(){return p(this.getDateRange())}}function y(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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(m(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 p(this.getDateRange())}}function w(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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(m(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 p(this.getDateRange())}}function C(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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,i){C(this,"startDate",void 0),C(this,"endDate",void 0),C(this,"childPeriodType",void 0),this.startDate=e,this.endDate=t,this.childPeriodType=i}static getLastNRange(e,t,i){const o=Math.max(parseInt(t.toString(),10)-1,0);if(Number.isNaN(o))throw new Error("Invalid range strAmount");let n=i?m(i):u(),a=new Date(n.getTime());if("day"===e)a.setDate(a.getDate()-o);else if("week"===e)a.setDate(a.getDate()-7*o);else if("month"===e)a.setDate(1),a.setMonth(a.getMonth()-o);else{if("year"!==e)throw new Error(`Unknown period type '${e}'.`);a.setFullYear(a.getFullYear()-o)}if("day"!==e){const t=c.periods[e].parse(a),i=c.periods[e].parse(n);[a]=t.getDateRange(),[,n]=i.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,i){const o=t?m(t):u();let n=new Date(o.getTime()),a=new Date(o.getTime());if("day"===e)n.setDate(n.getDate()-i),a.setDate(a.getDate()-i);else if("week"===e)n.setDate(n.getDate()-7*i),a.setDate(a.getDate()-7*i);else if("month"===e)n.setDate(1),n.setMonth(n.getMonth()-i),a.setDate(1),a.setMonth(a.getMonth()-i);else{if("year"!==e)throw new Error(`Unknown period type '${e}'.`);n.setFullYear(n.getFullYear()-i),a.setFullYear(a.getFullYear()-i)}if("day"!==e){const t=c.periods[e].parse(n),i=c.periods[e].parse(a);[n]=t.getDateRange(),[,a]=i.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 i=k.getLastNRange(t,"2").startDate;return k.getLastNRange(t,e.substring(8),i)}if(/^last/.test(e))return k.getLastNRange(t,e.substring(4));const i=decodeURIComponent(e).split(",");return new k(m(i[0]),m(i[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 p(this.getDateRange())}getDayCount(){return Math.ceil((this.endDate.getTime()-this.startDate.getTime())/864e5)+1}}c.addCustomPeriod("range",k);var D=i("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 V(e){if("string"!==typeof e)return;const t=e.trim();return t&&/^[A-Za-z0-9_]+$/.test(t)?t:void 0}function x(){const{CoreHome:e}=window;return null===e||void 0===e?void 0:e.ReportingMenuStore}function N(){const{CoreHome:e}=window;return null===e||void 0===e?void 0:e.ComparisonStoreInstance}function B(e){var t;if("string"!==typeof e)return;const i=e.trim(),o=N();if(o){const t=o.getSegmentComparisons();if(!i&&t.length)return t[0].title;const n=t.find(t=>t.params.segment===e);if(n)return n.title}if(!i)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,i,o,n){let r="",s="",l="";""!==t&&""!==e&&(l=c.parse(t,e).getPrettyString());const d=a("CoreHome_WebAnalyticsReports")+" - Matomo",u=x();if(u&&i&&o){var m,p,h,g;let e=u.findSubcategory(i,o);e.category||(await u.fetchMenuItems(),e=u.findSubcategory(i,o)),r=null!==(m=null===(p=e)||void 0===p||null===(p=p.category)||void 0===p?void 0:p.name)&&void 0!==m?m:"",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=B(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 i(e){t(...e.detail)}t.wrapper=i,window.addEventListener(e,i)},E.off=function(e,t){t.wrapper&&window.removeEventListener(e,t.wrapper)},E.postEvent=function(e,...t){const i=new CustomEvent(e,{detail:t});window.dispatchEvent(i)},E.getLoginModule=function(){const e=V(E.loginModule);if(e)return e;const t=V(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,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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:L,broadcast:R}=window;function A(e,t){try{return c.parse(e,t),!0}catch(i){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),i=this.stringify(t);this.updateHashToUrl("?"+i)}updateUrl(e,t={}){const i="string"!==typeof e?this.stringify(e):e,o=Object.keys(t).length?this.getFinalHashParams(t,e):{},n=this.stringify(o);let a="?"+i;n.length&&(a=`${a}#?${n}`),window.broadcast.propagateNewPage("",void 0,void 0,void 0,a)}getFinalHashParams(e,t={}){const i="string"!==typeof e?e:this.parse(e),o="string"!==typeof e?t:this.parse(t);return Object.assign({period:o.period||this.parsed.value.period,date:o.date||this.parsed.value.date,segment:o.segment||this.parsed.value.segment},i)}updateLocation(e){M.helper.isReportingPage()?this.updateHash(e):this.updateUrl(e)}getSearchParam(e){const t=window.location.href.split("#"),i=new RegExp(e+"(\\[]|=)");if(t&&t[1]&&i.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 R.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:i,subcategory:o}=this.getMenuPathSuffix(),n=this.getSearchParam("segment")||"";L.updateTitle(t,e,i,o,n)}updatePeriodParamsFromUrl(){const{period:e,date:t}=this.getDateAndPeriodFromUrl();let i=t;if(!A(e,i))return;if(L.period===e&&L.currentDateString===i)return;L.period=e;const o=c.parse(e,i).getDateRange();L.startDateString=d(o[0]),L.endDateString=d(o[1]),"range"===L.period&&(i=`${L.startDateString},${L.endDateString}`),L.currentDateString=i}}const H=new _;var U=H;function q(e,t,i){const o=new Date;i||(i=432e4),o.setTime(o.getTime()+i),document.cookie=`${e}=${t}; expires=${o.toUTCString()}; path=/`}function W(e){const t="; "+document.cookie,i=t.split(`; ${e}=`);if(2==i.length){const e=i.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,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */L.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,i){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=i}}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 i=new te;if(t.withTokenInUrl&&i.withTokenInUrl(),t.errorElement&&i.setErrorElement(t.errorElement),t.redirectOnSuccess&&i.redirectOnSuccess(!0!==t.redirectOnSuccess?t.redirectOnSuccess:void 0),i.setFormat(t.format||"json"),Array.isArray(e))i.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 o=Q(e);let n={};if(o){let t=null;null!==e.segment&&(t=encodeURIComponent(e.segment)),n={segment:t}}i.addParams(Object.assign(Object.assign({module:"API",format:t.format||"json"},e),n),"get")}t.postParams&&i.addParams(t.postParams,"post"),t.headers&&(i.headers=Object.assign(Object.assign({},i.headers),t.headers));let o=!0;return"undefined"===typeof t.createErrorNotification||t.createErrorNotification||(i.useCallbackInCaseOfError(),i.setErrorCallback(null),o=!1),t.abortController&&(i.abortController=t.abortController),t.returnResponseObject&&(i.resolveWithHelper=!0),!1===t.abortable&&(i.abortable=!1),i.send().then(e=>{const t=e instanceof te?e.requestHandle.responseJSON:e,o="API.getBulkRequest"===i.postParams.method&&Array.isArray(t)?t:[t],n=o.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(o||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 i="object"===typeof e&&null!==e&&"status"in e?e.status:null;throw 504===i&&(t="Request was possibly aborted"),429===i&&(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 i=[];for(let o=0;o<e.length;o+=t)i.push(e.slice(o,o+t));return i}handleApiErrorResponseOrCallback(e,t,i){this.loadingElement&&K(this.loadingElement).hide();const o="API.getBulkRequest"===this.postParams.method&&Array.isArray(e)?e:[e],n=o.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,i="toast";K(this.errorElement).length&&e.length&&(K(this.errorElement).show(),t=this.errorElement,i=null);const o=!document.querySelector("#login_form");if(e&&o){const o=window["require"]("piwik/UI"),n=new o.Notification;n.show(e,{placeat:t,context:"error",type:i,id:"ajaxHelper"}),n.scrollToNotification()}}else this.callback&&this.callback(e,t,i)}buildRequestUrl(e){const t=this.mixinDefaultGetParams(e);let i=this.getUrl;if("?"!==i[i.length-1]&&(i+="&"),Object.prototype.hasOwnProperty.call(t,"segment")){const e=t.segment;delete t.segment,null!==e&&"undefined"!==typeof e&&(i=`${i}segment=${e}&`)}return t.date&&(i=`${i}date=${decodeURIComponent(t.date.toString())}&`,delete t.date),i+=K.param(t),i}buildChunkedBulkAjaxCall(e){const t=this.buildRequestUrl(Object.assign({},this.getParams)),i=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:i})),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([]);const i=this.abortController||new AbortController;this.abortController=i;let o=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:()=>{i.abort()}},c=l;let d=c;this.requestHandle=c,this.abortable&&window.globalAjaxQueue.push(c),i.signal.addEventListener("abort",()=>{o&&o.abort()});const u=te.splitIntoChunks(e,t),m=[],p=e=>e>=u.length?Promise.resolve(m):(o=this.buildChunkedBulkAjaxCall(u[e]),new Promise((e,t)=>{o.then((t,i,o)=>{d=o,l.readyState=o.readyState,l.status=o.status,l.statusText=o.statusText||i,Array.isArray(t)?m.push(...t):m.push(t),e(m)}).fail((e,i,o)=>{l.readyState=e.readyState,l.status=e.status,l.statusText=e.statusText||i,t(new X(e,i,o))})}).then(()=>p(e+1)));return p(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:i,errorThrown:o}=e;if(r(),this.errorCallback&&this.errorCallback.apply(this,[t,i,o]),s(t,i),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={},i={}){return te.fetch(e,Object.assign(Object.assign({},i),{},{postParams:t}))}static oneAtATime(e,t){let i=null;return(o,n)=>(i&&i.abort(),i=new AbortController,te.post(Object.assign(Object.assign({},o),{},{method:e}),n,Object.assign(Object.assign({},t),{},{abortController:i})).finally(()=>{i=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 i="string"===typeof e?window.broadcast.getValuesFromUrl(e):e,o=["compareSegments","comparePeriods","compareDates"];Object.keys(i).forEach(e=>{let n=i[e];(-1===o.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();this.requestHandle=this.buildAjaxCall(),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 i=!document.querySelector("#login_form"),o="1"===e.getResponseHeader("X-Matomo-Session-Timed-Out");if(o&&i)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),i={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,i,o)=>{this.handleApiErrorResponseOrCallback(t,i,o),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(i)}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(),i=Object.assign(Object.assign({},t),e);return i}mixinDefaultGetParams(e){const t=U.getSearchParam("segment"),i={idSite:M.idSite?M.idSite.toString():broadcast.getValueFromUrl("idSite"),period:M.period||broadcast.getValueFromUrl("period"),segment:t},o=e,n=Q(o)||Q(this.postParams);return o.token_auth&&(o.token_auth=null,delete o.token_auth),Object.keys(i).forEach(e=>{!this.useGETDefaultParameter(e)||"segment"===e&&n||null!==o[e]&&"undefined"!==typeof o[e]&&""!==o[e]||null!==this.postParams[e]&&"undefined"!==typeof this.postParams[e]&&""!==this.postParams[e]||!i[e]||(o[e]=i[e])}),!this.useGETDefaultParameter("date")||o.date||this.postParams.date||(o.date=M.currentDateString),o}getRequestHandle(){return this.requestHandle}}function ie(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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{$:oe}=window;class ne{constructor(){ie(this,"defaultMinFractionDigits",0),ie(this,"defaultMaxFractionDigits",2)}format(e,t,i,o){if(!oe.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),i>=0){const e=10**i;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 i=(null===e||void 0===e?void 0:e[0].length)||0;const o=a.split(",");o.length>2&&(i=o[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,i).reverse().join(""));r=r.reverse(),c=r.join(",")}if(o>0&&(d=d.replace(/0+$/,""),d.length<o&&d.length<i)){const e=o-d.length;d+=new Array(e+1).join("0")}let m=d?`${c}.${d}`:c;return m=a.replace(/#(?:[.,]#+)*0(?:[,.][0#]+)*/,m),this.replaceSymbols(m)}replaceSymbols(e){const t={".":M.numbers.symbolDecimal,",":M.numbers.symbolGroup,"+":M.numbers.symbolPlus,"-":M.numbers.symbolMinus,"%":M.numbers.symbolPercent};let i="";const o=e.split("");return o.forEach(e=>{let o=e;Object.entries(t).some(([e,t])=>-1!==o.indexOf(e)&&(o=o.replace(e,t),!0)),i+=o}),i}valOrDefault(e,t){return"undefined"===typeof e?t:e}getMaxFractionDigitsForCompactFormat(e){return 1===e?1:0}determineCorrectCompactPattern(e,t){let i=0,o=0,n="";if(Math.round(t)<1e3)return["0",1];for(i=1e3;i<=1e19;i*=10){const r=i+"One",s=i+"Other";if(1===Math.round(t/i)&&""!==(null===e||void 0===e?void 0:e[r])?(o=i,n=r):Math.round(t/i)>=1&&""!==(null===e||void 0===e?void 0:e[s])&&(o=i,n=s),null!==e&&void 0!==e&&e[n]){var a;const o=(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**o/(10*i))<10**o)break}}return[(null===e||void 0===e?void 0:e[n])||"0",o]}formatCompact(e,t,i){var o;const n=(null===(o=e.match(/0/g))||void 0===o?void 0:o.length)||0;let a=t;n>1&&(a/=10**(n-1));const r=this.getMaxFractionDigitsForCompactFormat(n),s=10**r,l=Math.round(i/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("-"),i=e.split(M.numbers.symbolDecimal);return i.forEach((e,t)=>{i[t]=e.replace(/[^0-9]/g,"")}),(t?-1:1)*parseFloat(i.join("."))}formatNumber(e,t,i){return this.format(e,M.numbers.patternNumber,this.valOrDefault(t,this.defaultMaxFractionDigits),this.valOrDefault(i,this.defaultMinFractionDigits))}formatPercent(e,t,i){return this.format(e,M.numbers.patternPercent,this.valOrDefault(t,this.defaultMaxFractionDigits),this.valOrDefault(i,this.defaultMinFractionDigits))}formatCurrency(e,t,i,o){const n=this.format(e,M.numbers.patternCurrency,this.valOrDefault(i,this.defaultMaxFractionDigits),this.valOrDefault(o,this.defaultMinFractionDigits));return n.replace("¤",t)}formatNumberCompact(e){const t=e,[i,o]=this.determineCorrectCompactPattern(M.numbers.patternsCompactNumber||[],t);return Math.round(t)<1e3||"0"===i?this.formatNumber(t,this.getMaxFractionDigitsForCompactFormat(Math.round(t)),0):this.formatCompact(i,o,t)}formatCurrencyCompact(e,t){const i=e,[o,n]=this.determineCorrectCompactPattern(M.numbers.patternsCompactCurrency||[],i);return Math.round(i)<1e3||"0"===o?this.formatCurrency(i,t,this.getMaxFractionDigitsForCompactFormat(Math.round(i)),0):this.formatCompact(o,n,i).replace("¤",t)}formatEvolution(e,t,i,o){if(o)return this.formatPercent(Math.abs(e),t,i);const n=this.formatPercent(e,t,i);return`${e>0?M.numbers.symbolPlus:""}${n}`}calculateAndFormatEvolution(e,t,i){const o=parseInt(t,10),n=parseInt(e,10)-o;let a;a=0===n||Number.isNaN(n)?0:0===o||Number.isNaN(o)?100:n/o*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,i)}}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 i=t.split(":"),o=i[0];i.shift();const n=i.join(":");"undefined"===typeof window.broadcast.popoverHandlers[o]||window.broadcast.isLoginPage()||window.broadcast.popoverHandlers[o](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 i(){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"),i())}),ce=!0),t.off("click.matomoZenMode").on("click.matomoZenMode",()=>{window.Mousetrap.trigger("z")}),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 ue(e,...t){const i=t;return window._pk_externalRawLink?window._pk_externalRawLink(e,i):e}function me(e,...t){if(!e)return"";const i=t.length>0&&t[0]?t[0]:null,o=t.length>1&&t[1]?t[1]:null,n=t.length>2&&t[2]?t[2]:null,a=ue(e,i,o,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 pe(e,t,i){return ae.formatNumber(e,t,i)}function he(e,t,i){return ae.formatPercent(e,t,i)}function ge(e,t,i,o){return ae.formatCurrency(e,t,i,o)}function be(e,t,i,o){return ae.formatEvolution(e,t,i,o)}function fe(e,t,i){return ae.calculateAndFormatEvolution(e,t,i)}
/*!
 * 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.translate=a,t.config.globalProperties.translateOrDefault=r,t.config.globalProperties.externalLink=me,t.config.globalProperties.externalRawLink=ue,t.config.globalProperties.formatNumber=pe,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 i,o;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,i&&o)if(window[e]&&o)try{o(window[e])}finally{i=void 0,o=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,i(r)}finally{i=void 0,o=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)=>{o=e,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 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 i;return e instanceof HTMLElement?e:null===(i=t.instance)||void 0===i?void 0:i.$refs[e]}var De={getRef:ke};const Ee=300;function Pe(e,t=Ee){let i;return function(...o){i&&clearTimeout(i),i=setTimeout(()=>{e.call(this,...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 Te(e){return"undefined"===typeof e?e:JSON.parse(JSON.stringify(e))}const Ve={ref:"root"};function xe(e,t,i,o,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ve,[e.componentWrapper?(Object(D["openBlock"])(),Object(D["createBlock"])(Object(D["resolveDynamicComponent"])(e.componentWrapper),{key:0})):Object(D["createCommentVNode"])("",!0)],512)}var Ne=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}}});Ne.render=xe;var Be=Ne;const Ie={class:"loadingPiwik"};function Me(e,t,i,o,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"},Le=Object(D["createElementVNode"])("span",null,null,-1),Re=Object(D["createElementVNode"])("span",null,null,-1),Ae=Object(D["createElementVNode"])("span",null,null,-1),_e=[Le,Re,Ae];function He(e,t,i,o,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,i,o,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 i={};$(e).addClass("matomo-dropdown-menu");const o=!!$(e).parent().closest(".dropdown-content").length;var n;o&&(i={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(i)},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,i){const o=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,o||e.contains(i.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,i){27===i.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 it(e,t){var i,o;null===(i=t.value)||void 0===i||!i.focused||null!==(o=t.oldValue)&&void 0!==o&&o.focused||setTimeout(()=>{e.focus(),t.value.afterFocus&&t.value.afterFocus()},5)}var ot={mounted(e,t){it(e,t)},updated(e,t){it(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;function at(){const e=nt(this).attr("title")||"";return window.vueSanitize(e.replace(/\n/g,"<br />"))}function rt(e,t){var i,o,n,a,r,s;nt(e).tooltip({track:!0,content:(null===(i=t.value)||void 0===i?void 0:i.content)||at,show:"undefined"!==typeof(null===(o=t.value)||void 0===o?void 0:o.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})}var st={mounted(e,t){setTimeout(()=>rt(e,t))},updated(e,t){setTimeout(()=>rt(e,t))},beforeUnmount(e){try{window.$(e).tooltip("destroy")}catch(t){}}};const lt={ref:"root"};function ct(e,t,i,o,n,a){return Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",lt,[Object(D["renderSlot"])(e.$slots,"default")],512)),[[D["vShow"],e.modelValue]])}var dt=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"))}}});dt.render=ct;var ut=dt;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function mt(e,t,i){var o;e.classList.add("expanded"),null!==(o=t.value)&&void 0!==o&&o.onExpand&&t.value.onExpand(i);const n=e.querySelector(".dropdown.positionInViewport");n&&M.helper.setMarginLeftToBeInViewport(n)}function pt(e,t,i){var o;e.classList.contains("expanded")&&(e.classList.remove("expanded"),null!==(o=t.value)&&void 0!==o&&o.onClosed&&t.value.onClosed(i))}function ht(e,t,i){e.classList.contains("expanded")?pt(e,t,i):mt(e,t,i)}function gt(e,t,i){const o=t.value.isMouseDown&&t.value.hasScrolled;t.value.isMouseDown=!1,t.value.hasScrolled=!1,o||e.contains(i.target)||pt(e,t,i)}function bt(e){e.value.hasScrolled=!0}function ft(e){e.value.isMouseDown=!0,e.value.hasScrolled=!1}function vt(e,t,i){"Escape"===i.key&&(t.value.isMouseDown=!1,t.value.hasScrolled=!1,pt(e,t,i))}const Ot=document.documentElement;var yt={mounted(e,t){t.value.isMouseDown=!1,t.value.hasScrolled=!1,t.value.onClickOnExpander=ht.bind(null,e,t),t.value.onEscapeHandler=vt.bind(null,e,t),t.value.onMouseDown=ft.bind(null,t),t.value.onClickOutsideElement=gt.bind(null,e,t),t.value.onScroll=bt.bind(null,t),setTimeout(()=>{const e=De.getRef(t.value.expander,t);e&&e.addEventListener("click",t.value.onClickOnExpander)}),Ot.addEventListener("keyup",t.value.onEscapeHandler),Ot.addEventListener("mousedown",t.value.onMouseDown),Ot.addEventListener("mouseup",t.value.onClickOutsideElement),Ot.addEventListener("scroll",t.value.onScroll)},unmounted(e,t){const i=De.getRef(t.value.expander,t);i&&Ot.removeEventListener("click",t.value.onClickOnExpander),Ot.removeEventListener("keyup",t.value.onEscapeHandler),Ot.removeEventListener("mousedown",t.value.onMouseDown),Ot.removeEventListener("mouseup",t.value.onClickOutsideElement),Ot.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 jt(e){e.classList.add("expanded");const t=e.querySelector(".dropdown.positionInViewport");t&&M.helper.setMarginLeftToBeInViewport(t)}function wt(e){e.classList.remove("expanded")}function St(e,t){e.contains(t.target)||e.classList.remove("expanded")}function Ct(e,t){27===t.which&&e.classList.remove("expanded")}const kt=document.documentElement;var Dt={mounted(e,t){t.value.onMouseEnter=jt.bind(null,e),t.value.onMouseLeave=wt.bind(null,e),t.value.onClickOutsideElement=St.bind(null,e),t.value.onEscapeHandler=Ct.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),kt.addEventListener("keyup",t.value.onEscapeHandler),kt.addEventListener("mouseup",t.value.onClickOutsideElement)},unmounted(e,t){const i=De.getRef(t.value.expander,t);i&&i.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{$:Et}=window;var Pt={mounted(e,t){const i=Et(e),{sensitiveData:o}=t.value,n=t.value.showCharacters||6,r=t.value.clickElementSelector||i;let s="";function l(){i.html(o),Et(r).css({cursor:""}),Et(r).tooltip("destroy")}n>0&&(s+=o.slice(0,n)),s+=o.slice(n).replace(/./g,"*"),i.html(s),Et(r).tooltip({content:a("CoreHome_ClickToSeeFullInformation"),items:"*",track:!0}),Et(r).one("click",l),Et(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{$:Tt}=window;var Vt={mounted(e){const t=Tt(e);!t.attr("data-target")&&t.attr("data-activates")&&t.attr("data-target",t.attr("data-activates"));const i=t.attr("data-target");i&&Tt("#"+i).length&&t.dropdown({inDuration:300,outDuration:225,constrainWidth:!1,belowOrigin:!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{$:xt}=window;function Nt(e,t){e.value.focusedElement!==t.target&&(e.value.focusedElement=t.target,xt(t.target).select())}function Bt(e){const t=document.createRange();t.selectNode(e.target);const i=window.getSelection();i&&i.rangeCount>0&&i.removeAllRanges(),i&&i.addRange(t)}function It(e){delete e.value.focusedElement}var Mt={mounted(e,t){const i=e.tagName.toLowerCase();t.value.elementSupportsSelect="textarea"===i,t.value.elementSupportsSelect?(t.value.onFocusHandler=Nt.bind(null,t),t.value.onBlurHandler=It.bind(null,t),e.addEventListener("focus",t.value.onFocusHandler),e.addEventListener("blur",t.value.onBlurHandler)):(t.value.onClickHandler=Bt,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 Ft(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 i=e.parentElement;if(i){const e=i.getElementsByTagName("i")[0];e&&(e.classList.remove("copyToClipboardIcon"),e.classList.add("copyToClipboardIconCheck"));const t=i.getElementsByClassName("copyToClipboardCopiedDiv")[0];t&&(t.style.display="inline-block",setTimeout(()=>{t.style.display="none"},2500))}}}function Lt(e,t){if(t.value.transitionOpen){const i=e.parentElement;if(i){const e=i.getElementsByTagName("i")[0];e&&(e.classList.remove("copyToClipboardIconCheck"),e.classList.add("copyToClipboardIcon"))}t.value.transitionOpen=!1}else t.value.transitionOpen=!0}var Rt={mounted(e,t){const i=e.tagName.toLowerCase();if("pre"===i){const i=document.createElement("button");i.setAttribute("type","button"),i.className="copyToClipboardButton";const o=document.createElement("div");o.className="copyToClipboardPositionDiv";const n=document.createElement("i");n.className="copyToClipboardIcon",i.appendChild(n);const r=document.createElement("span");r.className="copyToClipboardSpan",r.innerHTML=a("General_Copy"),i.appendChild(r),o.appendChild(i);const s=document.createElement("div");s.className="copyToClipboardCopiedDiv",s.innerHTML=a("General_CopiedToClipboard"),o.appendChild(s);const l=e.parentElement;l&&(l.classList.add("copyToClipboardWrapper"),l.appendChild(o)),t.value.onClickHandler=Ft.bind(null,e),i.addEventListener("click",t.value.onClickHandler),t.value.onTransitionEndHandler=Lt.bind(null,e,t),i.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 At(){const e=document.getElementById("mobile-left-menu");if(e)try{window.$(e).sidenav("open")}catch(t){}}function _t(){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(i){}}var Ht={mounted(e,t){if(!t.value.activator)return;const i=document.getElementById("secondNavBar"),o=e=>{i&&i.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:()=>{o(!0)},onCloseStart:()=>{o(!1)}})}}e.classList.contains("collapsible")&&window.$(e).collapsible()})}};const $t={key:0,class:"title",tabindex:"6"},Ut=["href","title"],qt={class:"iconsBar"},Wt=["href","title"],zt=Object(D["createElementVNode"])("span",{class:"icon-help"},null,-1),Gt=[zt],Kt=["title"],Yt=Object(D["createElementVNode"])("span",{class:"icon-info"},null,-1),Qt=[Yt],Jt={key:2,class:"ratingIcons"},Xt={class:"inlineHelp"},Zt=["innerHTML"],ei=["innerHTML"],ti=["href"];function ii(e,t,i,o,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",$t,[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,Ut)):Object(D["createCommentVNode"])("",!0),Object(D["withDirectives"])(Object(D["createElementVNode"])("span",qt,[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")},Gt,8,Wt)):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")},Qt,10,Kt)):Object(D["createCommentVNode"])("",!0),e.showRateFeature?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Jt,[(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",Xt,[Object(D["createElementVNode"])("div",{innerHTML:e.$sanitize(e.actualInlineHelp)},null,8,Zt),""!=e.reportGenerated?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,class:"helpDate",innerHTML:e.$sanitize(e.reportGenerated)},null,8,ei)):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,ti)):Object(D["createCommentVNode"])("",!0)],512),[[D["vShow"],e.showInlineHelp]])],544)}var oi=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 o=e.querySelector(".title .inlineHelp");if(!o&&null!==(t=e.parentElement)&&void 0!==t&&t.nextElementSibling&&(o=e.parentElement.nextElementSibling.querySelector(".reportDocumentation")),o){var i;const e=null===(i=o.getAttribute("data-content"))||void 0===i?void 0:i.trim();e&&e.length&&(this.actualInlineHelp=`<p>${e}</p>`,setTimeout(()=>o.remove(),0))}}var o;this.actualFeatureName||(this.actualFeatureName=null===(o=e.querySelector(".title"))||void 0===o?void 0:o.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"):""}}});oi.render=ii;var ni=oi;const ai={class:"card-content"},ri={key:0,class:"card-title"},si={key:1,class:"card-title"},li={ref:"content"},ci={key:0,class:"card-image hide-on-med-and-down"},di=["src","alt"];function ui(e,t,i,o,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",ai,[!e.contentTitle||e.actualFeature||e.helpUrl||e.actualHelpText||e.editUrl?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("h2",ri,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",si,[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",li,[Object(D["renderSlot"])(e.$slots,"default")],512)]),e.imageUrl?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ci,[Object(D["createElementVNode"])("img",{src:e.imageUrl,alt:e.actualImageAltText},null,8,di)])):Object(D["createCommentVNode"])("",!0)],2)}let mi=null;const{$:pi}=window;var hi=Object(D["defineComponent"])({props:{contentTitle:String,feature:String,helpUrl:String,editUrl:String,helpText:String,anchor:String,imageUrl:String,imageAltText:String},components:{EnrichedHeadline:ni},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,pi(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===mi&&(mi=document.querySelector("#content.admin"));let i=null;if(mi&&(i=mi.offsetTop),i||0===i){const t=e.closest(".widgetLoader"),o=t?t.offsetTop:e.offsetTop;o-i<17&&(e.style.marginTop="0")}},methods:{decode(e){return M.helper.htmlDecode(e)}}});hi.render=ui;var gi=hi;const bi={key:0,ref:"root",class:"matomo-comparisons"},fi={class:"comparison-type"},vi=["title"],Oi=["href"],yi=["title"],ji={class:"comparison-period-label"},wi=["onClick"],Si=["title"],Ci={class:"loadingPiwik",style:{display:"none"}};function ki(e,t,i,o,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",bi,[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,i)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"comparison card",key:t.index},[Object(D["createElementVNode"])("div",fi,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,Oi)],8,vi),(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.periodComparisons,i=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:"comparison-period",key:i.index,title:e.getComparisonTooltip(t,i)},[Object(D["createElementVNode"])("span",{class:"comparison-dot",style:Object(D["normalizeStyle"])({"background-color":e.getSeriesColor(t,i)})},null,4),Object(D["createElementVNode"])("span",ji,Object(D["toDisplayString"])(i.title)+" ("+Object(D["toDisplayString"])(e.getComparisonPeriodType(i))+") ",1)],8,yi))),128)),e.segmentComparisons.length>1?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:0,class:"remove-button",onClick:t=>e.removeSegmentComparison(i)},[Object(D["createElementVNode"])("span",{class:"icon icon-close",title:e.translate("General_ClickToRemoveComp")},null,8,Si)],8,wi)):Object(D["createCommentVNode"])("",!0)]))),128)),Object(D["createElementVNode"])("div",Ci,[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 Di(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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 Ei{get state(){return Object(D["readonly"])(this.segmentState)}constructor(){Di(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 Pi=new Ei;function Ti(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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 Vi=8,xi=3;function Ni(e){return e?Array.isArray(e)?e:[e]:[]}class Bi{constructor(){Ti(this,"privateState",Object(D["reactive"])({comparisonsDisabledFor:[]})),Ti(this,"state",Object(D["readonly"])(this.privateState)),Ti(this,"colors",{}),Ti(this,"segmentComparisons",Object(D["computed"])(()=>this.parseSegmentComparisons())),Ti(this,"periodComparisons",Object(D["computed"])(()=>this.parsePeriodComparisons())),Ti(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.getComparisons(),()=>M.postEvent("piwikComparisonsChanged"),{deep:!0})}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,i=0){const o=this.getComparisonSeriesIndex(t.index,e.index)%Vi;if(0===i)return this.colors["series"+o];const n=i%xi;return this.colors[`series${o}-shade${n}`]}getSeriesColorName(e,t){let i="series"+e%Vi;return t>0&&(i+="-shade"+t%xi),i}isComparisonEnabled(){return this.isEnabled.value}getIndividualComparisonRowIndices(e){const t=this.getSegmentComparisons().length,i=e%t,o=Math.floor(e/t);return{segmentIndex:i,periodIndex:o}}getComparisonSeriesIndex(e,t){const i=this.getSegmentComparisons().length;return e*i+t}getAllComparisonSeries(){const e=[];let t=0;return this.getPeriodComparisons().forEach(i=>{this.getSegmentComparisons().forEach(o=>{e.push({index:t,params:Object.assign(Object.assign({},o.params),i.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 i={};0===e&&(i.segment=t[0].params.segment),this.updateQueryParamsFromComparisons(t,this.periodComparisons.value,i)}removeSegmentComparisonByDefinition(e){if(!this.isComparisonEnabled())throw new Error("Comparison disabled.");let t=null;this.getSegmentComparisons().forEach((i,o)=>{i&&i.params&&i.params.segment===e&&(t=o)}),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,i={}){const o={},n={};let a=!1,r=!1;e.forEach(e=>{a?o[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(o),comparePeriods:s,compareDates:l},d=M.helper.isReportingPage()?U.hashParsed.value:U.urlParsed.value;U.updateLocation(Object.assign(Object.assign(Object.assign({},d),c),i))}getAllSeriesColors(){const{ColorManager:e}=M;if(!e)return[];const t=[];for(let i=0;i<Vi;i+=1){t.push("series"+i);for(let e=0;e<xi;e+=1)t.push(`series${i}-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}=Pi.state,t=[...Ni(U.parsed.value.compareSegments)];t.unshift(U.parsed.value.segment||"");const i=[];return t.forEach((t,o)=>{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")),i.push({params:{segment:t},title:M.helper.htmlDecode(r),index:o})}),i}parsePeriodComparisons(){const e=[...Ni(U.parsed.value.comparePeriods)],t=[...Ni(U.parsed.value.compareDates)];e.unshift(U.parsed.value.period),t.unshift(U.parsed.value.date);const i=[];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(o){r=a("General_Error")}i.push({params:{date:t[n],period:e[n]},title:r,index:n})}return i}checkEnabledForCurrentPage(){const e=U.parsed.value.category||U.parsed.value.module,t=U.parsed.value.subcategory||U.parsed.value.action,i=`${e}.${t}`,o=-1===this.privateState.comparisonsDisabledFor.indexOf(i)&&-1===this.privateState.comparisonsDisabledFor.indexOf(e+".*");return document.documentElement.classList.toggle("comparisonsDisabled",!o),o}}var Ii=new Bi,Mi=Object(D["defineComponent"])({props:{},components:{MatomoLoader:Ue},directives:{Tooltips:st},data(){return{comparisonTooltips:null}},setup(){const e=Object(D["computed"])(()=>Ii.isComparing()&&!window.broadcast.isNoDataPage()),t=Object(D["computed"])(()=>Ii.getSegmentComparisons()),i=Object(D["computed"])(()=>Ii.getPeriodComparisons()),o=Ii.getSeriesColor.bind(Ii);function n(){const e=window.$(this).attr("title");return e?window.vueSanitize(e.replace(/\n/g,"<br />")):e}return{isComparing:e,segmentComparisons:t,periodComparisons:i,getSeriesColor:o,transformTooltipContent:n}},methods:{comparisonHasSegment(e){return"undefined"!==typeof e.params.segment},removeSegmentComparison(e){window.$(this.$refs.root).tooltip("destroy"),Ii.removeSegmentComparison(e)},getComparisonPeriodType(e){const{period:t}=e.params;if("range"===t)return a("CoreHome_PeriodRange");const i=a(`Intl_Period${t.substring(0,1).toUpperCase()}${t.substring(1)}`);return i.substring(0,1).toUpperCase()+i.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,!Ii.isComparing())return;const e=Ii.getPeriodComparisons(),t=Ii.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(i=>{this.comparisonTooltips={},e.forEach(e=>{this.comparisonTooltips[e.index]={},t.forEach(t=>{const o=this.generateComparisonTooltip(i,e,t);this.comparisonTooltips[e.index][t.index]=o})})})},generateComparisonTooltip(e,t,i){if(!e.reportData.comparisons)return"";const o=Ii.getComparisonSeriesIndex(t.index,0),n=e.reportData.comparisons[o],r=Ii.getComparisonSeriesIndex(t.index,i.index),s=e.reportData.comparisons[r],l=e.reportData.comparisons[i.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()}});Mi.render=ki;var Fi=Mi;const Li={ref:"root",class:"menuDropdown"},Ri=["title"],Ai=["innerHTML"],_i=Object(D["createElementVNode"])("span",{class:"icon-chevron-down reporting-menu-sub-icon"},null,-1),Hi={class:"items"},$i={key:0,class:"search"},Ui=["placeholder"],qi=["title"],Wi=["title"];function zi(e,t,i,o,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",Li,[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,Ai),_i],8,Ri),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",Hi,[e.showSearch&&e.showItems?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",$i,[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,Ui),[[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,qi),[[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,Wi),[[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{$:Gi}=window;var Ki=Object(D["defineComponent"])({props:{menuTitle:String,tooltip:String,showSearch:Boolean,menuTitleChangeOnClick:Boolean},directives:{FocusAnywhereButHere:tt,FocusIf:ot},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,Gi(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();Gi(this.$refs.root).find(".item").each((e,i)=>{const o=Gi(i);-1===o.text().toLowerCase().indexOf(t)?o.hide():o.show()})}}});Ki.render=zi;var Yi=Ki;const Qi={ref:"root"};function Ji(e,t,i,o,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Qi,null,512)}const Xi=1,{$:Zi}=window;var eo=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 i=Object(D["ref"])(null);function o(t,i){const o=t.children("a"),{selectedDateStart:n,selectedDateEnd:a}=e,r=i.getTime(),s=!!(e.persistentHighlightedDateStart&&e.persistentHighlightedDateEnd&&i>=e.persistentHighlightedDateStart&&i<=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&&i>=e.highlightedDateStart&&i<=e.highlightedDateEnd?(t.addClass("ui-state-hover"),o.length&&o.addClass("ui-state-hover")):(t.removeClass("ui-state-hover"),o.removeClass("ui-state-hover")),s?(t.addClass("ui-datepicker-persistent-highlight"),o.length&&o.addClass("ui-datepicker-persistent-highlight")):(t.removeClass("ui-datepicker-persistent-highlight"),o.removeClass("ui-datepicker-persistent-highlight"))}function n(e,t,i){if(e.hasClass("ui-datepicker-other-month"))return a(e,t,i);const o=parseInt(e.children("a,span").text(),10);return new Date(i,t,o)}function a(e,t,i){let o;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 o=n(s,t,i),o.setDate(r.index(e)-r.index(s)+1),o}const s=a.children("td:not(.ui-datepicker-other-month)").last();return o=n(s,t,i),o.setDate(o.getDate()+r.index(e)-r.index(s)),o}function r(){const e=Zi(i.value),t=e.find("td[data-month]"),o=parseInt(t.attr("data-month"),10),n=parseInt(t.attr("data-year"),10);return[o,n]}function s(){const e=Zi(i.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(){o(Zi(this),c),c.setDate(c.getDate()+1)}))}function l(){if(!e.viewDate)return!1;let t;if("string"===typeof e.viewDate)try{t=m(e.viewDate)}catch(a){return!1}else t=e.viewDate;const o=Zi(i.value),n=r();return(n[0]!==t.getMonth()||n[1]!==t.getFullYear())&&(o.datepicker("setDate",t),!0)}function c(){const t=Zi(i.value),o=t.find(".ui-datepicker-month")[0];o&&(o.disabled=e.disableMonthDropdown||!!e.disabled);const n=t.find(".ui-datepicker-year")[0];n&&(n.disabled=!!e.disabled)}function d(){const t=Zi(i.value),o=e.disabled?-1:0;t.find("a, select").attr("tabindex",o),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=Zi(i.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 p(){const t=Zi(i.value),o=e.stepMonths||Xi;if(t.datepicker("option","stepMonths")===o)return!1;const n=Zi(".ui-datepicker-month",t).val(),a=Zi(".ui-datepicker-year",t).val();return t.datepicker("option","stepMonths",o).datepicker("setDate",new Date(a,n)),u(),!0}function h(){if(!Zi(this).hasClass("ui-state-hover"))return;const e=Zi(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 i=!1;[e=>e.selectedDateStart,e=>e.selectedDateEnd,e=>e.persistentHighlightedDateStart,e=>e.persistentHighlightedDateEnd,e=>e.highlightedDateStart,e=>e.highlightedDateEnd].forEach(o=>{if(i)return;const n=o(e),a=o(t);!n&&a&&(i=!0),n&&!a&&(i=!0),n&&a&&n.getTime()!==a.getTime()&&(i=!0)}),e.viewDate!==t.viewDate&&l()&&(i=!0),e.stepMonths!==t.stepMonths&&p(),e.disableMonthDropdown!==t.disableMonthDropdown&&c(),e.disabled!==t.disabled&&(c(),d()),i&&s()}),Object(D["onMounted"])(()=>{const o=Zi(i.value),a=e.options||{},m=Object.assign(Object.assign(Object.assign({},M.getBaseDatePickerOptions()),a),{},{onChangeMonthYear:()=>{setTimeout(()=>{u()})}});o.datepicker(m),o.on("mouseover","tbody td a",e=>{e.originalEvent&&s()}),o.on("mouseenter","tbody td",(function(){const e=r(),i=Zi(this),o=n(i,e[0],e[1]);t.emit("cellHover",{date:o,$cell:i})})),o.on("mouseout","tbody td a",()=>{s()}),o.on("mouseleave","table",()=>t.emit("cellHoverLeave")).on("mouseenter","thead",()=>t.emit("cellHoverLeave")),o.on("click","tbody td.ui-datepicker-other-month",h),o.on("click",e=>{e.preventDefault();const t=Zi(e.target).closest("a");(t.is(".ui-datepicker-next")||t.is(".ui-datepicker-prev"))&&g()}),o.on("click","td[data-month]",e=>{const i=Zi(e.target).closest("td"),o=parseInt(i.attr("data-month"),10),n=parseInt(i.attr("data-year"),10),a=parseInt(i.children("a,span").text(),10);t.emit("dateSelect",{date:new Date(n,o,a)})});const b=p();l(),c(),b||u(),d(),s()}),{root:i}}});eo.render=Ji;var to=eo;const io={class:"dateRangePicker"},oo={id:"calendarRangeFrom"},no={class:"dateRangePicker-label"},ao=["disabled"],ro={id:"calendarRangeTo"},so={class:"dateRangePicker-label"},lo=["disabled"];function co(e,t,i,o,n,a){const r=Object(D["resolveComponent"])("DatePicker");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",io,[Object(D["createElementVNode"])("div",oo,[Object(D["createElementVNode"])("h6",no,[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,ao),[[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",ro,[Object(D["createElementVNode"])("h6",so,[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,lo),[[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 uo="YYYY-MM-DD";var mo=Object(D["defineComponent"])({name:"DateRangePicker",props:{startDate:String,endDate:String,disabled:Boolean},components:{DatePicker:to},data(){let e=null;try{this.startDate&&(e=m(this.startDate))}catch(i){}let t=null;try{this.endDate&&(t=m(this.endDate))}catch(i){}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.setStartRangeDateFromStr(this.startDate)},endDate(){this.endDateText=this.endDate,this.setEndRangeDateFromStr(this.endDate)}},mounted(){this.rangeChanged()},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})},setStartRangeDateFromStr(e){this.startDateInvalid=!0;let t=null;try{e&&e.length===uo.length&&(t=m(e))}catch(i){}t&&(this.fromPickerSelectedDate=t,this.startDateInvalid=!1,this.rangeChanged())},setEndRangeDateFromStr(e){this.endDateInvalid=!0;let t=null;try{e&&e.length===uo.length&&(t=m(e))}catch(i){}t&&(this.toPickerSelectedDate=t,this.endDateInvalid=!1,this.rangeChanged())},rangeChanged(){this.$emit("rangeChange",{start:this.fromPickerSelectedDate?d(this.fromPickerSelectedDate):null,end:this.toPickerSelectedDate?d(this.toPickerSelectedDate):null})}}});mo.render=co;var po=mo;function ho(e,t,i,o,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 go=" ",bo=["custom","previousPeriod","previousYear"],fo=[{key:"custom",value:a("General_Custom")},{key:"previousPeriod",value:a("General_PreviousPeriod").replace(/\s+/,go)},{key:"previousYear",value:a("General_PreviousYear").replace(/\s+/,go)}];function vo(){return new Date(window.piwik.minDateYear,window.piwik.minDateMonth-1,window.piwik.minDateDay)}function Oo(){return new Date(window.piwik.maxDateYear,window.piwik.maxDateMonth-1,window.piwik.maxDateDay)}const yo="range";function jo(e){return"[object Date]"===Object.prototype.toString.call(e)&&!Number.isNaN(e.getTime())}function wo(e){return"day"===e||"week"===e||"month"===e||"year"===e}var So=Object(D["defineComponent"])({props:{period:{type:String,required:!0},date:[String,Date],disabled:Boolean},components:{DatePicker:to},emits:["select"],setup(e,t){const i=Object(D["ref"])(e.date),o=Object(D["ref"])([null,null]),n=Object(D["ref"])([null,null]),a=Object(D["ref"])(null),r=vo(),s=Oo();function l(t){const i=c.get(e.period).parse(t).getDateRange();return i[0]=r<i[0]?i[0]:r,i[1]=s>i[1]?i[1]:s,i}function d(e,t){if(!e||!t||e.getTime()>=t.getTime())return[null,null];const i=new Date(e);i.setDate(i.getDate()+1);const o=new Date(t);return o.setDate(o.getDate()-1),i.getTime()>o.getTime()?[null,null]:[i,o]}function u(e){if(!e)return void(n.value=[null,null]);const t=l(e);n.value=d(t[0],t[1])}function p(t,i){const o=t<r||t>s,n=i.hasClass("ui-datepicker-other-month")&&("month"===e.period||"day"===e.period);a.value=o||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 o.value=[null,null],n.value=[null,null],a.value=null,void(i.value=null);o.value=l(e.date),u(e.date),a.value=null,i.value=m(e.date)}return Object(D["watch"])(e,b),b(),{selectedDates:o,committedBetweenHighlightDates:n,highlightedDates:a,viewDate:i,onHoverNormalCell:p,onHoverLeaveNormalCells:h,onDateSelected:g}}});So.render=ho;var Co=So;const ko={key:0},Do=["data-notification-instance-id"],Eo={key:1},Po={class:"notification-body"},To=["innerHTML"],Vo={key:1};function xo(e,t,i,o,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",ko,[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",Eo,Object(D["toDisplayString"])(e.title),1)):Object(D["createCommentVNode"])("",!0),Object(D["createElementVNode"])("div",Po,[e.message?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.message)},null,8,To)):Object(D["createCommentVNode"])("",!0),e.message?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Vo,[Object(D["renderSlot"])(e.$slots,"default")]))])],14,Do)]),_:3},8,["name"])])]),_:3},8,["name"])]))]),_:3},8,["name"])}const{$:No}=window;var Bo=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&&No(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})}}});Bo.render=xo;var Io=Bo;const Mo={class:"notification-group"},Fo=["innerHTML"];function Lo(e,t,i,o,n,a){const r=Object(D["resolveComponent"])("Notification");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Mo,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.notifications,(t,i)=>(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:t.id||"no-id-"+i,"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:i=>e.removeNotification(t.id)},{default:Object(D["withCtx"])(()=>[Object(D["createElementVNode"])("div",{innerHTML:e.$sanitize(t.message)},null,8,Fo)]),_:2},1032,["notification-id","title","context","type","noclear","toast-length","style","animate","message","notification-instance-id","css-class","onClosed"]))),128))])}function Ro(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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{$:Ao}=window;class _o{constructor(){Ro(this,"privateState",Object(D["reactive"])({notifications:[]})),Ro(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=Ao('[data-role="notification"]'),t=[];e.each((i,o)=>{const n=Ao(o),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,i="#notificationContainer";if(e.placeat)i=e.placeat;else{const e=".modal.open .modal-content",o=document.querySelector(e);o&&(o.querySelector("#modalNotificationContainer")||Ao(o).prepend('<div id="modalNotificationContainer"/>'),i=e+" #modalNotificationContainer",t=this.prependNotification)}const o=e.group||(i?i.toString():"");this.initializeNotificationContainer(i,o);const n=(this.nextNotificationId+=1).toString();return t.call(this,Object.assign(Object.assign({},e),{},{noclear:!!e.noclear,group:o,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?Ao(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 i=document.createElement("div");i.style.position="absolute",i.style.top=t.offset().top+"px",i.style.left=t.offset().left+"px",i.style.zIndex="1000",document.body.appendChild(i);const o=ve({render:()=>Object(D["createVNode"])(Io,Object.assign(Object.assign({},e),{},{notificationId:e.id,type:"toast",onClosed:()=>{o.unmount()}}))});o.mount(i)}initializeNotificationContainer(e,t){if(!e)return;const i=Ao(e);if(i.children(".notification-group").length)return;const o=window.CoreHome.NotificationGroup,n=ve({template:'<NotificationGroup :group="group"></NotificationGroup>',data:()=>({group:t})});n.component("NotificationGroup",o),n.mount(i[0])}checkMessage(e){if(!e)throw new Error("No message given, cannot display notification")}}const Ho=new _o;var $o=Ho;Ao(()=>Ho.parseNotificationDivs());var Uo=Object(D["defineComponent"])({props:{group:String},components:{Notification:Io},computed:{notifications(){return $o.state.notifications.filter(e=>this.group?this.group===e.group:!e.group)}},methods:{removeNotification(e){$o.remove(e)}}});Uo.render=Lo;var qo=Uo;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const Wo=Object(D["createElementVNode"])("span",{class:"icon-help"},null,-1),zo=[Wo];function Go(e,t,i,o,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))},zo)}const Ko="reportingMenu-help";var Yo=Object(D["defineComponent"])({props:{message:{type:String,required:!0},name:{type:String,required:!0}},data(){return{currentName:""}},methods:{showHelp(){if(""!==this.currentName)return $o.remove(Ko),void(this.currentName="");$o.show({context:"info",id:Ko,type:"help",noclear:!0,class:"help-notification",message:this.message,placeat:"#notificationContainer",prepend:!0}),""!==this.name&&(this.currentName=this.name)}}});Yo.render=Go;var Qo=Yo;function Jo(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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 Xo{constructor(){Jo(this,"state",Object(D["reactive"])({initialSites:[],isInitialized:!1})),Jo(this,"stateFiltered",Object(D["reactive"])({initialSites:[],isInitialized:!1,excludedSites:[],onlySitesWithAdminAccess:!1,onlySitesWithAtLeastWriteAccess:!1,siteTypesToExclude:[]})),Jo(this,"currentRequestAbort",null),Jo(this,"limitRequest",void 0),Jo(this,"initialSites",Object(D["computed"])(()=>Object(D["readonly"])(this.state.initialSites))),Jo(this,"initialSitesFiltered",Object(D["computed"])(()=>Object(D["readonly"])(this.stateFiltered.initialSites)))}isFiltered(e=!1,t=[],i=!1,o=[]){return t.length>0||e||i||o.length>0}matchesCurrentFilteredState(e=!1,t=[],i=!1,o=[]){return!this.stateFiltered.isInitialized&&!this.isFiltered(e,t,i,o)||this.stateFiltered.isInitialized&&t.length===this.stateFiltered.excludedSites.length&&t.every((e,t)=>e===this.stateFiltered.excludedSites[t])&&e===this.stateFiltered.onlySitesWithAdminAccess&&i===this.stateFiltered.onlySitesWithAtLeastWriteAccess&&o.length===this.stateFiltered.siteTypesToExclude.length&&o.every((e,t)=>e===this.stateFiltered.siteTypesToExclude[t])}loadInitialSites(e=!1,t=[],i=!1,o=[]){return this.state.isInitialized&&!this.isFiltered(e,t,i,o)?Promise.resolve(Object(D["readonly"])(this.state.initialSites)):this.stateFiltered.isInitialized&&this.matchesCurrentFilteredState(e,t,i,o)?Promise.resolve(Object(D["readonly"])(this.stateFiltered.initialSites)):this.isFiltered(e,t,i,o)?this.searchSite("%",e,t,i,o).then(n=>(this.stateFiltered.isInitialized=!0,this.stateFiltered.excludedSites=t,this.stateFiltered.onlySitesWithAdminAccess=e,this.stateFiltered.onlySitesWithAtLeastWriteAccess=i,this.stateFiltered.siteTypesToExclude=o,null!==n&&(this.stateFiltered.initialSites=n),n)):this.state.isInitialized?Promise.resolve(Object(D["readonly"])(this.state.initialSites)):this.searchSite("%",e,t,i,o).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,i=[],o=!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":o&&(s="write"),this.currentRequestAbort=new AbortController,te.fetch({method:"SitesManager.getSitesWithMinimumAccess",permission:s,limit:r,pattern:e,sitesToExclude:i,siteTypesToExclude:n},{abortController:this.currentRequestAbort,abortable:!1})}).then(e=>e?this.processWebsitesList(e):null).finally(()=>{this.currentRequestAbort=null})):this.loadInitialSites(t,i,o,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 Zo=new Xo;const en=["value","name"],tn=["title"],on=["textContent"],nn={key:1,class:"placeholder"},an={class:"dropdown"},rn={class:"custom_select_search"},sn=["placeholder"],ln={key:0},cn={class:"custom_select_container"},dn=["onClick"],un=["innerHTML","href","title"],mn={class:"custom_select_ul_list"},pn={class:"noresult"},hn={key:1};function gn(e,t,i,o,n,a){var r,s,l,c;const d=Object(D["resolveComponent"])("AllSitesLink"),u=Object(D["resolveDirective"])("tooltips"),m=Object(D["resolveDirective"])("focus-if"),p=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,en)):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,on)):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",nn,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,tn)),[[u]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",an,[Object(D["withDirectives"])(Object(D["createElementVNode"])("div",rn,[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,sn),[[D["vModelText"],e.searchTerm],[m,{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",ln,[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",cn,[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,(i,o)=>Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{onClick:t=>e.switchSite(Object.assign(Object.assign({},i),{},{id:i.idsite}),t),key:o},[Object(D["createElementVNode"])("a",{onClick:t[6]||(t[6]=e=>e.preventDefault()),innerHTML:e.$sanitize(e.getMatchedSiteName(i.name)),tabindex:"4",href:e.getUrlForSiteId(i.idsite),title:i.name},null,8,un)],8,dn)),[[D["vShow"],!(!e.showSelectedSite&&""+e.activeSiteId===""+i.idsite)]])),128))]),Object(D["withDirectives"])(Object(D["createElementVNode"])("ul",mn,[Object(D["createElementVNode"])("li",null,[Object(D["createElementVNode"])("div",pn,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",hn,[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)),[[p,{blur:e.onBlur}]])}const bn=["innerHTML","href"];function fn(e,t,i,o,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,bn)])}var vn=Object(D["defineComponent"])({props:{href:String,allSitesText:String},emits:["click"],methods:{onClick(e){this.$emit("click",e)}}});vn.render=fn;var On=vn,yn=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:On},directives:{FocusAnywhereButHere:tt,FocusIf:ot,Tooltips:st},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=Zo.matchesCurrentFilteredState(this.onlySitesWithAdminAccess,this.sitesToExclude?this.sitesToExclude:[],this.onlySitesWithAtLeastWriteAccess,this.siteTypesToExclude?this.siteTypesToExclude:[])&&Zo.initialSitesFiltered.value&&Zo.initialSitesFiltered.value.length?Zo.initialSitesFiltered.value:Zo.initialSites.value;return e&&e.length>1},firstSiteName(){const e=Zo.initialSitesFiltered.value&&Zo.initialSitesFiltered.value.length?Zo.initialSitesFiltered.value:Zo.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 i=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey;t&&i&&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&&Zo.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 i=this.htmlEntities(e.substring(0,t)),o=this.htmlEntities(e.substring(t+this.searchTerm.length));return`${i}<span class="autocompleteMatched">${this.searchTerm}</span>${o}`},loadInitialSites(){return Zo.loadInitialSites(this.onlySitesWithAdminAccess,this.sitesToExclude?this.sitesToExclude:[],this.onlySitesWithAtLeastWriteAccess,this.siteTypesToExclude?this.siteTypesToExclude:[]).then(e=>{this.sites=e||[]})},searchSite(e){this.isLoading=!0,Zo.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})),i=U.stringify(Object.assign(Object.assign({},U.hashParsed.value),{},{segment:"",idSite:e}));return`?${t}#?${i}`},htmlEntities(e){return M.helper.htmlEntities(e)}}});yn.render=gn;var jn=yn;const wn={ref:"root",class:"quickAccessInside"},Sn=["title","placeholder"],Cn={class:"dropdown quickAccessDropdown"},kn={class:"no-result"},Dn=["onClick"],En=["onMouseenter","onClick"],Pn={class:"quickAccessMatomoSearch"},Tn=["onMouseenter","onClick"],Vn=["textContent"],xn={class:"quick-access-category helpCategory"},Nn=["href"];function Bn(e,t,i,o,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",wn,[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,Sn),[[D["vModelText"],e.searchTerm],[r,{focused:e.searchActive}],[s]]),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",Cn,[Object(D["withDirectives"])(Object(D["createElementVNode"])("ul",null,[Object(D["createElementVNode"])("li",kn,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:i=>{e.searchTerm=t.title,e.searchMenu(e.searchTerm)}},Object(D["toDisplayString"])(t.title),9,Dn),(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:i=>e.searchIndex=t.menuIndex,onClick:i=>e.selectMenuItem(t.index),key:t.index},[Object(D["createElementVNode"])("a",null,Object(D["toDisplayString"])(t.name.trim()),1)],42,En))),128))]))),128)),Object(D["createElementVNode"])("ul",Pn,[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,i)=>Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:Object(D["normalizeClass"])(["result",{selected:e.numMenuItems+i===e.searchIndex}]),onMouseenter:t=>e.searchIndex=e.numMenuItems+i,onClick:i=>e.selectSite(t.idsite),key:t.idsite},[Object(D["createElementVNode"])("a",{textContent:Object(D["toDisplayString"])(t.name)},null,8,Vn)],42,Tn)),[[D["vShow"],e.hasSitesSelector&&!e.isLoading]])),128))]),Object(D["createElementVNode"])("ul",null,[Object(D["createElementVNode"])("li",xn,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,Nn)],34)])],512),[[D["vShow"],e.searchTerm&&e.searchActive]])])),[[l,{blur:e.onBlur}]])}const{ListingFormatter:In}=window;function Mn(e){const t=e.getBoundingClientRect(),i=window.$(window);return t.top>=0&&t.left>=0&&t.bottom<=i.height()&&t.right<=i.width()}function Fn(e){e&&e.scrollIntoView&&e.scrollIntoView()}var Ln=Object(D["defineComponent"])({name:"QuickAccess",directives:{FocusAnywhereButHere:tt,FocusIf:ot,Tooltips:st},watch:{searchActive(e){const t=this.$refs.root;if(!t||!t.parentElement)return;const i=t.parentElement.classList;i.toggle("active",e),i.toggle("expanded",e)}},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")&&At(),Fn(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:{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",In.formatAnd(e))}},emits:["itemSelected","blur"],methods:{onKeypress(e){const t=this.searchTerm&&this.searchActive,i=9===e.which,o=27===e.which;38===e.which?(this.highlightPreviousItem(),e.preventDefault()):40===e.which?(this.highlightNextItem(),e.preventDefault()):13===e.which?this.clickQuickAccessMenuItem():i&&t||o&&t?this.deactivateSearch():i?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&&!Mn(e)&&Fn(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 i=-1;const o={},n=[],a=e=>{const t=Object.assign({},e);i+=1,t.menuIndex=i;const{category:a}=t;a in o||(n.push({title:a,items:[]}),o[a]=n.length-1);const r=o[a];n[r].items.push(t)};this.resetSearchIndex(),this.hasSitesSelector&&(this.isLoading=!0,Zo.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);s.forEach(a),l.forEach(a),c.forEach(a),this.numMenuItems=s.length+l.length+c.length,this.menuItems=n},resetSearchIndex(){this.searchIndex=0,this.makeSureSelectedItemIsInViewport()},selectSite(e){this.deactivateSearch(),_t(),Zo.loadSite(e)},selectMenuItem(e){const t=document.querySelector(`[quick_access='${e}']`);if(t){this.deactivateSearch(),_t();const e=t.getAttribute("href");if(e&&e.length>10&&t&&t.click)try{t.click()}catch(i){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(i=>{var o;let n=null===(o=i.textContent)||void 0===o?void 0:o.trim();var a;(!n||null!=i.parentElement&&null!=i.parentElement.tagName&&"DIV"===i.parentElement.tagName)&&(n=null===(a=i.getAttribute("title"))||void 0===a?void 0:a.trim());n&&(t.push({name:n,index:this.menuIndexCounter+=1,category:e}),i.setAttribute("quick_access",""+this.menuIndexCounter))}),t},getLeftMenuItems(){const e=[];return document.querySelectorAll("#secondNavBar .menuTab").forEach(t=>{var i;const o=window.$(t).find("> .item");let n=(null===(i=o[0])||void 0===i?void 0:i.innerText.trim())||"";n&&-1!==n.lastIndexOf("\n")&&(n=n.slice(0,n.lastIndexOf("\n")).trim()),window.$(t).find("li .item").each((t,i)=>{var o;const a=null===(o=i.textContent)||void 0===o?void 0:o.trim();a&&(e.push({name:a,category:n,index:this.menuIndexCounter+=1}),i.setAttribute("quick_access",""+this.menuIndexCounter))})}),e},getSegmentItems(){if(!this.hasSegmentSelector)return[];const e=a("CoreHome_Segments"),t=[];return document.querySelectorAll(".segmentList [data-idsegment]").forEach(i=>{var o;const n=null===(o=i.querySelector(".segname"))||void 0===o||null===(o=o.textContent)||void 0===o?void 0:o.trim();n&&(t.push({name:n,category:e,index:this.menuIndexCounter+=1}),i.setAttribute("quick_access",""+this.menuIndexCounter))}),t}}});Ln.render=Bn;var Rn=Ln;const An={class:"fieldArray form-group"},_n={key:0,class:"fieldUiControl"},Hn=["onClick","title"];function $n(e,t,i,o,n,a){const r=Object(D["resolveComponent"])("Field");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",An,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.modelValue,(t,i)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])(["fieldArrayTable multiple valign-wrapper",{["fieldArrayTable"+i]:!0}]),key:i},[e.field.uiControl?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",_n,[Object(D["createVNode"])(r,{"full-width":!0,"model-value":t,options:e.field.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(t,i),"model-modifiers":e.field.modelModifiers,placeholder:" ",uicontrol:e.field.uiControl,title:e.field.title,name:`${e.name}-${i}`,id:`${e.id}-${i}`,"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(i),class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Hn),[[D["vShow"],i+1!==e.modelValue.length]])],2))),128))])}const Un=Ce("CorePluginsAdmin","Field");var qn=Object(D["defineComponent"])({props:{modelValue:Array,name:String,id:String,field:Object,rows:String},components:{Field:Un},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 i=[...this.modelValue||[]];i[t]=e,this.$emit("update:modelValue",i)},removeEntry(e){if(e>-1&&this.modelValue){const t=this.modelValue.filter((t,i)=>i!==e);this.$emit("update:modelValue",t)}}}});qn.render=$n;var Wn=qn;const zn={class:"multiPairField form-group"},Gn={key:1,class:"fieldUiControl fieldUiControl2"},Kn={key:2,class:"fieldUiControl fieldUiControl3"},Yn={key:3,class:"fieldUiControl fieldUiControl4"},Qn=["onClick","title"];function Jn(e,t,i,o,n,a){const r=Object(D["resolveComponent"])("Field");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",zn,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.modelValue,(t,i)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{class:Object(D["normalizeClass"])(["multiPairFieldTable multiple valign-wrapper",{["multiPairFieldTable"+i]:!0,[`has${e.fieldCount}Fields`]:!0}]),key:i},[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(i,e.field1.key,t),"model-modifiers":e.field1.modelModifiers,placeholder:" ",uicontrol:e.field1.uiControl,name:`${e.name}-p1-${i}`,id:`${e.id}-p1-${i}`,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",Gn,[Object(D["createVNode"])(r,{"full-width":!0,options:e.field2.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(i,e.field2.key,t),"model-value":t[e.field2.key],"model-modifiers":e.field2.modelModifiers,placeholder:" ",uicontrol:e.field2.uiControl,name:`${e.name}-p2-${i}`,id:`${e.id}-p2-${i}`,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",Kn,[Object(D["createVNode"])(r,{"full-width":!0,options:e.field3.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(i,e.field3.key,t),"model-value":t[e.field3.key],"model-modifiers":e.field3.modelModifiers,placeholder:" ",uicontrol:e.field3.uiControl,name:`${e.name}-p3-${i}`,id:`${e.id}-p3-${i}`,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",Yn,[Object(D["createVNode"])(r,{"full-width":!0,options:e.field4.availableValues,"onUpdate:modelValue":t=>e.onEntryChange(i,e.field4.key,t),"model-value":t[e.field4.key],"model-modifiers":e.field4.modelModifiers,placeholder:" ",uicontrol:e.field4.uiControl,name:`${e.name}-p4-${i}`,id:`${e.id}-p4-${i}`,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(i),class:"icon-minus valign",title:e.translate("General_Remove")},null,8,Qn),[[D["vShow"],i+1!==e.modelValue.length]])],2))),128))])}const Xn=Ce("CorePluginsAdmin","Field");var Zn=Object(D["defineComponent"])({props:{modelValue:Array,name:String,id:String,field1:Object,field2:Object,field3:Object,field4:Object,rows:Number},components:{Field:Xn},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,i){const o=[...this.modelValue];o[e]=Object.assign(Object.assign({},o[e]),{},{[t]:i}),this.$emit("update:modelValue",o)},removeEntry(e){if(e>-1&&this.modelValue){const t=this.modelValue.filter((t,i)=>i!==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}}});Zn.render=Jn;var ea=Zn;const ta=["disabled"],ia=Object(D["createElementVNode"])("span",{class:"icon-chevron-left"},null,-1),oa=[ia],na=["title"],aa=Object(D["createElementVNode"])("span",{class:"icon icon-calendar"},null,-1),ra={class:"flex"},sa={key:0,id:"ajaxLoadingCalendar"},la={class:"loadingSegment"},ca=["disabled"],da=Object(D["createElementVNode"])("span",{class:"icon-chevron-right"},null,-1),ua=[da];function ma(e,t,i,o,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)},oa,8,ta)):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)},[aa,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",ra,[Object(D["createVNode"])(r,{"ui-selected-period":e.selectedPeriod,"periods-filtered":e.periodsFiltered,"ui-selection":e.uiSelection,"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),"onUpdate:activePresetId":t[2]||(t[2]=t=>e.activePresetId=t),onPeriodSelect:t[3]||(t[3]=t=>e.onPeriodOptionSelected(t)),onPeriodDblclick:t[4]||(t[4]=t=>e.onPeriodOptionDblClick(t)),onPresetSelect:t[5]||(t[5]=t=>e.onPresetDateRangeSelected(t))},null,8,["ui-selected-period","periods-filtered","ui-selection","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,"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()),onRangePresetDateCellClickCapture:t[9]||(t[9]=t=>e.onRangePresetDateCellClickCapture(t)),"onUpdate:isComparing":t[10]||(t[10]=t=>e.isComparing=t),"onUpdate:comparePeriodType":t[11]||(t[11]=t=>e.comparePeriodType=t),"onUpdate:compareStartDate":t[12]||(t[12]=t=>e.compareStartDate=t),"onUpdate:compareEndDate":t[13]||(t[13]=t=>e.compareEndDate=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","is-apply-enabled"])]),e.isLoadingNewPage?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",sa,[Object(D["createVNode"])(l,{loading:!0}),Object(D["createElementVNode"])("div",la,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)},ua,8,ca)):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 pa(e){return("period"!==e.uiSelectionType||e.uiSelectedPeriod===yo)&&(!e.hasPendingNonRangePeriodChange&&(!(e.uiSelectedPeriod===yo&&!e.hasPendingPresetSelection&&!e.isRangeValid)&&!(e.isComparing&&"custom"===e.comparePeriodType&&!e.isCompareRangeValid)))}function ha(e){if(e.hasPendingNonRangePeriodChange)return{type:"stop"};if(!e.isCompareDirty)return e.shouldCloseSelectorWithoutApplying?{type:"close"}:{type:"stop"};if(e.appliedPeriod===yo){if(!e.hasCommittedRangeBounds)return{type:"stop"};const t=`${e.appliedRangeStartDate},${e.appliedRangeEndDate}`;return{type:"commit",date:e.rollingDateParam||t,period:yo}}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 ga(e){return 0===e.detail}function ba(e){const t=Object.assign({},e);return delete t.comparePeriods,delete t.comparePeriodType,delete t.compareDates,t}function fa(e,t,i){const o=new Date(e.getTime());switch(t){case"day":o.setDate(o.getDate()+i);break;case"week":o.setDate(o.getDate()+7*i);break;case"month":o.setMonth(o.getMonth()+i);break;case"year":o.setFullYear(o.getFullYear()+i);break;default:break}return o}function va(e,t,i){const o=new Date(e.getTime());return o<t&&o.setTime(t.getTime()),o>i&&o.setTime(i.getTime()),o}const Oa={class:"period-type period-selector-options-column"},ya={id:"otherPeriods"};function ja(e,t,i,o,n,a){const r=Object(D["resolveComponent"])("PeriodOptions"),s=Object(D["resolveComponent"])("PresetDateRanges");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Oa,[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":"period"===e.uiSelection.type?e.uiSelection.id:null,"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,{"model-value":e.activePresetId,"checked-preset-id":"preset"===e.uiSelection.type?e.uiSelection.id:null,"allowed-periods":e.periodsFiltered,"min-date":e.minAllowedDate,"max-date":e.maxAllowedDate,"onUpdate:modelValue":t[3]||(t[3]=t=>e.$emit("update:activePresetId",t)),onSelect:t[4]||(t[4]=t=>e.$emit("preset-select",t))},null,8,["model-value","checked-preset-id","allowed-periods","min-date","max-date"])])])}const wa={class:"presetDateRanges"},Sa={key:0,class:"preset-date-range-group-separator"},Ca=["name","id","checked","onChange"],ka={class:"preset-option-text"};function Da(e,t,i,o,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",wa,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.groupedPresetDateRanges,(t,i)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",{key:i,class:"preset-date-range-group"},[i>0?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Sa)):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})},[Object(D["createElementVNode"])("input",{type:"radio",class:"preset-option-input",name:e.presetInputName,id:"preset_date_"+t.id,checked:e.checkedPresetId===t.id,onChange:i=>e.handlePresetSelected(t.id)},null,40,Ca),Object(D["createElementVNode"])("span",ka,Object(D["toDisplayString"])(e.translate(t.labelKey)),1)],2)]))),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 Ea={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"},Pa=[{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"}],Ta={"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"};function Va(e,t){return Ta[`${e}|${t}`]||null}function xa(e){return new Date(e.getTime())}function Na(e,t){const i=xa(e);return i.setDate(i.getDate()+t),i}function Ba(e){return new Date(e.getFullYear(),e.getMonth(),1)}function Ia(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function Ma(e){const t=(e.getDay()+6)%7;return Na(e,-t)}function Fa(e){const t=e.getMonth(),i=t-t%3;return new Date(e.getFullYear(),i,1)}function La(e,t){return`${d(e)},${d(t)}`}function Ra(e,t,i){return e<t?new Date(t.getTime()):e>i?new Date(i.getTime()):e}function Aa(e,t){const i=xa(t);switch(e){case"today":return{id:e,period:"day",date:"today",startDate:i,endDate:i};case"yesterday":{const t=Na(i,-1);return{id:e,period:"day",date:"yesterday",startDate:t,endDate:t}}case"last7days":{const t=Na(i,-6);return{id:e,period:"range",date:"last7",startDate:t,endDate:i}}case"last30days":{const t=Na(i,-29);return{id:e,period:"range",date:"last30",startDate:t,endDate:i}}case"last90days":{const t=Na(i,-89);return{id:e,period:"range",date:"last90",startDate:t,endDate:i}}case"lastWeekMonSun":{const t=Ma(i),o=Na(t,-7),n=Na(o,6);return{id:e,period:"week",date:"lastweek",startDate:o,endDate:n}}case"lastMonth":{const t=new Date(i.getFullYear(),i.getMonth()-1,1),o=Ba(t),n=Ia(t);return{id:e,period:"month",date:"lastmonth",startDate:o,endDate:n}}case"lastQuarter":{const t=Fa(i),o=Na(t,-1),n=Fa(o);return{id:e,period:"range",date:La(n,o),startDate:n,endDate:o}}case"lastYear":{const t=i.getFullYear()-1,o=new Date(t,0,1),n=new Date(t,11,31);return{id:e,period:"year",date:"lastyear",startDate:o,endDate:n}}case"thisWeekMonToday":{const t=Ma(i);return{id:e,period:"week",date:"today",startDate:t,endDate:i}}case"thisMonth":{const t=Ba(i);return{id:e,period:"month",date:"today",startDate:t,endDate:i}}case"thisQuarter":{const t=Fa(i);return{id:e,period:"range",date:La(t,i),startDate:t,endDate:i}}case"thisYear":{const t=new Date(i.getFullYear(),0,1);return{id:e,period:"year",date:"today",startDate:t,endDate:i}}default:throw new Error("Unknown preset date range: "+e)}}const _a=[["today","yesterday"],["last7days","last30days","last90days"],["lastWeekMonSun","lastMonth","lastQuarter","lastYear"],["thisWeekMonToday","thisMonth","thisQuarter","thisYear"]];let Ha=0;var $a=Object(D["defineComponent"])({props:{modelValue:{type:String,default:null},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-"+Ha;return Ha+=1,{presetInputName:e}},emits:["update:modelValue","select"],computed:{presetDateRanges(){return Pa.filter(e=>this.allowedPeriods.includes(Ea[e.id]))},groupedPresetDateRanges(){const e=new Map(this.presetDateRanges.map(e=>[e.id,e]));return _a.map(t=>t.map(t=>e.get(t)).filter(e=>!!e)).filter(e=>e.length)}},methods:{translate:a,handlePresetSelected(e){const t=Aa(e,this.today);this.$emit("update:modelValue",e),this.$emit("select",Object.assign(Object.assign({},t),{},{startDate:Ra(t.startDate,this.minDate,this.maxDate),endDate:Ra(t.endDate,this.minDate,this.maxDate)}))}}});$a.render=Da;var Ua=$a;const qa=["aria-label"],Wa=["title","onDblclick"],za=["name","id","checked","onChange","onKeydown"],Ga={class:"period-option-text"};function Ka(e,t,i,o,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:i=>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:i=>e.handlePeriodSelected(t),onKeydown:Object(D["withKeys"])(Object(D["withModifiers"])(i=>e.handlePeriodEnter(t),["prevent"]),["enter"])},null,40,za),Object(D["createElementVNode"])("span",Ga,Object(D["toDisplayString"])(e.getPeriodDisplayText(t)),1)],42,Wa)]))),128))],8,qa)}let Ya=0;var Qa=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-"+Ya;return Ya+=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)}}});Qa.render=Ka;var Ja=Qa,Xa=Object(D["defineComponent"])({name:"PeriodSelectorOptionsColumn",components:{PresetDateRanges:Ua,PeriodOptions:Ja},props:{uiSelectedPeriod:{type:String,required:!0},periodsFiltered:{type:Array,required:!0},uiSelection:{type:Object,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","update:activePresetId","period-select","period-dblclick","preset-select"],methods:{translate:a}});Xa.render=ja;var Za=Xa;const er={class:"period-selector-calendar-column"},tr=["aria-disabled"],ir=["aria-disabled"],or={class:"apply-button-container"},nr=["disabled","value"];function ar(e,t,i,o,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",er,[Object(D["createElementVNode"])("div",{class:Object(D["normalizeClass"])({"calendar-disabled":"preset"===e.uiSelection.type}),"aria-disabled":"preset"===e.uiSelection.type?"true":"false",onClickCapture:t[2]||(t[2]=t=>e.$emit("range-preset-date-cell-click-capture",t))},[Object(D["withDirectives"])(Object(D["createVNode"])(r,{class:"period-range","start-date":e.displayRangeStartDate,"end-date":e.displayRangeEndDate,disabled:"preset"===e.uiSelection.type,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","disabled"]),[[D["vShow"],"range"===e.calendarViewport]])],42,tr),Object(D["withDirectives"])(Object(D["createElementVNode"])("div",{class:Object(D["normalizeClass"])(["period-date",{"calendar-disabled":"preset"===e.uiSelection.type}]),"aria-disabled":"preset"===e.uiSelection.type?"true":"false"},[Object(D["createVNode"])(s,{id:"datepicker",period:e.singleCalendarPeriod,date:e.singleCalendarSelectedDate,disabled:"preset"===e.uiSelection.type,onSelect:t[3]||(t[3]=t=>e.$emit("single-date-select",t.date))},null,8,["period","date","disabled"])],10,ir),[[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,"onUpdate:isComparing":t[4]||(t[4]=t=>e.$emit("update:isComparing",t)),"onUpdate:comparePeriodType":t[5]||(t[5]=t=>e.$emit("update:comparePeriodType",t)),"onUpdate:compareStartDate":t[6]||(t[6]=t=>e.$emit("update:compareStartDate",t)),"onUpdate:compareEndDate":t[7]||(t[7]=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"]),Object(D["createElementVNode"])("div",or,[Object(D["createElementVNode"])("input",{type:"submit",id:"calendarApply",class:"btn",onClick:t[8]||(t[8]=t=>e.$emit("apply-click")),disabled:!e.isApplyEnabled,value:e.translate("General_Apply")},null,8,nr)])])}const rr={key:0,class:"compare-checkbox"},sr={class:"compare-checkbox-label"},lr=["checked"],cr={class:"compare-checkbox-text"},dr={id:"comparePeriodToDropdown"},ur={key:1,class:"compare-date-range"},mr={id:"comparePeriodStartDate"},pr=Object(D["createElementVNode"])("span",{class:"compare-dates-separator"},null,-1),hr={id:"comparePeriodEndDate"};function gr(e,t,i,o,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",rr,[Object(D["createElementVNode"])("label",sr,[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",cr,Object(D["toDisplayString"])(e.translate("General_CompareTo")),1)]),Object(D["createElementVNode"])("div",dr,[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",ur,[Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",mr,[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"])])]),pr,Object(D["createElementVNode"])("div",hr,[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"])])])])])):Object(D["createCommentVNode"])("",!0)],64)}const br=Ce("CorePluginsAdmin","Field");var fr=Object(D["defineComponent"])({name:"PeriodSelectorCompareControls",components:{Field:br},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}},emits:["update:isComparing","update:comparePeriodType","update:compareStartDate","update:compareEndDate"],methods:{translate:a,onCompareToggle(e){this.$emit("update:isComparing",e.target.checked)}}});fr.render=gr;var vr=fr,Or=Object(D["defineComponent"])({name:"PeriodSelectorCalendarColumn",components:{DateRangePicker:po,PeriodDatePicker:Co,PeriodSelectorCompareControls:vr},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},isApplyEnabled:{type:Boolean,required:!0}},emits:["range-change","single-date-select","apply-click","range-preset-date-cell-click-capture","update:isComparing","update:comparePeriodType","update:compareStartDate","update:compareEndDate"],methods:{translate:a}});Or.render=ar;var yr=Or;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const jr=["date","period","comparePeriods","comparePeriodType","compareDates","compareSegments"];function wr(e,t){return`${e}|${t}`}function Sr(e){const t={};return Object.keys(e).filter(e=>!jr.includes(e)).sort().forEach(i=>{t[i]=e[i]}),JSON.stringify(t)}function Cr(e,t,i,o,n){return!i&&e===o&&t===n}function kr(e,t,i,o){const n=!!i&&o===e,a=n&&i?Object.assign({},i):null;return{syncedUiSelection:a,lastKnownHashSelectionKey:e,lastKnownHashContextKey:t,nextHashUiSelection:null,nextHashSelectionKey:null,lastInteractionSource:null}}var Dr=Object(D["defineComponent"])({name:"PeriodSelector",props:{periods:Array},components:{PeriodSelectorOptionsColumn:Za,PeriodSelectorCalendarColumn:yr,ActivityIndicator:We},directives:{ExpandOnClick:yt,Tooltips:st},data(){const e=U.parsed.value.period,t=wo(e)?e:"day",i=vo(),o=Oo();return{uiSelection:{type:"period",id:e},lastInteractionSource:null,nextHashUiSelection:null,nextHashSelectionKey:null,lastKnownHashSelectionKey:null,lastKnownHashContextKey:null,minAllowedDate:i,maxAllowedDate:o,activePresetId:null,pendingPresetSelection:null,committedPeriod:e,committedAnchorDate:null,selectedPeriod:e,calendarViewport:e===yo?"range":"single",singleCalendarPeriod:t,singleCalendarSelectedDate:null,appliedRangeStartDate:null,appliedRangeEndDate:null,isRangeValid:null,isLoadingNewPage:!1,isComparing:null,comparePeriodType:"previousPeriod",compareStartDate:"",compareEndDate:"",compareAppliedSignature:""}},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:{matomoParsed(){return U.parsed.value},isComparingStoreValue(){return Ii.isComparingPeriods()},periodComparisonsStoreValue(){return Ii.getPeriodComparisons()},comparePeriodDropdownOptions(){return fo},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 Ii.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=m(this.appliedRangeStartDate),t=m(this.appliedRangeEndDate),i=k.getLastNRange("day",2,e).startDate,o=Math.floor((t.valueOf()-e.valueOf())/864e5),n=k.getLastNRange("day",1+o,i);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,i=m(e),o=m(t);return!jo(i)||!jo(o)||i>o?(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!==yo&&this.selectedPeriod!==this.committedPeriod},isRangePresetSelection(){return"preset"===this.uiSelection.type&&this.selectedPeriod===yo},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(ga(e)){const e=this.$refs.root,t="preset"===this.uiSelection.type?"#preset_date_"+this.uiSelection.id:"#period_id_"+this.uiSelection.id,i=e.querySelector(t)||e.querySelector("#preset_date_today");i instanceof HTMLElement&&i.focus()}},onClosed(e){ga(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.activePresetId=null,this.pendingPresetSelection=null},setPendingPeriodAndDate(e,t){this.committedPeriod=e,this.selectedPeriod=e,this.committedAnchorDate=t,this.setRangeStartEndFromPeriod(e,d(t)),wo(e)&&(this.singleCalendarPeriod=e,this.singleCalendarSelectedDate=t)},setPiwikPeriodAndDate(e,t){this.setPendingPeriodAndDate(e,t),this.setUiSelection({type:"period",id:e},"period");const i=d(t);this.clearPresetSelection(),this.commitSelectionToUrl(i,this.selectedPeriod)},commitSelectionToUrl(e,t){this.nextHashUiSelection=Object.assign({},this.uiSelection),this.nextHashSelectionKey=wr(t,e),this.compareAppliedSignature=this.compareCurrentSignature,this.propagateNewUrlParams(e,t),window.initTopControls()},onPeriodOptionSelected(e){if(this.setUiSelection({type:"period",id:e.period},"period"),this.selectedPeriod=e.period,this.clearPresetSelection(),e.period===yo)return this.calendarViewport="range",void(this.isRangeValid=!0);this.calendarViewport="single",wo(e.period)&&(this.singleCalendarPeriod=e.period),this.singleCalendarSelectedDate=e.period===this.committedPeriod?this.committedAnchorDate:null},onPeriodOptionDblClick(e){this.onPeriodOptionSelected(e),e.period!==yo&&e.period!==this.committedPeriod&&this.committedAnchorDate&&this.setPiwikPeriodAndDate(e.period,this.committedAnchorDate)},canInteractWithSingleCalendar(){return"single"===this.calendarViewport&&"period"===this.uiSelection.type&&this.selectedPeriod!==yo},onDatePickerSelected(e){this.canInteractWithSingleCalendar()&&(this.setUiSelection({type:"period",id:this.selectedPeriod},"calendar"),this.setPendingPeriodAndDate(this.selectedPeriod,e),this.clearPresetSelection(),this.commitSelectionToUrl(d(e),this.selectedPeriod))},onPresetDateRangeSelected(e){this.periodsFiltered.includes(e.period)&&(this.setUiSelection({type:"preset",id:e.id},"preset"),this.activePresetId=e.id,this.selectedPeriod=e.period,this.isRangeValid=!0,this.pendingPresetSelection=e,e.period!==yo?(this.calendarViewport="single",this.singleCalendarSelectedDate=e.startDate,wo(e.period)&&(this.singleCalendarPeriod=e.period)):this.calendarViewport="range")},propagateNewUrlParams(e,t){const i=this.selectedComparisonParams;let o;M.helper.isReportingPage()?(this.closePeriodSelector(),o=U.hashParsed.value):(this.isLoadingNewPage=!0,o=U.parsed.value),U.updateLocation(Object.assign(Object.assign({},ba(o)),{},{date:e,period:t},i))},hasPendingPresetSelectionOwnedByUi(){return!!this.pendingPresetSelection&&"preset"===this.uiSelection.type&&this.pendingPresetSelection.id===this.uiSelection.id},shouldCloseSelectorWithoutApplying(){return"preset"===this.uiSelection.type&&this.selectedPeriod!==yo},hasCommittedRangeBounds(){return!!this.appliedRangeStartDate&&!!this.appliedRangeEndDate},applyPendingPresetSelection(){if(!this.hasPendingPresetSelectionOwnedByUi())return!1;const e=this.pendingPresetSelection;return this.committedPeriod=e.period,this.committedAnchorDate=e.startDate,this.appliedRangeStartDate=d(e.startDate),this.appliedRangeEndDate=d(e.endDate),this.commitSelectionToUrl(e.date,e.period),!0},applyRangeSelection(){if(this.selectedPeriod!==yo)return!1;const e=this.selectedDateString;return!e||(this.committedPeriod=yo,this.commitSelectionToUrl(this.getCurrentRollingDateParamIfOwnedByPreset()||e,yo),!0)},applyNonRangeOrCompareChanges(){const e=ha({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=Ii.getPeriodComparisons();if(e.length<2)return;const t=U.parsed.value.comparePeriodType;if(!bo.includes(t))return;if(this.comparePeriodType=t,"custom"!==this.comparePeriodType||"range"!==e[1].params.period)return;let i;try{i=c.parse(e[1].params.period,e[1].params.date)}catch(a){return}const[o,n]=i.getDateRange();this.compareStartDate=d(o),this.compareEndDate=d(n)},getCurrentContextKey(){return Sr(U.parsed.value)},applyUiSelectionFromHash(e,t,i){if(i)return this.uiSelection=i,void(this.activePresetId="preset"===i.type?i.id:null);const o=Va(e,t);if(o&&this.periodsFiltered.includes(e))return this.uiSelection={type:"preset",id:o},this.activePresetId=o,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 i=Va(e,t);return i!==this.uiSelection.id?null:t},resetSelectedDateValues(){this.committedAnchorDate=null,this.appliedRangeStartDate=null,this.appliedRangeEndDate=null},applyDateValuesFromHash(e,t){if(e===yo){const i=c.get(e).parse(t),[o,n]=i.getDateRange();return this.committedAnchorDate=o,this.appliedRangeStartDate=d(o),void(this.appliedRangeEndDate=d(n))}this.committedAnchorDate=m(t),this.setRangeStartEndFromPeriod(e,t),wo(e)&&(this.singleCalendarPeriod=e),this.singleCalendarSelectedDate=this.committedAnchorDate},updateSelectedValuesFromHash(){const e=U.parsed.value.date||"",t=U.parsed.value.period||"",i=wr(t,e),o=this.getCurrentContextKey();if(Cr(i,o,this.nextHashUiSelection,this.lastKnownHashSelectionKey,this.lastKnownHashContextKey))return;const n=kr(i,o,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!==yo&&null)}this.applyDateValuesFromHash(t,e),this.isRangeValid=t===yo||null,this.pendingPresetSelection=null,this.calendarViewport=t===yo?"range":"single",this.compareAppliedSignature=this.compareCurrentSignature},setRangeStartEndFromPeriod(e,t){const i=c.parse(e,t).getDateRange();this.appliedRangeStartDate=d(i[0]<this.minAllowedDate?this.minAllowedDate:i[0]),this.appliedRangeEndDate=d(i[1]>this.maxAllowedDate?this.maxAllowedDate:i[1])},canInteractWithRangeCalendar(){return"range"===this.calendarViewport&&"period"===this.uiSelection.type&&this.selectedPeriod===yo},onRangeChange(e,t){this.canInteractWithRangeCalendar()&&(e&&t?(this.isRangeValid=!0,this.appliedRangeStartDate=e,this.appliedRangeEndDate=t,this.setUiSelection({type:"period",id:yo},"range")):this.isRangeValid=!1)},onRangePresetDateCellClickCapture(e){if(!this.isRangePresetSelection)return;const t=e.target;t&&t.closest(".ui-datepicker-calendar a")&&(e.preventDefault(),e.stopPropagation())},isApplyEnabled(){return pa({uiSelectionType:this.uiSelection.type,uiSelectedPeriod:this.selectedPeriod,hasPendingNonRangePeriodChange:this.hasPendingNonRangePeriodChange,hasPendingPresetSelection:!!this.pendingPresetSelection,isRangeValid:this.isRangeValid,isComparing:this.isComparing,comparePeriodType:this.comparePeriodType,isCompareRangeValid:this.isCompareRangeValid()})},closePeriodSelector(){this.$refs.root.classList.remove("expanded")},isCompareRangeValid(){try{m(this.compareStartDate)}catch(e){return!1}try{m(this.compareEndDate)}catch(e){return!1}return!0},movePeriod(e){if(!this.canMovePeriod(e))return;const t=this.committedAnchorDate||new Date,i=fa(t,this.committedPeriod,e),o=va(i,this.minAllowedDate,this.maxAllowedDate);this.setPiwikPeriodAndDate(this.committedPeriod,o)},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)}}});Dr.render=ma;var Er=Dr;const Pr={class:"reportingMenu"},Tr=["aria-label"],Vr=["data-category-id"],xr=["onClick"],Nr={class:"hidden"},Br={key:2,role:"menu"},Ir=["href","onClick","title"],Mr=["href","onClick"],Fr=["onClick"],Lr=Object(D["createElementVNode"])("span",{class:"icon-help"},null,-1),Rr=[Lr],Ar={id:"mobile-left-menu",class:"sidenav sidenav--reporting-menu-mobile hide-on-large-only"},_r=["data-category-id"],Hr={key:1,class:"collapsible collapsible-accordion"},$r={class:"collapsible-header"},Ur={class:"collapsible-body"},qr=["onClick","href"],Wr=["onClick","href"];function zr(e,t,i,o,n,a){const r=Object(D["resolveComponent"])("MenuItemsDropdown"),s=Object(D["resolveDirective"])("side-nav");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Pr,[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:i=>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"])(i=>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",Nr,Object(D["toDisplayString"])(e.translate("CoreHome_Menu")),1)],8,xr)),t.component?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",Br,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t.subcategories,i=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{role:"menuitem",class:Object(D["normalizeClass"])({active:(i.id===e.displayedSubcategory||i.isGroup&&e.activeSubsubcategory===e.displayedSubcategory)&&t.id===e.displayedCategory}),key:i.id},[i.isGroup?(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:0,"show-search":!0,"menu-title":e.htmlEntities(i.name)},{default:Object(D["withCtx"])(()=>[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(i.subcategories,o=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{class:Object(D["normalizeClass"])(["item",{active:o.id===e.activeSubsubcategory&&i.id===e.displayedSubcategory&&t.id===e.displayedCategory}]),tabindex:"5",href:"#?"+e.makeUrl(t,o),onClick:i=>e.loadSubcategory(t,o,i),title:o.tooltip,key:o.id},Object(D["toDisplayString"])(o.name),11,Ir))),128))]),_:2},1032,["menu-title"])):Object(D["createCommentVNode"])("",!0),i.isGroup?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,href:"#?"+e.makeUrl(t,i),class:"item",onClick:o=>e.loadSubcategory(t,i,o),tabindex:"5"},Object(D["toDisplayString"])(i.name),9,Mr)),i.help?(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:2,class:Object(D["normalizeClass"])(["item-help-icon",{active:e.helpShownCategory&&e.helpShownCategory.subcategory===i.id&&e.helpShownCategory.category===t.id&&i.help}]),tabindex:"5",href:"javascript:",onClick:o=>e.showHelp(t,i,o)},Rr,10,Fr)):Object(D["createCommentVNode"])("",!0)],2))),128))]))],10,Vr))),128))],8,Tr),Object(D["createElementVNode"])("ul",Ar,[(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:i=>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",Hr,[Object(D["createElementVNode"])("li",null,[Object(D["createElementVNode"])("a",$r,[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",Ur,[Object(D["createElementVNode"])("ul",null,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t.subcategories,i=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:i.id},[i.isGroup?(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],{key:0},Object(D["renderList"])(i.subcategories,i=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{onClick:o=>e.loadSubcategory(t,i),href:"#?"+e.makeUrl(t,i),key:i.id},Object(D["toDisplayString"])(i.name),9,qr))),128)):Object(D["createCommentVNode"])("",!0),i.isGroup?Object(D["createCommentVNode"])("",!0):(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",{key:1,onClick:o=>e.loadSubcategory(t,i),href:"#?"+e.makeUrl(t,i)},Object(D["toDisplayString"])(i.name),9,Wr))]))),128))])])])])),[[s,{activator:e.sideNavActivator}]])],8,_r))),128))])])}function Gr(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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 Kr{constructor(){Gr(this,"privateState",Object(D["reactive"])({pages:[]})),Gr(this,"state",Object(D["computed"])(()=>Object(D["readonly"])(this.privateState))),Gr(this,"fetchAllPagesPromise",void 0),Gr(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(i=>i&&i.category&&i.subcategory&&i.category.id===e&&""+i.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 Yr=new Kr;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function Qr(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 Jr(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 Xr(e){const t=e;return t.subcategories?t.subcategories:[]}function Zr(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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=parseFloat(e);return!Number.isNaN(t)&&Number.isFinite(t)}class ts{constructor(){Zr(this,"privateState",Object(D["reactive"])({activeSubcategoryId:null,activeSubsubcategoryId:null})),Zr(this,"state",Object(D["computed"])(()=>Object(D["readonly"])(this.privateState))),Zr(this,"activeCategory",Object(D["computed"])(()=>"undefined"!==typeof this.state.value.activeCategoryId?this.state.value.activeCategoryId:U.parsed.value.category)),Zr(this,"activeSubcategory",Object(D["computed"])(()=>this.state.value.activeSubcategoryId||U.parsed.value.subcategory)),Zr(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})),Zr(this,"menu",Object(D["computed"])(()=>this.buildMenuFromPages()))}fetchMenuItems(){return Yr.getAllPages().then(()=>this.menu.value)}reloadMenuItems(){return Yr.reloadAllPages().then(()=>this.menu.value)}findSubcategory(e,t){let i=void 0,o=void 0,n=void 0;return this.menu.value.forEach(a=>{a.id===e&&(Jr(a)||[]).forEach(e=>{e.id===t&&(i=a,o=e),e.isGroup&&(Xr(e)||[]).forEach(r=>{r.id===t&&(i=a,o=e,n=r)})})}),{category:i,subcategory:o,subsubcategory:n}}buildMenuFromPages(){const e=[],t=U.parsed.value.category,i=U.parsed.value.subcategory,o=Yr.pages.value,n={};return o.forEach(r=>{const s=Object.assign({},r.category),l=s.id,c=l===t;if(n[l])return;n[l]=!0,s.subcategories=[];let d=null;const u=o.filter(e=>e.category.id===l);u.forEach(e=>{const t=Object.assign({},e.subcategory),o=t.id===i&&c;if(e.widgets&&e.widgets[0]&&es(e.subcategory.id)){d||(d=Object.assign({},t),d.name=a("CoreHome_ChooseX",[s.name]),d.isGroup=!0,d.subcategories=[],d.order=10),o&&(d.name=t.name);const e=t.id;return t.tooltip=`${t.name} (id = ${e})`,void d.subcategories.push(t)}s.subcategories.push(t)}),d&&d.subcategories&&d.subcategories.length<=5?d.subcategories.forEach(e=>s.subcategories.push(e)):d&&s.subcategories.push(d),s.subcategories=Qr(Jr(s)),e.push(s)}),Qr(e)}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,i){e&&t&&(this.privateState.activeCategoryId=e.id,this.privateState.activeSubcategoryId=t.id,i&&(this.privateState.activeSubsubcategoryId=i.id))}}var is=new ts;function os(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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 ns(e){const t=e;return t.widgets?t.widgets:[]}class as{constructor(){os(this,"privateState",Object(D["reactive"])({isFetchedFirstTime:!1,categorizedWidgets:{}})),os(this,"state",Object(D["computed"])(()=>(this.privateState.isFetchedFirstTime||this.fetchAvailableWidgets(),Object(D["readonly"])(this.privateState)))),os(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 i=t;this.privateState.categorizedWidgets=i,e(this.widgets.value)})}catch(i){t(i)}})):Promise.resolve(this.widgets.value)}reloadAvailableWidgets(){window.widgetsHelper.clearAvailableWidgets();const e=this.fetchAvailableWidgets();return e.then(()=>{M.postEvent("WidgetsStore.reloaded")}),e}}var rs=new as;const ss="reportingmenu-help";var ls=Object(D["defineComponent"])({components:{MenuItemsDropdown:Yi},directives:{SideNav:Ht},props:{},data(){return{showSubcategoryHelpOnLoad:null,initialLoad:!0,helpShownCategory:null}},computed:{sideNavActivator(){return document.querySelector("nav .activateLeftMenu")},menu(){const e=is.menu.value;return e.forEach(e=>{if(e.widget&&e.widget.indexOf(".")>0){const[t,i]=e.widget.split(".");e.component=Ce(t,i)}}),e},activeCategory(){return is.activeCategory.value},activeSubcategory(){return is.activeSubcategory.value},activeSubsubcategory(){return is.activeSubsubcategory.value},displayedCategory(){return U.parsed.value.category},displayedSubcategory(){return U.parsed.value.subcategory}},created(){is.fetchMenuItems().then(e=>{if(!U.parsed.value.subcategory){const t=e[0],i=t.subcategories[0];is.enterSubcategory(t,i),this.propagateUrlChange(t,i)}}),Object(D["watch"])(()=>U.parsed.value,e=>{const t=is.findSubcategory(e.category,e.subcategory);is.enterSubcategory(t.category,t.subcategory,t.subsubcategory)}),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",()=>{is.reloadMenuItems().then(()=>{const e=U.parsed.value.category,t=U.parsed.value.subcategory;if(e&&t){const i=is.findSubcategory(e,t);i.category&&is.enterSubcategory(i.category,i.subcategory,i.subsubcategory)}}),rs.reloadAvailableWidgets()})},methods:{propagateUrlChange(e,t){const i=U.parsed.value;i.category===e.id&&i.subcategory===t.id?this.loadSubcategory(e,t):U.updateHash(Object.assign(Object.assign({},U.hashParsed.value),{},{category:e.id,subcategory:t.id}))},loadCategory(e){$o.remove(ss);const t=is.toggleCategory(e),{subcategories:i}=e,o=i&&1===i.length||e.widget&&i&&i.length;if(t&&o){this.helpShownCategory=null;const t=e.subcategories[0];this.propagateUrlChange(e,t)}},loadSubcategory(e,t,i){i&&(i.shiftKey||i.ctrlKey||i.metaKey)||($o.remove(ss),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:i,period:o,date:n,segment:a,comparePeriods:r,compareDates:s,compareSegments:l}=U.parsed.value;return U.stringify({idSite:i,period:o,date:n,segment:a,comparePeriods:r,compareDates:s,compareSegments:l,category:e.id,subcategory:t.id})},htmlEntities(e){return M.helper.htmlEntities(e)},showHelp(e,t,i){const o=U.parsed.value,n=o.category,r=o.subcategory;if((n!==e.id||r!==t.id)&&i)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 $o.remove(ss),void(this.helpShownCategory=null);const s=a("CoreHome_ReportingCategoryHelpPrefix",e.name,t.name),l=`<strong>${s}</strong><br/>`;$o.show({context:"info",id:ss,type:"help",noclear:!0,class:"help-notification",message:l+t.help,placeat:"#notificationContainer",prepend:!0}),this.helpShownCategory={category:e.id,subcategory:t.id}}}});ls.render=zr;var cs=ls;function ds(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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 us{constructor(){ds(this,"privateState",Object(D["reactive"])({reports:[]})),ds(this,"state",Object(D["readonly"])(this.privateState)),ds(this,"reports",Object(D["computed"])(()=>this.state.reports)),ds(this,"reportsPromise",void 0)}findReport(e,t){return this.reports.value.find(i=>i.module===e&&i.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 us;const ps={class:"widgetLoader"},hs={key:0},gs={key:1,class:"notification system notification-error"},bs=["href"],fs={key:2,class:"notification system notification-error"},vs={class:"theWidgetContent",ref:"widgetContent"};function Os(e,t,i,o,n,a){const r=Object(D["resolveComponent"])("ActivityIndicator");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",ps,[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",hs,Object(D["toDisplayString"])(e.widgetName),1)):Object(D["createCommentVNode"])("",!0),e.loadingFailedRateLimit?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",fs,Object(D["toDisplayString"])(e.translate("General_ErrorRateLimit")),1)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",gs,[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,bs)):Object(D["createCommentVNode"])("",!0)]))],512),[[D["vShow"],e.loadingFailed]]),Object(D["createElementVNode"])("div",vs,null,512)])}function ys(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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 js{constructor(){ys(this,"privateState",Object(D["reactive"])({module:"",action:"",category:"",subcategory:"",idSite:"",widgetSearchFilters:{}})),ys(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 js,Ss=Object(D["defineComponent"])({props:{widgetParams:Object,widgetName:String,loadingMessage:String},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 i=Object.assign({},e||{});const o=Object.keys(Object.assign(Object.assign({},U.hashParsed.value),{},{idSite:"",period:"",date:"",segment:"",widget:""}));return o.forEach(e=>{"category"!==e&&"subcategory"!==e&&(e in i||(i[e]=t[e]))}),Ii.isComparisonEnabled()&&(i=Object.assign(Object.assign({},i),{},{comparePeriods:t.comparePeriods,compareDates:t.compareDates,compareSegments:t.compareSegments})),e&&"showtitle"in e||(i.showtitle="1"),M.shouldPropagateTokenAuth&&t.token_auth&&(M.broadcast.isWidgetizeRequestWithoutSession()||(i.force_api_session="1"),i.token_auth=t.token_auth),i.random=Math.floor(1e4*Math.random()),i},loadWidgetUrl(e,t){this.loading=!0,this.abortHttpRequestIfNeeded(),this.cleanupLastWidgetContent(),this.lastWidgetAbortController=new AbortController;let i={};e.uniqueId&&(i=ws.getSearchFilters(e.uniqueId)),te.fetch(this.getWidgetUrl(Object.assign(e,i)),{format:"html",abortController:this.lastWidgetAbortController}).then(i=>{if(t!==this.changeCounter||"string"!==typeof i)return;this.lastWidgetAbortController=null,this.loading=!1,this.loadingFailed=!1;const o=this.$refs.widgetContent;window.$(o).html(i);const n=window.$(o).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),$o.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))})}}});Ss.render=Os;var Cs=Ss;function ks(e,t,i,o,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 Ds=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),i=null===e||void 0===e?void 0:e[t.name];if(!i)throw new Error(`Unknown widget component ${t.plugin}.${t.name}`);this.componentToRender=Object(D["markRaw"])(i)}catch(i){console.error(i),this.loadingFailed=!0}finally{this.loading=!1}}}});Ds.render=ks;var Es=Ds;const Ps={class:"widget-container"};function Ts(e,t,i,o,n,a){const r=Object(D["resolveComponent"])("Widget");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Ps,[(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 Vs=Ce("CoreHome","Widget");var xs=Object(D["defineComponent"])({props:{container:{type:Array,required:!0}},components:{Widget:Vs},computed:{actualContainer(){var e,t,i;const o=this.container;if(null===o||void 0===o||null===(e=o[0])||void 0===e||!e.parameters)return o;const[n]=o,a="1"===(null===(t=n.parameters)||void 0===t?void 0:t.widget)||1===(null===(i=n.parameters)||void 0===i?void 0:i.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,...o.slice(1)]}}});xs.render=Ts;var Ns=xs;const Bs={class:"reportsByDimensionView"},Is={class:"entityList"},Ms={class:"listCircle"},Fs=["onClick"],Ls={class:"dimension"},Rs={class:"reportContainer"},As=Object(D["createElementVNode"])("div",{class:"clear"},null,-1);function _s(e,t,i,o,n,a){const r=Object(D["resolveComponent"])("WidgetLoader");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Bs,[Object(D["createElementVNode"])("div",Is,[(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",Ms,[(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:i=>e.selectWidget(t)},[Object(D["createElementVNode"])("span",Ls,Object(D["toDisplayString"])(t.name),1)],10,Fs))),128))])]))),128))]),Object(D["createElementVNode"])("div",Rs,[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)]),As])}var Hs=Object(D["defineComponent"])({props:{widgets:Array},components:{WidgetLoader:Cs},data(){return{selectedWidget:null}},created(){[this.selectedWidget]=this.widgetsSorted},computed:{widgetsSorted(){return Qr(this.widgets)},widgetsByCategory(){const e={};return this.widgetsSorted.forEach(t=>{var i;const o=null===(i=t.subcategory)||void 0===i?void 0:i.name;o&&(e[o]||(e[o]={name:o,order:t.order,widgets:[]}),e[o].widgets.push(t))}),Qr(Object.values(e))}},methods:{selectWidget(e){this.selectedWidget=Object.assign({},e)}}});Hs.render=_s;var $s=Hs;const Us=["id"],qs={key:2},Ws={key:3};function zs(e,t,i,o,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},null,8,["widget-params","widget-name"])),!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",qs,[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",Ws,[Object(D["createElementVNode"])("div",null,[Object(D["createVNode"])(c,{widgets:e.actualWidget.widgets},null,8,["widgets"])])])):Object(D["createCommentVNode"])("",!0)],10,Us)),[[d,{content:e.tooltipContent}]]):Object(D["createCommentVNode"])("",!0)}function Gs(e,t){let i=void 0;return Object.values(e||{}).some(e=>(i=e.find(e=>{var i;return e&&e.isContainer&&(null===(i=e.parameters)||void 0===i?void 0:i.containerId)===t}),i)),i}var Ks=Object(D["defineComponent"])({props:{widget:Object,widgetized:Boolean,containerid:String,preventRecursion:Boolean},components:{WidgetLoader:Cs,WidgetContainer:Ns,WidgetByDimensionContainer:$s,ClientWidgetRenderer:Es},directives:{Tooltips:st},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 rs.widgets.value},actualWidget(){const e=this.widget;if(e){const t=Object.assign({},e);if(e&&e.isReport&&!e.documentation){const i=ms.findReport(e.module,e.action);i&&i.documentation&&(t.documentation=i.documentation)}return e.uniqueId&&(t.parameters=Object.assign(Object.assign({},t.parameters),{},{uniqueId:e.uniqueId})),t}if(this.containerid){const e=Gs(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=ns(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}}});Ks.render=zs;var Ys=Ks;const Qs={class:"reporting-page"},Js={key:1,class:"col s12 l6 leftWidgetColumn"},Xs={key:2,class:"col s12 l6 rightWidgetColumn"};function Zs(e,t,i,o,n,a){const r=Object(D["resolveComponent"])("ActivityIndicator"),s=Object(D["resolveComponent"])("Widget");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Qs,[Object(D["createVNode"])(r,{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"])(s,{key:0,class:"col s12 fullWidgetColumn",widget:e},null,8,["widget"])),e.group?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Js,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.left,e=>(Object(D["openBlock"])(),Object(D["createBlock"])(s,{widget:e,key:e.uniqueId},null,8,["widget"]))),128))])):Object(D["createCommentVNode"])("",!0),e.group?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",Xs,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.right,e=>(Object(D["openBlock"])(),Object(D["createBlock"])(s,{widget:e,key:e.uniqueId},null,8,["widget"]))),128))])):Object(D["createCommentVNode"])("",!0)]))),128))])}function el(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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 tl(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 il(e){if(e&&e[0]){const t=[...e],i=e[0];return i.group?t[0]=Object.assign(Object.assign({},t[0]),{},{left:il(i.left||[]),right:il(i.right||[])}):t[0]=Object.assign(Object.assign({},t[0]),{},{isFirstInPage:!0}),t}return e}class ol{constructor(){el(this,"privateState",Object(D["reactive"])({})),el(this,"state",Object(D["computed"])(()=>Object(D["readonly"])(this.privateState))),el(this,"page",Object(D["computed"])(()=>this.state.value.page)),el(this,"widgets",Object(D["computed"])(()=>{const e=this.page.value;if(!e)return[];let t=[];const i={},o=e=>e.isReport&&i[`${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=>{o(e)||(n(e).forEach(e=>{i[`${e.module}.${e.action}`]=!0}),t.push(e))}),t=Qr(t),1===t.length)return il(t);const a=[];for(let s=0;s<t.length;s+=1){const e=t[s];if(tl(e)||t[s+1]&&tl(t[s+1]))a.push(Object.assign(Object.assign({},e),{},{widgets:Qr(ns(e))}));else{let i=0;const o=[e],n=[];while(t[s+1]&&!tl(t[s+1]))s+=1,i+=1,i%2===0?o.push(t[s]):n.push(t[s]);a.push({group:!0,left:o,right:n})}}const r=il(a);return r}))}fetchPage(e,t){return this.resetPage(),Promise.all([Yr.getAllPages(),ms.fetchReportMetadata()]).then(()=>(this.privateState.page=Yr.findPage(e,t),this.page.value))}resetPage(){this.privateState.page=void 0}}var nl=new ol;function al(){const e="category=General_Visitors&subcategory=Live_VisitorLog",t=window.broadcast.buildReportingUrl(e);let i=a("CoreHome_PeriodHasOnlyRawData",`<a href="${t}">`,"</a>");M.visitorLogEnabled||(i=a("CoreHome_PeriodHasOnlyRawDataNoVisitsLog")),$o.show({id:"onlyRawData",animate:!1,context:"info",message:i,type:"transient"})}function rl(){$o.remove("onlyRawData")}var sl=Object(D["defineComponent"])({components:{ActivityIndicator:We,Widget:Ys},data(){return{loading:!1,hasRawData:!1,hasNoVisits:!1,dateLastChecked:null,hasNoPage:!1}},created(){nl.resetPage(),this.loading=!0,this.renderInitialPage(),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||(rl(),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 i=U.parsed.value;this.renderPage(e,t,i.period,i.date,i.segment)})},computed:{widgets(){return nl.widgets.value}},methods:{renderPage(e,t,i,o,n){if(!e||!t)return nl.resetPage(),void(this.loading=!1);try{c.parse(i,o)}catch(s){return $o.show({id:"invalidDate",animate:!1,context:"error",message:a("CoreHome_DateInvalid"),type:"transient"}),nl.resetPage(),void(this.loading=!1)}$o.remove("invalidDate"),M.postEvent("matomoPageChange",{}),$o.clearTransientNotifications(),c.parse(i,o).containsToday()&&this.showOnlyRawDataMessageIfRequired(e,t,i,o,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});nl.fetchPage(e,t).then(()=>{const t=!nl.page.value;if(t){const t=Yr.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,i,o,n){if(this.hasRawData&&this.hasNoVisits&&al(),n)return void rl();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 rl();const s=6e4;this.dateLastChecked&&(new Date).valueOf()-this.dateLastChecked.valueOf()<s||te.fetch({method:"VisitsSummary.getVisits",date:o,period:i,segment:n}).then(e=>(this.dateLastChecked=new Date,e.value>0?(this.hasNoVisits=!1,void rl()):(this.hasNoVisits=!0,this.hasRawData?void al():te.fetch({method:"Live.getMostRecentVisitsDateTime",date:o,period:i}).then(e=>{if(!e||""===e.value)return this.hasRawData=!1,void rl();this.hasRawData=!0,al()}))))}}});sl.render=Zs;var ll=sl;const cl={class:"report-export-popover row",id:"reportExport"},dl={class:"col l6"},ul={name:"format"},ml={name:"option_flat"},pl={name:"option_show_dimensions"},hl={name:"option_expanded"},gl={name:"option_format_metrics"},bl={class:"col l6"},fl={name:"filter_type"},vl={class:"filter_limit"},Ol={name:"filter_limit_all"},yl={key:0,name:"filter_limit"},jl={key:1,name:"filter_limit"},wl={class:"col l12"},Sl=["value"],Cl=["innerHTML"],kl={class:"col l12"},Dl=["href","title"],El=["innerHTML"];function Pl(e,t,i,o,n,a){const r=Object(D["resolveComponent"])("Field"),s=Object(D["resolveDirective"])("select-on-focus");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",cl,[Object(D["createElementVNode"])("div",dl,[Object(D["createElementVNode"])("div",ul,[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",ml,[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",pl,[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",hl,[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.isCsvOrTsv]])])]),Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",gl,[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",bl,[Object(D["createElementVNode"])("div",null,[Object(D["createElementVNode"])("div",fl,[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",vl,[Object(D["withDirectives"])(Object(D["createElementVNode"])("div",Ol,[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",yl,[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",jl,[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",wl,[Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("textarea",{readonly:"",class:"exportFullUrl",value:e.exportLinkWithoutToken},[Object(D["createTextVNode"])("\n      ")],8,Sl)),[[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,Cl)],512),[[D["vShow"],e.showUrl]]),Object(D["createElementVNode"])("div",kl,[Object(D["createElementVNode"])("a",{class:"btn",href:e.exportLink,target:"_new",title:e.translate("CoreHome_ExportTooltip")},Object(D["toDisplayString"])(e.translate("General_Export")),9,Dl),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,El)):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 Tl=["CSV","TSV"];function Vl(e){return Tl.includes(e)}function xl(e,t,i){return e?Vl(i)?{hasUserPreference:!1,preferredMode:null}:{hasUserPreference:!0,preferredMode:"flat"}:t?{hasUserPreference:!0,preferredMode:"expanded"}:{hasUserPreference:!0,preferredMode:null}}function Nl(e,t,i,o){const{hasUserPreference:n,preferredMode:a}=o;return e?Vl(i)?t?{optionFlat:!n||"flat"===a,optionExpanded:!1}:{optionFlat:!1,optionExpanded:!1}: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}:{optionFlat:!1,optionExpanded:!1}}const Bl=Ce("CorePluginsAdmin","Field");var Il=Object(D["defineComponent"])({components:{Field:Bl},directives:{SelectOnFocus:Mt},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:xl(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})`},isCsvOrTsv(){return Vl(this.reportFormat)},effectiveSubtableOptions(){return Nl(this.hasSubtables,this.canExportFlat,this.reportFormat,this.subtablePreference)},optionFlatModel:{get(){return this.effectiveSubtableOptions.optionFlat},set(e){this.hasSubtables&&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&&!Vl(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:i,reportType:o}=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:m,period:p}=n.param;"RSS"===t&&(m="last10"),"undefined"!==typeof n.param.dateUsedInGraph&&(m=n.param.dateUsedInGraph);const h=M.config.datatable_export_range_as_day.toLowerCase();-1!==h.indexOf(t.toLowerCase())&&"range"===n.param.period&&(p="day"),"range"===n.param.period&&"graphEvolution"===n.param.viewDataTable&&(p="day");const g={module:"API",format:t,idSite:u,period:p,date:m};"processed"===o?(g.method="API.getProcessedReport",[g.apiModule,g.apiAction]=i.split(".")):g.method=i,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 i=t;!0===i?i=1:!1===i&&(i=0),g[e]=i});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)}`}}});Il.render=Pl;var Ml=Il;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:Fl}=window;var Ll={mounted(e,t){e.addEventListener("click",()=>{var i;const o=U.hashParsed.value.popover,n=Fl(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,m=(null!==(i=t.value.canExportFlat)&&void 0!==i?i:u)&&u,p=m,h=!1,g={initialReportType:"default",initialReportFormat:"TSV",initialReportLimit:l>0?l:100,initialReportLimitAll:-1===l?"yes":"no",initialOptionFlat:p,initialOptionShowDimensions:d,initialOptionExpanded:h,initialOptionFormatMetrics:!1,hasSubtables:u,canExportFlat:m,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",Ml);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(),""!==o&&setTimeout(()=>{U.updateHash(Object.assign(Object.assign({},U.hashParsed.value),{},{popover:o})),t.value.onClose&&t.value.onClose()},100)}),setTimeout(()=>{r.dialog(),Fl(".exportFullUrl, .btn",r).tooltip({track:!0,show:!1,hide:!1})},100)})}};const Rl=["src","width","height"];function Al(e,t,i,o,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,Rl)}var _l=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:i}=this,o=M.getSparklineColors();e&&(o.lineColor=o.lineColor.filter((t,i)=>-1!==e.indexOf(i)));const n=JSON.stringify(o),a={forceView:"1",viewDataTable:"sparkline",widget:this.isWidget?"1":"0",showtitle:"1",colors:n,random:Date.now(),date:this.defaultDate,segment:U.parsed.value.segment},r="object"===typeof t?t:U.parse(t.substring(t.indexOf("?")+1)),s=new te,l=s.mixinDefaultGetParams(Object.assign(Object.assign({},a),r)),c=U.parsed.value.token_auth;return c&&c.length&&M.shouldPropagateTokenAuth&&(l.token_auth=c),l.themeMode=i,"?"+U.stringify(l)},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 i=d(e[0]),o=d(e[1]);return`${i},${o}`}},methods:{onThemeModeChange(){this.themeMode=M.getThemeMode()}}});_l.render=Al;var Hl=_l;const $l={class:"progressbar"},Ul={class:"progress"},ql=["innerHTML"];function Wl(e,t,i,o,n,a){const r=Object(D["resolveComponent"])("MatomoLoader");return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",$l,[Object(D["createElementVNode"])("div",Ul,[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,ql)],512),[[D["vShow"],!!e.label]])])}var zl=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}}});zl.render=Wl;var Gl=zl,Kl={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 Yl="(max-width: 767px)",Ql=new WeakMap;function Jl(e){const t=e.parentElement;if(!t||t.classList.contains("contentTableWrapper"))return;const i=document.createElement("div");i.className="contentTableWrapper",t.insertBefore(i,e),i.appendChild(e)}function Xl(e){const t=e.parentElement;if(!t||!t.classList.contains("contentTableWrapper"))return;const i=t.parentElement;i&&(i.insertBefore(e,t),t.remove())}function Zl(e){return(e||window.matchMedia(Yl)).matches}function ec(e,t){e.addEventListener("change",t)}function tc(e,t){e.removeEventListener("change",t)}function ic(e,t){e.classList.add("card","card-table","entityTable"),Zl(t)?Jl(e):Xl(e)}function oc(e){const t=Ql.get(e);t&&(tc(t.mediaQuery,t.listener),Ql.delete(e)),Xl(e)}function nc(e){const t=Ql.get(e);if(t)return void ic(e,t.mediaQuery);const i=window.matchMedia(Yl),o=()=>{e.isConnected?ic(e,i):oc(e)};ec(i,o),Ql.set(e,{mediaQuery:i,listener:o}),ic(e,i)}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */var ac={mounted(e,t){var i;null!==t&&void 0!==t&&null!==(i=t.value)&&void 0!==i&&i.off||nc(e)},updated(e,t){var i;null!==t&&void 0!==t&&null!==(i=t.value)&&void 0!==i&&i.off?oc(e):Object(D["nextTick"])(()=>{nc(e)})},beforeUnmount(e){oc(e)}};const rc={ref:"root"};function sc(e,t,i,o,n,a){return Object(D["openBlock"])(),Object(D["createElementBlock"])("div",rc,[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{$:lc}=window;var cc=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(){lc(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=$o.show({message:a("General_YourChangesHaveBeenSaved"),context:"success",type:"toast",id:"ajaxHelper"});$o.scrollToNotification(e)}}).catch(e=>{this.errorPostResponse=e.message}).finally(()=>{this.isSubmitting=!1})}}});cc.render=sc;var dc=cc;function uc(e,t,i,o,n,a){return Object(D["renderSlot"])(e.$slots,"default")}var mc=Object(D["defineComponent"])({});mc.render=uc;var pc=mc;const hc={key:0},gc=["data-target","title"],bc=Object(D["createElementVNode"])("span",{class:"icon-configure"},null,-1),fc=[bc],vc=["data-target"],Oc=["title"],yc=["title","src"],jc=["id"],wc=["data-footer-icon-id"],Sc=["title"],Cc=["title","src"],kc={key:2},Dc=Object(D["createElementVNode"])("li",{class:"divider"},null,-1),Ec=Object(D["createElementVNode"])("li",{class:"divider"},null,-1),Pc=["title"],Tc=Object(D["createElementVNode"])("span",{class:"icon-export"},null,-1),Vc=[Tc],xc=["title"],Nc=Object(D["createElementVNode"])("span",{class:"icon-image"},null,-1),Bc=[Nc],Ic=["title"],Mc=Object(D["createElementVNode"])("span",{class:"icon-annotation"},null,-1),Fc=[Mc],Lc=["title"],Rc=Object(D["createElementVNode"])("span",{class:"icon-search",draggable:"false"},null,-1),Ac=["title"],_c=["id","title"],Hc=["title"],$c=["title","src"],Uc=["id"],qc={key:0},Wc=["innerHTML"],zc={key:1},Gc=["innerHTML"],Kc={key:2},Yc=["innerHTML"],Qc={key:3},Jc=["innerHTML"],Xc={key:4},Zc=["innerHTML"],ed={key:5},td=["innerHTML"],id=["title","data-target"],od=Object(D["createElementVNode"])("span",{class:"icon-calendar"},null,-1),nd={class:"periodName"},ad=["id"],rd=["data-period"];function sd(e,t,i,o,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",hc,[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"}},fc,10,gc)),[[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,Oc)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("img",{key:1,title:e.translate("CoreHome_ChangeVisualization"),width:"16",height:"16",src:e.activeFooterIcon},null,8,yc))],8,vc)),[[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,i)=>(Object(D["openBlock"])(),Object(D["createBlock"])(r,{key:i},{default:Object(D["withCtx"])(()=>[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(t.buttons.filter(e=>!!e.icon),i=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:i.id},[Object(D["createElementVNode"])("a",{class:Object(D["normalizeClass"])(`${t.class} tableIcon\n              ${-1!==e.activeFooterIconIds.indexOf(i.id)?"activeIcon":""}`),"data-footer-icon-id":i.id},[/^icon-/.test(i.icon||"")?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,title:i.title,class:Object(D["normalizeClass"])(i.icon),style:{"margin-right":"5.5px"}},null,10,Sc)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("img",{key:1,width:"16",height:"16",title:i.title,src:i.icon,style:{"margin-right":"5.5px"}},null,8,Cc)),i.title?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",kc,Object(D["toDisplayString"])(i.title),1)):Object(D["createCommentVNode"])("",!0)],10,wc)]))),128)),Dc]),_:2},1024))),128)),Ec],8,jc)):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"]))},Vc,8,Pc)),[[l,{reportTitle:e.reportTitle,requestParams:e.requestParams,apiMethod:e.apiMethodToRequestDataTable,reportFormats:e.reportFormats,maxFilterLimit:e.maxFilterLimit}]]):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"}},Bc,8,xc)):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"}},Fc,8,Ic)):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"]))},[Rc,Object(D["createElementVNode"])("span",{class:"icon-close",draggable:"false",title:e.translate("CoreHome_CloseSearch")},null,8,Ac),Object(D["createElementVNode"])("input",{id:`widgetSearch_${e.reportId}_${e.placement}`,title:e.translate("CoreHome_DataTableHowToSearch"),type:"text",class:"dataTableSearchInput"},null,8,_c)],8,Lc)):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,$c))],10,Hc))),128)),Object(D["createElementVNode"])("ul",{id:"dropdownConfigure"+e.randomIdForDropdown,class:"dropdown-content tableConfiguration"},[e.showFlattenTable?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",qc,[Object(D["createElementVNode"])("div",{class:"configItem dataTableFlatten",innerHTML:e.$sanitize(e.flattenItemText)},null,8,Wc)])):Object(D["createCommentVNode"])("",!0),e.showDimensionsConfigItem?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",zc,[Object(D["createElementVNode"])("div",{class:"configItem dataTableShowDimensions",innerHTML:e.$sanitize(e.showDimensionsText)},null,8,Gc)])):Object(D["createCommentVNode"])("",!0),e.showFlatConfigItem?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",Kc,[Object(D["createElementVNode"])("div",{class:"configItem dataTableIncludeAggregateRows",innerHTML:e.$sanitize(e.includeAggregateRowsText)},null,8,Yc)])):Object(D["createCommentVNode"])("",!0),e.showTotalsConfigItem?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",Qc,[Object(D["createElementVNode"])("div",{class:"configItem dataTableShowTotalsRow",innerHTML:e.$sanitize(e.keepTotalsRowText)},null,8,Jc)])):Object(D["createCommentVNode"])("",!0),e.showExcludeLowPopulation?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",Xc,[Object(D["createElementVNode"])("div",{class:"configItem dataTableExcludeLowPopulation",innerHTML:e.$sanitize(e.excludeLowPopText)},null,8,Zc)])):Object(D["createCommentVNode"])("",!0),e.showPivotBySubtable?(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",ed,[Object(D["createElementVNode"])("div",{class:"configItem dataTablePivotBySubtable",innerHTML:e.$sanitize(e.pivotByText)},null,8,td)])):Object(D["createCommentVNode"])("",!0)],8,Uc),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,[od,Object(D["createElementVNode"])("span",nd,Object(D["toDisplayString"])(e.translations[e.clientSideParameters.period]||e.clientSideParameters.period),1)])],8,id)),[[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,rd)]))),128))],8,ad)):Object(D["createCommentVNode"])("",!0)])):Object(D["createCommentVNode"])("",!0)}const{$:ld}=window;function cd(e,t,i){if(/(%(.\$)?s+)/g.test(a(e))){const o=['<br /><span class="action">'];i&&o.push(i);let n=a(e,...o);return t&&(n+=` (${a("CoreHome_Default")})`),n+="</span>",n}return a(e)}function dd(e,t,i){return e?cd(t,!0):cd(i)}function ud(e){return!!e&&"0"!==e}var md=Object(D["defineComponent"])({props:{showPeriods:Boolean,showFooter:Boolean,showFooterIcons:Boolean,showSearch:Boolean,showFlattenTable: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:pc},directives:{DropdownButton:Vt,ReportExport:Ll},methods:{showExportImage(e){ld(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},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 dd(ud(e.flat),"CoreHome_UnFlattenDataTable","CoreHome_FlattenDataTable")},keepTotalsRowText(){const e=this.clientSideParameters;return dd(ud(e.keep_totals_row),"CoreHome_RemoveTotalsRowDataTable","CoreHome_AddTotalsRowDataTable")},includeAggregateRowsText(){const e=this.clientSideParameters;return dd(ud(e.include_aggregate_rows),"CoreHome_DataTableExcludeAggregateRows","CoreHome_DataTableIncludeAggregateRows")},showDimensionsText(){const e=this.clientSideParameters;return dd(ud(e.show_dimensions),"CoreHome_DataTableCombineDimensions","CoreHome_DataTableShowDimensions")},pivotByText(){const e=this.clientSideParameters;return ud(e.pivotBy)?cd("CoreHome_UndoPivotBySubtable",!0):cd("CoreHome_PivotBySubtable",!1,this.pivotDimensionName)},excludeLowPopText(){const e=this.clientSideParameters;return dd(ud(e.enable_filter_excludelowpop),"CoreHome_IncludeRowsWithLowPopulation","CoreHome_ExcludeRowsWithLowPopulation")},isAnyConfigureIconHighlighted(){const e=this.clientSideParameters;return ud(e.flat)||ud(e.keep_totals_row)||ud(e.include_aggregate_rows)||ud(e.show_dimensions)||ud(e.pivotBy)||ud(e.enable_filter_excludelowpop)},isTableView(){return"table"===this.viewDataTable||"tableAllColumns"===this.viewDataTable||"tableGoals"===this.viewDataTable}}});md.render=sd;var pd=md;const hd={key:0,class:"title",style:{cursor:"pointer"},ref:"expander"},gd=Object(D["createElementVNode"])("span",{class:"icon-update"},null,-1),bd={key:1,class:"title",href:"?module=CoreUpdater&action=newVersionAvailable",style:{cursor:"pointer"},ref:"expander"},fd=Object(D["createElementVNode"])("span",{class:"icon-update"},null,-1),vd=["innerHTML"],Od=["href"],yd={id:"updateCheckLinkContainer"},jd={class:"dropdown positionInViewport"},wd=["innerHTML"],Sd=["innerHTML"];function Cd(e,t,i,o,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",hd,[gd,Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(e.translate("General_NewUpdatePiwikX",e.latestVersionAvailable)),1)],512)):(Object(D["openBlock"])(),Object(D["createElementBlock"])("a",bd,[fd,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,vd)):(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",yd,Object(D["toDisplayString"])(e.translate("CoreHome_SeeAvailableVersions")),1)],8,Od))]),_:1})):Object(D["createCommentVNode"])("",!0),Object(D["createElementVNode"])("div",jd,[e.latestVersionAvailable&&e.isSuperUser?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.updateNowText)},null,8,wd)):e.latestVersionAvailable&&e.hasSomeViewAccess&&!e.isAnonymous?(Object(D["openBlock"])(),Object(D["createElementBlock"])("span",{key:1,innerHTML:e.$sanitize(e.updateAvailableText)},null,8,Sd)):Object(D["createCommentVNode"])("",!0),Object(D["createTextVNode"])(" "+Object(D["toDisplayString"])(e.translate("General_YouAreCurrentlyUsing",e.piwikVersion)),1)])],2)),[[s,{expander:"expander"}]])}var kd=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:pc},directives:{ExpandOnHover:Dt},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>",me("https://matomo.org/changelog/"),"</a>");return e+"<br/>"},updateAvailableText(){const e=a("General_NewUpdatePiwikX",this.latestVersionAvailable||""),t=me("https://matomo.org/")+"Matomo</a>",i=me("https://matomo.org/changelog/"),o=a("General_PiwikXIsAvailablePleaseNotifyPiwikAdmin",`${t} ${i}${this.latestVersionAvailable}</a>`,`<a href="mailto:${this.contactEmail}?subject=${encodeURIComponent(e)}">`,"</a>");return o+"<br />"}}});kd.render=Cd;var Dd=kd;const Ed={id:"mobile-left-menu",class:"sidenav hide-on-large-only"},Pd={class:"collapsible collapsible-accordion"},Td={class:"collapsible-header"},Vd={class:"collapsible-body"},xd=["title","href"];function Nd(e,t,i,o,n,a){const r=Object(D["resolveDirective"])("side-nav");return Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",Ed,[(Object(D["openBlock"])(!0),Object(D["createElementBlock"])(D["Fragment"],null,Object(D["renderList"])(e.menuWithSubmenuItems,(t,i)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{class:"no-padding",key:i},[Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",Pd,[Object(D["createElementVNode"])("li",null,[Object(D["createElementVNode"])("a",Td,[Object(D["createTextVNode"])(Object(D["toDisplayString"])(e.translateOrDefault(i)),1),Object(D["createElementVNode"])("i",{class:Object(D["normalizeClass"])(t._icon||"icon-chevron-down")},null,2)]),Object(D["createElementVNode"])("div",Vd,[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,i])=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:t},[Object(D["createElementVNode"])("a",{title:i._tooltip?e.translateIfNecessary(i._tooltip):"",target:"_self",href:e.getMenuUrl(i._url)},Object(D["toDisplayString"])(e.translateIfNecessary(t)),9,xd)]))),128))])])])])),[[r,{activator:e.activateLeftMenu}]])]))),128))])}const{$:Bd}=window;var Id=Object(D["defineComponent"])({props:{menu:{type:Object,required:!0}},directives:{SideNav:Ht},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 Bd("nav .activateLeftMenu")[0]}}});Id.render=Nd;var Md=Id;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:Fd}=window;function Ld(e){Fd.scrollTo(e,20)}function Rd(e){e&&e.preventDefault()}function Ad(e,t){var i,o;if(!e)return;if(-1!==e.indexOf("&"))return;let n=null;try{n=Fd("#"+e)}catch(a){return}if(null!==(i=n)&&void 0!==i&&i.length)return Ld(n),void Rd(t);n=Fd(`a[name=${e}]`),null!==(o=n)&&void 0!==o&&o.length&&(Ld(n),Rd(t))}function _d(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 Hd(){if("#/"===window.location.hash.slice(0,2)){const e=window.location.hash.slice(2);Ad(e,null)}}function $d(){Object(D["watch"])(()=>U.url.value,(e,t)=>{if(!e)return;const i=e.href.indexOf("#/");if(-1===i)return;if(t&&!_d(t,e.href))return;const o=e.href.slice(i+2);Ad(o,null)})}function Ud(){Object(D["nextTick"])(Hd)}
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function qd(e){const t=[];if("INPUT"===e.tagName&&"password"===e.type)t.push(e);else{const i=e.querySelectorAll('input[type="password"]');i.forEach(e=>t.push(e))}return t}function Wd(e,t){let i,o=e.value;const n=()=>{e.value="",e.dispatchEvent(new Event("input"))},a=()=>{i&&clearTimeout(i),i=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!==o&&(o=e.value,a())},300);e.onUmounted={cleanup(){clearTimeout(i),clearInterval(l),e.removeEventListener("input",r),e.removeEventListener("change",s),delete e.dataset.autoClearEnabled}}}$d(),Fd(Hd);var zd={mounted(e,t){const i=t.value&&t.value.delay||600,o=qd(e);o.forEach(e=>Wd(e,i))},unmounted(e){const t=qd(e);t.forEach(e=>{e.onUmounted&&"function"===typeof e.onUmounted.cleanup&&(e.onUmounted.cleanup(),delete e.onUmounted)})}};const Gd={key:0,class:"password-strength row"};function Kd(e,t,i,o,n,a){return e.rules.length?(Object(D["openBlock"])(),Object(D["createElementBlock"])("ul",Gd,[(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 Yd=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(i=>{if(e.length||"undefined"===typeof i.passed)try{const o=new RegExp(i.validationRegex.replace(/^\/|\/$/g,""));o.test(e)?(i.passed=!0,t.push(!0)):i.passed=!1}catch(o){console.log("Invalid password validation pattern:",o)}else delete i.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}}});Yd.render=Kd;var Qd=Yd;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const Jd={class:"main-duplicator-modal-content"},Xd={class:"modal-header"},Zd=Object(D["createElementVNode"])("span",{class:"btn-close modal-close"},[Object(D["createElementVNode"])("i",{class:"icon-close"})],-1),eu={key:0,class:"modal-sub-header"},tu={class:"loading-message"},iu={key:0,class:"modal-sub-header"},ou=["innerHTML"],nu={class:"modal-content"},au={class:"modal-inputs"},ru={class:"modal-sub-footer"},su=["innerHTML"],lu=["innerHTML"],cu={class:"modal-footer"},du=["disabled"];function uu(e,t,i,o,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",Jd,[Object(D["createElementVNode"])("div",Xd,[Zd,Object(D["createElementVNode"])("h2",null,Object(D["toDisplayString"])(e.getModalTitle),1)]),e.isLoading?(Object(D["openBlock"])(),Object(D["createElementBlock"])("div",eu,[Object(D["createVNode"])(r),Object(D["createElementVNode"])("span",tu,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",iu,[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,ou)):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",nu,[Object(D["withDirectives"])((Object(D["openBlock"])(),Object(D["createElementBlock"])("div",au,[Object(D["renderSlot"])(e.$slots,"default")])),[[l]])]),Object(D["createElementVNode"])("div",ru,[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,i)=>(Object(D["openBlock"])(),Object(D["createElementBlock"])("li",{key:i,innerHTML:e.$sanitize(t)},null,8,su))),128))])],2)):Object(D["createCommentVNode"])("",!0),Object(D["createElementVNode"])("p",{class:"note-text",innerHTML:e.$sanitize(e.getNoteText)},null,8,lu)]),Object(D["createElementVNode"])("div",cu,[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,du)])],64))],512),[[D["vShow"],e.isModalVisible]])],2)}const mu=Ce("CorePluginsAdmin","Field"),pu=Ce("CorePluginsAdmin","Form"),{$:hu}=window;var gu=Object(D["defineComponent"])({directives:{Form:pu},components:{Field:mu,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=hu(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=hu(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 i=this.modalStore.adapter.prepareApiParams(this.modalStore.getFormValues(null===(t=this.destinationSite)||void 0===t?void 0:t.id));this.modalStore.adapter.submitRequest(i).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=me(this.descriptionLearnMoreLink);return a("CoreHome_LearnMoreFullStop",e,"</a>")},getIsValid(){return!this.isValidated||Array.isArray(this.duplicationErrors)&&0===this.duplicationErrors.length}}});gu.render=uu;var bu=gu;const fu=["title","aria-disabled"];function vu(e,t,i,o,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,fu)),[[r],[D["vShow"],e.isActionVisible]])}var Ou=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:st},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)}}});Ou.render=vu;var yu=Ou;function ju(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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 wu{constructor(e){ju(this,"module",void 0),ju(this,"method",void 0),ju(this,"format",void 0),ju(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(i=>{i in e&&e[i]||t.push(a("General_Required",i))}),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 i=new te;return i.useCallbackInCaseOfError(),i.setErrorCallback(null),i.removeDefaultParameter("date"),i.removeDefaultParameter("period"),i.removeDefaultParameter("segment"),i.addParams({module:this.module,method:this.method,format:this.format},"GET"),i.addParams(t,"POST"),i.setFormat(this.format),i.send()}onSuccess(e){let t=new Promise(e=>e());this.onSuccessCallback&&(t=this.onSuccessCallback(e)),t.then(()=>{setTimeout(()=>{const t=$o.show({message:e.message,context:e.success?"success":"error",type:"toast",id:"entityDuplicationResult"});$o.scrollToNotification(t)})})}}function Su(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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 Cu{constructor(e,t,i){Su(this,"state",Object(D["reactive"])({isModalVisible:!1,commonFormData:{},entityFormData:{},entityTypeTranslation:""})),Su(this,"adapter",void 0),this.state.entityTypeTranslation=e,this.adapter="validateFormFields"in t?t:new wu(t),this.state.commonFormData=null!==i&&void 0!==i?i:{}}static buildStoreInstance(e,t,i){return Object(D["reactive"])(new Cu(e,t,i))}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
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["CorePluginsAdmin"]=t(require("CoreHome"),require("vue")):e["CorePluginsAdmin"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CorePluginsAdmin/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},4788:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},i={"–":"\\--","—":"\\---"," ":"~","\t":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},a=function(e,t){return r({},e,t)};e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.preserveFormatting,s=void 0!==n&&n,l=t.escapeMapFn,c=void 0===l?a:l,u=String(e),p="",d=c(r({},o),s?r({},i):{}),m=Object.keys(d),f=function(){var e=!1;m.forEach((function(t,n){e||u.length>=t.length&&u.slice(0,t.length)===t&&(p+=d[m[n]],u=u.slice(t.length,u.length),e=!0)})),e||(p+=u.slice(0,1),u=u.slice(1,u.length))};while(u)f();return p}},7634:function(e,t,n){"use strict";var r,o,i;(function(n,a){o=[],r=a,i="function"===typeof r?r.apply(t,o):r,void 0===i||(e.exports=i)})(0,(function(){function e(){return!0}function t(){return!1}function n(){}function r(){var o=[{name:"number",test:function(e){return"number"===typeof e}},{name:"string",test:function(e){return"string"===typeof e}},{name:"boolean",test:function(e){return"boolean"===typeof e}},{name:"Function",test:function(e){return"function"===typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"===typeof e&&null!==e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],i={name:"any",test:e},a=[],s=[],l={types:o,conversions:s,ignore:a};function c(e){var t=K(l.types,(function(t){return t.name===e}));if(t)return t;if("any"===e)return i;var n=K(l.types,(function(t){return t.name.toLowerCase()===e.toLowerCase()}));throw new TypeError('Unknown type "'+e+'"'+(n?'. Did you mean "'+n.name+'"?':""))}function u(e){return e===i?999:l.types.indexOf(e)}function p(e){var t=K(l.types,(function(t){return t.test(e)}));if(t)return t.name;throw new TypeError("Value has unknown type. Value: "+e)}function d(e,t){if(!e.signatures)throw new TypeError("Function is no typed-function");var n;if("string"===typeof t){n=t.split(",");for(var r=0;r<n.length;r++)n[r]=n[r].trim()}else{if(!Array.isArray(t))throw new TypeError("String array or a comma separated string expected");n=t}var o=n.join(","),i=e.signatures[o];if(i)return i;throw new TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+n.join(", ")+"))")}function m(e,t){var n=p(e);if(t===n)return e;for(var r=0;r<l.conversions.length;r++){var o=l.conversions[r];if(o.from===n&&o.to===t)return o.convert(e)}throw new Error("Cannot convert from "+n+" to "+t)}function f(e){return e.map((function(e){var t=e.types.map(N);return(e.restParam?"...":"")+t.join("|")})).join(",")}function h(e,t){var n=0===e.indexOf("..."),r=n?e.length>3?e.slice(3):"any":e,o=r.split("|").map(I).filter(U).filter(L),i=P(t,o),a=o.map((function(e){var t=c(e);return{name:e,typeIndex:u(t),test:t.test,conversion:null,conversionIndex:-1}})),s=i.map((function(e){var n=c(e.from);return{name:e.from,typeIndex:u(n),test:n.test,conversion:e,conversionIndex:t.indexOf(e)}}));return{types:a.concat(s),restParam:n}}function g(e,t,n){var r=[];return""!==e.trim()&&(r=e.split(",").map(I).map((function(e,t,r){var o=h(e,n);if(o.restParam&&t!==r.length-1)throw new SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return o}))),r.some(R)?null:{params:r,fn:t}}function b(e){var t=z(e);return!!t&&t.restParam}function y(e){return e.types.some((function(e){return null!=e.conversion}))}function v(t){if(t&&0!==t.types.length){if(1===t.types.length)return c(t.types[0].name).test;if(2===t.types.length){var n=c(t.types[0].name).test,r=c(t.types[1].name).test;return function(e){return n(e)||r(e)}}var o=t.types.map((function(e){return c(e.name).test}));return function(e){for(var t=0;t<o.length;t++)if(o[t](e))return!0;return!1}}return e}function O(e){var t,n,r;if(b(e)){t=q(e).map(v);var o=t.length,i=v(z(e)),a=function(e){for(var t=o;t<e.length;t++)if(!i(e[t]))return!1;return!0};return function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return a(e)&&e.length>=o+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=v(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=v(e[0]),r=v(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(v),function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return e.length===t.length})}function j(e,t){return t<e.params.length?e.params[t]:b(e.params)?z(e.params):null}function w(e,t,n){var r=j(e,t),o=r?n?r.types.filter(k):r.types:[];return o.map(N)}function N(e){return e.name}function k(e){return null===e.conversion||void 0===e.conversion}function x(e,t){var n=Y(Z(e,(function(e){return w(e,t,!1)})));return-1!==n.indexOf("any")?["any"]:n}function E(e,t,n){var r,o,i,a=e||"unnamed",s=n;for(i=0;i<t.length;i++){var l=s.filter((function(e){var n=v(j(e,i));return(i<e.params.length||b(e.params))&&n(t[i])}));if(0===l.length){if(o=x(s,i),o.length>0){var c=p(t[i]);return r=new TypeError("Unexpected type of argument in function "+a+" (expected: "+o.join(" or ")+", actual: "+c+", index: "+i+")"),r.data={category:"wrongType",fn:a,index:i,actual:c,expected:o},r}}else s=l}var u=s.map((function(e){return b(e.params)?1/0:e.params.length}));if(t.length<Math.min.apply(null,u))return o=x(s,i),r=new TypeError("Too few arguments in function "+a+" (expected: "+o.join(" or ")+", index: "+t.length+")"),r.data={category:"tooFewArgs",fn:a,index:t.length,expected:o},r;var d=Math.max.apply(null,u);return t.length>d?(r=new TypeError("Too many arguments in function "+a+" (expected: "+d+", actual: "+t.length+")"),r.data={category:"tooManyArgs",fn:a,index:t.length,expectedLength:d},r):(r=new TypeError('Arguments of type "'+t.join(", ")+'" do not match any of the defined signatures of function '+a+"."),r.data={category:"mismatch",actual:t.map(p)},r)}function C(e){for(var t=999,n=0;n<e.types.length;n++)k(e.types[n])&&(t=Math.min(t,e.types[n].typeIndex));return t}function S(e){for(var t=999,n=0;n<e.types.length;n++)k(e.types[n])||(t=Math.min(t,e.types[n].conversionIndex));return t}function V(e,t){var n;return n=e.restParam-t.restParam,0!==n?n:(n=y(e)-y(t),0!==n?n:(n=C(e)-C(t),0!==n?n:S(e)-S(t)))}function A(e,t){var n,r,o=Math.min(e.params.length,t.params.length);if(r=e.params.some(y)-t.params.some(y),0!==r)return r;for(n=0;n<o;n++)if(r=y(e.params[n])-y(t.params[n]),0!==r)return r;for(n=0;n<o;n++)if(r=V(e.params[n],t.params[n]),0!==r)return r;return e.params.length-t.params.length}function P(e,t){var n={};return e.forEach((function(e){-1!==t.indexOf(e.from)||-1===t.indexOf(e.to)||n[e.from]||(n[e.from]=e)})),Object.keys(n).map((function(e){return n[e]}))}function T(e,t){var n=t;if(e.some(y)){var r=b(e),o=e.map(M);n=function(){for(var e=[],n=r?arguments.length-1:arguments.length,i=0;i<n;i++)e[i]=o[i](arguments[i]);return r&&(e[n]=arguments[n].map(o[n])),t.apply(this,e)}}var i=n;if(b(e)){var a=e.length-1;i=function(){return n.apply(this,W(arguments,0,a).concat([W(arguments,a)]))}}return i}function M(e){var t,n,r,o,i=[],a=[];switch(e.types.forEach((function(e){e.conversion&&(i.push(c(e.conversion.from).test),a.push(e.conversion.convert))})),a.length){case 0:return function(e){return e};case 1:return t=i[0],r=a[0],function(e){return t(e)?r(e):e};case 2:return t=i[0],n=i[1],r=a[0],o=a[1],function(e){return t(e)?r(e):n(e)?o(e):e};default:return function(e){for(var t=0;t<a.length;t++)if(i[t](e))return a[t](e);return e}}}function B(e){var t={};return e.forEach((function(e){e.params.some(y)||D(e.params,!0).forEach((function(n){t[f(n)]=e.fn}))})),t}function D(e,t){function n(e,r,o){if(r<e.length){var i,a=e[r],s=t?a.types.filter(k):a.types;if(a.restParam){var l=s.filter(k);i=l.length<s.length?[l,s]:[s]}else i=s.map((function(e){return[e]}));return Z(i,(function(t){return n(e,r+1,o.concat([t]))}))}var c=o.map((function(t,n){return{types:t,restParam:n===e.length-1&&b(e)}}));return[c]}return n(e,0,[])}function $(e,t){for(var n=Math.max(e.params.length,t.params.length),r=0;r<n;r++){var o=w(e,r,!0),i=w(t,r,!0);if(!G(o,i))return!1}var a=e.params.length,s=t.params.length,l=b(e.params),c=b(t.params);return l?c?a===s:s>=a:c?a>=s:a===s}function F(e,r){if(0===Object.keys(r).length)throw new SyntaxError("No signatures provided");var o=[];Object.keys(r).map((function(e){return g(e,r[e],l.conversions)})).filter(H).forEach((function(e){var t=K(o,(function(t){return $(t,e)}));if(t)throw new TypeError('Conflicting signatures "'+f(t.params)+'" and "'+f(e.params)+'".');o.push(e)}));var i=Z(o,(function(e){var t=e?D(e.params,!1):[];return t.map((function(t){return{params:t,fn:e.fn}}))})).filter(H);i.sort(A);var a=i[0]&&i[0].params.length<=2&&!b(i[0].params),s=i[1]&&i[1].params.length<=2&&!b(i[1].params),c=i[2]&&i[2].params.length<=2&&!b(i[2].params),u=i[3]&&i[3].params.length<=2&&!b(i[3].params),p=i[4]&&i[4].params.length<=2&&!b(i[4].params),d=i[5]&&i[5].params.length<=2&&!b(i[5].params),m=a&&s&&c&&u&&p&&d,h=i.map((function(e){return O(e.params)})),y=a?v(i[0].params[0]):t,j=s?v(i[1].params[0]):t,w=c?v(i[2].params[0]):t,N=u?v(i[3].params[0]):t,k=p?v(i[4].params[0]):t,x=d?v(i[5].params[0]):t,E=a?v(i[0].params[1]):t,C=s?v(i[1].params[1]):t,S=c?v(i[2].params[1]):t,V=u?v(i[3].params[1]):t,P=p?v(i[4].params[1]):t,M=d?v(i[5].params[1]):t,F=i.map((function(e){return T(e.params,e.fn)})),_=a?F[0]:n,L=s?F[1]:n,I=c?F[2]:n,U=u?F[3]:n,R=p?F[4]:n,q=d?F[5]:n,z=a?i[0].params.length:-1,W=s?i[1].params.length:-1,J=c?i[2].params.length:-1,G=u?i[3].params.length:-1,Y=p?i[4].params.length:-1,X=d?i[5].params.length:-1,Q=m?6:0,ee=i.length,te=function(){for(var t=Q;t<ee;t++)if(h[t](arguments))return F[t].apply(this,arguments);return l.onMismatch(e,arguments,i)},ne=function e(t,n){return arguments.length===z&&y(t)&&E(n)?_.apply(e,arguments):arguments.length===W&&j(t)&&C(n)?L.apply(e,arguments):arguments.length===J&&w(t)&&S(n)?I.apply(e,arguments):arguments.length===G&&N(t)&&V(n)?U.apply(e,arguments):arguments.length===Y&&k(t)&&P(n)?R.apply(e,arguments):arguments.length===X&&x(t)&&M(n)?q.apply(e,arguments):te.apply(e,arguments)};try{Object.defineProperty(ne,"name",{value:e})}catch(re){}return ne.signatures=B(i),ne}function _(e,t,n){throw E(e,t,n)}function L(e){return-1===l.ignore.indexOf(e)}function I(e){return e.trim()}function U(e){return!!e}function H(e){return null!==e}function R(e){return 0===e.types.length}function q(e){return e.slice(0,e.length-1)}function z(e){return e[e.length-1]}function W(e,t,n){return Array.prototype.slice.call(e,t,n)}function J(e,t){return-1!==e.indexOf(t)}function G(e,t){for(var n=0;n<e.length;n++)if(J(t,e[n]))return!0;return!1}function K(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function Y(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return Object.keys(t)}function Z(e,t){return Array.prototype.concat.apply([],e.map(t))}function X(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(("object"===typeof r.signatures||"string"===typeof r.signature)&&""!==r.name)if(""===t)t=r.name;else if(t!==r.name){var o=new Error("Function names do not match (expected: "+t+", actual: "+r.name+")");throw o.data={actual:r.name,expected:t},o}}return t}function Q(e){var t,n={};function r(e,r){if(n.hasOwnProperty(e)&&r!==n[e])throw t=new Error('Signature "'+e+'" is defined twice'),t.data={signature:e},t}for(var o=0;o<e.length;o++){var i=e[o];if("object"===typeof i.signatures)for(var a in i.signatures)i.signatures.hasOwnProperty(a)&&(r(a,i.signatures[a]),n[a]=i.signatures[a]);else{if("string"!==typeof i.signature)throw t=new TypeError("Function is no typed-function (index: "+o+")"),t.data={index:o},t;r(i.signature,i),n[i.signature]=i}}return n}return l=F("typed",{"string, Object":F,Object:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);var r=X(t);return F(r,e)},"...Function":function(e){return F(X(e),Q(e))},"string, ...Function":function(e,t){return F(e,Q(t))}}),l.create=r,l.types=o,l.conversions=s,l.ignore=a,l.onMismatch=_,l.throwMismatchError=_,l.createError=E,l.convert=m,l.find=d,l.addType=function(e,t){if(!e||"string"!==typeof e.name||"function"!==typeof e.test)throw new TypeError("Object with properties {name: string, test: function} expected");if(!1!==t)for(var n=0;n<l.types.length;n++)if("Object"===l.types[n].name)return void l.types.splice(n,0,e);l.types.push(e)},l.addConversion=function(e){if(!e||"string"!==typeof e.from||"string"!==typeof e.to||"function"!==typeof e.convert)throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");l.conversions.push(e)},l}return r()}))},"8bbf":function(e,n){e.exports=t},a559:function(e,t){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports["default"]=e.exports,n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports["default"]=e.exports},c0e2:function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;for(r;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,a=r.length;i<a;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"expressions",(function(){return vi})),n.d(t,"FormField",(function(){return Ms})),n.d(t,"Field",(function(){return Fs})),n.d(t,"PluginSettings",(function(){return dl})),n.d(t,"PluginFilter",(function(){return wl})),n.d(t,"PluginManagement",(function(){return El})),n.d(t,"PluginUpload",(function(){return Al})),n.d(t,"SaveButton",(function(){return Dl})),n.d(t,"Form",(function(){return Fl})),n.d(t,"GroupedSettings",(function(){return Ks})),n.d(t,"PluginsIntro",(function(){return Xl})),n.d(t,"ThemesIntro",(function(){return ac})),n.d(t,"PasswordConfirmation",(function(){return cl})),n.d(t,"PluginName",(function(){return cc})),n.d(t,"PluginsTable",(function(){return _u})),n.d(t,"PluginsTableWithUpdates",(function(){return pp})),n.d(t,"UploadPluginDialog",(function(){return xp})),n.d(t,"InstallAllPaidPluginsButton",(function(){return Yl})),n.d(t,"FieldPassword",(function(){return Cs})),n.d(t,"PluginsUpdateCount",(function(){return Cp})),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var i=n("a559"),a=n.n(i);function s(e){return"number"===typeof e}function l(e){return!(!e||"object"!==typeof e||"function"!==typeof e.constructor)&&(!0===e.isBigNumber&&"object"===typeof e.constructor.prototype&&!0===e.constructor.prototype.isBigNumber||"function"===typeof e.constructor.isDecimal&&!0===e.constructor.isDecimal(e))}function c(e){return e&&"object"===typeof e&&!0===Object.getPrototypeOf(e).isComplex||!1}function u(e){return e&&"object"===typeof e&&!0===Object.getPrototypeOf(e).isFraction||!1}function p(e){return e&&!0===e.constructor.prototype.isUnit||!1}function d(e){return"string"===typeof e}var m=Array.isArray;function f(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function h(e){return Array.isArray(e)||f(e)}function g(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function b(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function y(e){return e&&!0===e.constructor.prototype.isRange||!1}function v(e){return e&&!0===e.constructor.prototype.isIndex||!1}function O(e){return"boolean"===typeof e}function j(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function w(e){return e&&!0===e.constructor.prototype.isHelp||!1}function N(e){return"function"===typeof e}function k(e){return e instanceof Date}function x(e){return e instanceof RegExp}function E(e){return!(!e||"object"!==typeof e||e.constructor!==Object||c(e)||u(e))}function C(e){return null===e}function S(e){return void 0===e}function V(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function A(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function P(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function T(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function M(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function B(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function D(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function $(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function F(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function _(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function L(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function I(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function U(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function H(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function R(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function q(e){return e&&!0===e.constructor.prototype.isChain||!1}function z(e){var t=typeof e;return"object"===t?null===e?"null":Array.isArray(e)?"Array":e instanceof Date?"Date":e instanceof RegExp?"RegExp":l(e)?"BigNumber":c(e)?"Complex":u(e)?"Fraction":f(e)?"Matrix":p(e)?"Unit":v(e)?"Index":y(e)?"Range":j(e)?"ResultSet":_(e)?e.type:q(e)?"Chain":w(e)?"Help":"Object":"function"===t?"Function":t}function W(e){var t=typeof e;if("number"===t||"string"===t||"boolean"===t||null===e||void 0===e)return e;if("function"===typeof e.clone)return e.clone();if(Array.isArray(e))return e.map((function(e){return W(e)}));if(e instanceof Date)return new Date(e.valueOf());if(l(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return J(e,W)}function J(e,t){var n={};for(var r in e)Q(e,r)&&(n[r]=t(e[r]));return n}function G(e,t){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(var n in t)if(Q(t,n)&&!(n in Object.prototype)&&!(n in Function.prototype))if(t[n]&&t[n].constructor===Object)void 0===e[n]&&(e[n]={}),e[n]&&e[n].constructor===Object?G(e[n],t[n]):e[n]=t[n];else{if(Array.isArray(t[n]))throw new TypeError("Arrays are not supported by deepExtend");e[n]=t[n]}return e}function K(e,t){var n,r,o;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(r=0,o=e.length;r<o;r++)if(!K(e[r],t[r]))return!1;return!0}if("function"===typeof e)return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!K(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}return e===t}function Y(e){var t={};return Z(e,t),t}function Z(e,t){for(var n in e)if(Q(e,n)){var r=e[n];"object"===typeof r&&null!==r?Z(r,t):t[n]=r}}function X(e,t,n){var r,o=!0;Object.defineProperty(e,t,{get:function(){return o&&(r=n(),o=!1),r},set:function(e){r=e,o=!1},configurable:!0,enumerable:!0})}function Q(e,t){return e&&Object.hasOwnProperty.call(e,t)}function ee(e){return e&&"function"===typeof e.factory}function te(e,t){for(var n={},r=0;r<t.length;r++){var o=t[r],i=e[o];void 0!==i&&(n[o]=i)}return n}function ne(e){return Object.keys(e).map(t=>e[t])}var re=n("c0e2"),oe=n.n(re);function ie(e){var t=new oe.a;return e.on=t.on.bind(t),e.off=t.off.bind(t),e.once=t.once.bind(t),e.emit=t.emit.bind(t),e}function ae(e){return"boolean"===typeof e||!!isFinite(e)&&e===Math.round(e)}var se=Math.sign||function(e){return e>0?1:e<0?-1:0},le=Math.log2||function(e){return Math.log(e)/Math.LN2},ce=Math.log10||function(e){return Math.log(e)/Math.LN10},ue=Math.log1p||function(e){return Math.log(e+1)},pe=Math.cbrt||function(e){if(0===e)return e;var t,n=e<0;return n&&(e=-e),isFinite(e)?(t=Math.exp(Math.log(e)/3),t=(e/(t*t)+2*t)/3):t=e,n?-t:t},de=Math.expm1||function(e){return e>=2e-4||e<=-2e-4?Math.exp(e)-1:e+e*e/2+e*e*e/6};function me(e,t,n){var r={2:"0b",8:"0o",16:"0x"},o=r[t],i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!ae(n))throw new Error("size must be an integer");if(e>2**(n-1)-1||e<-(2**(n-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!ae(e))throw new Error("Value must be an integer");e<0&&(e+=2**n),i="i".concat(n)}var a="";return e<0&&(e=-e,a="-"),"".concat(a).concat(o).concat(e.toString(t)).concat(i)}function fe(e,t){if("function"===typeof t)return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var n,r,o="auto";if(t&&(t.notation&&(o=t.notation),s(t)?n=t:s(t.precision)&&(n=t.precision),t.wordSize&&(r=t.wordSize,"number"!==typeof r)))throw new Error('Option "wordSize" must be a number');switch(o){case"fixed":return be(e,n);case"exponential":return ye(e,n);case"engineering":return ge(e,n);case"bin":return me(e,2,r);case"oct":return me(e,8,r);case"hex":return me(e,16,r);case"auto":return ve(e,n,t&&t).replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t}));default:throw new Error('Unknown notation "'+o+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function he(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var n=t[1],r=t[2],o=parseFloat(t[4]||"0"),i=r.indexOf(".");o+=-1!==i?i-1:r.length-1;var a=r.replace(".","").replace(/^0*/,(function(e){return o-=e.length,""})).replace(/0*$/,"").split("").map((function(e){return parseInt(e)}));return 0===a.length&&(a.push(0),o++),{sign:n,coefficients:a,exponent:o}}function ge(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=he(e),r=Oe(n,t),o=r.exponent,i=r.coefficients,a=o%3===0?o:o<0?o-3-o%3:o-o%3;if(s(t))while(t>i.length||o-a+1>i.length)i.push(0);else for(var l=Math.abs(o-a)-(i.length-1),c=0;c<l;c++)i.push(0);var u=Math.abs(o-a),p=1;while(u>0)p++,u--;var d=i.slice(p).join(""),m=s(t)&&d.length||d.match(/[1-9]/)?"."+d:"",f=i.slice(0,p).join("")+m+"e"+(o>=0?"+":"")+a.toString();return r.sign+f}function be(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=he(e),r="number"===typeof t?Oe(n,n.exponent+1+t):n,o=r.coefficients,i=r.exponent+1,a=i+(t||0);return o.length<a&&(o=o.concat(je(a-o.length))),i<0&&(o=je(1-i).concat(o),i=1),i<o.length&&o.splice(i,0,0===i?"0.":"."),r.sign+o.join("")}function ye(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=he(e),r=t?Oe(n,t):n,o=r.coefficients,i=r.exponent;o.length<t&&(o=o.concat(je(t-o.length)));var a=o.shift();return r.sign+a+(o.length>0?"."+o.join(""):"")+"e"+(i>=0?"+":"")+i}function ve(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&void 0!==n.lowerExp?n.lowerExp:-3,o=n&&void 0!==n.upperExp?n.upperExp:5,i=he(e),a=t?Oe(i,t):i;if(a.exponent<r||a.exponent>=o)return ye(e,t);var s=a.coefficients,l=a.exponent;s.length<t&&(s=s.concat(je(t-s.length))),s=s.concat(je(l-s.length+1+(s.length<t?t-s.length:0))),s=je(-l).concat(s);var c=l>0?l:0;return c<s.length-1&&s.splice(c+1,0,"."),a.sign+s.join("")}function Oe(e,t){var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;while(t<=0)r.unshift(0),n.exponent++,t++;if(r.length>t){var o=r.splice(t,r.length-t);if(o[0]>=5){var i=t-1;r[i]++;while(10===r[i])r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}}return n}function je(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function we(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}Number.EPSILON;var Ne=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},ke=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},xe=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},Ee=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},Ce=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},Se=Math.tanh||function(e){var t=Math.exp(2*e);return(t-1)/(t+1)};function Ve(e,t,n){var r=e.constructor,o=new r(2),i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!ae(n))throw new Error("size must be an integer");if(e.greaterThan(o.pow(n-1).sub(1))||e.lessThan(o.pow(n-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(o.pow(n))),i="i".concat(n)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(t," not supported "))}}function Ae(e,t){if("function"===typeof t)return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n,r,o="auto";if(void 0!==t&&(t.notation&&(o=t.notation),"number"===typeof t?n=t:t.precision&&(n=t.precision),t.wordSize&&(r=t.wordSize,"number"!==typeof r)))throw new Error('Option "wordSize" must be a number');switch(o){case"fixed":return Me(e,n);case"exponential":return Te(e,n);case"engineering":return Pe(e,n);case"bin":return Ve(e,2,r);case"oct":return Ve(e,8,r);case"hex":return Ve(e,16,r);case"auto":var i,a=t&&void 0!==t.lowerExp?t.lowerExp:-3,s=t&&void 0!==t.upperExp?t.upperExp:5;if(e.isZero())return"0";var l=e.toSignificantDigits(n),c=l.e;return i=c>=a&&c<s?l.toFixed():Te(e,n),i.replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t}));default:throw new Error('Unknown notation "'+o+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Pe(e,t){var n=e.e,r=n%3===0?n:n<0?n-3-n%3:n-n%3,o=e.mul(Math.pow(10,-r)),i=o.toPrecision(t);return-1!==i.indexOf("e")&&(i=o.toString()),i+"e"+(n>=0?"+":"")+r.toString()}function Te(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()}function Me(e,t){return e.toFixed(t)}function Be(e,t){var n=De(e,t);return t&&"object"===typeof t&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function De(e,t){if("number"===typeof e)return fe(e,t);if(l(e))return Ae(e,t);if(Le(e))return t&&"decimal"===t.fraction?e.toString():e.s*e.n+"/"+e.d;if(Array.isArray(e))return _e(e,t);if(d(e))return'"'+e+'"';if("function"===typeof e)return e.syntax?String(e.syntax):"function";if(e&&"object"===typeof e){if("function"===typeof e.format)return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var n=Object.keys(e).map(n=>'"'+n+'": '+Be(e[n],t));return"{"+n.join(", ")+"}"}return String(e)}function $e(e){var t=String(e),n="",r=0;while(r<t.length){var o=t.charAt(r);"\\"===o?(n+=o,r++,o=t.charAt(r),""!==o&&-1!=='"\\/bfnrtu'.indexOf(o)||(n+="\\"),n+=o):n+='"'===o?'\\"':o,r++}return'"'+n+'"'}function Fe(e){var t=String(e);return t=t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),t}function _e(e,t){if(Array.isArray(e)){for(var n="[",r=e.length,o=0;o<r;o++)0!==o&&(n+=", "),n+=_e(e[o],t);return n+="]",n}return Be(e,t)}function Le(e){return e&&"object"===typeof e&&"number"===typeof e.s&&"number"===typeof e.n&&"number"===typeof e.d||!1}function Ie(e,t,n){if(!(this instanceof Ie))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=(new Error).stack}function Ue(e,t,n){if(!(this instanceof Ue))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}function He(e){var t=[];while(Array.isArray(e))t.push(e.length),e=e[0];return t}function Re(e,t){return Array.prototype.map.call(e,t)}function qe(e,t){Array.prototype.forEach.call(e,t)}function ze(e,t){return Array.prototype.join.call(e,t)}function We(e,t){return-1!==e.indexOf(t)}function Je(e,t,n,r){function o(r){var o=te(r,t.map(Ze));return Ke(e,t,r),n(o)}return o.isFactory=!0,o.fn=e,o.dependencies=t.slice().sort(),r&&(o.meta=r),o}function Ge(e){return"function"===typeof e&&"string"===typeof e.fn&&Array.isArray(e.dependencies)}function Ke(e,t,n){var r=t.filter(e=>!Ye(e)).every(e=>void 0!==n[e]);if(!r){var o=t.filter(e=>void 0===n[e]);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(o.map(e=>'"'.concat(e,'"')).join(", "),"."))}}function Ye(e){return e&&"?"===e[0]}function Ze(e){return e&&"?"===e[0]?e.slice(1):e}function Xe(e,t,n,r){if(!(this instanceof Xe))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=r,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(void 0!==r&&null!==r?"-"+r:"")+" expected)",this.stack=(new Error).stack}function Qe(e,t,n,r){function o(e,t){var n=arguments.length;if(1!==n&&2!==n)throw new Xe("import",n,1,2);function r(e,n,o){if(Array.isArray(n))n.forEach(t=>r(e,t));else if("object"===typeof n)for(var i in n)Q(n,i)&&r(e,n[i],i);else if(Ge(n)||void 0!==o){var a=Ge(n)?O(n)?n.fn+".transform":n.fn:o;if(Q(e,a)&&e[a]!==n&&!t.silent)throw new Error('Cannot import "'+a+'" twice');e[a]=n}else if(!t.silent)throw new TypeError("Factory, Object, or Array expected")}t||(t={});var o={};for(var a in r(o,e),o)if(Q(o,a)){var s=o[a];if(Ge(s))m(s,t);else if(h(s))i(a,s,t);else if(!t.silent)throw new TypeError("Factory, Object, or Array expected")}}function i(t,o,i){if(i.wrap&&"function"===typeof o&&(o=d(o)),b(o)&&(o=e(t,{[o.signature]:o})),g(n[t])&&g(o))return o=i.override?e(t,o.signatures):e(n[t],o),n[t]=o,delete r[t],a(t,o),void n.emit("import",t,(function(){return o}));if(void 0===n[t]||i.override)return n[t]=o,delete r[t],a(t,o),void n.emit("import",t,(function(){return o}));if(!i.silent)throw new Error('Cannot import "'+t+'": already exists')}function a(e,t){t&&"function"===typeof t.transform?(n.expression.transform[e]=t.transform,y(e)&&(n.expression.mathWithTransform[e]=t.transform)):(delete n.expression.transform[e],y(e)&&(n.expression.mathWithTransform[e]=t))}function s(e){delete n.expression.transform[e],y(e)?n.expression.mathWithTransform[e]=n[e]:delete n.expression.mathWithTransform[e]}function d(e){var t=function(){for(var t=[],r=0,o=arguments.length;r<o;r++){var i=arguments[r];t[r]=i&&i.valueOf()}return e.apply(n,t)};return e.transform&&(t.transform=e.transform),t}function m(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.fn;if(We(i,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(i));var a=O(t)?n.expression.transform:n,l=i in n.expression.transform,c=Q(a,i)?a[i]:void 0,u=function(){var r={};t.dependencies.map(Ze).forEach(e=>{if(We(e,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(e));"math"===e?r.math=n:"mathWithTransform"===e?r.mathWithTransform=n.expression.mathWithTransform:"classes"===e?r.classes=n:r[e]=n[e]});var a=t(r);if(a&&"function"===typeof a.transform)throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(void 0===c||o.override)return a;if(g(c)&&g(a))return e(c,a);if(o.silent)return c;throw new Error('Cannot import "'+i+'": already exists')};t.meta&&!1===t.meta.lazy?(a[i]=u(),c&&l?s(i):(O(t)||v(t))&&X(n.expression.mathWithTransform,i,()=>a[i])):(X(a,i,u),c&&l?s(i):(O(t)||v(t))&&X(n.expression.mathWithTransform,i,()=>a[i])),r[i]=t,n.emit("import",i,u)}function h(e){return"function"===typeof e||"number"===typeof e||"string"===typeof e||"boolean"===typeof e||null===e||p(e)||c(e)||l(e)||u(e)||f(e)||Array.isArray(e)}function g(e){return"function"===typeof e&&"object"===typeof e.signatures}function b(e){return"function"===typeof e&&"string"===typeof e.signature}function y(e){return!Q(j,e)}function v(e){return-1===e.fn.indexOf(".")&&!Q(j,e.fn)&&(!e.meta||!e.meta.isClass)}function O(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction||!1}var j={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return o}Ie.prototype=new RangeError,Ie.prototype.constructor=RangeError,Ie.prototype.name="DimensionError",Ie.prototype.isDimensionError=!0,Ue.prototype=new RangeError,Ue.prototype.constructor=RangeError,Ue.prototype.name="IndexError",Ue.prototype.isIndexError=!0,Xe.prototype=new Error,Xe.prototype.constructor=Error,Xe.prototype.name="ArgumentsError",Xe.prototype.isArgumentsError=!0;var et={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null},tt=["Matrix","Array"],nt=["number","BigNumber","Fraction"];function rt(e,t){function n(n){if(n){var r=J(e,W);it(n,"matrix",tt),it(n,"number",nt),G(e,n);var o=J(e,W),i=J(n,W);return t("config",o,r,i),o}return J(e,W)}return n.MATRIX_OPTIONS=tt,n.NUMBER_OPTIONS=nt,Object.keys(et).forEach(t=>{Object.defineProperty(n,t,{get:()=>e[t],enumerable:!0,configurable:!0})}),n}function ot(e,t){return-1!==e.indexOf(t)}function it(e,t,n){void 0===e[t]||ot(n,e[t])||console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+n.map(e=>JSON.stringify(e)).join(", ")+".")}function at(e,t){var n=a()({},et,t);if("function"!==typeof Object.create)throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var r=ie({isNumber:s,isComplex:c,isBigNumber:l,isFraction:u,isUnit:p,isString:d,isArray:m,isMatrix:f,isCollection:h,isDenseMatrix:g,isSparseMatrix:b,isRange:y,isIndex:v,isBoolean:O,isResultSet:j,isHelp:w,isFunction:N,isDate:k,isRegExp:x,isObject:E,isNull:C,isUndefined:S,isAccessorNode:V,isArrayNode:A,isAssignmentNode:P,isBlockNode:T,isConditionalNode:M,isConstantNode:B,isFunctionAssignmentNode:D,isFunctionNode:$,isIndexNode:F,isNode:_,isObjectNode:L,isOperatorNode:I,isParenthesisNode:U,isRangeNode:H,isSymbolNode:R,isChain:q});r.config=rt(n,r.emit),r.expression={transform:{},mathWithTransform:{config:r.config}};var o=[],i=[];function z(e){if(Ge(e))return e(r);var t=e[Object.keys(e)[0]];if(Ge(t))return t(r);if(!ee(e))throw console.warn("Factory object with properties `type`, `name`, and `factory` expected",e),new Error("Factory object with properties `type`, `name`, and `factory` expected");var a,s=o.indexOf(e);return-1===s?(a=!0===e.math?e.factory(r.type,n,z,r.typed,r):e.factory(r.type,n,z,r.typed),o.push(e),i.push(a)):a=i[s],a}var W={};function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.typed.apply(r.typed,t)}var G=Qe(J,z,r,W);return r.import=G,r.on("config",()=>{ne(W).forEach(e=>{e&&e.meta&&e.meta.recreateOnConfigChange&&G(e,{override:!0})})}),r.create=at.bind(null,e),r.factory=Je,r.import(ne(Y(e))),r.ArgumentsError=Xe,r.DimensionError=Ie,r.IndexError=Ue,r}var st=new Set(["end"]);function lt(e,t){if(ft(e)&&pt(e,t))return e[t];if("function"===typeof e[t]&&mt(e,t))throw new Error('Cannot access method "'+t+'" as a property');throw new Error('No access to property "'+t+'"')}function ct(e,t,n){if(ft(e)&&pt(e,t))return e[t]=n,n;throw new Error('No access to property "'+t+'"')}function ut(e,t){return t in e}function pt(e,t){return!(!e||"object"!==typeof e)&&(!!Q(ht,t)||!(t in Object.prototype)&&!(t in Function.prototype))}function dt(e,t){if(!mt(e,t))throw new Error('No access to method "'+t+'"')}function mt(e,t){return null!==e&&void 0!==e&&"function"===typeof e[t]&&(!(Q(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e))&&(!!Q(gt,t)||!(t in Object.prototype)&&!(t in Function.prototype)))}function ft(e){return"object"===typeof e&&e&&e.constructor===Object}var ht={length:!0,name:!0},gt={toString:!0,valueOf:!0,toLocaleString:!0};class bt{constructor(e){this.wrappedObject=e}keys(){return Object.keys(this.wrappedObject)}get(e){return lt(this.wrappedObject,e)}set(e,t){return ct(this.wrappedObject,e,t),this}has(e){return ut(this.wrappedObject,e)}}function yt(){return new Map}function vt(e){if(!e)return yt();if(Ot(e))return e;if(E(e))return new bt(e);throw new Error("createMap can create maps from objects or Maps")}function Ot(e){return!!e&&(e instanceof Map||e instanceof bt||"function"===typeof e.set&&"function"===typeof e.get&&"function"===typeof e.keys&&"function"===typeof e.has)}function jt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o of n)if(o)if(Ot(o))for(var i of o.keys())e.set(i,o.get(i));else if(E(o))for(var a of Object.keys(o))e.set(a,o[a]);return e}var wt="Node",Nt=["mathWithTransform"],kt=Je(wt,Nt,e=>{var{mathWithTransform:t}=e;function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator")}function r(e){for(var t of[...st])if(e.has(t))throw new Error('Scope contains an illegal symbol, "'+t+'" is a reserved keyword')}return n.prototype.evaluate=function(e){return this.compile().evaluate(e)},n.prototype.type="Node",n.prototype.isNode=!0,n.prototype.comment="",n.prototype.compile=function(){var e=this._compile(t,{}),n={},o=null;function i(t){var i=vt(t);return r(i),e(i,n,o)}return{evaluate:i}},n.prototype._compile=function(e,t){throw new Error("Method _compile should be implemented by type "+this.type)},n.prototype.forEach=function(e){throw new Error("Cannot run forEach on a Node interface")},n.prototype.map=function(e){throw new Error("Cannot run map on a Node interface")},n.prototype._ifNode=function(e){if(!_(e))throw new TypeError("Callback function must return a Node");return e},n.prototype.traverse=function(e){function t(e,n){e.forEach((function(e,r,o){n(e,r,o),t(e,n)}))}e(this,null,null),t(this,e)},n.prototype.transform=function(e){function t(n,r,o){var i=e(n,r,o);return i!==n?i:n.map(t)}return t(this,null,null)},n.prototype.filter=function(e){var t=[];return this.traverse((function(n,r,o){e(n,r,o)&&t.push(n)})),t},n.prototype.clone=function(){throw new Error("Cannot clone a Node interface")},n.prototype.cloneDeep=function(){return this.map((function(e){return e.cloneDeep()}))},n.prototype.equals=function(e){return!!e&&K(this,e)},n.prototype.toString=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this._toString(e)},n.prototype.toJSON=function(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)},n.prototype.toHTML=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this.toHTML(e)},n.prototype._toString=function(){throw new Error("_toString not implemented for "+this.type)},n.prototype.toTex=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this._toTex(e)},n.prototype._toTex=function(e){throw new Error("_toTex not implemented for "+this.type)},n.prototype._getCustomString=function(e){if(e&&"object"===typeof e)switch(typeof e.handler){case"object":case"undefined":return;case"function":return e.handler(this,e);default:throw new TypeError("Object or function expected as callback")}},n.prototype.getIdentifier=function(){return this.type},n.prototype.getContent=function(){return this},n},{isClass:!0,isNode:!0}),xt={createNode:kt},Et="number",Ct="number, number";function St(e){return Math.abs(e)}function Vt(e,t){return e+t}function At(e,t){return e-t}function Pt(e,t){return e*t}function Tt(e,t){return e/t}function Mt(e){return-e}function Bt(e){return e}function Dt(e){return pe(e)}function $t(e){return e*e*e}function Ft(e){return Math.exp(e)}function _t(e){return de(e)}function Lt(e,t){if(!ae(e)||!ae(t))throw new Error("Parameters in function gcd must be integer numbers");var n;while(0!==t)n=e%t,e=t,t=n;return e<0?-e:e}function It(e,t){if(!ae(e)||!ae(t))throw new Error("Parameters in function lcm must be integer numbers");if(0===e||0===t)return 0;var n,r=e*t;while(0!==t)n=t,t=e%n,e=n;return Math.abs(r/e)}function Ut(e){return ce(e)}function Ht(e){return le(e)}function Rt(e){return ue(e)}function qt(e,t){if(t>0)return e-t*Math.floor(e/t);if(0===t)return e;throw new Error("Cannot calculate mod for a negative divisor")}function zt(e){return se(e)}function Wt(e){return Math.sqrt(e)}function Jt(e){return e*e}function Gt(e,t){var n,r,o,i,a=0,s=1,l=1,c=0;if(!ae(e)||!ae(t))throw new Error("Parameters in function xgcd must be integer numbers");while(t)r=Math.floor(e/t),o=e-r*t,n=a,a=s-r*a,s=n,n=l,l=c-r*l,c=n,e=t,t=o;return i=e<0?[-e,-s,-c]:[e,e?s:0,c],i}function Kt(e,t){return e*e<1&&t===1/0||e*e>1&&t===-1/0?0:Math.pow(e,t)}function Yt(e){return Math.abs(e)}St.signature=Et,Vt.signature=Ct,At.signature=Ct,Pt.signature=Ct,Tt.signature=Ct,Mt.signature=Et,Bt.signature=Et,Dt.signature=Et,$t.signature=Et,Ft.signature=Et,_t.signature=Et,Lt.signature=Ct,It.signature=Ct,Ut.signature=Et,Ht.signature=Et,Rt.signature=Et,qt.signature=Ct,zt.signature=Et,Wt.signature=Et,Jt.signature=Et,Gt.signature=Ct,Kt.signature=Ct,Yt.signature=Et;var Zt="number",Xt="number, number";function Qt(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function bitAnd");return e&t}function en(e){if(!ae(e))throw new Error("Integer expected in function bitNot");return~e}function tn(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function bitOr");return e|t}function nn(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function bitXor");return e^t}function rn(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function leftShift");return e<<t}function on(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function rightArithShift");return e>>t}function an(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function rightLogShift");return e>>>t}Qt.signature=Xt,en.signature=Zt,tn.signature=Xt,nn.signature=Xt,rn.signature=Xt,on.signature=Xt,an.signature=Xt;var sn="number",ln="number, number";function cn(e){return!e}function un(e,t){return!(!e&&!t)}function pn(e,t){return!!e!==!!t}function dn(e,t){return!(!e||!t)}function mn(e,t){if(t<e)return 1;if(t===e)return t;var n=t+e>>1;return mn(e,n)*mn(n+1,t)}function fn(e,t){if(!ae(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!ae(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(t>e)throw new TypeError("k must be less than or equal to n");for(var n=e-t,r=1,o=t<n?n+1:t+1,i=2,a=t<n?t:n,s=o;s<=e;++s){r*=s;while(i<=a&&r%i===0)r/=i,++i}return i<=a&&(r/=mn(i,a)),r}function hn(e){var t;if(ae(e))return e<=0?isFinite(e)?1/0:NaN:e>171?1/0:mn(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*hn(1-e));if(e>=171.35)return 1/0;if(e>85){var n=e*e,r=n*e,o=r*e,i=o*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*n)-139/(51840*r)-571/(2488320*o)+163879/(209018880*i)+5246819/(75246796800*i*e))}--e,t=bn[0];for(var a=1;a<bn.length;++a)t+=bn[a]/(e+a);var s=e+gn+.5;return Math.sqrt(2*Math.PI)*Math.pow(s,e+.5)*Math.exp(-s)*t}cn.signature=sn,un.signature=ln,pn.signature=ln,dn.signature=ln,fn.signature="number, number",hn.signature="number";var gn=4.7421875,bn=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],yn=.9189385332046728,vn=5,On=7,jn=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];function wn(e){if(e<0)return NaN;if(0===e)return 1/0;if(!isFinite(e))return e;if(e<.5)return Math.log(Math.PI/Math.sin(Math.PI*e))-wn(1-e);e-=1;for(var t=e+vn+.5,n=jn[0],r=On-1;r>=1;r--)n+=jn[r]/(e+r);return yn+(e+.5)*Math.log(t)-t+Math.log(n)}wn.signature="number";var Nn="number",kn="number, number";function xn(e){return Math.acos(e)}function En(e){return Ne(e)}function Cn(e){return Math.atan(1/e)}function Sn(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}function Vn(e){return Math.asin(1/e)}function An(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}function Pn(e){return Math.acos(1/e)}function Tn(e){var t=1/e,n=Math.sqrt(t*t-1);return Math.log(n+t)}function Mn(e){return Math.asin(e)}function Bn(e){return ke(e)}function Dn(e){return Math.atan(e)}function $n(e,t){return Math.atan2(e,t)}function Fn(e){return xe(e)}function _n(e){return Math.cos(e)}function Ln(e){return Ee(e)}function In(e){return 1/Math.tan(e)}function Un(e){var t=Math.exp(2*e);return(t+1)/(t-1)}function Hn(e){return 1/Math.sin(e)}function Rn(e){return 0===e?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*se(e)}function qn(e){return 1/Math.cos(e)}function zn(e){return 2/(Math.exp(e)+Math.exp(-e))}function Wn(e){return Math.sin(e)}function Jn(e){return Ce(e)}function Gn(e){return Math.tan(e)}function Kn(e){return Se(e)}xn.signature=Nn,En.signature=Nn,Cn.signature=Nn,Sn.signature=Nn,Vn.signature=Nn,An.signature=Nn,Pn.signature=Nn,Tn.signature=Nn,Mn.signature=Nn,Bn.signature=Nn,Dn.signature=Nn,$n.signature=kn,Fn.signature=Nn,_n.signature=Nn,Ln.signature=Nn,In.signature=Nn,Un.signature=Nn,Hn.signature=Nn,Rn.signature=Nn,qn.signature=Nn,zn.signature=Nn,Wn.signature=Nn,Jn.signature=Nn,Gn.signature=Nn,Kn.signature=Nn;var Yn="number";function Zn(e){return ae(e)}function Xn(e){return e<0}function Qn(e){return e>0}function er(e){return 0===e}function tr(e){return Number.isNaN(e)}function nr(){throw new Error('No "bignumber" implementation available')}function rr(){throw new Error('No "fraction" implementation available')}function or(){throw new Error('No "matrix" implementation available')}function ir(){throw new Error('No "matrix" implementation available')}Zn.signature=Yn,Xn.signature=Yn,Qn.signature=Yn,er.signature=Yn,tr.signature=Yn;var ar=Je("matrix",[],()=>or),sr=Je("subset",[],()=>ir);lr("combinations",fn),lr("gamma",hn),lr("lgamma",wn);function lr(e,t){return Je(e,["typed"],e=>{var{typed:n}=e;return n(t)})}var cr={createSubset:sr};function ur(e){return e&&e.isIndexError?new Ue(e.index+1,e.min+1,void 0!==e.max?e.max+1:void 0):e}function pr(e){var{subset:t}=e;return function(e,n){try{if(Array.isArray(e))return t(e,n);if(e&&"function"===typeof e.subset)return e.subset(n);if("string"===typeof e)return t(e,n);if("object"===typeof e){if(!n.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return lt(e,n.getObjectProperty())}throw new TypeError("Cannot apply index: unsupported type of object")}catch(r){throw ur(r)}}}var dr="AccessorNode",mr=["subset","Node"],fr=Je(dr,mr,e=>{var{subset:t,Node:n}=e,r=pr({subset:t});function o(e,t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!_(e))throw new TypeError('Node expected for parameter "object"');if(!F(t))throw new TypeError('IndexNode expected for parameter "index"');this.object=e||null,this.index=t,Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function i(e){return!(V(e)||A(e)||B(e)||$(e)||L(e)||U(e)||R(e))}return o.prototype=new n,o.prototype.type="AccessorNode",o.prototype.isAccessorNode=!0,o.prototype._compile=function(e,t){var n=this.object._compile(e,t),o=this.index._compile(e,t);if(this.index.isObjectProperty()){var i=this.index.getObjectProperty();return function(e,t,r){return lt(n(e,t,r),i)}}return function(e,t,i){var a=n(e,t,i),s=o(e,t,a);return r(a,s)}},o.prototype.forEach=function(e){e(this.object,"object",this),e(this.index,"index",this)},o.prototype.map=function(e){return new o(this._ifNode(e(this.object,"object",this)),this._ifNode(e(this.index,"index",this)))},o.prototype.clone=function(){return new o(this.object,this.index)},o.prototype._toString=function(e){var t=this.object.toString(e);return i(this.object)&&(t="("+t+")"),t+this.index.toString(e)},o.prototype.toHTML=function(e){var t=this.object.toHTML(e);return i(this.object)&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+this.index.toHTML(e)},o.prototype._toTex=function(e){var t=this.object.toTex(e);return i(this.object)&&(t="\\left(' + object + '\\right)"),t+this.index.toTex(e)},o.prototype.toJSON=function(){return{mathjs:"AccessorNode",object:this.object,index:this.index}},o.fromJSON=function(e){return new o(e.object,e.index)},o},{isClass:!0,isNode:!0}),hr={NodeDependencies:xt,subsetDependencies:cr,createAccessorNode:fr},gr="ArrayNode",br=["Node"],yr=Je(gr,br,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(this.items=e||[],!Array.isArray(this.items)||!this.items.every(_))throw new TypeError("Array containing Nodes expected")}return n.prototype=new t,n.prototype.type="ArrayNode",n.prototype.isArrayNode=!0,n.prototype._compile=function(e,t){var n=Re(this.items,(function(n){return n._compile(e,t)})),r="Array"!==e.config.matrix;if(r){var o=e.matrix;return function(e,t,r){return o(Re(n,(function(n){return n(e,t,r)})))}}return function(e,t,r){return Re(n,(function(n){return n(e,t,r)}))}},n.prototype.forEach=function(e){for(var t=0;t<this.items.length;t++){var n=this.items[t];e(n,"items["+t+"]",this)}},n.prototype.map=function(e){for(var t=[],r=0;r<this.items.length;r++)t[r]=this._ifNode(e(this.items[r],"items["+r+"]",this));return new n(t)},n.prototype.clone=function(){return new n(this.items.slice(0))},n.prototype._toString=function(e){var t=this.items.map((function(t){return t.toString(e)}));return"["+t.join(", ")+"]"},n.prototype.toJSON=function(){return{mathjs:"ArrayNode",items:this.items}},n.fromJSON=function(e){return new n(e.items)},n.prototype.toHTML=function(e){var t=this.items.map((function(t){return t.toHTML(e)}));return'<span class="math-parenthesis math-square-parenthesis">[</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},n.prototype._toTex=function(e){function t(n,r){var o=n.some(A)&&!n.every(A),i=r||o,a=i?"&":"\\\\",s=n.map((function(n){return n.items?t(n.items,!r):n.toTex(e)})).join(a);return o||!i||i&&!r?"\\begin{bmatrix}"+s+"\\end{bmatrix}":s}return t(this.items,!1)},n},{isClass:!0,isNode:!0}),vr={NodeDependencies:xt,createArrayNode:yr},Or={createMatrix:ar};function jr(e){var{subset:t,matrix:n}=e;return function(e,r,o){try{if(Array.isArray(e))return n(e).subset(r,o).valueOf();if(e&&"function"===typeof e.subset)return e.subset(r,o);if("string"===typeof e)return t(e,r,o);if("object"===typeof e){if(!r.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return ct(e,r.getObjectProperty(),o),e}throw new TypeError("Cannot apply index: unsupported type of object")}catch(i){throw ur(i)}}}var wr=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{associativity:"left",associativeWith:[]}},{"OperatorNode:and":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{associativity:"left",associativeWith:[]},"OperatorNode:unequal":{associativity:"left",associativeWith:[]},"OperatorNode:smaller":{associativity:"left",associativeWith:[]},"OperatorNode:larger":{associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{associativity:"left",associativeWith:[]}},{"OperatorNode:to":{associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{associativity:"left",associativeWith:[]},"OperatorNode:mod":{associativity:"left",associativeWith:[]}},{"OperatorNode:unaryPlus":{associativity:"right"},"OperatorNode:unaryMinus":{associativity:"right"},"OperatorNode:bitNot":{associativity:"right"},"OperatorNode:not":{associativity:"right"}},{"OperatorNode:pow":{associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{associativity:"left"}},{"OperatorNode:transpose":{associativity:"left"}}];function Nr(e,t){var n=e;"keep"!==t&&(n=e.getContent());for(var r=n.getIdentifier(),o=0;o<wr.length;o++)if(r in wr[o])return o;return null}function kr(e,t){var n=e;"keep"!==t&&(n=e.getContent());var r=n.getIdentifier(),o=Nr(n,t);if(null===o)return null;var i=wr[o][r];if(Q(i,"associativity")){if("left"===i.associativity)return"left";if("right"===i.associativity)return"right";throw Error("'"+r+"' has the invalid associativity '"+i.associativity+"'.")}return null}function xr(e,t,n){var r="keep"!==n?e.getContent():e,o="keep"!==n?e.getContent():t,i=r.getIdentifier(),a=o.getIdentifier(),s=Nr(r,n);if(null===s)return null;var l=wr[s][i];if(Q(l,"associativeWith")&&l.associativeWith instanceof Array){for(var c=0;c<l.associativeWith.length;c++)if(l.associativeWith[c]===a)return!0;return!1}return null}var Er="AssignmentNode",Cr=["subset","?matrix","Node"],Sr=Je(Er,Cr,e=>{var{subset:t,matrix:n,Node:r}=e,o=pr({subset:t}),i=jr({subset:t,matrix:n});function a(e,t,n){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=e,this.index=n?t:null,this.value=n||t,!R(e)&&!V(e))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(R(e)&&"end"===e.name)throw new Error('Cannot assign to symbol "end"');if(this.index&&!F(this.index))throw new TypeError('IndexNode expected as "index"');if(!_(this.value))throw new TypeError('Node expected as "value"');Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function s(e,t){t||(t="keep");var n=Nr(e,t),r=Nr(e.value,t);return"all"===t||null!==r&&r<=n}return a.prototype=new r,a.prototype.type="AssignmentNode",a.prototype.isAssignmentNode=!0,a.prototype._compile=function(e,t){var n=this.object._compile(e,t),r=this.index?this.index._compile(e,t):null,a=this.value._compile(e,t),s=this.object.name;if(this.index){if(this.index.isObjectProperty()){var l=this.index.getObjectProperty();return function(e,t,r){var o=n(e,t,r),i=a(e,t,r);return ct(o,l,i),i}}if(R(this.object))return function(e,t,o){var l=n(e,t,o),c=a(e,t,o),u=r(e,t,l);return e.set(s,i(l,u,c)),c};var c=this.object.object._compile(e,t);if(this.object.index.isObjectProperty()){var u=this.object.index.getObjectProperty();return function(e,t,n){var o=c(e,t,n),s=lt(o,u),l=r(e,t,s),p=a(e,t,n);return ct(o,u,i(s,l,p)),p}}var p=this.object.index._compile(e,t);return function(e,t,n){var s=c(e,t,n),l=p(e,t,s),u=o(s,l),d=r(e,t,u),m=a(e,t,n);return i(s,l,i(u,d,m)),m}}if(!R(this.object))throw new TypeError("SymbolNode expected as object");return function(e,t,n){var r=a(e,t,n);return e.set(s,r),r}},a.prototype.forEach=function(e){e(this.object,"object",this),this.index&&e(this.index,"index",this),e(this.value,"value",this)},a.prototype.map=function(e){var t=this._ifNode(e(this.object,"object",this)),n=this.index?this._ifNode(e(this.index,"index",this)):null,r=this._ifNode(e(this.value,"value",this));return new a(t,n,r)},a.prototype.clone=function(){return new a(this.object,this.index,this.value)},a.prototype._toString=function(e){var t=this.object.toString(e),n=this.index?this.index.toString(e):"",r=this.value.toString(e);return s(this,e&&e.parenthesis)&&(r="("+r+")"),t+n+" = "+r},a.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},a.fromJSON=function(e){return new a(e.object,e.index,e.value)},a.prototype.toHTML=function(e){var t=this.object.toHTML(e),n=this.index?this.index.toHTML(e):"",r=this.value.toHTML(e);return s(this,e&&e.parenthesis)&&(r='<span class="math-paranthesis math-round-parenthesis">(</span>'+r+'<span class="math-paranthesis math-round-parenthesis">)</span>'),t+n+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+r},a.prototype._toTex=function(e){var t=this.object.toTex(e),n=this.index?this.index.toTex(e):"",r=this.value.toTex(e);return s(this,e&&e.parenthesis)&&(r="\\left(".concat(r,"\\right)")),t+n+":="+r},a},{isClass:!0,isNode:!0}),Vr={matrixDependencies:Or,NodeDependencies:xt,subsetDependencies:cr,createAssignmentNode:Sr},Ar="ResultSet",Pr=[],Tr=Je(Ar,Pr,()=>{function e(t){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=t||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(t){return new e(t.entries)},e},{isClass:!0}),Mr={createResultSet:Tr},Br="BlockNode",Dr=["ResultSet","Node"],$r=Je(Br,Dr,e=>{var{ResultSet:t,Node:n}=e;function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new Error("Array expected");this.blocks=e.map((function(e){var t=e&&e.node,n=!e||void 0===e.visible||e.visible;if(!_(t))throw new TypeError('Property "node" must be a Node');if("boolean"!==typeof n)throw new TypeError('Property "visible" must be a boolean');return{node:t,visible:n}}))}return r.prototype=new n,r.prototype.type="BlockNode",r.prototype.isBlockNode=!0,r.prototype._compile=function(e,n){var r=Re(this.blocks,(function(t){return{evaluate:t.node._compile(e,n),visible:t.visible}}));return function(e,n,o){var i=[];return qe(r,(function(t){var r=t.evaluate(e,n,o);t.visible&&i.push(r)})),new t(i)}},r.prototype.forEach=function(e){for(var t=0;t<this.blocks.length;t++)e(this.blocks[t].node,"blocks["+t+"].node",this)},r.prototype.map=function(e){for(var t=[],n=0;n<this.blocks.length;n++){var o=this.blocks[n],i=this._ifNode(e(o.node,"blocks["+n+"].node",this));t[n]={node:i,visible:o.visible}}return new r(t)},r.prototype.clone=function(){var e=this.blocks.map((function(e){return{node:e.node,visible:e.visible}}));return new r(e)},r.prototype._toString=function(e){return this.blocks.map((function(t){return t.node.toString(e)+(t.visible?"":";")})).join("\n")},r.prototype.toJSON=function(){return{mathjs:"BlockNode",blocks:this.blocks}},r.fromJSON=function(e){return new r(e.blocks)},r.prototype.toHTML=function(e){return this.blocks.map((function(t){return t.node.toHTML(e)+(t.visible?"":'<span class="math-separator">;</span>')})).join('<span class="math-separator"><br /></span>')},r.prototype._toTex=function(e){return this.blocks.map((function(t){return t.node.toTex(e)+(t.visible?"":";")})).join("\\;\\;\n")},r},{isClass:!0,isNode:!0}),Fr={NodeDependencies:xt,ResultSetDependencies:Mr,createBlockNode:$r},_r="ConditionalNode",Lr=["Node"],Ir=Je(_r,Lr,e=>{var{Node:t}=e;function n(e,t,r){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!_(e))throw new TypeError("Parameter condition must be a Node");if(!_(t))throw new TypeError("Parameter trueExpr must be a Node");if(!_(r))throw new TypeError("Parameter falseExpr must be a Node");this.condition=e,this.trueExpr=t,this.falseExpr=r}function r(e){if("number"===typeof e||"boolean"===typeof e||"string"===typeof e)return!!e;if(e){if(l(e))return!e.isZero();if(c(e))return!(!e.re&&!e.im);if(p(e))return!!e.value}if(null===e||void 0===e)return!1;throw new TypeError('Unsupported type of condition "'+z(e)+'"')}return n.prototype=new t,n.prototype.type="ConditionalNode",n.prototype.isConditionalNode=!0,n.prototype._compile=function(e,t){var n=this.condition._compile(e,t),o=this.trueExpr._compile(e,t),i=this.falseExpr._compile(e,t);return function(e,t,a){return r(n(e,t,a))?o(e,t,a):i(e,t,a)}},n.prototype.forEach=function(e){e(this.condition,"condition",this),e(this.trueExpr,"trueExpr",this),e(this.falseExpr,"falseExpr",this)},n.prototype.map=function(e){return new n(this._ifNode(e(this.condition,"condition",this)),this._ifNode(e(this.trueExpr,"trueExpr",this)),this._ifNode(e(this.falseExpr,"falseExpr",this)))},n.prototype.clone=function(){return new n(this.condition,this.trueExpr,this.falseExpr)},n.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.condition.toString(e),o=Nr(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==o&&o<=n)&&(r="("+r+")");var i=this.trueExpr.toString(e),a=Nr(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==a&&a<=n)&&(i="("+i+")");var s=this.falseExpr.toString(e),l=Nr(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==l&&l<=n)&&(s="("+s+")"),r+" ? "+i+" : "+s},n.prototype.toJSON=function(){return{mathjs:"ConditionalNode",condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}},n.fromJSON=function(e){return new n(e.condition,e.trueExpr,e.falseExpr)},n.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.condition.toHTML(e),o=Nr(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==o&&o<=n)&&(r='<span class="math-parenthesis math-round-parenthesis">(</span>'+r+'<span class="math-parenthesis math-round-parenthesis">)</span>');var i=this.trueExpr.toHTML(e),a=Nr(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==a&&a<=n)&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>');var s=this.falseExpr.toHTML(e),l=Nr(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==l&&l<=n)&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),r+'<span class="math-operator math-conditional-operator">?</span>'+i+'<span class="math-operator math-conditional-operator">:</span>'+s},n.prototype._toTex=function(e){return"\\begin{cases} {"+this.trueExpr.toTex(e)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(e)+"}\\\\{"+this.falseExpr.toTex(e)+"}, &\\quad{\\text{otherwise}}\\end{cases}"},n},{isClass:!0,isNode:!0}),Ur={NodeDependencies:xt,createConditionalNode:Ir},Hr=n("4788"),Rr=n.n(Hr),qr={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},zr={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},Wr={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(zr.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(zr.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(zr.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(zr.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(zr.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(zr.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(zr.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(zr.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(zr.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(zr.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(zr.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(zr.bitAnd,"${args[1]}\\right)")},bitNot:{1:zr.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(zr.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(zr.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(zr.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(zr.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(zr.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(zr.and,"${args[1]}\\right)")},not:{1:zr.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(zr.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(zr.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(zr.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(zr.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(zr.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(zr.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(zr.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(zr.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(zr.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(zr.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(zr.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(zr.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(zr.to,"${args[1]}\\right)")},numeric:function(e,t){return e.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(qr.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},Jr="\\mathrm{${name}}\\left(${args}\\right)",Gr={deg:"^\\circ"};function Kr(e){return Rr()(e,{preserveFormatting:!0})}function Yr(e,t){return t="undefined"!==typeof t&&t,t?Q(Gr,e)?Gr[e]:"\\mathrm{"+Kr(e)+"}":Q(qr,e)?qr[e]:Kr(e)}var Zr="ConstantNode",Xr=["Node"],Qr=Je(Zr,Xr,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this.value=e}return n.prototype=new t,n.prototype.type="ConstantNode",n.prototype.isConstantNode=!0,n.prototype._compile=function(e,t){var n=this.value;return function(){return n}},n.prototype.forEach=function(e){},n.prototype.map=function(e){return this.clone()},n.prototype.clone=function(){return new n(this.value)},n.prototype._toString=function(e){return Be(this.value,e)},n.prototype.toHTML=function(e){var t=this._toString(e);switch(z(this.value)){case"number":case"BigNumber":case"Fraction":return'<span class="math-number">'+t+"</span>";case"string":return'<span class="math-string">'+t+"</span>";case"boolean":return'<span class="math-boolean">'+t+"</span>";case"null":return'<span class="math-null-symbol">'+t+"</span>";case"undefined":return'<span class="math-undefined">'+t+"</span>";default:return'<span class="math-symbol">'+t+"</span>"}},n.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},n.fromJSON=function(e){return new n(e.value)},n.prototype._toTex=function(e){var t=this._toString(e);switch(z(this.value)){case"string":return"\\mathtt{"+Kr(t)+"}";case"number":case"BigNumber":if(!isFinite(this.value))return this.value.valueOf()<0?"-\\infty":"\\infty";var n=t.toLowerCase().indexOf("e");return-1!==n?t.substring(0,n)+"\\cdot10^{"+t.substring(n+1)+"}":t;case"Fraction":return this.value.toLatex();default:return t}},n},{isClass:!0,isNode:!0}),eo={NodeDependencies:xt,createConstantNode:Qr},to=n("7634"),no=n.n(to),ro=function(){return ro=no.a.create,no.a},oo=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],io=Je("typed",oo,(function(e){var{BigNumber:t,Complex:n,DenseMatrix:r,Fraction:o}=e,i=ro();return i.types=[{name:"number",test:s},{name:"Complex",test:c},{name:"BigNumber",test:l},{name:"Fraction",test:u},{name:"Unit",test:p},{name:"string",test:d},{name:"Chain",test:q},{name:"Array",test:m},{name:"Matrix",test:f},{name:"DenseMatrix",test:g},{name:"SparseMatrix",test:b},{name:"Range",test:y},{name:"Index",test:v},{name:"boolean",test:O},{name:"ResultSet",test:j},{name:"Help",test:w},{name:"function",test:N},{name:"Date",test:k},{name:"RegExp",test:x},{name:"null",test:C},{name:"undefined",test:S},{name:"AccessorNode",test:V},{name:"ArrayNode",test:A},{name:"AssignmentNode",test:P},{name:"BlockNode",test:T},{name:"ConditionalNode",test:M},{name:"ConstantNode",test:B},{name:"FunctionNode",test:$},{name:"FunctionAssignmentNode",test:D},{name:"IndexNode",test:F},{name:"Node",test:_},{name:"ObjectNode",test:L},{name:"OperatorNode",test:I},{name:"ParenthesisNode",test:U},{name:"RangeNode",test:H},{name:"SymbolNode",test:R},{name:"Map",test:Ot},{name:"Object",test:E}],i.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(t||ao(e),we(e)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return n||so(e),new n(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return n||so(e),new n(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return n||so(e),new n(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){o||co(e);var t=new o(e);if(t.valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw new Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(e){t||ao(e);try{return new t(e)}catch(n){throw new Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){o||co(e);try{return new o(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){n||so(e);try{return new n(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||ao(e),new t(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return o||co(e),new o(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return r||lo(),new r(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],i}));function ao(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function so(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function lo(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function co(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var uo={createTyped:io},po="FunctionAssignmentNode",mo=["typed","Node"],fo=Je(po,mo,e=>{var{typed:t,Node:n}=e;function r(e,t,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof e)throw new TypeError('String expected for parameter "name"');if(!Array.isArray(t))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!_(n))throw new TypeError('Node expected for parameter "expr"');if(st.has(e))throw new Error('Illegal function name, "'+e+'" is a reserved keyword');this.name=e,this.params=t.map((function(e){return e&&e.name||e})),this.types=t.map((function(e){return e&&e.type||"any"})),this.expr=n}function o(e,t){var n=Nr(e,t),r=Nr(e.expr,t);return"all"===t||null!==r&&r<=n}return r.prototype=new n,r.prototype.type="FunctionAssignmentNode",r.prototype.isFunctionAssignmentNode=!0,r.prototype._compile=function(e,n){var r=Object.create(n);qe(this.params,(function(e){r[e]=!0}));var o=this.expr._compile(e,r),i=this.name,a=this.params,s=ze(this.types,","),l=i+"("+ze(this.params,", ")+")";return function(e,n,r){var c={};c[s]=function(){for(var t=Object.create(n),i=0;i<a.length;i++)t[a[i]]=arguments[i];return o(e,t,r)};var u=t(i,c);return u.syntax=l,e.set(i,u),u}},r.prototype.forEach=function(e){e(this.expr,"expr",this)},r.prototype.map=function(e){var t=this._ifNode(e(this.expr,"expr",this));return new r(this.name,this.params.slice(0),t)},r.prototype.clone=function(){return new r(this.name,this.params.slice(0),this.expr)},r.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=this.expr.toString(e);return o(this,t)&&(n="("+n+")"),this.name+"("+this.params.join(", ")+") = "+n},r.prototype.toJSON=function(){var e=this.types;return{mathjs:"FunctionAssignmentNode",name:this.name,params:this.params.map((function(t,n){return{name:t,type:e[n]}})),expr:this.expr}},r.fromJSON=function(e){return new r(e.name,e.params,e.expr)},r.prototype.toHTML=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=[],r=0;r<this.params.length;r++)n.push('<span class="math-symbol math-parameter">'+Fe(this.params[r])+"</span>");var i=this.expr.toHTML(e);return o(this,t)&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+Fe(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+n.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+i},r.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=this.expr.toTex(e);return o(this,t)&&(n="\\left(".concat(n,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(Yr).join(",")+"\\right):="+n},r},{isClass:!0,isNode:!0}),ho={NodeDependencies:xt,typedDependencies:uo,createFunctionAssignmentNode:fo},go="SymbolNode",bo=["math","?Unit","Node"],yo=Je(go,bo,e=>{var{math:t,Unit:n,Node:r}=e;function o(e){return!!n&&n.isValuelessUnit(e)}function i(e){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof e)throw new TypeError('String expected for parameter "name"');this.name=e}return i.prototype=new r,i.prototype.type="SymbolNode",i.prototype.isSymbolNode=!0,i.prototype._compile=function(e,t){var r=this.name;if(!0===t[r])return function(e,t,n){return t[r]};if(r in e)return function(t,n,o){return t.has(r)?t.get(r):lt(e,r)};var a=o(r);return function(e,t,o){return e.has(r)?e.get(r):a?new n(null,r):i.onUndefinedSymbol(r)}},i.prototype.forEach=function(e){},i.prototype.map=function(e){return this.clone()},i.onUndefinedSymbol=function(e){throw new Error("Undefined symbol "+e)},i.prototype.clone=function(){return new i(this.name)},i.prototype._toString=function(e){return this.name},i.prototype.toHTML=function(e){var t=Fe(this.name);return"true"===t||"false"===t?'<span class="math-symbol math-boolean">'+t+"</span>":"i"===t?'<span class="math-symbol math-imaginary-symbol">'+t+"</span>":"Infinity"===t?'<span class="math-symbol math-infinity-symbol">'+t+"</span>":"NaN"===t?'<span class="math-symbol math-nan-symbol">'+t+"</span>":"null"===t?'<span class="math-symbol math-null-symbol">'+t+"</span>":"undefined"===t?'<span class="math-symbol math-undefined-symbol">'+t+"</span>":'<span class="math-symbol">'+t+"</span>"},i.prototype.toJSON=function(){return{mathjs:"SymbolNode",name:this.name}},i.fromJSON=function(e){return new i(e.name)},i.prototype._toTex=function(e){var n=!1;"undefined"===typeof t[this.name]&&o(this.name)&&(n=!0);var r=Yr(this.name,n);return"\\"===r[0]?r:" "+r},i},{isClass:!0,isNode:!0}),vo={NodeDependencies:xt,createSymbolNode:yo};function Oo(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"===typeof e.createSubScope?jt(e.createSubScope(),...n):jt(yt(),e,...n)}var jo="FunctionNode",wo=["math","Node","SymbolNode"],No=Je(jo,wo,e=>{var{math:t,Node:n,SymbolNode:r}=e;function o(e,t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if("string"===typeof e&&(e=new r(e)),!_(e))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(t)||!t.every(_))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=e,this.args=t||[],Object.defineProperty(this,"name",{get:function(){return this.fn.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}o.prototype=new n,o.prototype.type="FunctionNode",o.prototype.isFunctionNode=!0;var i=e=>Be(e,{truncate:78});o.prototype._compile=function(e,t){if(!(this instanceof o))throw new TypeError("No valid FunctionNode");var n=this.args.map(n=>n._compile(e,t));if(!R(this.fn)){if(V(this.fn)&&F(this.fn.index)&&this.fn.index.isObjectProperty()){var r=this.fn.object._compile(e,t),a=this.fn.index.getObjectProperty(),s=this.args;return function(t,o,i){var l=r(t,o,i);dt(l,a);var c=l[a]&&l[a].rawArgs;if(c)return l[a](s,e,Oo(t,o),t);var u=n.map(e=>e(t,o,i));return l[a].apply(l,u)}}var l=this.fn.toString(),c=this.fn._compile(e,t),u=this.args;return function(t,r,o){var a=c(t,r,o);if("function"!==typeof a)throw new TypeError("Expression '".concat(l,"' did not evaluate to a function; value is:")+"\n  ".concat(i(a)));if(a.rawArgs)return a(u,e,Oo(t,r),t);var s=n.map(e=>e(t,r,o));return a.apply(a,s)}}var p=this.fn.name;if(t[p]){var d=this.args;return function(t,r,o){var a=r[p];if("function"!==typeof a)throw new TypeError("Argument '".concat(p,"' was not a function; received: ").concat(i(a)));if(a.rawArgs)return a(d,e,Oo(t,r),t);var s=n.map(e=>e(t,r,o));return a.apply(a,s)}}var m=p in e?lt(e,p):void 0,f="function"===typeof m&&!0===m.rawArgs,h=t=>{var n;if(t.has(p))n=t.get(p);else{if(!(p in e))return o.onUndefinedFunction(p);n=lt(e,p)}if("function"===typeof n)return n;throw new TypeError("'".concat(p,"' is not a function; its value is:\n  ").concat(i(n)))};if(f){var g=this.args;return function(t,n,r){var o=h(t);return o(g,e,Oo(t,n),t)}}switch(n.length){case 0:return function(e,t,n){var r=h(e);return r()};case 1:return function(e,t,r){var o=h(e),i=n[0];return o(i(e,t,r))};case 2:return function(e,t,r){var o=h(e),i=n[0],a=n[1];return o(i(e,t,r),a(e,t,r))};default:return function(e,t,r){var o=h(e),i=n.map(n=>n(e,t,r));return o(...i)}}},o.prototype.forEach=function(e){e(this.fn,"fn",this);for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)},o.prototype.map=function(e){for(var t=this._ifNode(e(this.fn,"fn",this)),n=[],r=0;r<this.args.length;r++)n[r]=this._ifNode(e(this.args[r],"args["+r+"]",this));return new o(t,n)},o.prototype.clone=function(){return new o(this.fn,this.args.slice(0))},o.onUndefinedFunction=function(e){throw new Error("Undefined function "+e)};var a=o.prototype.toString;function s(e,t,n){var r,o="",i=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,a=0;while(null!==(r=i.exec(e)))if(o+=e.substring(a,r.index),a=r.index,"$$"===r[0])o+="$",a++;else{a+=r[0].length;var s=t[r[1]];if(!s)throw new ReferenceError("Template: Property "+r[1]+" does not exist.");if(void 0===r[2])switch(typeof s){case"string":o+=s;break;case"object":if(_(s))o+=s.toTex(n);else{if(!Array.isArray(s))throw new TypeError("Template: "+r[1]+" has to be a Node, String or array of Nodes");o+=s.map((function(e,t){if(_(e))return e.toTex(n);throw new TypeError("Template: "+r[1]+"["+t+"] is not a Node.")})).join(",")}break;default:throw new TypeError("Template: "+r[1]+" has to be a Node, String or array of Nodes")}else{if(!_(s[r[2]]&&s[r[2]]))throw new TypeError("Template: "+r[1]+"["+r[2]+"] is not a Node.");o+=s[r[2]].toTex(n)}}return o+=e.slice(a),o}o.prototype.toString=function(e){var t,n=this.fn.toString(e);return e&&"object"===typeof e.handler&&Q(e.handler,n)&&(t=e.handler[n](this,e)),"undefined"!==typeof t?t:a.call(this,e)},o.prototype._toString=function(e){var t=this.args.map((function(t){return t.toString(e)})),n=D(this.fn)?"("+this.fn.toString(e)+")":this.fn.toString(e);return n+"("+t.join(", ")+")"},o.prototype.toJSON=function(){return{mathjs:"FunctionNode",fn:this.fn,args:this.args}},o.fromJSON=function(e){return new o(e.fn,e.args)},o.prototype.toHTML=function(e){var t=this.args.map((function(t){return t.toHTML(e)}));return'<span class="math-function">'+Fe(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'};var l=o.prototype.toTex;return o.prototype.toTex=function(e){var t;return e&&"object"===typeof e.handler&&Q(e.handler,this.name)&&(t=e.handler[this.name](this,e)),"undefined"!==typeof t?t:l.call(this,e)},o.prototype._toTex=function(e){var n,r,o=this.args.map((function(t){return t.toTex(e)}));switch(Wr[this.name]&&(n=Wr[this.name]),!t[this.name]||"function"!==typeof t[this.name].toTex&&"object"!==typeof t[this.name].toTex&&"string"!==typeof t[this.name].toTex||(n=t[this.name].toTex),typeof n){case"function":r=n(this,e);break;case"string":r=s(n,this,e);break;case"object":switch(typeof n[o.length]){case"function":r=n[o.length](this,e);break;case"string":r=s(n[o.length],this,e);break}}return"undefined"!==typeof r?r:s(Jr,this,e)},o.prototype.getIdentifier=function(){return this.type+":"+this.name},o},{isClass:!0,isNode:!0}),ko={NodeDependencies:xt,SymbolNodeDependencies:vo,createFunctionNode:No},xo="size",Eo=["typed","config","?matrix"],Co=Je(xo,Eo,e=>{var{typed:t,config:n,matrix:r}=e;return t(xo,{Matrix:function(e){return e.create(e.size())},Array:He,string:function(e){return"Array"===n.matrix?[e.length]:r([e.length])},"number | Complex | BigNumber | Unit | boolean | null":function(e){return"Array"===n.matrix?[]:r?r([]):or()}})}),So={matrixDependencies:Or,typedDependencies:uo,createSize:Co},Vo="IndexNode",Ao=["Node","size"],Po=Je(Vo,Ao,e=>{var{Node:t,size:n}=e;function r(e,t){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(this.dimensions=e,this.dotNotation=t||!1,!Array.isArray(e)||!e.every(_))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}return r.prototype=new t,r.prototype.type="IndexNode",r.prototype.isIndexNode=!0,r.prototype._compile=function(e,t){var r=Re(this.dimensions,(function(r,o){var i=r.filter(e=>e.isSymbolNode&&"end"===e.name).length>0;if(i){var a=Object.create(t);a.end=!0;var s=r._compile(e,a);return function(e,t,r){if(!f(r)&&!m(r)&&!d(r))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+z(r));var i=n(r).valueOf(),a=Object.create(t);return a.end=i[o],s(e,a,r)}}return r._compile(e,t)})),o=lt(e,"index");return function(e,t,n){var i=Re(r,(function(r){return r(e,t,n)}));return o(...i)}},r.prototype.forEach=function(e){for(var t=0;t<this.dimensions.length;t++)e(this.dimensions[t],"dimensions["+t+"]",this)},r.prototype.map=function(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this._ifNode(e(this.dimensions[n],"dimensions["+n+"]",this));return new r(t,this.dotNotation)},r.prototype.clone=function(){return new r(this.dimensions.slice(0),this.dotNotation)},r.prototype.isObjectProperty=function(){return 1===this.dimensions.length&&B(this.dimensions[0])&&"string"===typeof this.dimensions[0].value},r.prototype.getObjectProperty=function(){return this.isObjectProperty()?this.dimensions[0].value:null},r.prototype._toString=function(e){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"},r.prototype.toJSON=function(){return{mathjs:"IndexNode",dimensions:this.dimensions,dotNotation:this.dotNotation}},r.fromJSON=function(e){return new r(e.dimensions,e.dotNotation)},r.prototype.toHTML=function(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this.dimensions[n].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+Fe(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},r.prototype._toTex=function(e){var t=this.dimensions.map((function(t){return t.toTex(e)}));return this.dotNotation?"."+this.getObjectProperty():"_{"+t.join(",")+"}"},r},{isClass:!0,isNode:!0}),To={NodeDependencies:xt,sizeDependencies:So,createIndexNode:Po},Mo="ObjectNode",Bo=["Node"],Do=Je(Mo,Bo,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=e||{},e&&("object"!==typeof e||!Object.keys(e).every((function(t){return _(e[t])}))))throw new TypeError("Object containing Nodes expected")}return n.prototype=new t,n.prototype.type="ObjectNode",n.prototype.isObjectNode=!0,n.prototype._compile=function(e,t){var n={};for(var r in this.properties)if(Q(this.properties,r)){var o=$e(r),i=JSON.parse(o);if(!pt(this.properties,i))throw new Error('No access to property "'+i+'"');n[i]=this.properties[r]._compile(e,t)}return function(e,t,r){var o={};for(var i in n)Q(n,i)&&(o[i]=n[i](e,t,r));return o}},n.prototype.forEach=function(e){for(var t in this.properties)Q(this.properties,t)&&e(this.properties[t],"properties["+$e(t)+"]",this)},n.prototype.map=function(e){var t={};for(var r in this.properties)Q(this.properties,r)&&(t[r]=this._ifNode(e(this.properties[r],"properties["+$e(r)+"]",this)));return new n(t)},n.prototype.clone=function(){var e={};for(var t in this.properties)Q(this.properties,t)&&(e[t]=this.properties[t]);return new n(e)},n.prototype._toString=function(e){var t=[];for(var n in this.properties)Q(this.properties,n)&&t.push($e(n)+": "+this.properties[n].toString(e));return"{"+t.join(", ")+"}"},n.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},n.fromJSON=function(e){return new n(e.properties)},n.prototype.toHTML=function(e){var t=[];for(var n in this.properties)Q(this.properties,n)&&t.push('<span class="math-symbol math-property">'+Fe(n)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[n].toHTML(e));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'},n.prototype._toTex=function(e){var t=[];for(var n in this.properties)Q(this.properties,n)&&t.push("\\mathbf{"+n+":} & "+this.properties[n].toTex(e)+"\\\\");return"\\left\\{\\begin{array}{ll}".concat(t.join("\n"),"\\end{array}\\right\\}")},n},{isClass:!0,isNode:!0}),$o={NodeDependencies:xt,createObjectNode:Do},Fo="OperatorNode",_o=["Node"],Lo=Je(Fo,_o,e=>{var{Node:t}=e;function n(e,t,r,o,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof e)throw new TypeError('string expected for parameter "op"');if("string"!==typeof t)throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(r)||!r.every(_))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=!0===o,this.isPercentage=!0===i,this.op=e,this.fn=t,this.args=r||[]}function r(e,t,n,r,o){var i,a=Nr(e,t),s=kr(e,t);if("all"===t||r.length>2&&"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier())return r.map((function(e){switch(e.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}}));switch(r.length){case 0:i=[];break;case 1:var l=Nr(r[0],t);if(o&&null!==l){var c,u;if("keep"===t?(c=r[0].getIdentifier(),u=e.getIdentifier()):(c=r[0].getContent().getIdentifier(),u=e.getContent().getIdentifier()),!1===wr[a][u].latexLeftParens){i=[!1];break}if(!1===wr[l][c].latexParens){i=[!1];break}}if(null===l){i=[!1];break}if(l<=a){i=[!0];break}i=[!1];break;case 2:var p,d,m=Nr(r[0],t),f=xr(e,r[0],t);p=null!==m&&(m===a&&"right"===s&&!f||m<a);var h,g,b,y=Nr(r[1],t),v=xr(e,r[1],t);if(d=null!==y&&(y===a&&"left"===s&&!v||y<a),o)"keep"===t?(h=e.getIdentifier(),g=e.args[0].getIdentifier(),b=e.args[1].getIdentifier()):(h=e.getContent().getIdentifier(),g=e.args[0].getContent().getIdentifier(),b=e.args[1].getContent().getIdentifier()),null!==m&&(!1===wr[a][h].latexLeftParens&&(p=!1),!1===wr[m][g].latexParens&&(p=!1)),null!==y&&(!1===wr[a][h].latexRightParens&&(d=!1),!1===wr[y][b].latexParens&&(d=!1));i=[p,d];break;default:"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier()||(i=r.map((function(n){var r=Nr(n,t),o=xr(e,n,t),i=kr(n,t);return null!==r&&(a===r&&s===i&&!o||r<a)})));break}return r.length>=2&&"OperatorNode:multiply"===e.getIdentifier()&&e.implicit&&"auto"===t&&"hide"===n&&(i=r.map((function(e,t){var n="ParenthesisNode"===e.getIdentifier();return!(!i[t]&&!n)}))),i}return n.prototype=new t,n.prototype.type="OperatorNode",n.prototype.isOperatorNode=!0,n.prototype._compile=function(e,t){if("string"!==typeof this.fn||!mt(e,this.fn))throw e[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var n=lt(e,this.fn),r=Re(this.args,(function(n){return n._compile(e,t)}));if(1===r.length){var o=r[0];return function(e,t,r){return n(o(e,t,r))}}if(2===r.length){var i=r[0],a=r[1];return function(e,t,r){return n(i(e,t,r),a(e,t,r))}}return function(e,t,o){return n.apply(null,Re(r,(function(n){return n(e,t,o)})))}},n.prototype.forEach=function(e){for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)},n.prototype.map=function(e){for(var t=[],r=0;r<this.args.length;r++)t[r]=this._ifNode(e(this.args[r],"args["+r+"]",this));return new n(this.op,this.fn,t,this.implicit,this.isPercentage)},n.prototype.clone=function(){return new n(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)},n.prototype.isUnary=function(){return 1===this.args.length},n.prototype.isBinary=function(){return 2===this.args.length},n.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",o=this.args,i=r(this,t,n,o,!1);if(1===o.length){var a=kr(this,t),s=o[0].toString(e);i[0]&&(s="("+s+")");var l=/[a-zA-Z]+/.test(this.op);return"right"===a?this.op+(l?" ":"")+s:"left"===a?s+(l?" ":"")+this.op:s+this.op}if(2===o.length){var c=o[0].toString(e),u=o[1].toString(e);return i[0]&&(c="("+c+")"),i[1]&&(u="("+u+")"),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?c+" "+u:c+" "+this.op+" "+u}if(o.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var p=o.map((function(t,n){return t=t.toString(e),i[n]&&(t="("+t+")"),t}));return this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?p.join(" "):p.join(" "+this.op+" ")}return this.fn+"("+this.args.join(", ")+")"},n.prototype.toJSON=function(){return{mathjs:"OperatorNode",op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}},n.fromJSON=function(e){return new n(e.op,e.fn,e.args,e.implicit,e.isPercentage)},n.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",o=this.args,i=r(this,t,n,o,!1);if(1===o.length){var a=kr(this,t),s=o[0].toHTML(e);return i[0]&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),"right"===a?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+Fe(this.op)+"</span>"+s:s+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+Fe(this.op)+"</span>"}if(2===o.length){var l=o[0].toHTML(e),c=o[1].toHTML(e);return i[0]&&(l='<span class="math-parenthesis math-round-parenthesis">(</span>'+l+'<span class="math-parenthesis math-round-parenthesis">)</span>'),i[1]&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?l+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+c:l+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Fe(this.op)+"</span>"+c}var u=o.map((function(t,n){return t=t.toHTML(e),i[n]&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t}));return o.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())?this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?u.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):u.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Fe(this.op)+"</span>"):'<span class="math-function">'+Fe(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+u.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'},n.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",o=this.args,i=r(this,t,n,o,!0),a=zr[this.fn];if(a="undefined"===typeof a?this.op:a,1===o.length){var s=kr(this,t),l=o[0].toTex(e);return i[0]&&(l="\\left(".concat(l,"\\right)")),"right"===s?a+l:l+a}if(2===o.length){var c=o[0],u=c.toTex(e);i[0]&&(u="\\left(".concat(u,"\\right)"));var p,d=o[1],m=d.toTex(e);switch(i[1]&&(m="\\left(".concat(m,"\\right)")),p="keep"===t?c.getIdentifier():c.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return a+"{"+u+"}{"+m+"}";case"OperatorNode:pow":switch(u="{"+u+"}",m="{"+m+"}",p){case"ConditionalNode":case"OperatorNode:divide":u="\\left(".concat(u,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&"hide"===n)return u+"~"+m}return u+a+m}if(o.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var f=o.map((function(t,n){return t=t.toTex(e),i[n]&&(t="\\left(".concat(t,"\\right)")),t}));return"OperatorNode:multiply"===this.getIdentifier()&&this.implicit?f.join("~"):f.join(a)}return"\\mathrm{"+this.fn+"}\\left("+o.map((function(t){return t.toTex(e)})).join(",")+"\\right)"},n.prototype.getIdentifier=function(){return this.type+":"+this.fn},n},{isClass:!0,isNode:!0}),Io={NodeDependencies:xt,createOperatorNode:Lo},Uo="ParenthesisNode",Ho=["Node"],Ro=Je(Uo,Ho,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!_(e))throw new TypeError('Node expected for parameter "content"');this.content=e}return n.prototype=new t,n.prototype.type="ParenthesisNode",n.prototype.isParenthesisNode=!0,n.prototype._compile=function(e,t){return this.content._compile(e,t)},n.prototype.getContent=function(){return this.content.getContent()},n.prototype.forEach=function(e){e(this.content,"content",this)},n.prototype.map=function(e){var t=e(this.content,"content",this);return new n(t)},n.prototype.clone=function(){return new n(this.content)},n.prototype._toString=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"("+this.content.toString(e)+")":this.content.toString(e)},n.prototype.toJSON=function(){return{mathjs:"ParenthesisNode",content:this.content}},n.fromJSON=function(e){return new n(e.content)},n.prototype.toHTML=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(e)},n.prototype._toTex=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"\\left(".concat(this.content.toTex(e),"\\right)"):this.content.toTex(e)},n},{isClass:!0,isNode:!0}),qo={NodeDependencies:xt,createParenthesisNode:Ro},zo="RangeNode",Wo=["Node"],Jo=Je(zo,Wo,e=>{var{Node:t}=e;function n(e,t,r){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!_(e))throw new TypeError("Node expected");if(!_(t))throw new TypeError("Node expected");if(r&&!_(r))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=e,this.end=t,this.step=r||null}function r(e,t){var n=Nr(e,t),r={},o=Nr(e.start,t);if(r.start=null!==o&&o<=n||"all"===t,e.step){var i=Nr(e.step,t);r.step=null!==i&&i<=n||"all"===t}var a=Nr(e.end,t);return r.end=null!==a&&a<=n||"all"===t,r}return n.prototype=new t,n.prototype.type="RangeNode",n.prototype.isRangeNode=!0,n.prototype.needsEnd=function(){var e=this.filter((function(e){return R(e)&&"end"===e.name}));return e.length>0},n.prototype._compile=function(e,t){var n=e.range,r=this.start._compile(e,t),o=this.end._compile(e,t);if(this.step){var i=this.step._compile(e,t);return function(e,t,a){return n(r(e,t,a),o(e,t,a),i(e,t,a))}}return function(e,t,i){return n(r(e,t,i),o(e,t,i))}},n.prototype.forEach=function(e){e(this.start,"start",this),e(this.end,"end",this),this.step&&e(this.step,"step",this)},n.prototype.map=function(e){return new n(this._ifNode(e(this.start,"start",this)),this._ifNode(e(this.end,"end",this)),this.step&&this._ifNode(e(this.step,"step",this)))},n.prototype.clone=function(){return new n(this.start,this.end,this.step&&this.step)},n.prototype._toString=function(e){var t,n=e&&e.parenthesis?e.parenthesis:"keep",o=r(this,n),i=this.start.toString(e);if(o.start&&(i="("+i+")"),t=i,this.step){var a=this.step.toString(e);o.step&&(a="("+a+")"),t+=":"+a}var s=this.end.toString(e);return o.end&&(s="("+s+")"),t+=":"+s,t},n.prototype.toJSON=function(){return{mathjs:"RangeNode",start:this.start,end:this.end,step:this.step}},n.fromJSON=function(e){return new n(e.start,e.end,e.step)},n.prototype.toHTML=function(e){var t,n=e&&e.parenthesis?e.parenthesis:"keep",o=r(this,n),i=this.start.toHTML(e);if(o.start&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t=i,this.step){var a=this.step.toHTML(e);o.step&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+='<span class="math-operator math-range-operator">:</span>'+a}var s=this.end.toHTML(e);return o.end&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+='<span class="math-operator math-range-operator">:</span>'+s,t},n.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=r(this,t),o=this.start.toTex(e);if(n.start&&(o="\\left(".concat(o,"\\right)")),this.step){var i=this.step.toTex(e);n.step&&(i="\\left(".concat(i,"\\right)")),o+=":"+i}var a=this.end.toTex(e);return n.end&&(a="\\left(".concat(a,"\\right)")),o+=":"+a,o},n},{isClass:!0,isNode:!0}),Go={NodeDependencies:xt,createRangeNode:Jo},Ko="RelationalNode",Yo=["Node"],Zo=Je(Ko,Yo,e=>{var{Node:t}=e;function n(e,t){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(t))throw new TypeError("Parameter params must be an array");if(e.length!==t.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=e,this.params=t}return n.prototype=new t,n.prototype.type="RelationalNode",n.prototype.isRelationalNode=!0,n.prototype._compile=function(e,t){var n=this,r=this.params.map(n=>n._compile(e,t));return function(t,o,i){for(var a,s=r[0](t,o,i),l=0;l<n.conditionals.length;l++){a=s,s=r[l+1](t,o,i);var c=lt(e,n.conditionals[l]);if(!c(a,s))return!1}return!0}},n.prototype.forEach=function(e){this.params.forEach((t,n)=>e(t,"params["+n+"]",this),this)},n.prototype.map=function(e){return new n(this.conditionals.slice(),this.params.map((t,n)=>this._ifNode(e(t,"params["+n+"]",this)),this))},n.prototype.clone=function(){return new n(this.conditionals,this.params)},n.prototype._toString=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.params.map((function(r,o){var i=Nr(r,t);return"all"===t||null!==i&&i<=n?"("+r.toString(e)+")":r.toString(e)})),o={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},i=r[0],a=0;a<this.conditionals.length;a++)i+=" "+o[this.conditionals[a]]+" "+r[a+1];return i},n.prototype.toJSON=function(){return{mathjs:"RelationalNode",conditionals:this.conditionals,params:this.params}},n.fromJSON=function(e){return new n(e.conditionals,e.params)},n.prototype.toHTML=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.params.map((function(r,o){var i=Nr(r,t);return"all"===t||null!==i&&i<=n?'<span class="math-parenthesis math-round-parenthesis">(</span>'+r.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':r.toHTML(e)})),o={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},i=r[0],a=0;a<this.conditionals.length;a++)i+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Fe(o[this.conditionals[a]])+"</span>"+r[a+1];return i},n.prototype._toTex=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.params.map((function(r,o){var i=Nr(r,t);return"all"===t||null!==i&&i<=n?"\\left("+r.toTex(e)+"\right)":r.toTex(e)})),o=r[0],i=0;i<this.conditionals.length;i++)o+=zr[this.conditionals[i]]+r[i+1];return o},n},{isClass:!0,isNode:!0}),Xo={NodeDependencies:xt,createRelationalNode:Zo};function Qo(e,t,n){return e&&"function"===typeof e.map?e.map((function(e){return Qo(e,t,n)})):t(e)}var ei="number",ti=["typed"];function ni(e){var t=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(t){var n={"0b":2,"0o":8,"0x":16}[t[1]],r=t[2],o=t[3];return{input:e,radix:n,integerPart:r,fractionalPart:o}}return null}function ri(e){for(var t=parseInt(e.integerPart,e.radix),n=0,r=0;r<e.fractionalPart.length;r++){var o=parseInt(e.fractionalPart[r],e.radix);n+=o/Math.pow(e.radix,r+1)}var i=t+n;if(isNaN(i))throw new SyntaxError('String "'+e.input+'" is no valid number');return i}var oi=Je(ei,ti,e=>{var{typed:t}=e,n=t("number",{"":function(){return 0},number:function(e){return e},string:function(e){if("NaN"===e)return NaN;var t=ni(e);if(t)return ri(t);var n=0,r=e.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);r&&(n=Number(r[2]),e=r[1]);var o=Number(e);if(isNaN(o))throw new SyntaxError('String "'+e+'" is no valid number');if(r){if(o>2**n-1)throw new SyntaxError('String "'.concat(e,'" is out of range'));o>=2**(n-1)&&(o-=2**n)}return o},BigNumber:function(e){return e.toNumber()},Fraction:function(e){return e.valueOf()},Unit:function(e){throw new Error("Second argument with valueless unit expected")},null:function(e){return 0},"Unit, string | Unit":function(e,t){return e.toNumber(t)},"Array | Matrix":function(e){return Qo(e,this)}});return n.fromJSON=function(e){return parseFloat(e.value)},n}),ii={typedDependencies:uo,createNumber:oi},ai="numeric",si=["number","?bignumber","?fraction"],li=Je(ai,si,e=>{var{number:t,bignumber:n,fraction:r}=e,o={string:!0,number:!0,BigNumber:!0,Fraction:!0},i={number:e=>t(e),BigNumber:n?e=>n(e):nr,Fraction:r?e=>r(e):rr};return function(e,t){var n=z(e);if(!(n in o))throw new TypeError("Cannot convert "+e+' of type "'+n+'"; valid input types are '+Object.keys(o).join(", "));if(!(t in i))throw new TypeError("Cannot convert "+e+' to type "'+t+'"; valid output types are '+Object.keys(i).join(", "));return t===n?e:i[t](e)}}),ci={numberDependencies:ii,createNumeric:li},ui="parse",pi=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],di=Je(ui,pi,e=>{var{typed:t,numeric:n,config:r,AccessorNode:o,ArrayNode:i,AssignmentNode:s,BlockNode:l,ConditionalNode:c,ConstantNode:u,FunctionAssignmentNode:p,FunctionNode:d,IndexNode:m,ObjectNode:f,OperatorNode:h,ParenthesisNode:g,RangeNode:b,RelationalNode:y,SymbolNode:v}=e,O=t(ui,{string:function(e){return U(e,{})},"Array | Matrix":function(e){return j(e,{})},"string, Object":function(e,t){var n=void 0!==t.nodes?t.nodes:{};return U(e,n)},"Array | Matrix, Object":j});function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0!==t.nodes?t.nodes:{};return Qo(e,(function(e){if("string"!==typeof e)throw new TypeError("String expected");return U(e,n)}))}var w={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},N={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},k={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},x={true:!0,false:!1,null:null,undefined:void 0},E=["NaN","Infinity"];function C(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:w.NULL,nestingLevel:0,conditionalLevel:null}}function S(e,t){return e.expression.substr(e.index,t)}function A(e){return S(e,1)}function P(e){e.index++}function T(e){return e.expression.charAt(e.index-1)}function M(e){return e.expression.charAt(e.index+1)}function D(e){e.tokenType=w.NULL,e.token="",e.comment="";while(1){if("#"===A(e))while("\n"!==A(e)&&""!==A(e))e.comment+=A(e),P(e);if(!O.isWhitespace(A(e),e.nestingLevel))break;P(e)}if(""!==A(e)){if("\n"===A(e)&&!e.nestingLevel)return e.tokenType=w.DELIMITER,e.token=A(e),void P(e);var t=A(e),n=S(e,2),r=S(e,3);if(3===r.length&&N[r])return e.tokenType=w.DELIMITER,e.token=r,P(e),P(e),void P(e);if(2===n.length&&N[n])return e.tokenType=w.DELIMITER,e.token=n,P(e),void P(e);if(N[t])return e.tokenType=w.DELIMITER,e.token=t,void P(e);if(O.isDigitDot(t)){e.tokenType=w.NUMBER;var o=S(e,2);if("0b"===o||"0o"===o||"0x"===o){e.token+=A(e),P(e),e.token+=A(e),P(e);while(O.isHexDigit(A(e)))e.token+=A(e),P(e);if("."===A(e)){e.token+=".",P(e);while(O.isHexDigit(A(e)))e.token+=A(e),P(e)}else if("i"===A(e)){e.token+="i",P(e);while(O.isDigit(A(e)))e.token+=A(e),P(e)}return}if("."===A(e)){if(e.token+=A(e),P(e),!O.isDigit(A(e)))return void(e.tokenType=w.DELIMITER)}else{while(O.isDigit(A(e)))e.token+=A(e),P(e);O.isDecimalMark(A(e),M(e))&&(e.token+=A(e),P(e))}while(O.isDigit(A(e)))e.token+=A(e),P(e);if("E"===A(e)||"e"===A(e))if(O.isDigit(M(e))||"-"===M(e)||"+"===M(e)){if(e.token+=A(e),P(e),"+"!==A(e)&&"-"!==A(e)||(e.token+=A(e),P(e)),!O.isDigit(A(e)))throw xe(e,'Digit expected, got "'+A(e)+'"');while(O.isDigit(A(e)))e.token+=A(e),P(e);if(O.isDecimalMark(A(e),M(e)))throw xe(e,'Digit expected, got "'+A(e)+'"')}else if("."===M(e))throw P(e),xe(e,'Digit expected, got "'+A(e)+'"')}else{if(!O.isAlpha(A(e),T(e),M(e))){e.tokenType=w.UNKNOWN;while(""!==A(e))e.token+=A(e),P(e);throw xe(e,'Syntax error in part "'+e.token+'"')}while(O.isAlpha(A(e),T(e),M(e))||O.isDigit(A(e)))e.token+=A(e),P(e);Q(k,e.token)?e.tokenType=w.DELIMITER:e.tokenType=w.SYMBOL}}else e.tokenType=w.DELIMITER}function F(e){do{D(e)}while("\n"===e.token)}function _(e){e.nestingLevel++}function L(e){e.nestingLevel--}function U(e,t){var n=C();a()(n,{expression:e,extraNodes:t}),D(n);var r=H(n);if(""!==n.token)throw n.tokenType===w.DELIMITER?Ee(n,"Unexpected operator "+n.token):xe(n,'Unexpected part "'+n.token+'"');return r}function H(e){var t,n,r=[];""!==e.token&&"\n"!==e.token&&";"!==e.token&&(t=q(e),t.comment=e.comment);while("\n"===e.token||";"===e.token)0===r.length&&t&&(n=";"!==e.token,r.push({node:t,visible:n})),D(e),"\n"!==e.token&&";"!==e.token&&""!==e.token&&(t=q(e),t.comment=e.comment,n=";"!==e.token,r.push({node:t,visible:n}));return r.length>0?new l(r):(t||(t=new u(void 0),t.comment=e.comment),t)}function q(e){var t,n,r,o,i=z(e);if("="===e.token){if(R(i))return t=i.name,F(e),r=q(e),new s(new v(t),r);if(V(i))return F(e),r=q(e),new s(i.object,i.index,r);if($(i)&&R(i.fn)&&(o=!0,n=[],t=i.name,i.args.forEach((function(e,t){R(e)?n[t]=e.name:o=!1})),o))return F(e),r=q(e),new p(t,n,r);throw xe(e,"Invalid left hand side of assignment operator =")}return i}function z(e){var t=W(e);while("?"===e.token){var n=e.conditionalLevel;e.conditionalLevel=e.nestingLevel,F(e);var r=t,o=q(e);if(":"!==e.token)throw xe(e,"False part of conditional expression expected");e.conditionalLevel=null,F(e);var i=q(e);t=new c(r,o,i),e.conditionalLevel=n}return t}function W(e){var t=J(e);while("or"===e.token)F(e),t=new h("or","or",[t,J(e)]);return t}function J(e){var t=G(e);while("xor"===e.token)F(e),t=new h("xor","xor",[t,G(e)]);return t}function G(e){var t=K(e);while("and"===e.token)F(e),t=new h("and","and",[t,K(e)]);return t}function K(e){var t=Y(e);while("|"===e.token)F(e),t=new h("|","bitOr",[t,Y(e)]);return t}function Y(e){var t=Z(e);while("^|"===e.token)F(e),t=new h("^|","bitXor",[t,Z(e)]);return t}function Z(e){var t=X(e);while("&"===e.token)F(e),t=new h("&","bitAnd",[t,X(e)]);return t}function X(e){var t=[ee(e)],n=[],r={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};while(Q(r,e.token)){var o={name:e.token,fn:r[e.token]};n.push(o),F(e),t.push(ee(e))}return 1===t.length?t[0]:2===t.length?new h(n[0].name,n[0].fn,t):new y(n.map(e=>e.fn),t)}function ee(e){var t,n,r,o;t=te(e);var i={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};while(Q(i,e.token))n=e.token,r=i[n],F(e),o=[t,te(e)],t=new h(n,r,o);return t}function te(e){var t,n,r,o;t=ne(e);var i={to:"to",in:"to"};while(Q(i,e.token))n=e.token,r=i[n],F(e),"in"===n&&""===e.token?t=new h("*","multiply",[t,new v("in")],!0):(o=[t,ne(e)],t=new h(n,r,o));return t}function ne(e){var t,n=[];if(t=":"===e.token?new u(1):re(e),":"===e.token&&e.conditionalLevel!==e.nestingLevel){n.push(t);while(":"===e.token&&n.length<3)F(e),")"===e.token||"]"===e.token||","===e.token||""===e.token?n.push(new v("end")):n.push(re(e));t=3===n.length?new b(n[0],n[2],n[1]):new b(n[0],n[1])}return t}function re(e){var t,n,r,o;t=oe(e);var i={"+":"add","-":"subtract"};while(Q(i,e.token)){n=e.token,r=i[n],F(e);var a=oe(e);o=a.isPercentage?[t,new h("*","multiply",[t,a])]:[t,a],t=new h(n,r,o)}return t}function oe(e){var t,n,r,o;t=ie(e),n=t;var i={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};while(1){if(!Q(i,e.token))break;r=e.token,o=i[r],F(e),n=ie(e),t=new h(r,o,[t,n])}return t}function ie(e){var t,n;t=ae(e),n=t;while(1){if(!(e.tokenType===w.SYMBOL||"in"===e.token&&B(t))&&(e.tokenType!==w.NUMBER||B(n)||I(n)&&"!"!==n.op)&&"("!==e.token)break;n=ae(e),t=new h("*","multiply",[t,n],!0)}return t}function ae(e){var t=se(e),n=t,r=[];while(1){if("/"!==e.token||!B(n))break;if(r.push(a()({},e)),F(e),e.tokenType!==w.NUMBER){a()(e,r.pop());break}if(r.push(a()({},e)),F(e),e.tokenType!==w.SYMBOL&&"("!==e.token){r.pop(),a()(e,r.pop());break}a()(e,r.pop()),r.pop(),n=se(e),t=new h("/","divide",[t,n])}return t}function se(e){var t,n,r,o;t=le(e);var i={"%":"mod",mod:"mod"};while(Q(i,e.token))n=e.token,r=i[n],F(e),"%"===n&&e.tokenType===w.DELIMITER&&"("!==e.token?t=new h("/","divide",[t,new u(100)],!1,!0):(o=[t,le(e)],t=new h(n,r,o));return t}function le(e){var t,n,r,o={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Q(o,e.token)?(r=o[e.token],t=e.token,F(e),n=[le(e)],new h(t,r,n)):ce(e)}function ce(e){var t,n,r,o;return t=ue(e),"^"!==e.token&&".^"!==e.token||(n=e.token,r="^"===n?"pow":"dotPow",F(e),o=[t,le(e)],t=new h(n,r,o)),t}function ue(e){var t,n,r,o;t=pe(e);var i={"!":"factorial","'":"ctranspose"};while(Q(i,e.token))n=e.token,r=i[n],D(e),o=[t],t=new h(n,r,o),t=me(e,t);return t}function pe(e){var t=[];if(e.tokenType===w.SYMBOL&&Q(e.extraNodes,e.token)){var n=e.extraNodes[e.token];if(D(e),"("===e.token){if(t=[],_(e),D(e),")"!==e.token){t.push(q(e));while(","===e.token)D(e),t.push(q(e))}if(")"!==e.token)throw xe(e,"Parenthesis ) expected");L(e),D(e)}return new n(t)}return de(e)}function de(e){var t,r;return e.tokenType===w.SYMBOL||e.tokenType===w.DELIMITER&&e.token in k?(r=e.token,D(e),t=Q(x,r)?new u(x[r]):-1!==E.indexOf(r)?new u(n(r,"number")):new v(r),t=me(e,t),t):fe(e)}function me(e,t,n){var r;while(("("===e.token||"["===e.token||"."===e.token)&&(!n||-1!==n.indexOf(e.token)))if(r=[],"("===e.token){if(!R(t)&&!V(t))return t;if(_(e),D(e),")"!==e.token){r.push(q(e));while(","===e.token)D(e),r.push(q(e))}if(")"!==e.token)throw xe(e,"Parenthesis ) expected");L(e),D(e),t=new d(t,r)}else if("["===e.token){if(_(e),D(e),"]"!==e.token){r.push(q(e));while(","===e.token)D(e),r.push(q(e))}if("]"!==e.token)throw xe(e,"Parenthesis ] expected");L(e),D(e),t=new o(t,new m(r))}else{if(D(e),e.tokenType!==w.SYMBOL)throw xe(e,"Property name expected after dot");r.push(new u(e.token)),D(e);var i=!0;t=new o(t,new m(r,i))}return t}function fe(e){var t,n;return'"'===e.token?(n=he(e),t=new u(n),t=me(e,t),t):ge(e)}function he(e){var t="";while(""!==A(e)&&'"'!==A(e))"\\"===A(e)&&(t+=A(e),P(e)),t+=A(e),P(e);if(D(e),'"'!==e.token)throw xe(e,'End of string " expected');return D(e),JSON.parse('"'+t+'"')}function ge(e){var t,n;return"'"===e.token?(n=be(e),t=new u(n),t=me(e,t),t):ye(e)}function be(e){var t="";while(""!==A(e)&&"'"!==A(e))"\\"===A(e)&&(t+=A(e),P(e)),t+=A(e),P(e);if(D(e),"'"!==e.token)throw xe(e,"End of string ' expected");return D(e),JSON.parse('"'+t+'"')}function ye(e){var t,n,r,o;if("["===e.token){if(_(e),D(e),"]"!==e.token){var a=ve(e);if(";"===e.token){r=1,n=[a];while(";"===e.token)D(e),n[r]=ve(e),r++;if("]"!==e.token)throw xe(e,"End of matrix ] expected");L(e),D(e),o=n[0].items.length;for(var s=1;s<r;s++)if(n[s].items.length!==o)throw Ee(e,"Column dimensions mismatch ("+n[s].items.length+" !== "+o+")");t=new i(n)}else{if("]"!==e.token)throw xe(e,"End of matrix ] expected");L(e),D(e),t=a}}else L(e),D(e),t=new i([]);return me(e,t)}return Oe(e)}function ve(e){var t=[q(e)],n=1;while(","===e.token)D(e),t[n]=q(e),n++;return new i(t)}function Oe(e){if("{"===e.token){var t;_(e);var n={};do{if(D(e),"}"!==e.token){if('"'===e.token)t=he(e);else if("'"===e.token)t=be(e);else{if(!(e.tokenType===w.SYMBOL||e.tokenType===w.DELIMITER&&e.token in k))throw xe(e,"Symbol or string expected as object key");t=e.token,D(e)}if(":"!==e.token)throw xe(e,"Colon : expected after object key");D(e),n[t]=q(e)}}while(","===e.token);if("}"!==e.token)throw xe(e,"Comma , or bracket } expected after object value");L(e),D(e);var r=new f(n);return r=me(e,r),r}return je(e)}function je(e){var t;return e.tokenType===w.NUMBER?(t=e.token,D(e),new u(n(t,r.number))):we(e)}function we(e){var t;if("("===e.token){if(_(e),D(e),t=q(e),")"!==e.token)throw xe(e,"Parenthesis ) expected");return L(e),D(e),t=new g(t),t=me(e,t),t}return Ne(e)}function Ne(e){throw""===e.token?xe(e,"Unexpected end of expression"):xe(e,"Value expected")}function ke(e){return e.index-e.token.length+1}function xe(e,t){var n=ke(e),r=new SyntaxError(t+" (char "+n+")");return r.char=n,r}function Ee(e,t){var n=ke(e),r=new SyntaxError(t+" (char "+n+")");return r.char=n,r}return O.isAlpha=function(e,t,n){return O.isValidLatinOrGreek(e)||O.isValidMathSymbol(e,n)||O.isValidMathSymbol(t,e)},O.isValidLatinOrGreek=function(e){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(e)},O.isValidMathSymbol=function(e,t){return/^[\uD835]$/.test(e)&&/^[\uDC00-\uDFFF]$/.test(t)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(t)},O.isWhitespace=function(e,t){return" "===e||"\t"===e||"\n"===e&&t>0},O.isDecimalMark=function(e,t){return"."===e&&"/"!==t&&"*"!==t&&"^"!==t},O.isDigitDot=function(e){return e>="0"&&e<="9"||"."===e},O.isDigit=function(e){return e>="0"&&e<="9"},O.isHexDigit=function(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"},O}),mi={AccessorNodeDependencies:hr,ArrayNodeDependencies:vr,AssignmentNodeDependencies:Vr,BlockNodeDependencies:Fr,ConditionalNodeDependencies:Ur,ConstantNodeDependencies:eo,FunctionAssignmentNodeDependencies:ho,FunctionNodeDependencies:ko,IndexNodeDependencies:To,ObjectNodeDependencies:$o,OperatorNodeDependencies:Io,ParenthesisNodeDependencies:qo,RangeNodeDependencies:Go,RelationalNodeDependencies:Xo,SymbolNodeDependencies:vo,numericDependencies:ci,typedDependencies:uo,createParse:di},fi="evaluate",hi=["typed","parse"],gi=Je(fi,hi,e=>{var{typed:t,parse:n}=e;return t(fi,{string:function(e){var t=yt();return n(e).compile().evaluate(t)},"string, Map | Object":function(e,t){return n(e).compile().evaluate(t)},"Array | Matrix":function(e){var t=yt();return Qo(e,(function(e){return n(e).compile().evaluate(t)}))},"Array | Matrix, Map | Object":function(e,t){return Qo(e,(function(e){return n(e).compile().evaluate(t)}))}})}),bi={parseDependencies:mi,typedDependencies:uo,createEvaluate:gi};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
const yi=at({evaluateDependencies:bi});yi.import({add:(e,t)=>e+t,subtract:(e,t)=>e-t,multiply:(e,t)=>e*t,divide:(e,t)=>e/t,equal:(e,t)=>e==t,unequal:(e,t)=>e!=t,not:e=>!e,and:(e,t)=>e&&t,or:(e,t)=>e||t,largerEq:(e,t)=>e>=t,larger:(e,t)=>e>t,smallerEq:(e,t)=>e<=t,smaller:(e,t)=>e<t},{override:!0});var vi=yi,Oi=n("8bbf");const ji={class:"form-group row matomo-form-field"},wi={key:0,class:"col s12"},Ni={key:0,class:"form-help"},ki={key:0,class:"inline-help",ref:"inlineHelp"},xi=Object(Oi["createElementVNode"])("br",null,null,-1),Ei=["href"];function Ci(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("Notification");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",ji,[e.formField.introduction?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("h3",wi,Object(Oi["toDisplayString"])(e.formField.introduction),1)):Object(Oi["createCommentVNode"])("",!0),Object(Oi["createElementVNode"])("div",{class:Object(Oi["normalizeClass"])(["col s12",{"input-field":"checkbox"!==e.formField.uiControl&&"radio"!==e.formField.uiControl,"file-field":"file"===e.formField.uiControl,m6:!e.formField.fullWidth}])},[(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(Object(Oi["resolveDynamicComponent"])(e.childComponent),Object(Oi["mergeProps"])(Object.assign(Object.assign({formField:e.formField},e.formField),{},{id:e.fieldId,modelValue:e.processedModelValue,modelModifiers:e.modelModifiers,availableOptions:e.availableOptions},e.extraChildComponentParams),{"onUpdate:modelValue":t[0]||(t[0]=t=>e.onChange(t)),"onCheck:isValid":t[1]||(t[1]=t=>e.onCheckIsValid(t))}),null,16))],2),Object(Oi["createElementVNode"])("div",{class:Object(Oi["normalizeClass"])(["col s12",{m6:!e.formField.fullWidth}])},[e.showFormHelp?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Ni,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("div",{class:"form-description"},Object(Oi["toDisplayString"])(e.formField.description),513),[[Oi["vShow"],e.formField.description]]),e.formField.inlineHelp||e.hasInlineHelpSlot?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",ki,[e.inlineHelpComponent?(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(Object(Oi["resolveDynamicComponent"])(e.inlineHelpComponent),Object(Oi["normalizeProps"])(Object(Oi["mergeProps"])({key:0},e.inlineHelpBind)),null,16)):Object(Oi["createCommentVNode"])("",!0),Object(Oi["renderSlot"])(e.$slots,"inline-help")],512)):Object(Oi["createCommentVNode"])("",!0),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("span",null,[xi,Object(Oi["createTextVNode"])(" "+Object(Oi["toDisplayString"])(e.translate("General_Default"))+": ",1),Object(Oi["createElementVNode"])("span",null,Object(Oi["toDisplayString"])(e.defaultValuePrettyTruncated),1)],512),[[Oi["vShow"],e.showDefaultValue]])])):Object(Oi["createCommentVNode"])("",!0),e.isPrivacyPolicyControlled?(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(a,{key:1,noclear:!0,context:"info"},{default:Object(Oi["withCtx"])(()=>[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("PrivacyManager_PolicyControlledSetting"))+" ",1),Object(Oi["createElementVNode"])("a",{href:e.privacyPolicyLink},Object(Oi["toDisplayString"])(e.translate("PrivacyManager_ViewPrivacyComplianceOverview")),9,Ei)]),_:1})):Object(Oi["createCommentVNode"])("",!0)],2)])}var Si=n("19dc");const Vi={class:"checkbox"},Ai=["checked","id","name"],Pi=["innerHTML"];function Ti(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Vi,[Object(Oi["createElementVNode"])("label",null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({onChange:t[0]||(t[0]=t=>e.onChange(t))},e.uiControlAttributes,{value:1,checked:e.isChecked,type:"checkbox",id:e.id,name:e.name}),null,16,Ai),Object(Oi["createElementVNode"])("span",{innerHTML:e.$sanitize(e.title)},null,8,Pi)])])}var Mi=Object(Oi["defineComponent"])({props:{modelValue:[Boolean,Number,String],modelModifiers:Object,uiControlAttributes:Object,name:String,title:String,id:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange(e){const t=e.target.checked;if(this.modelValue!==t){var n;if(null===(n=this.modelModifiers)||void 0===n||!n.abortable)return void this.$emit("update:modelValue",t);const r={value:t,abort(){e.target.checked=!t}};this.$emit("update:modelValue",r)}}},computed:{isChecked(){return!!this.modelValue&&"0"!==this.modelValue}}});Mi.render=Ti;var Bi=Mi;const Di={ref:"root"},$i=["value","checked","onChange","id","name"];function Fi(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Di,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(Oi["toDisplayString"])(e.title),513),[[Oi["vShow"],e.title]]),(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.availableOptions,(t,n)=>(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("p",{key:n,class:"checkbox"},[Object(Oi["createElementVNode"])("label",null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({value:t.key,checked:!!e.checkboxStates[n],onChange:t=>e.onChange(n)},e.uiControlAttributes,{type:"checkbox",id:`${e.id}${t.key}`,name:t.name}),null,16,$i),Object(Oi["createElementVNode"])("span",null,Object(Oi["toDisplayString"])(t.value),1),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("span",{class:"form-description"},Object(Oi["toDisplayString"])(t.description),513),[[Oi["vShow"],t.description]])])]))),128))],512)}function _i(e,t){return(e||[]).map(e=>t&&-1!==t.indexOf(e.key))}var Li=Object(Oi["defineComponent"])({props:{modelValue:Array,modelModifiers:Object,name:String,title:String,id:String,availableOptions:Array,uiControlAttributes:Object,type:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{checkboxStates(){return _i(this.availableOptions,this.modelValue)}},mounted(){setTimeout(()=>{window.Materialize.updateTextFields()})},methods:{onChange(e){var t;const n=[...this.checkboxStates];n[e]=!n[e];const r=this.availableOptions||{},o=[];if(Object.values(r).forEach((e,t)=>{n[t]&&o.push(e.key)}),null===(t=this.modelModifiers)||void 0===t||!t.abortable)return void this.$emit("update:modelValue",o);const i={value:o,abort:()=>{const t=this.$refs.root.querySelectorAll("input").item(e);t.checked=!t.checked}};this.$emit("update:modelValue",i)}}});Li.render=Fi;var Ii=Li;const Ui={class:"expandableSelector"},Hi=Object(Oi["createElementVNode"])("svg",{class:"caret",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},[Object(Oi["createElementVNode"])("path",{d:"M7 10l5 5 5-5z"}),Object(Oi["createElementVNode"])("path",{d:"M0 0h24v24H0z",fill:"none"})],-1),Ri=["value"],qi={class:"expandableList z-depth-2"},zi={class:"searchContainer"},Wi={class:"collection firstLevel"},Ji=["onClick"],Gi={class:"collection secondLevel"},Ki=["onClick"],Yi={class:"primary-content"},Zi=["title"];function Xi(e,t,n,r,o,i){const a=Object(Oi["resolveDirective"])("focus-if"),s=Object(Oi["resolveDirective"])("focus-anywhere-but-here");return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Ui,[Object(Oi["createElementVNode"])("div",{onClick:t[0]||(t[0]=t=>e.showSelect=!e.showSelect),class:"select-wrapper"},[Hi,Object(Oi["createElementVNode"])("input",{type:"text",class:"select-dropdown",readonly:"readonly",value:e.modelValueText},null,8,Ri)]),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("div",qi,[Object(Oi["createElementVNode"])("div",zi,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("input",{type:"text",placeholder:"Search","onUpdate:modelValue":t[1]||(t[1]=t=>e.searchTerm=t),class:"expandableSearch browser-default"},null,512),[[Oi["vModelText"],e.searchTerm],[a,{focused:e.showSelect}]])]),Object(Oi["createElementVNode"])("ul",Wi,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.availableOptions,(t,n)=>Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("li",{class:"collection-item",key:n},[Object(Oi["createElementVNode"])("h4",{class:"expandableListCategory",onClick:n=>e.onCategoryClicked(t)},[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(t.group)+" ",1),Object(Oi["createElementVNode"])("span",{class:Object(Oi["normalizeClass"])(["secondary-content",{"icon-chevron-right":e.showCategory!==t.group,"icon-chevron-down":e.showCategory===t.group}])},null,2)],8,Ji),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("ul",Gi,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(t.values.filter(t=>e.isSearchMatch(t.value)),t=>(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("li",{class:"expandableListItem collection-item valign-wrapper",key:t.key,onClick:n=>e.onValueClicked(t)},[Object(Oi["createElementVNode"])("span",Yi,Object(Oi["toDisplayString"])(t.value),1),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("span",{title:t.tooltip,class:"secondary-content icon-help"},null,8,Zi),[[Oi["vShow"],t.tooltip]])],8,Ki))),128))],512),[[Oi["vShow"],e.showCategory===t.group||e.searchTerm]])])),[[Oi["vShow"],t.values.filter(t=>e.isSearchMatch(t.value)).length]])),128))])],512),[[Oi["vShow"],e.showSelect]])])),[[s,{blur:e.onBlur}]])}function Qi(e){const t=[];if(!e)return t;const n={};return Object.values(e).forEach(e=>{const t=e,r=t.group||"";r in n&&n[r]||(n[r]={values:[],group:r});const o={key:t.key,value:t.value};"tooltip"in t&&t.tooltip&&(o.tooltip=t.tooltip),n[r].values.push(o)}),Object.values(n).forEach(e=>{e.values.length&&t.push(e)}),t}var ea=Object(Oi["defineComponent"])({props:{modelValue:[Number,String],modelModifiers:Object,availableOptions:Array,title:String},directives:{FocusAnywhereButHere:Si["FocusAnywhereButHere"],FocusIf:Si["FocusIf"]},inheritAttrs:!1,emits:["update:modelValue"],data(){return{showSelect:!1,searchTerm:"",showCategory:""}},computed:{searchTermLowercase(){return this.searchTerm.toLowerCase()},searchTermNormalized(){return this.normalize(this.searchTerm)},modelValueText(){if(this.title)return this.title;const e=this.modelValue,t=this.availableOptions||[];let n;return t.some(t=>(n=t.values.find(t=>t.key===e),n)),n?n.value?""+n.value:"":e?""+e:""}},methods:{normalize(e){return Si["Matomo"].helper.normalize(e)},isSearchMatch(e){const t=""+(null!==e&&void 0!==e?e:"");return-1!==this.normalize(t).indexOf(this.searchTermNormalized)||-1!==t.toLowerCase().indexOf(this.searchTermLowercase)},onBlur(){this.showSelect=!1},onCategoryClicked(e){this.showCategory===e.group?this.showCategory="":this.showCategory=e.group},onValueClicked(e){var t;if(this.showSelect=!1,null===(t=this.modelModifiers)||void 0===t||!t.abortable)return void this.$emit("update:modelValue",e.key);const n={value:e.key,abort(){}};this.$emit("update:modelValue",n)}}});ea.render=Xi;var ta=ea;const na=["for","innerHTML"];function ra(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("FieldArray");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("label",{for:e.id,innerHTML:e.$sanitize(e.title)},null,8,na),Object(Oi["createVNode"])(a,{name:e.name,id:e.id,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=t=>e.onValueUpdate(t)),"model-modifiers":e.modelModifiers,field:e.uiControlAttributes.field,rows:e.uiControlAttributes.rows},null,8,["name","id","model-value","model-modifiers","field","rows"])])}var oa=Object(Oi["defineComponent"])({components:{FieldArray:Si["FieldArray"]},props:{name:String,title:String,id:String,modelValue:null,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],methods:{onValueUpdate(e){this.$emit("update:modelValue",e)}}});oa.render=ra;var ia=oa;const aa={class:"btn"},sa=["for","innerHTML"],la=["name","id"],ca={class:"file-path-wrapper"},ua=["value"];function pa(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("div",aa,[Object(Oi["createElementVNode"])("span",{for:e.id,innerHTML:e.$sanitize(e.title)},null,8,sa),Object(Oi["createElementVNode"])("input",{ref:"fileInput",name:e.name,type:"file",id:e.id,onChange:t[0]||(t[0]=t=>e.onChange(t))},null,40,la)]),Object(Oi["createElementVNode"])("div",ca,[Object(Oi["createElementVNode"])("input",{class:"file-path validate",value:e.filePath,type:"text"},null,8,ua)])])}var da=Object(Oi["defineComponent"])({props:{name:String,title:String,id:String,modelValue:[String,File],modelModifiers:Object},inheritAttrs:!1,emits:["update:modelValue"],watch:{modelValue(e){if(!e||""===e){const e=this.$refs.fileInput;e.value=""}}},methods:{onChange(e){var t;const{files:n}=e.target;if(!n)return;const r=n.item(0);if(null===(t=this.modelModifiers)||void 0===t||!t.abortable)return void this.$emit("update:modelValue",r);const o={value:r,abort(){}};this.$emit("update:modelValue",o)}},computed:{filePath(){if(this.modelValue instanceof File)return this.$refs.fileInput.value}}});da.render=pa;var ma=da;const fa=["type","name","id","value"];function ha(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("input",{type:e.uiControl,name:e.name,id:e.id,value:e.modelValue,onChange:t[0]||(t[0]=t=>e.onChange(t))},null,40,fa)])}var ga=Object(Oi["defineComponent"])({props:{modelValue:null,modelModifiers:Object,uiControl:String,name:String,id:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange(e){this.$emit("update:modelValue",e.target.value)}}});ga.render=ha;var ba=ga;const ya={class:"fieldMultiTuple"},va=["for","innerHTML"];function Oa(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("MultiPairField");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",ya,[Object(Oi["createElementVNode"])("label",{for:e.id,innerHTML:e.$sanitize(e.title)},null,8,va),Object(Oi["createVNode"])(a,{name:e.name,id:e.id,"model-value":e.modelValue,"onUpdate:modelValue":e.onUpdateValue,"model-modifiers":e.modelModifiers,field1:e.uiControlAttributes.field1,field2:e.uiControlAttributes.field2,field3:e.uiControlAttributes.field3,field4:e.uiControlAttributes.field4,rows:e.uiControlAttributes.rows},null,8,["name","id","model-value","onUpdate:modelValue","model-modifiers","field1","field2","field3","field4","rows"])])}var ja=Object(Oi["defineComponent"])({props:{name:String,title:String,id:String,modelValue:null,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{MultiPairField:Si["MultiPairField"]},emits:["update:modelValue"],methods:{onUpdateValue(e){this.$emit("update:modelValue",e)}}});ja.render=Oa;var wa=ja;const Na=["type","id","name","value"],ka=["for","innerHTML"];function xa(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({class:"control_"+e.uiControl,type:e.uiControl,id:e.id,name:e.name,value:e.modelValueFormatted,onKeydown:t[0]||(t[0]=t=>e.onChange(t)),onChange:t[1]||(t[1]=t=>e.onChange(t))},e.uiControlAttributes),null,16,Na),Object(Oi["createElementVNode"])("label",{for:e.id,innerHTML:e.$sanitize(e.title)},null,8,ka)],64)}var Ea=Object(Oi["defineComponent"])({props:{uiControl:String,name:String,title:String,id:String,modelValue:[Number,String],modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],created(){this.onChange=Object(Si["debounce"])(this.onChange.bind(this),50)},methods:{onChange(e){const t=parseFloat(e.target.value);if(t!==this.modelValue){var n;if(null===(n=this.modelModifiers)||void 0===n||!n.abortable)return void this.$emit("update:modelValue",t);const r={value:t,abort:()=>{e.target.value!==this.modelValueFormatted&&(e.target.value=this.modelValueFormatted)}};this.$emit("update:modelValue",r)}}},mounted(){setTimeout(()=>{window.Materialize.updateTextFields()})},watch:{modelValue(){setTimeout(()=>{window.Materialize.updateTextFields()})}},computed:{modelValueFormatted(){return(this.modelValue||"").toString()}}});Ea.render=xa;var Ca=Ea;const Sa={ref:"root"},Va=["value","id","name","disabled","checked"];function Aa(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Sa,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(Oi["toDisplayString"])(e.title),513),[[Oi["vShow"],e.title]]),(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.availableOptions||[],n=>(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("p",{key:n.key,class:"radio"},[Object(Oi["createElementVNode"])("label",null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({value:n.key,onChange:t[0]||(t[0]=t=>e.onChange(t)),type:"radio",id:`${e.id}${n.key}`,name:e.name,disabled:n.disabled||e.disabled},e.uiControlAttributes,{checked:e.modelValue===n.key||""+e.modelValue===n.key}),null,16,Va),Object(Oi["createElementVNode"])("span",null,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(n.value)+" ",1),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("span",{class:"form-description"},Object(Oi["toDisplayString"])(n.description),513),[[Oi["vShow"],n.description]])])])]))),128))],512)}var Pa=Object(Oi["defineComponent"])({props:{title:String,availableOptions:Array,name:String,id:String,disabled:Boolean,uiControlAttributes:Object,modelValue:[String,Number],modelModifiers:Object},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange(e){var t;if(null===(t=this.modelModifiers)||void 0===t||!t.abortable)return void this.$emit("update:modelValue",e.target.value);const n=()=>{this.$refs.root.querySelectorAll("input").forEach((e,t)=>{var n;if(null===(n=this.availableOptions)||void 0===n||!n[t])return;const{key:r}=this.availableOptions[t];e.checked=this.modelValue===r||""+this.modelValue===r})},r={value:e.target.value,abort:()=>{n()}};this.$emit("update:modelValue",r)}}});Pa.render=Aa;var Ta=Pa;const Ma={key:0,class:"matomo-field-select"},Ba=["multiple","name","id"],Da=["label"],$a=["value","selected","disabled"],Fa=["for","innerHTML"],_a={key:1,class:"matomo-field-select"},La=["multiple","name","id"],Ia=["value","selected","disabled"],Ua=["for","innerHTML"];function Ha(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[e.groupedOptions?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Ma,[Object(Oi["createElementVNode"])("select",Object(Oi["mergeProps"])({ref:"select",class:"grouped",multiple:e.multiple,name:e.name,id:e.id,onChange:t[0]||(t[0]=t=>e.onChange(t))},e.uiControlAttributes),[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.groupedOptions,([t,n])=>(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("optgroup",{key:t,label:t},[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(n,t=>(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("option",{key:t.key,value:"string:"+t.key,selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(Oi["toDisplayString"])(t.value),9,$a))),128))],8,Da))),128))],16,Ba),Object(Oi["createElementVNode"])("label",{for:e.id,innerHTML:e.$sanitize(e.title)},null,8,Fa)])):Object(Oi["createCommentVNode"])("",!0),!e.groupedOptions&&e.options?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",_a,[Object(Oi["createElementVNode"])("select",Object(Oi["mergeProps"])({class:"ungrouped",ref:"select",multiple:e.multiple,name:e.name,id:e.id,onChange:t[1]||(t[1]=t=>e.onChange(t))},e.uiControlAttributes),[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.options,t=>(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("option",{key:t.key,value:"string:"+t.key,selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(Oi["toDisplayString"])(t.value),9,Ia))),128))],16,La),Object(Oi["createElementVNode"])("label",{for:e.id,innerHTML:e.$sanitize(e.title)},null,8,Ua)])):Object(Oi["createCommentVNode"])("",!0)],64)}function Ra(e,t,n,r={},o){if(!e)return;const i=window.$(e);if(Array.from(e.options).forEach(e=>{e.selected=o?!!t&&-1!==t.indexOf(e.value.replace(/^string:/,"")):"string:"+t===e.value}),i.formSelect(r),n){const e=i.closest(".select-wrapper").find("input");e.attr("placeholder",n)}}function qa(e){return!Array.isArray(e)&&"object"===typeof e&&Object.values(e).some(e=>"object"===typeof e)}function za(e,t){return e.some(e=>e.key===t)}function Wa(e,t,n){if(!e)return[];let r=!0,o=e;qa(o)||(o={"":e},r=!1);const i=[];return Object.entries(o).forEach(([e,n])=>{Object.entries(n).forEach(([n,o])=>{if(o&&"object"===typeof o&&"undefined"!==typeof o.key)return void i.push(o);let a=n;"integer"===t&&"string"===typeof n&&(a=parseInt(n,10)),i.push({group:r?e:void 0,key:a,value:o})})}),null!==n&&void 0!==n&&n.placeholder&&!za(i,"")?[{key:"",value:""},...i]:i}function Ja(e){return"string"===typeof e?e.replace(/^string:/,""):e}var Ga=Object(Oi["defineComponent"])({props:{modelValue:null,modelModifiers:Object,multiple:Boolean,name:String,title:String,id:String,availableOptions:Array,uiControlAttributes:Object,uiControlOptions:Object},inheritAttrs:!1,emits:["update:modelValue"],computed:{options(){const e=this.availableOptions;return!e||za(e,"")||"undefined"!==typeof this.modelValue&&null!==this.modelValue&&""!==this.modelValue?e:[{key:"",value:this.modelValue,group:this.hasGroups?"":void 0},...e]},hasGroups(){const e=this.availableOptions;return e&&e[0]&&"undefined"!==typeof e[0].group},groupedOptions(){const{options:e}=this;if(!this.hasGroups||!e)return null;const t={};e.forEach(e=>{const n=e.group;t[n]=t[n]||[],t[n].push(e)});const n=Object.entries(t);return n.sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0),n}},methods:{onChange(e){var t;const n=e.target;let r;if(this.multiple?(r=Array.from(n.options).filter(e=>e.selected).map(e=>e.value),r=r.map(e=>Ja(e))):(r=n.value,r=Ja(r)),null===(t=this.modelModifiers)||void 0===t||!t.abortable)return void this.$emit("update:modelValue",r);const o={value:r,abort:()=>{this.onModelValueChange(this.modelValue)}};this.$emit("update:modelValue",o)},onModelValueChange(e){window.$(this.$refs.select).val(e),setTimeout(()=>{var t;Ra(this.$refs.select,e,null===(t=this.uiControlAttributes)||void 0===t?void 0:t.placeholder,this.uiControlOptions,this.multiple)})}},watch:{modelValue(e){this.onModelValueChange(e)},"uiControlAttributes.disabled":{handler(e,t){setTimeout(()=>{var n;e!==t&&Ra(this.$refs.select,this.modelValue,null===(n=this.uiControlAttributes)||void 0===n?void 0:n.placeholder,this.uiControlOptions,this.multiple)})}},availableOptions(e,t){e!==t&&setTimeout(()=>{var e;Ra(this.$refs.select,this.modelValue,null===(e=this.uiControlAttributes)||void 0===e?void 0:e.placeholder,this.uiControlOptions,this.multiple)})}},mounted(){setTimeout(()=>{var e;Ra(this.$refs.select,this.modelValue,null===(e=this.uiControlAttributes)||void 0===e?void 0:e.placeholder,this.uiControlOptions,this.multiple)})}});Ga.render=Ha;var Ka=Ga;const Ya=["for","innerHTML"],Za={class:"sites_autocomplete"};function Xa(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("SiteSelector");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("label",{for:e.id,class:"siteSelectorLabel",innerHTML:e.$sanitize(e.title)},null,8,Ya),Object(Oi["createElementVNode"])("div",Za,[Object(Oi["createVNode"])(a,Object(Oi["mergeProps"])({"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=t=>e.onChange(t)),id:e.id,"show-all-sites-item":e.uiControlAttributes.showAllSitesItem||!1,"switch-site-on-select":!1,"show-selected-site":!0,"only-sites-with-admin-access":e.uiControlAttributes.onlySitesWithAdminAccess||!1,"only-sites-with-at-least-write-access":e.uiControlAttributes.onlySitesWithAtLeastWriteAccess||!1},e.uiControlAttributes),null,16,["model-value","id","show-all-sites-item","only-sites-with-admin-access","only-sites-with-at-least-write-access"])])])}var Qa=Object(Oi["defineComponent"])({props:{name:String,title:String,id:String,modelValue:Object,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{SiteSelector:Si["SiteSelector"]},emits:["update:modelValue"],methods:{onChange(e){var t;if(null===(t=this.modelModifiers)||void 0===t||!t.abortable)return void this.$emit("update:modelValue",e);const n={value:e,abort(){}};this.$emit("update:modelValue",n)}}});Qa.render=Xa;var es=Qa;const ts=["type","id","name","value","spellcheck"],ns=["for","innerHTML"];function rs(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({class:"control_"+e.uiControl,type:e.uiControl,id:e.id,name:e.name,value:e.modelValueText,spellcheck:"password"!==e.uiControl&&null,onKeydown:t[0]||(t[0]=t=>e.onKeydown(t)),onChange:t[1]||(t[1]=t=>e.onKeydown(t))},e.uiControlAttributes),null,16,ts),Object(Oi["createElementVNode"])("label",{for:e.id,innerHTML:e.$sanitize(e.title)},null,8,ns)],64)}var os=Object(Oi["defineComponent"])({props:{title:String,name:String,id:String,uiControlAttributes:Object,modelValue:[String,Number],modelModifiers:Object,uiControl:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{modelValueText(){return"undefined"===typeof this.modelValue||null===this.modelValue?"":this.modelValue.toString()}},created(){this.onKeydown=Object(Si["debounce"])(this.onKeydown.bind(this),50)},mounted(){setTimeout(()=>{window.Materialize.updateTextFields()})},watch:{modelValue(){setTimeout(()=>{window.Materialize.updateTextFields()})}},methods:{onKeydown(e){const t=e.target.value;if(this.modelValue!==t){var n;if(null===(n=this.modelModifiers)||void 0===n||!n.abortable)return void this.$emit("update:modelValue",t);const r={value:t,abort:()=>{e.target.value!==this.modelValueText&&(e.target.value=this.modelValueText)}};this.$emit("update:modelValue",r)}}}});os.render=rs;var is=os;const as=["for","innerHTML"],ss=["type","name","id","value"];function ls(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("label",{for:e.id,innerHTML:e.$sanitize(e.title)},null,8,as),Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({class:"control_"+e.uiControl,type:e.uiControl,name:e.name,id:e.id,onKeydown:t[0]||(t[0]=t=>e.onKeydown(t)),onChange:t[1]||(t[1]=t=>e.onKeydown(t)),value:e.concattedValues},e.uiControlAttributes),null,16,ss)])}var cs=Object(Oi["defineComponent"])({props:{name:String,title:String,id:String,uiControl:String,modelValue:Array,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,computed:{concattedValues(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(", ")}},emits:["update:modelValue"],created(){this.onKeydown=Object(Si["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown(e){const t=e.target.value.split(",").map(e=>e.trim());if(t.join(", ")!==this.concattedValues){var n;if(null===(n=this.modelModifiers)||void 0===n||!n.abortable)return void this.$emit("update:modelValue",t);const r={value:t,abort:()=>{e.target.value!==this.concattedValues&&(e.target.value=this.concattedValues)}};this.$emit("update:modelValue",r)}}}});cs.render=ls;var us=cs;const ps=["name","id","value"],ds=["for","innerHTML"];function ms(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[Object(Oi["createElementVNode"])("textarea",Object(Oi["mergeProps"])({name:e.name},e.uiControlAttributes,{id:e.id,value:e.modelValueText,onKeydown:t[0]||(t[0]=t=>e.onKeydown(t)),onChange:t[1]||(t[1]=t=>e.onKeydown(t)),class:"materialize-textarea",ref:"textarea"}),null,16,ps),Object(Oi["createElementVNode"])("label",{for:e.id,innerHTML:e.$sanitize(e.title)},null,8,ds)],64)}var fs=Object(Oi["defineComponent"])({props:{name:String,uiControlAttributes:Object,modelValue:String,modelModifiers:Object,title:String,id:String},inheritAttrs:!1,emits:["update:modelValue"],created(){this.onKeydown=Object(Si["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown(e){const t=e.target.value;if(t!==this.modelValue){var n;if(null===(n=this.modelModifiers)||void 0===n||!n.abortable)return void this.$emit("update:modelValue",t);const r={value:t,abort:()=>{e.target.value!==this.modelValue&&(e.target.value=this.modelValueText)}};this.$emit("update:modelValue",r)}}},computed:{modelValueText(){return this.modelValue||""}},watch:{modelValue(){setTimeout(()=>{window.Materialize.textareaAutoResize(this.$refs.textarea),window.Materialize.updateTextFields()})}},mounted(){setTimeout(()=>{window.Materialize.textareaAutoResize(this.$refs.textarea),window.Materialize.updateTextFields()})}});fs.render=ms;var hs=fs;const gs=["for","innerHTML"],bs=["name","id","value"];function ys(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("label",{for:e.id,innerHTML:e.$sanitize(e.title)},null,8,gs),Object(Oi["createElementVNode"])("textarea",Object(Oi["mergeProps"])({ref:"textarea",name:e.name,id:e.id},e.uiControlAttributes,{value:e.concattedValue,onKeydown:t[0]||(t[0]=t=>e.onKeydown(t)),onChange:t[1]||(t[1]=t=>e.onKeydown(t)),class:"materialize-textarea"}),null,16,bs)])}const vs="\n";var Os=Object(Oi["defineComponent"])({props:{name:String,title:String,id:String,uiControlAttributes:Object,modelValue:[Array,String],modelModifiers:Object},inheritAttrs:!1,emits:["update:modelValue"],computed:{concattedValue(){if("string"===typeof this.modelValue)return this.modelValue;if("object"===typeof this.modelValue)return Object.values(this.modelValue).join(vs);try{return(this.modelValue||[]).join(vs)}catch(e){return console.error(e),""}}},created(){this.onKeydown=Object(Si["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown(e){const t=e.target.value.split(vs);if(t.join(vs)!==this.concattedValue){var n;if(null===(n=this.modelModifiers)||void 0===n||!n.abortable)return void this.$emit("update:modelValue",t);const r={value:t,abort:()=>{e.target.value!==this.concattedValue&&(e.target.value=this.concattedValue)}};this.$emit("update:modelValue",r)}}},watch:{modelValue(e,t){e!==t&&setTimeout(()=>{this.$refs.textarea&&window.Materialize.textareaAutoResize(this.$refs.textarea),window.Materialize.updateTextFields()})}},mounted(){setTimeout(()=>{this.$refs.textarea&&window.Materialize.textareaAutoResize(this.$refs.textarea),window.Materialize.updateTextFields()})}});Os.render=ys;var js=Os;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */function ws(e,t){if(!e)return[];const n=[];return Object.entries(e).forEach(([e,r])=>{if(r&&"object"===typeof r&&"undefined"!==typeof r.key)return void n.push(r);let o=e;"integer"===t&&"string"===typeof e&&(o=parseInt(o,10)),n.push({key:o,value:r})}),n}const Ns=["type","id","name","value"],ks=["for","innerHTML"];function xs(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("PasswordStrength");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({class:"control_"+e.uiControl,type:e.uiControl,id:e.id,name:e.name,value:e.modelValueText,spellcheck:"false",autocomplete:"current-password",autocorrect:"off",autocapitalize:"none",onKeydown:t[0]||(t[0]=t=>e.onKeydown(t)),onChange:t[1]||(t[1]=t=>e.onKeydown(t))},e.uiControlAttributes),null,16,Ns),Object(Oi["createElementVNode"])("label",{for:e.id,innerHTML:e.$sanitize(e.title)},null,8,ks),Object(Oi["createVNode"])(a,{password:e.modelValueText,"validation-rules":e.passwordStrengthValidationRules,"onCheck:isValid":t[2]||(t[2]=t=>e.onCheckIsValid(t))},null,8,["password","validation-rules"])],64)}var Es=Object(Oi["defineComponent"])({components:{PasswordStrength:Si["PasswordStrength"]},props:{title:String,name:String,id:String,uiControlAttributes:Object,modelValue:[String,Number],modelModifiers:Object,uiControl:String},inheritAttrs:!1,emits:["update:modelValue","check:isValid"],computed:{modelValueText(){return"undefined"===typeof this.modelValue||null===this.modelValue?"":this.modelValue.toString()},passwordStrengthValidationRules(){var e,t;return null!==(e=null===(t=this.uiControlAttributes)||void 0===t?void 0:t.passwordStrengthValidationRules)&&void 0!==e?e:[]}},created(){this.onKeydown=Object(Si["debounce"])(this.onKeydown.bind(this),50)},mounted(){setTimeout(()=>{window.Materialize.updateTextFields()})},watch:{modelValue(){setTimeout(()=>{window.Materialize.updateTextFields()})}},methods:{onKeydown(e){const t=e.target.value;if(this.modelValue!==t){var n;if(null===(n=this.modelModifiers)||void 0===n||!n.abortable)return void this.$emit("update:modelValue",t);const r={value:t,abort:()=>{e.target.value!==this.modelValueText&&(e.target.value=this.modelValueText)}};this.$emit("update:modelValue",r)}},onCheckIsValid(e){this.$emit("check:isValid",e)}}});Es.render=xs;var Cs=Es;const Ss=["url","search","email"],Vs=["textarea","checkbox","text"],As={checkbox:"FieldCheckbox","expandable-select":"FieldExpandableSelect","field-array":"FieldFieldArray",file:"FieldFile",hidden:"FieldHidden",multiselect:"FieldSelect",multituple:"FieldMultituple",number:"FieldNumber",password:"FieldPassword",radio:"FieldRadio",select:"FieldSelect",site:"FieldSite",text:"FieldText",textarea:"FieldTextarea"},Ps={FieldSelect:Wa,FieldCheckboxArray:ws,FieldRadio:ws,FieldExpandableSelect:Qi};var Ts=Object(Oi["defineComponent"])({props:{modelValue:null,modelModifiers:Object,formField:{type:Object,required:!0}},emits:["update:modelValue","check:isValid"],components:{Notification:Si["Notification"],FieldCheckbox:Bi,FieldCheckboxArray:Ii,FieldExpandableSelect:ta,FieldFieldArray:ia,FieldFile:ma,FieldHidden:ba,FieldMultituple:wa,FieldNumber:Ca,FieldRadio:Ta,FieldSelect:Ka,FieldSite:es,FieldText:is,FieldTextArray:us,FieldTextarea:hs,FieldTextareaArray:js,FieldPassword:Cs},setup(e){const t=Object(Oi["ref"])(null),n=e=>{let n;e&&t.value&&"function"!==typeof e.render&&(n="string"===typeof e?0===e.indexOf("#")?window.$(e):window.vueSanitize(e):e,window.$(t.value).html("").append(n))};return Object(Oi["watch"])(()=>e.formField.inlineHelp,n),Object(Oi["onMounted"])(()=>{n(e.formField.inlineHelp)}),{inlineHelp:t}},computed:{inlineHelpComponent(){const e=this.formField,t=e.inlineHelp;if(t&&"function"===typeof t.render)return e.inlineHelp},inlineHelpBind(){return this.inlineHelpComponent?this.formField.inlineHelpBind:void 0},childComponent(){const e=this.formField;if(e.component){let t=e.component;if(e.component.plugin){const{plugin:n,name:r}=e.component;if(!n||!r)throw new Error("Invalid component property given to FormField directive, must be {plugin: '...',name: '...'}");t=Object(Si["useExternalPluginComponent"])(n,r)}return Object(Oi["markRaw"])(t)}const{uiControl:t}=e;let n=As[t];return-1!==Ss.indexOf(t)&&(n="FieldText"),"array"===this.formField.type&&-1!==Vs.indexOf(t)&&(n+="Array"),n},extraChildComponentParams(){return"multiselect"===this.formField.uiControl?{multiple:!0}:{}},showFormHelp(){return this.formField.description||this.formField.inlineHelp||this.showDefaultValue||this.hasInlineHelpSlot},showDefaultValue(){return this.defaultValuePretty&&"checkbox"!==this.formField.uiControl&&"radio"!==this.formField.uiControl},processedModelValue(){const e=this.formField;if("boolean"===e.type){const t=this.modelValue&&this.modelValue>0&&"0"!==this.modelValue;if("checkbox"===e.uiControl)return t;if("radio"===e.uiControl)return t?"1":"0"}return this.modelValue},defaultValue(){const{defaultValue:e}=this.formField;return Array.isArray(e)?e.join(","):e},availableOptions(){const{childComponent:e}=this;if("string"!==typeof e)return null;const t=this.formField;return t.availableValues&&Ps[e]?Ps[e](t.availableValues,t.type,t.uiControlAttributes):null},defaultValuePretty(){const e=this.formField;let{defaultValue:t}=e;const{availableOptions:n}=this;if("string"===typeof t&&t){let e=null;try{e=JSON.parse(t)}catch(o){}if(null!==e&&"object"===typeof e)return""}if(!Array.isArray(n))return Array.isArray(t)?"":t?""+t:"";const r=[];return Array.isArray(t)||(t=[t]),(n||[]).forEach(e=>{"undefined"!==typeof e.value&&-1!==t.indexOf(e.key)&&r.push(e.value)}),r.join(", ")},defaultValuePrettyTruncated(){return this.defaultValuePretty.substring(0,50)},hasInlineHelpSlot(){var e;if(!this.$slots["inline-help"])return!1;const t=this.$slots["inline-help"]();return!(null===t||void 0===t||null===(e=t[0])||void 0===e||null===(e=e.children)||void 0===e||!e.length)},fieldId(){return this.formField.id?this.formField.id:this.formField.name},getExtraMetadataIdSite(){var e;return null===(e=this.formField.extraMetadata)||void 0===e?void 0:e.idSite},isPrivacyPolicyControlled(){var e;return void 0!==(null===(e=this.formField.extraMetadata)||void 0===e?void 0:e.compliancePolicyControlled)},privacyPolicyLink(){var e;return"?"+Si["MatomoUrl"].stringify(Object.assign(Object.assign({},Si["MatomoUrl"].urlParsed.value),{},{module:"PrivacyManager",action:"compliance",idSite:null!==(e=this.getExtraMetadataIdSite)&&void 0!==e?e:"all"}))}},methods:{onChange(e){this.$emit("update:modelValue",e)},onCheckIsValid(e){this.$emit("check:isValid",e)}}});Ts.render=Ci;var Ms=Ts;function Bs(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("FormField");return Object(Oi["openBlock"])(),Object(Oi["createBlock"])(a,{"form-field":e.field,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=t=>e.onChange(t)),"onCheck:isValid":t[1]||(t[1]=t=>e.onCheckIsValid(t)),"model-modifiers":e.modelModifiers},{"inline-help":Object(Oi["withCtx"])(()=>[Object(Oi["renderSlot"])(e.$slots,"inline-help")]),_:3},8,["form-field","model-value","model-modifiers"])}const Ds={multiselect:"array",checkbox:"boolean",site:"object",number:"integer"};var $s=Object(Oi["defineComponent"])({props:{modelValue:null,modelModifiers:Object,uicontrol:String,name:String,id:{type:String,default:()=>""},defaultValue:null,options:[Object,Array],description:String,introduction:String,title:String,inlineHelp:[String,Object],inlineHelpBind:Object,disabled:Boolean,uiControlAttributes:{type:Object,default:()=>({})},uiControlOptions:{type:Object,default:()=>({})},autocomplete:String,varType:String,autofocus:Boolean,tabindex:Number,fullWidth:Boolean,maxlength:Number,required:Boolean,placeholder:String,rows:Number,min:Number,max:Number,component:null,extraMetadata:{type:Object,default:()=>({})}},emits:["update:modelValue","check:isValid"],components:{FormField:Ms},computed:{type(){if(this.varType)return this.varType;const e=this.uicontrol;return e&&Ds[e]?Ds[e]:"string"},field(){return{uiControl:this.uicontrol,type:this.type,name:this.name,id:this.id?this.id:this.name,defaultValue:this.defaultValue,availableValues:this.options,description:this.description,introduction:this.introduction,inlineHelp:this.inlineHelp,inlineHelpBind:this.inlineHelpBind,title:this.title,component:this.component,uiControlAttributes:Object.assign(Object.assign({},this.uiControlAttributes),{},{disabled:this.disabled,autocomplete:this.autocomplete,tabindex:this.tabindex,autofocus:this.autofocus,rows:this.rows,required:this.required,maxlength:this.maxlength,placeholder:this.placeholder,min:this.min,max:this.max}),fullWidth:this.fullWidth,uiControlOptions:this.uiControlOptions,extraMetadata:this.extraMetadata}}},methods:{onChange(e){this.$emit("update:modelValue",e)},onCheckIsValid(e){this.$emit("check:isValid",e)}}});$s.render=Bs;var Fs=$s;const _s={class:"pluginSettings",ref:"root"},Ls=["id"],Is={class:"card-content"},Us=["id"],Hs=["onClick","disabled","value"];function Rs(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("GroupedSettings"),s=Object(Oi["resolveComponent"])("ActivityIndicator"),l=Object(Oi["resolveComponent"])("PasswordConfirmation");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",_s,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.settingsPerPlugin,t=>(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",{class:"card",id:t.pluginName+"PluginSettings",key:t.pluginName+"PluginSettings"},[Object(Oi["createElementVNode"])("div",Is,[Object(Oi["createElementVNode"])("h2",{class:"card-title",id:t.pluginName},Object(Oi["toDisplayString"])(t.title),9,Us),Object(Oi["createVNode"])(a,{"group-name":t.pluginName,settings:t.settings,"all-setting-values":e.settingValues,onChange:n=>e.settingValues[`${t.pluginName}.${n.name}`]=n.value},null,8,["group-name","settings","all-setting-values","onChange"]),Object(Oi["createElementVNode"])("input",{type:"button",onClick:n=>e.saveSetting(t.pluginName),disabled:e.isLoading,class:"pluginsSettingsSubmit btn",value:e.translate("General_Save")},null,8,Hs),Object(Oi["createVNode"])(s,{loading:e.isLoading||e.isSaving[t.pluginName]},null,8,["loading"])])],8,Ls))),128)),Object(Oi["createVNode"])(l,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showPasswordConfirmModal=t),onConfirmed:e.confirmPassword},null,8,["modelValue","onConfirmed"])],512)}function qs(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("GroupedSetting");return Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.settings,t=>(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",{key:`${e.groupPrefix}${t.name}`},[Object(Oi["createVNode"])(a,{"model-value":e.allSettingValues[`${e.groupPrefix}${t.name}`],"onUpdate:modelValue":n=>e.$emit("change",{name:t.name,value:n}),setting:t,"condition-values":e.settingValues},null,8,["model-value","onUpdate:modelValue","setting","condition-values"])]))),128)}function zs(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("FormField");return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createVNode"])(a,{"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=t=>e.changeValue(t)),"form-field":e.setting},null,8,["model-value","form-field"])],512)),[[Oi["vShow"],e.showField]])}var Ws=Object(Oi["defineComponent"])({props:{setting:{type:Object,required:!0},modelValue:null,conditionValues:{type:Object,required:!0}},components:{FormField:Ms},emits:["update:modelValue"],computed:{showField(){let e=this.setting.condition;if(!e)return!0;e=e.replace(/&&/g," and "),e=e.replace(/\|\|/g," or "),e=e.replace(/!/g," not ");try{return vi.evaluate(e,this.conditionValues)}catch(t){return console.log(`failed to parse setting condition '${e}': ${t.message}`),console.log(this.conditionValues),!1}}},methods:{changeValue(e){this.$emit("update:modelValue",e)}}});Ws.render=zs;var Js=Ws,Gs=Object(Oi["defineComponent"])({props:{groupName:String,settings:{type:Array,required:!0},allSettingValues:{type:Object,required:!0}},emits:["change"],components:{GroupedSetting:Js},computed:{settingValues(){const e=Object.entries(this.allSettingValues).filter(([e])=>{if(this.groupName){const[t]=e.split(".");if(t!==this.groupName)return!1}return!0}).map(([e,t])=>this.groupName?[e.split(".")[1],t]:[e,t]);return Object.fromEntries(e)},groupPrefix(){return this.groupName?this.groupName+".":""}}});Gs.render=qs;var Ks=Gs;const Ys={class:"confirm-password-modal modal",ref:"root"},Zs={class:"modal-content"},Xs={class:"modal-text"},Qs={ref:"content"},el={key:0},tl={key:1},nl={key:2},rl={class:"password-confirmation-div"},ol={class:"modal-footer"},il=["disabled"];function al(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("Field"),s=Object(Oi["resolveDirective"])("auto-clear-password");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Ys,[Object(Oi["createElementVNode"])("div",Zs,[Object(Oi["createElementVNode"])("div",Xs,[Object(Oi["createElementVNode"])("div",Qs,[Object(Oi["renderSlot"])(e.$slots,"default")],512),e.requiresPasswordConfirmation||e.slotHasContent?Object(Oi["createCommentVNode"])("",!0):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("h2",el,Object(Oi["toDisplayString"])(e.translate("UsersManager_ConfirmThisChange")),1)),e.requiresPasswordConfirmation&&!e.slotHasContent?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("h2",tl,Object(Oi["toDisplayString"])(e.translate("UsersManager_ConfirmWithReAuthentication")),1)):Object(Oi["createCommentVNode"])("",!0),e.requiresPasswordConfirmation&&e.slotHasContent?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",nl,Object(Oi["toDisplayString"])(e.translate("UsersManager_ConfirmWithReAuthentication")),1)):Object(Oi["createCommentVNode"])("",!0)]),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("div",rl,[Object(Oi["withDirectives"])(Object(Oi["createVNode"])(a,{modelValue:e.passwordConfirmation,"onUpdate:modelValue":t[0]||(t[0]=t=>e.passwordConfirmation=t),uicontrol:"password",disabled:e.requiresPasswordConfirmation?void 0:"disabled",name:"currentUserPassword",id:e.passwordFieldId,autocomplete:"off","full-width":!0,title:e.translate("UsersManager_YourCurrentPassword")},null,8,["modelValue","disabled","id","title"]),[[s]])],512),[[Oi["vShow"],e.requiresPasswordConfirmation]])]),Object(Oi["createElementVNode"])("div",ol,[e.alternativeIdentityConfirmationComponent?(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(Object(Oi["resolveDynamicComponent"])(e.alternativeIdentityConfirmationComponent),{key:0,onConfirmed:e.onConfirm},null,40,["onConfirmed"])):Object(Oi["createCommentVNode"])("",!0),Object(Oi["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn confirm-password-btn",disabled:e.requiresPasswordConfirmation&&!e.passwordConfirmation?"disabled":void 0,onClick:t[1]||(t[1]=t=>e.onClickConfirm(t))},Object(Oi["toDisplayString"])(e.translate("General_Confirm")),9,il),Object(Oi["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no btn-flat",onClick:t[2]||(t[2]=t=>e.onClickCancel(t))},Object(Oi["toDisplayString"])(e.translate("General_Cancel")),1)])],512)}const{$:sl}=window;var ll=Object(Oi["defineComponent"])({props:{modelValue:{type:Boolean,required:!0},passwordFieldId:{type:String,default:()=>"currentUserPassword"}},data(){return{passwordConfirmation:"",slotHasContent:!0,altIdConfirmComponent:{plugin:"",component:""}}},emits:["confirmed","aborted","update:modelValue"],directives:{AutoClearPassword:Si["AutoClearPassword"]},components:{Field:Fs},activated(){this.$emit("update:modelValue",!1)},methods:{onClickConfirm(e){e.preventDefault(),this.onConfirm(this.passwordConfirmation),this.passwordConfirmation=""},onConfirm(e){const t=this.$refs.root,n=sl(t);n.modal("close"),this.$emit("confirmed",e)},onClickCancel(e){e.preventDefault();const t=this.$refs.root,n=sl(t);n.modal("close"),this.$emit("aborted"),this.passwordConfirmation=""},showPasswordConfirmModal(){Si["Matomo"].postEvent("PasswordConfirmation.altIdComponent",this.altIdConfirmComponent),this.slotHasContent=!this.$refs.content.matches(":empty");const e=this.$refs.root,t=sl(e),n=e=>{const n=e.keyCode?e.keyCode:e.which;13===n&&(t.modal("close"),this.$emit("confirmed",this.passwordConfirmation),this.passwordConfirmation="")};t.modal({dismissible:!1,onOpenEnd:()=>{const e=".modal.open #"+this.passwordFieldId;sl(e).focus(),sl(e).off("keypress").keypress(n)},onCloseEnd:()=>{this.$emit("update:modelValue",!1)}}).modal("open")}},computed:{requiresPasswordConfirmation(){return!!Si["Matomo"].requiresPasswordConfirmation},alternativeIdentityConfirmationComponent(){return this.altIdConfirmComponent.plugin&&this.altIdConfirmComponent.component?Object(Si["useExternalPluginComponent"])(this.altIdConfirmComponent.plugin,this.altIdConfirmComponent.component):null}},watch:{modelValue(e){e&&this.showPasswordConfirmModal()}}});ll.render=al;var cl=ll;const{$:ul}=window;var pl=Object(Oi["defineComponent"])({props:{mode:String},components:{PasswordConfirmation:cl,ActivityIndicator:Si["ActivityIndicator"],GroupedSettings:Ks},data(){return{isLoading:!0,isSaving:{},showPasswordConfirmModal:!1,settingsToSave:null,settingsPerPlugin:[],settingValues:{}}},created(){Si["AjaxHelper"].fetch({method:this.apiMethod}).then(e=>{this.isLoading=!1,this.settingsPerPlugin=e,e.forEach(e=>{e.settings.forEach(t=>{this.settingValues[`${e.pluginName}.${t.name}`]=t.value})}),Object(Si["scrollToAnchorInUrl"])(),this.addSectionsToTableOfContents()}).catch(()=>{this.isLoading=!1})},computed:{apiMethod(){return"admin"===this.mode?"CorePluginsAdmin.getSystemSettings":"CorePluginsAdmin.getUserSettings"},saveApiMethod(){return"admin"===this.mode?"CorePluginsAdmin.setSystemSettings":"CorePluginsAdmin.setUserSettings"}},methods:{addSectionsToTableOfContents(){const e=ul("#generalSettingsTOC");if(!e.length)return;const t=this.settingsPerPlugin;t.forEach(t=>{const{pluginName:n,settings:r}=t;n&&("CoreAdminHome"===n&&r?r.filter(e=>e.introduction).forEach(t=>{e.append(`<a href="#/${n}PluginSettings">${t.introduction}</a> `)}):e.append(`<a href="#/${n}">${n.replace(/([A-Z])/g," $1").trim()}</a> `))})},confirmPassword(e){this.showPasswordConfirmModal=!1,this.save(this.settingsToSave,e)},saveSetting(e){"admin"===this.mode?(this.settingsToSave=e,this.showPasswordConfirmModal=!0):this.save(e)},save(e,t){const{saveApiMethod:n}=this;this.isSaving[e]=!0;const r=this.getValuesForPlugin(e);Si["AjaxHelper"].post({method:n},{settingValues:r,passwordConfirmation:t}).then(()=>{this.isSaving[e]=!1;const t=Si["NotificationsStore"].show({message:Object(Si["translate"])("CoreAdminHome_PluginSettingsSaveSuccess"),id:"generalSettings",context:"success",type:"transient"});Si["NotificationsStore"].scrollToNotification(t)}).catch(()=>{this.isSaving[e]=!1}),this.settingsToSave=null},getValuesForPlugin(e){const t={};return t[e]||(t[e]=[]),Object.entries(this.settingValues).forEach(([n,r])=>{const[o,i]=n.split(".");if(o!==e)return;let a=r;!1===a?a="0":!0===a&&(a="1"),Array.isArray(a)&&0===a.length&&(a="__empty__"),t[o].push({name:i,value:a})}),t}}});pl.render=Rs;var dl=pl;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:ml}=window;function fl(e){return e.find(".origin a.active").data("filter-origin")}function hl(e){return e.find(".status a.active").data("filter-status")}function gl(e,t){let n="#plugins tr";return n+="all"===e?"[data-filter-origin]":`[data-filter-origin=${e}]`,n+="all"===t?"[data-filter-status]":`[data-filter-status=${t}]`,ml(n)}function bl(e,t,n,r){const o=gl(n,r).length,i=` (${o})`;e.find(t+" .counter").text(i)}function yl(e){const t=fl(e),n=hl(e);bl(e,'[data-filter-status="all"]',t,"all"),bl(e,'[data-filter-status="active"]',t,"active"),bl(e,'[data-filter-status="inactive"]',t,"inactive"),bl(e,'[data-filter-origin="all"]',"all",n),bl(e,'[data-filter-origin="core"]',"core",n),bl(e,'[data-filter-origin="official"]',"official",n),bl(e,'[data-filter-origin="thirdparty"]',"thirdparty",n)}function vl(e){const t=fl(e),n=hl(e),r=gl(t,n);ml("#plugins tr[data-filter-origin][data-filter-status]").css("display","none"),r.css("display","table-row"),yl(e)}function Ol(e,t){t.preventDefault(),ml(t.target).siblings().removeClass("active"),ml(t.target).addClass("active"),vl(e)}function jl(e,t){t.preventDefault(),ml(t.target).siblings().removeClass("active"),ml(t.target).addClass("active"),vl(e)}var wl={mounted(e){setTimeout(()=>{yl(ml(e)),ml(e).find(".status").on("click","a",Ol.bind(null,ml(e))),ml(e).find(".origin").on("click","a",jl.bind(null,ml(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{$:Nl}=window;function kl(e,t){t.preventDefault();const n=Nl(t.target).attr("href"),r=Nl(t.target).attr("data-plugin-name");if(!n||!r)return;e.value.uninstallConfirmMessage||(e.value.uninstallConfirmMessage=Nl("#uninstallPluginConfirm").text());const o=(e.value.uninstallConfirmMessage||"").replace("%s",r);Nl("#uninstallPluginConfirm").text(o),Si["Matomo"].helper.modalConfirm("#confirmUninstallPlugin",{yes:()=>{window.location.href=n}})}function xl(e){e.preventDefault();const t=Nl(e.target).data("overlay-id");Si["Matomo"].helper.modalConfirm("#"+t,{})}var El={mounted(e,t){setTimeout(()=>{t.value.uninstallConfirmMessage="",Nl(e).find(".uninstall").click(kl.bind(null,t)),Nl(e).find(".plugin-donation-link").click(xl)})}};
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:Cl}=window;function Sl(e){e.preventDefault(),Si["Matomo"].helper.modalConfirm("#installPluginByUpload",{})}function Vl(e){const t=Cl("[name=pluginZip]"),n=t.val();n&&".zip"===n.slice(-4)?t.data("maxSize")>0&&t[0].files[0].size>1048576*t.data("maxSize")&&(e.preventDefault(),alert(Object(Si["translate"])("CorePluginsAdmin_FileExceedsUploadLimit"))):(e.preventDefault(),alert(Object(Si["translate"])("CorePluginsAdmin_NoZipFileSelected")))}var Al={mounted(){setTimeout(()=>{Cl(".uploadPlugin").click(Sl),Cl("#uploadPluginForm").submit(Vl)})}};const Pl={class:"matomo-save-button",style:{display:"inline-block"}},Tl=["disabled","value"];function Ml(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("ActivityIndicator");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Pl,[Object(Oi["createElementVNode"])("input",{type:"button",onClick:t[0]||(t[0]=t=>e.onConfirm(t)),disabled:e.saving||e.disabled,class:"btn",value:e.value?e.value:e.translate("General_Save")},null,8,Tl),Object(Oi["createVNode"])(a,{loading:e.saving},null,8,["loading"])])}var Bl=Object(Oi["defineComponent"])({props:{saving:Boolean,value:String,disabled:Boolean},components:{ActivityIndicator:Si["ActivityIndicator"]},emits:["confirm"],methods:{onConfirm(e){this.$emit("confirm",e)}}});Bl.render=Ml;var Dl=Bl;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:$l}=window;var Fl={mounted(e){setTimeout(()=>{$l(e).find("input[type=text]").keypress(t=>{const n=t.keyCode||t.which;13===n&&$l(e).find(".matomo-save-button input").triggerHandler("click")})})}};const _l=["innerHTML"],Ll={key:1,style:{"margin-right":"3.5px"}},Il=Object(Oi["createElementVNode"])("br",null,null,-1),Ul=["innerHTML"];function Hl(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("EnrichedHeadline"),s=Object(Oi["resolveComponent"])("InstallAllPaidPluginsButton"),l=Object(Oi["resolveDirective"])("content-intro");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("h2",null,[Object(Oi["createVNode"])(a,null,{default:Object(Oi["withCtx"])(()=>[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_PluginsManagement")),1)]),_:1})]),Object(Oi["createElementVNode"])("p",null,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_PluginsExtendPiwik"))+" "+Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_OncePluginIsInstalledYouMayActivateHere"))+" ",1),e.isMarketplaceEnabled||e.isPluginUploadEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.teaserExtendMatomoByPluginText),style:{"margin-right":"3.5px"}},null,8,_l)):Object(Oi["createCommentVNode"])("",!0),e.isPluginsAdminEnabled?Object(Oi["createCommentVNode"])("",!0):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Ll,[Il,Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_DoMoreContactPiwikAdmins")),1)])),Object(Oi["createElementVNode"])("span",{innerHTML:e.$sanitize(e.changeLookByManageThemesText)},null,8,Ul)])])),[[l]]),e.isMarketplaceEnabled?(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(s,{key:0})):Object(Oi["createCommentVNode"])("",!0)],64)}const Rl={key:0},ql=["disabled"],zl={class:"ui-confirm",id:"installAllPaidPluginsAtOnce",ref:"installAllPaidPluginsAtOnce"},Wl=["data-href","value"],Jl=["value"];function Gl(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("MatomoLoader");return e.paidPluginsToInstallAtOnce.length?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Rl,[Object(Oi["createElementVNode"])("button",{class:"btn installAllPaidPluginsAtOnceButton",onClick:t[0]||(t[0]=Object(Oi["withModifiers"])(t=>e.onInstallAllPaidPlugins(),["prevent"])),disabled:e.disabled||e.loading},[e.loading?(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(a,{key:0})):Object(Oi["createCommentVNode"])("",!0),Object(Oi["createTextVNode"])(" "+Object(Oi["toDisplayString"])(e.translate("Marketplace_InstallPurchasedPlugins")),1)],8,ql),Object(Oi["createElementVNode"])("div",zl,[Object(Oi["createElementVNode"])("h2",null,Object(Oi["toDisplayString"])(e.translate("Marketplace_InstallAllPurchasedPlugins")),1),Object(Oi["createElementVNode"])("p",null,Object(Oi["toDisplayString"])(e.translate("Marketplace_InstallThesePlugins")),1),Object(Oi["createElementVNode"])("ul",null,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.paidPluginsToInstallAtOnce,e=>(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("li",{key:e},Object(Oi["toDisplayString"])(e),1))),128))]),Object(Oi["createElementVNode"])("p",null,[Object(Oi["createElementVNode"])("input",{role:"install",type:"button","data-href":e.installAllPaidPluginsLink,value:e.translate("Marketplace_InstallAllPurchasedPluginsAction",e.paidPluginsToInstallAtOnce.length)},null,8,Wl),Object(Oi["createElementVNode"])("input",{role:"cancel",type:"button",value:e.translate("General_Cancel")},null,8,Jl)])],512)])):Object(Oi["createCommentVNode"])("",!0)}var Kl=Object(Oi["defineComponent"])({components:{MatomoLoader:Si["MatomoLoader"]},props:{disabled:{type:Boolean,required:!1,default:!1}},data(){return{paidPluginsToInstallAtOnce:[],installNonce:"",loading:!1}},created(){this.fetchPluginsToInstallAtOnce()},watch:{disabled(e,t){!1===e&&!0===t&&this.fetchPluginsToInstallAtOnce()}},methods:{onInstallAllPaidPlugins(){Si["Matomo"].helper.modalConfirm(this.$refs.installAllPaidPluginsAtOnce)},fetchPluginsToInstallAtOnce(){this.loading=!0,Si["Matomo"].hasSuperUserAccess&&Si["AjaxHelper"].fetch({module:"Marketplace",action:"getPaidPluginsToInstallAtOnceParams"}).then(e=>{var t,n;e&&(this.paidPluginsToInstallAtOnce=null!==(t=e.paidPluginsToInstallAtOnce)&&void 0!==t?t:[],this.installNonce=null!==(n=e.installAllPluginsNonce)&&void 0!==n?n:"");this.loading=!1})}},computed:{installAllPaidPluginsLink(){return"?"+Si["MatomoUrl"].stringify(Object.assign(Object.assign({},Si["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"installAllPaidPlugins",nonce:this.installNonce}))}}});Kl.render=Gl;var Yl=Kl,Zl=Object(Oi["defineComponent"])({props:{isMarketplaceEnabled:Boolean,isPluginUploadEnabled:Boolean,isPluginsAdminEnabled:Boolean},components:{EnrichedHeadline:Si["EnrichedHeadline"],InstallAllPaidPluginsButton:Yl},directives:{ContentIntro:Si["ContentIntro"]},computed:{teaserExtendMatomoByPluginText(){const e="?"+Si["MatomoUrl"].stringify(Object.assign(Object.assign({},Si["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"overview",sort:null,activated:null}));return Object(Si["translate"])("CorePluginsAdmin_TeaserExtendPiwikByPlugin",`<a href="${e}">`,"</a>",'<a href="#" class="uploadPlugin">',"</a>")},changeLookByManageThemesText(){const e="?"+Si["MatomoUrl"].stringify(Object.assign(Object.assign({},Si["MatomoUrl"].urlParsed.value),{},{action:"themes",activated:null}));return Object(Si["translate"])("CorePluginsAdmin_ChangeLookByManageThemes",`<a href="${e}">`,"</a>")}}});Zl.render=Hl;var Xl=Zl;const Ql=["innerHTML"],ec={key:1},tc=Object(Oi["createElementVNode"])("br",null,null,-1),nc={key:2},rc=Object(Oi["createElementVNode"])("br",null,null,-1);function oc(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("EnrichedHeadline"),s=Object(Oi["resolveDirective"])("content-intro");return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("h2",null,[Object(Oi["createVNode"])(a,null,{default:Object(Oi["withCtx"])(()=>[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_ThemesManagement")),1)]),_:1})]),Object(Oi["createElementVNode"])("p",null,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_ThemesDescription"))+" ",1),e.isMarketplaceEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.teaserExtendByThemeText)},null,8,Ql)):Object(Oi["createCommentVNode"])("",!0),e.otherUsersCount>0?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",ec,[tc,Object(Oi["createTextVNode"])(" "+Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_InfoThemeIsUsedByOtherUsersAsWell",e.otherUsersCount,e.themeEnabled)),1)])):Object(Oi["createCommentVNode"])("",!0),e.isPluginsAdminEnabled?Object(Oi["createCommentVNode"])("",!0):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",nc,[rc,Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_DoMoreContactPiwikAdmins")),1)]))])])),[[s]])}var ic=Object(Oi["defineComponent"])({props:{isMarketplaceEnabled:Boolean,otherUsersCount:Number,themeEnabled:Boolean,isPluginsAdminEnabled:Boolean},components:{EnrichedHeadline:Si["EnrichedHeadline"]},directives:{ContentIntro:Si["ContentIntro"]},computed:{teaserExtendByThemeText(){const e=Si["MatomoUrl"].stringify({module:"Marketplace",action:"overview"}),t=Si["MatomoUrl"].stringify({pluginType:"themes"}),n=`?${e}#?${t}`;return Object(Si["translate"])("CorePluginsAdmin_TeaserExtendPiwikByTheme",`<a href="${n}">`,"</a>")}}});ic.render=oc;var ac=ic;
/*!
 * 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;function lc(e,t){let{pluginName:n}=e.value;const{activePluginTab:r}=e.value;t.preventDefault(),r&&(n+="!"+r),window.broadcast.propagateNewPopoverParameter("browsePluginDetail",n)}window.broadcast.addPopoverHandler("browsePluginDetail",e=>{let t=e,n=null;if(-1!==e.indexOf("!")&&(n=e.slice(e.indexOf("!")+1),t=e.slice(0,e.indexOf("!"))),"Marketplace"===Si["MatomoUrl"].urlParsed.value.module&&"overview"===Si["MatomoUrl"].urlParsed.value.action)return window.broadcast.propagateNewPopoverParameter(""),void Si["MatomoUrl"].updateHash(Object.assign(Object.assign({},Si["MatomoUrl"].hashParsed.value),{},{showPlugin:t,popover:null}));let r="module=Marketplace&action=pluginDetails&pluginName="+encodeURIComponent(t);n&&(r+="&activeTab="+encodeURIComponent(n)),window.Piwik_Popover.createPopupAndLoadUrl(r,"details")});var cc={mounted(e,t){const{pluginName:n}=t.value;n&&(t.value.onClickHandler=lc.bind(null,t),sc(e).on("click",t.value.onClickHandler).attr("matomo-plugin-name",n))},unmounted(e,t){sc(e).off("click",t.value.onClickHandler)}};const uc={class:"row pluginsFilter"},pc={class:"origin"},dc={style:{"margin-right":"3.5px"}},mc={"data-filter-origin":"all",href:"#",class:"active"},fc=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),hc={"data-filter-origin":"core",href:"#"},gc=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),bc={"data-filter-origin":"official",href:"#"},yc=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),vc={"data-filter-origin":"thirdparty",href:"#"},Oc=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),jc={class:"status"},wc={style:{"margin-right":"3.5px"}},Nc={"data-filter-status":"all",href:"#",class:"active"},kc=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),xc={"data-filter-status":"active",href:"#"},Ec=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),Cc={"data-filter-status":"inactive",href:"#"},Sc=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),Vc={id:"confirmUninstallPlugin",class:"ui-confirm"},Ac={id:"uninstallPluginConfirm"},Pc=["value"],Tc=["value"],Mc={class:"status"},Bc={key:0,class:"action-links"},Dc={id:"plugins"},$c=["data-filter-status","data-filter-origin"],Fc={class:"name"},_c=["name"],Lc={key:0},Ic={key:1},Uc=["title"],Hc={key:2},Rc=Object(Oi["createElementVNode"])("br",null,null,-1),qc=Object(Oi["createElementVNode"])("br",null,null,-1),zc=["href"],Wc={class:"desc"},Jc={class:"plugin-desc-missingrequirements"},Gc={key:0},Kc=Object(Oi["createElementVNode"])("br",null,null,-1),Yc={class:"plugin-desc-text"},Zc={key:0,class:"plugin-homepage"},Xc=["href"],Qc={key:1,class:"plugin-donation"},eu=["data-overlay-id"],tu=["id","title"],nu=["innerHTML"],ru={class:"donation-links"},ou=["href"],iu=Object(Oi["createElementVNode"])("img",{src:"plugins/CorePluginsAdmin/images/paypal_donate.png",height:"30"},null,-1),au=[iu],su={key:1,class:"donation-link bitcoin"},lu=Object(Oi["createElementVNode"])("span",null,"Donate Bitcoins to:",-1),cu=["href"],uu=["value"],pu={key:0,class:"plugin-license"},du=["title","href"],mu={key:1},fu={key:1,class:"plugin-author"},hu=["title","href"],gu={key:1},bu={key:2,style:{"margin-right":"3.5px"}},yu={key:0},vu={key:0},Ou={key:1},ju={key:0},wu=Object(Oi["createElementVNode"])("br",null,null,-1),Nu=["data-plugin-name","href"],ku={key:0},xu={key:0},Eu={key:1},Cu=["href"],Su={key:1},Vu=["href"],Au={key:0,class:"tableActionBar"},Pu=["href"],Tu=Object(Oi["createElementVNode"])("span",{class:"icon-add"},null,-1),Mu=["href"],Bu=Object(Oi["createElementVNode"])("span",{class:"icon-add"},null,-1),Du={class:"footer-message"};function $u(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("ContentBlock"),s=Object(Oi["resolveDirective"])("plugin-filter"),l=Object(Oi["resolveDirective"])("plugin-name"),c=Object(Oi["resolveDirective"])("content-table"),u=Object(Oi["resolveDirective"])("plugin-management");return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createBlock"])(a,{"content-title":e.title,class:"pluginsManagement"},{default:Object(Oi["withCtx"])(()=>[Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("p",uc,[Object(Oi["createElementVNode"])("span",pc,[Object(Oi["createElementVNode"])("strong",dc,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Origin")),1),Object(Oi["createElementVNode"])("a",mc,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("General_All")),1),fc]),Object(Oi["createTextVNode"])(" | "),Object(Oi["createElementVNode"])("a",hc,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_OriginCore")),1),gc]),Object(Oi["createTextVNode"])(" | "),Object(Oi["createElementVNode"])("a",bc,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_OriginOfficial")),1),yc]),Object(Oi["createTextVNode"])(" | "),Object(Oi["createElementVNode"])("a",vc,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_OriginThirdParty")),1),Oc])]),Object(Oi["createElementVNode"])("span",jc,[Object(Oi["createElementVNode"])("strong",wc,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),Object(Oi["createElementVNode"])("a",Nc,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("General_All")),1),kc]),Object(Oi["createTextVNode"])(" | "),Object(Oi["createElementVNode"])("a",xc,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Active")),1),Ec]),Object(Oi["createTextVNode"])(" | "),Object(Oi["createElementVNode"])("a",Cc,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Inactive")),1),Sc])])])),[[s]]),Object(Oi["createElementVNode"])("div",Vc,[Object(Oi["createElementVNode"])("h2",Ac,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_UninstallConfirm")),1),Object(Oi["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Pc),Object(Oi["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Tc)]),Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("table",null,[Object(Oi["createElementVNode"])("thead",null,[Object(Oi["createElementVNode"])("tr",null,[Object(Oi["createElementVNode"])("th",null,Object(Oi["toDisplayString"])(e.isTheme?e.translate("CorePluginsAdmin_Theme"):e.translate("General_Plugin")),1),Object(Oi["createElementVNode"])("th",null,Object(Oi["toDisplayString"])(e.translate("General_Description")),1),Object(Oi["createElementVNode"])("th",Mc,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),e.displayAdminLinks?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("th",Bc,Object(Oi["toDisplayString"])(e.translate("General_Action")),1)):Object(Oi["createCommentVNode"])("",!0)])]),Object(Oi["createElementVNode"])("tbody",Dc,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.pluginsToDisplay,(n,r)=>{var o,i,a,s,c,u,p,d;return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("tr",{key:r,class:Object(Oi["normalizeClass"])(n.activated?"active-plugin":"inactive-plugin"),"data-filter-status":n.activated?"active":"inactive","data-filter-origin":e.getPluginOrigin(n)},[Object(Oi["createElementVNode"])("td",Fc,[Object(Oi["createElementVNode"])("a",{name:r},null,8,_c),n.isCorePlugin||-1===e.marketplacePluginNames.indexOf(r)?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Ic,Object(Oi["toDisplayString"])(r),1)):Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",Lc,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(r),1)])),[[l,{pluginName:r}]]),Object(Oi["createElementVNode"])("span",{class:"plugin-version",title:n.isCorePlugin?e.translate("CorePluginsAdmin_CorePluginTooltip"):void 0}," ("+Object(Oi["toDisplayString"])(n.isCorePlugin?e.translate("CorePluginsAdmin_OriginCore"):n.info.version)+") ",9,Uc),-1!==e.pluginNamesHavingSettings.indexOf(r)?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Hc,[Rc,qc,Object(Oi["createElementVNode"])("a",{href:`${e.generalSettingsLink}#/${r}`,class:"settingsLink"},Object(Oi["toDisplayString"])(e.translate("General_Settings")),9,zc)])):Object(Oi["createCommentVNode"])("",!0)]),Object(Oi["createElementVNode"])("td",Wc,[Object(Oi["createElementVNode"])("div",Jc,[n.missingRequirements?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Gc,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(n.missingRequirements)+" ",1),Kc])):Object(Oi["createCommentVNode"])("",!0)]),Object(Oi["createElementVNode"])("div",Yc,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(n.info.description.replaceAll("\n","<br/>"))+" ",1),null!==(o=n.info)&&void 0!==o&&o.homepage&&!e.isMatomoUrl(null===(i=n.info)||void 0===i?void 0:i.homepage)?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Zc,[Object(Oi["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:n.info.homepage}," ("+Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_PluginHomepage").replaceAll(" "," "))+") ",9,Xc)])):Object(Oi["createCommentVNode"])("",!0),null!==(a=n.info)&&void 0!==a&&null!==(a=a.donate)&&void 0!==a&&a.length?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Qc,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_LikeThisPlugin"))+" ",1),Object(Oi["createElementVNode"])("a",{onClick:t[0]||(t[0]=Object(Oi["withModifiers"])(()=>{},["prevent"])),class:"plugin-donation-link","data-overlay-id":"overlay-"+r},Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_ConsiderDonating")),9,eu),Object(Oi["createElementVNode"])("div",{id:"overlay-"+r,class:"donation-overlay ui-confirm",title:e.translate("CorePluginsAdmin_LikeThisPlugin")},[Object(Oi["createElementVNode"])("p",null,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_CommunityContributedPlugin")),1),Object(Oi["createElementVNode"])("p",{innerHTML:e.$sanitize(e.translate("CorePluginsAdmin_ConsiderDonatingCreatorOf",`<b>${r}</b>`))},null,8,nu),Object(Oi["createElementVNode"])("div",ru,[null!==(s=n.info)&&void 0!==s&&null!==(s=s.donate)&&void 0!==s&&s.paypal?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:0,class:"donation-link paypal",target:"_blank",rel:"noreferrer noopener",href:e.getPluginDonateLink(r,n.info.donate.paypal)},au,8,ou)):Object(Oi["createCommentVNode"])("",!0),null!==(c=n.info)&&void 0!==c&&null!==(c=c.donate)&&void 0!==c&&c.bitcoin?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",su,[lu,Object(Oi["createElementVNode"])("a",{href:"bitcoin:"+encodeURIComponent(n.info.donate.bitcoin)},Object(Oi["toDisplayString"])(n.info.donate.bitcoin),9,cu)])):Object(Oi["createCommentVNode"])("",!0)]),Object(Oi["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_Close")},null,8,uu)],8,tu)])):Object(Oi["createCommentVNode"])("",!0)]),null!==(u=n.info)&&void 0!==u&&u.license?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",pu,[null!==(p=n.info)&&void 0!==p&&p.license_file?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:0,title:e.translate("CorePluginsAdmin_LicenseHomepage"),rel:"noreferrer noopener",target:"_blank",href:"index.php?module=CorePluginsAdmin&action=showLicense&pluginName="+r},Object(Oi["toDisplayString"])(n.info.license),9,du)):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",mu,Object(Oi["toDisplayString"])(n.info.license),1))])):Object(Oi["createCommentVNode"])("",!0),null!==(d=n.info)&&void 0!==d&&d.authors?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",fu,[Object(Oi["createTextVNode"])(" By "),(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(n.info.authors.filter(e=>e.name),(t,r)=>(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",{key:r},[t.homepage?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:0,title:e.translate("CorePluginsAdmin_AuthorHomepage"),href:t.homepage,rel:"noreferrer noopener",target:"_blank"},Object(Oi["toDisplayString"])(t.name),9,hu)):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",gu,Object(Oi["toDisplayString"])(t.name),1)),n.info.authors.length-1>r?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",bu,",")):Object(Oi["createCommentVNode"])("",!0)]))),128)),Object(Oi["createTextVNode"])(". ")])):Object(Oi["createCommentVNode"])("",!0)]),Object(Oi["createElementVNode"])("td",{class:"status",style:Object(Oi["normalizeStyle"])({"border-left-width":e.isDefaultTheme(r)?"0":void 0})},[e.isDefaultTheme(r)?Object(Oi["createCommentVNode"])("",!0):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",yu,[n.activated?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",vu,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Active")),1)):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Ou,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Inactive"))+" ",1),n.uninstallable&&e.displayAdminLinks?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",ju,[wu,Object(Oi["createTextVNode"])(" - "),Object(Oi["createElementVNode"])("a",{"data-plugin-name":r,class:"uninstall",href:e.getUninstallLink(r)},Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_ActionUninstall")),9,Nu)])):Object(Oi["createCommentVNode"])("",!0)]))]))],4),e.displayAdminLinks?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("td",{key:0,class:"togl action-links",style:Object(Oi["normalizeStyle"])({"border-left-width":e.isDefaultTheme(r)?0:void 0})},[e.isDefaultTheme(r)?Object(Oi["createCommentVNode"])("",!0):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",ku,[n.invalid&&n.alwaysActivated?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",xu,"-")):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Eu,[n.activated?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:0,href:e.getDeactivateLink(r)},Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Deactivate")),9,Cu)):n.missingRequirements?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Su,"-")):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:2,href:e.getActivateLink(r)},Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Activate")),9,Vu))]))]))],4)):Object(Oi["createCommentVNode"])("",!0)],10,$c)}),128))])])),[[c]]),e.displayAdminLinks?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Au,[e.isTheme?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:0,href:e.themeOverviewLink},[Tu,Object(Oi["createTextVNode"])(" "+Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_InstallNewThemes")),1)],8,Pu)):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:1,href:e.overviewLink},[Bu,Object(Oi["createTextVNode"])(" "+Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_InstallNewPlugins")),1)],8,Mu))])):Object(Oi["createCommentVNode"])("",!0),Object(Oi["createElementVNode"])("div",Du,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_AlwaysActivatedPluginsList",e.pluginsAlwaysActivated)),1)]),_:1},8,["content-title"])),[[u,{}]])}var Fu=Object(Oi["defineComponent"])({props:{isTheme:Boolean,displayAdminLinks:Boolean,pluginsInfo:{type:Object,required:!0},uninstallNonce:{type:String,required:!0},deactivateNonce:{type:String,required:!0},activateNonce:{type:String,required:!0},marketplacePluginNames:{type:Array,required:!0},pluginNamesHavingSettings:{type:Array,required:!0},title:{type:String,required:!0}},components:{ContentBlock:Si["ContentBlock"]},directives:{PluginManagement:El,PluginFilter:wl,ContentTable:Si["ContentTable"],PluginName:cc},methods:{getPluginOrigin(e){return e.isCorePlugin?"core":e.isOfficialPlugin?"official":"thirdparty"},getPluginDonateLink(e,t){return"https://www.paypal.com/cgi-bin/webscr?"+Si["MatomoUrl"].stringify({cmd:"_donations",item_name:"Matomo Plugin "+e,bn:"PP-DonationsBF:btn_donateCC_LG.gif:NonHosted",business:t})},getUninstallLink(e){return"?"+Si["MatomoUrl"].stringify({module:"CorePluginsAdmin",action:"uninstall",pluginName:e,nonce:this.uninstallNonce})},isDefaultTheme(e){return this.isTheme&&"Morpheus"===e},getDeactivateLink(e){return"?"+Si["MatomoUrl"].stringify({module:"CorePluginsAdmin",action:"deactivate",pluginName:e,nonce:this.deactivateNonce,redirectTo:"referrer"})},getActivateLink(e){return"?"+Si["MatomoUrl"].stringify({module:"CorePluginsAdmin",action:"activate",pluginName:e,nonce:this.activateNonce,redirectTo:"referrer"})},isMatomoUrl(e){try{const t=new URL(e).host;return-1!==this.matomoHosts.indexOf(t)}catch(t){return!1}}},computed:{pluginsToDisplay(){const e=this.pluginsInfo;return Object.fromEntries(Object.entries(e).filter(([,e])=>{if(this.isTheme)return!0;const{alwaysActivated:t}=e;return"undefined"!==typeof t&&null!==t&&!t}))},generalSettingsLink(){return"?"+Si["MatomoUrl"].stringify(Object.assign(Object.assign({},Si["MatomoUrl"].urlParsed.value),{},{module:"CoreAdminHome",action:"generalSettings"}))},matomoHosts(){return["piwik.org","www.piwik.org","matomo.org","www.matomo.org"]},themeOverviewLink(){const e=Si["MatomoUrl"].stringify({module:"Marketplace",action:"overview"}),t=Si["MatomoUrl"].stringify({pluginType:"themes"});return`?${e}#?${t}`},overviewLink(){return"?"+Si["MatomoUrl"].stringify(Object.assign(Object.assign({},Si["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"overview",sort:""}))},pluginsAlwaysActivated(){const e=this.pluginsInfo;return Object.entries(e).filter(([,e])=>e.alwaysActivated).map(([e])=>e).join(", ")}}});Fu.render=$u;var _u=Fu;const Lu={key:0},Iu={key:0},Uu={class:"checkbox-container"},Hu=Object(Oi["createElementVNode"])("span",null,null,-1),Ru={class:"num"},qu={class:"status"},zu={key:1,class:"action-links"},Wu={id:"plugins"},Ju={key:0,class:"select-cell"},Gu={class:"checkbox-container"},Ku=["id","disabled","onUpdate:modelValue"],Yu=Object(Oi["createElementVNode"])("span",null,null,-1),Zu={class:"name"},Xu={class:"vers"},Qu=["href","title"],ep={key:1},tp={class:"desc"},np={class:"status"},rp={key:1,class:"togl action-links"},op=["title"],ip=["href"],ap=["href"],sp={key:3};function lp(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("MissingReqsNotice"),s=Object(Oi["resolveComponent"])("ContentBlock"),l=Object(Oi["resolveDirective"])("plugin-name"),c=Object(Oi["resolveDirective"])("content-table");return Object.keys(e.pluginsHavingUpdate).length?(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(s,{key:0,"content-title":e.translate("CorePluginsAdmin_NUpdatesAvailable",Object.keys(e.pluginsHavingUpdate).length)},{default:Object(Oi["withCtx"])(()=>[Object(Oi["createElementVNode"])("p",null,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_InfoPluginUpdateIsRecommended")),1),e.isPluginsAdminEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Lu,[Object(Oi["createElementVNode"])("a",{id:"update-selected-plugins",onClick:t[0]||(t[0]=Object(Oi["withModifiers"])(t=>e.updateSelectedPlugins(),["prevent"])),class:Object(Oi["normalizeClass"])({btn:!0,disabled:e.isUpdateLinkDisabled})},Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_UpdateSelected")),3)])):Object(Oi["createCommentVNode"])("",!0),Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("table",null,[Object(Oi["createElementVNode"])("thead",null,[Object(Oi["createElementVNode"])("tr",null,[e.isPluginsAdminEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("th",Iu,[Object(Oi["createElementVNode"])("span",Uu,[Object(Oi["createElementVNode"])("label",null,[Object(Oi["createElementVNode"])("input",{type:"checkbox",id:"select-plugin-all",onChange:t[1]||(t[1]=t=>e.selectAll(t.target.checked))},null,32),Hu])])])):Object(Oi["createCommentVNode"])("",!0),Object(Oi["createElementVNode"])("th",null,Object(Oi["toDisplayString"])(e.translate("General_Plugin")),1),Object(Oi["createElementVNode"])("th",Ru,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Version")),1),Object(Oi["createElementVNode"])("th",null,Object(Oi["toDisplayString"])(e.translate("General_Description")),1),Object(Oi["createElementVNode"])("th",qu,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),e.isPluginsAdminEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("th",zu,Object(Oi["toDisplayString"])(e.translate("General_Action")),1)):Object(Oi["createCommentVNode"])("",!0)])]),Object(Oi["createElementVNode"])("tbody",Wu,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.pluginsHavingUpdate,(n,r)=>{var o;return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("tr",{key:r,class:Object(Oi["normalizeClass"])(n.isActivated?"active-plugin":"inactive-plugin")},[e.isPluginsAdminEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("td",Ju,[Object(Oi["createElementVNode"])("span",Gu,[Object(Oi["createElementVNode"])("label",null,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("input",{type:"checkbox",id:"select-plugin-"+n.name,disabled:"undefined"!==typeof n.isDownloadable&&null!==n.isDownloadable&&!n.isDownloadable,"onUpdate:modelValue":t=>e.pluginsSelected[r]=t},null,8,Ku),[[Oi["vModelCheckbox"],e.pluginsSelected[r]]]),Yu])])])):Object(Oi["createCommentVNode"])("",!0),Object(Oi["createElementVNode"])("td",Zu,[Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{onClick:t[2]||(t[2]=Object(Oi["withModifiers"])(()=>{},["prevent"])),class:"plugin-details"},[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(n.name),1)])),[[l,{pluginName:n.name}]])]),Object(Oi["createElementVNode"])("td",Xu,[null!==(o=n.changelog)&&void 0!==o&&o.url?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:0,href:n.changelog.url,title:e.translate("CorePluginsAdmin_Changelog"),target:"_blank",rel:"noreferrer noopener"},Object(Oi["toDisplayString"])(n.currentVersion)+" => "+Object(Oi["toDisplayString"])(n.latestVersion),9,Qu)):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",ep,Object(Oi["toDisplayString"])(n.currentVersion)+" => "+Object(Oi["toDisplayString"])(n.latestVersion),1))]),Object(Oi["createElementVNode"])("td",tp,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(n.description)+" ",1),Object(Oi["createVNode"])(a,{plugin:n},null,8,["plugin"])]),Object(Oi["createElementVNode"])("td",np,Object(Oi["toDisplayString"])(n.isActivated?e.translate("CorePluginsAdmin_Active"):e.translate("CorePluginsAdmin_Inactive")),1),e.isPluginsAdminEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("td",rp,["undefined"===typeof n.isDownloadable||null===n.isDownloadable||n.isDownloadable?e.isMultiServerEnvironment?Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:1,onClick:t[3]||(t[3]=t=>e.isPluginDownloadLinkClicked=!0),href:e.downloadPluginLink(n)},Object(Oi["toDisplayString"])(e.translate("General_Download")),9,ip)),[[Oi["vShow"],!e.isPluginDownloadLinkClicked]]):0===n.missingRequirements.length?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:2,href:e.updatePluginLink(n)},Object(Oi["toDisplayString"])(e.translate("CoreUpdater_UpdateTitle")),9,ap)):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",sp,"-")):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",{key:0,title:`${e.translate("CorePluginsAdmin_PluginNotDownloadable")} ${n.isPaid?e.translate("CorePluginsAdmin_PluginNotDownloadablePaidReason"):""}`},Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_NotDownloadable")),9,op))])):Object(Oi["createCommentVNode"])("",!0)],2)}),128))])])),[[c]])]),_:1},8,["content-title"])):Object(Oi["createCommentVNode"])("",!0)}const cp=Object(Si["useExternalPluginComponent"])("Marketplace","MissingReqsNotice");var up=Object(Oi["defineComponent"])({props:{pluginsHavingUpdate:{type:Object,required:!0},pluginUpdateNonces:{type:Object,required:!0},updateNonce:{type:String,required:!0},isMultiServerEnvironment:Boolean,isPluginsAdminEnabled:Boolean},components:{ContentBlock:Si["ContentBlock"],MissingReqsNotice:cp},directives:{ContentTable:Si["ContentTable"],PluginName:cc},data(){return{isUpdating:!1,isPluginDownloadLinkClicked:!1,pluginsSelected:{}}},computed:{isUpdateLinkDisabled(){return this.isUpdating||!Object.keys(this.pluginsSelected).length||!Object.values(this.pluginsSelected).some(e=>!!e)}},methods:{selectAll(e){const t=this.pluginsHavingUpdate;Object.entries(t).forEach(([t,n])=>{(null===n.isDownloadable||"undefined"===typeof n.isDownloadable||n.isDownloadable)&&(this.pluginsSelected[t]=e)})},downloadPluginLink(e){return"?"+Si["MatomoUrl"].stringify(Object.assign(Object.assign({},Si["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"download",pluginName:e.name,nonce:this.pluginUpdateNonces[e.name]}))},updatePluginLink(e){return"?"+Si["MatomoUrl"].stringify(Object.assign(Object.assign({},Si["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"updatePlugin",pluginName:e.name,nonce:this.updateNonce}))},updateSelectedPlugins(){this.isUpdating=!0;const e=Object.entries(this.pluginsSelected).filter(([,e])=>e).map(([e])=>e);Si["MatomoUrl"].updateUrl(Object.assign(Object.assign({},Si["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"updatePlugin",nonce:this.updateNonce,pluginName:e.join(",")}))}}});up.render=lp;var pp=up;const dp={class:"ui-confirm",id:"installPluginByUpload"},mp={key:0},fp={class:"description"},hp=["action"],gp=["data-max-size"],bp=Object(Oi["createElementVNode"])("br",null,null,-1),yp=["value"],vp={key:1},Op=["innerHTML"],jp=Object(Oi["createElementVNode"])("pre",null,"[General]\n  enable_plugin_upload = 1",-1),wp=["value"];function Np(e,t,n,r,o,i){const a=Object(Oi["resolveComponent"])("Field"),s=Object(Oi["resolveDirective"])("auto-clear-password"),l=Object(Oi["resolveDirective"])("plugin-upload");return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",dp,[Object(Oi["createElementVNode"])("h2",null,Object(Oi["toDisplayString"])(e.translate("Marketplace_TeaserExtendPiwikByUpload")),1),e.isPluginUploadEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",mp,[Object(Oi["createElementVNode"])("p",fp,Object(Oi["toDisplayString"])(e.translate("Marketplace_AllowedUploadFormats")),1),Object(Oi["createElementVNode"])("form",{enctype:"multipart/form-data",method:"post",id:"uploadPluginForm",action:e.uploadPluginAction},[Object(Oi["createElementVNode"])("input",{type:"file",name:"pluginZip","data-max-size":e.uploadLimit},null,8,gp),bp,Object(Oi["withDirectives"])(Object(Oi["createVNode"])(a,{uicontrol:"password",name:"confirmPassword",autocomplete:"off",title:e.translate("Login_ConfirmPasswordToContinue"),modelValue:e.confirmPassword,"onUpdate:modelValue":t[0]||(t[0]=t=>e.confirmPassword=t)},null,8,["title","modelValue"]),[[s]]),Object(Oi["createElementVNode"])("input",{class:"startUpload btn",type:"submit",value:e.translate("Marketplace_UploadZipFile")},null,8,yp)],8,hp)])):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",vp,[Object(Oi["createElementVNode"])("p",{class:"description",innerHTML:e.$sanitize(e.translate("Marketplace_PluginUploadDisabled"))},null,8,Op),jp,Object(Oi["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Ok")},null,8,wp)]))])),[[l]])}var kp=Object(Oi["defineComponent"])({props:{isPluginUploadEnabled:Boolean,uploadLimit:[String,Number],installNonce:String},components:{Field:Fs},directives:{PluginUpload:Al,AutoClearPassword:Si["AutoClearPassword"]},data(){return{confirmPassword:""}},computed:{uploadPluginAction(){return"?"+Si["MatomoUrl"].stringify(Object.assign(Object.assign({},Si["MatomoUrl"].urlParsed.value),{},{module:"CorePluginsAdmin",action:"uploadPlugin",nonce:this.installNonce}))}}});kp.render=Np;var xp=kp,Ep=Object(Oi["defineComponent"])({props:{selector:{type:String,required:!0},observerSelector:{type:String,default:"#secondNavBar"}},data(){return{observer:null,pending:!1}},methods:{async fetchAndUpdate(e){await Si["AjaxHelper"].fetch({module:"API",method:"CorePluginsAdmin.getNumberOfPluginUpdates"}).then(t=>{const n=t.value||0;if(n){var r,o;const t=null!==(r=null===(o=e.textContent)||void 0===o?void 0:o.trim())&&void 0!==r?r:"";e.textContent=`${t} (${n})`}}).catch(e=>{console.error("Failed to fetch number of plugin updates:",e.message||e)})},maybeUpdate(){const e=document.querySelector(this.selector);e&&(this.observer&&(this.observer.disconnect(),this.observer=null),this.pending||(this.pending=!0,this.fetchAndUpdate(e).finally(()=>{this.pending=!1})))}},mounted(){const e=document.querySelector(this.observerSelector);e&&(this.maybeUpdate(),this.observer=new MutationObserver(()=>this.maybeUpdate()),this.observer.observe(e,{childList:!0,subtree:!0}))},beforeUnmount(){this.observer&&(this.observer.disconnect(),this.observer=null)},render(){return null}}),Cp=Ep}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["CoreAdminHome"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["CoreAdminHome"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,a){return function(e){var t={};function a(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,a),n.l=!0,n.exports}return a.m=e,a.c=t,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(o,n,function(t){return e[t]}.bind(null,n));return o},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="plugins/CoreAdminHome/vue/dist/",a(a.s="fae3")}({"19dc":function(t,a){t.exports=e},"8bbf":function(e,a){e.exports=t},a5a2:function(e,t){e.exports=a},fae3:function(e,t,a){"use strict";if(a.r(t),a.d(t,"ArchivingSettings",(function(){return E})),a.d(t,"BrandingSettings",(function(){return Y})),a.d(t,"SmtpSettings",(function(){return te})),a.d(t,"JsTrackingCodeGenerator",(function(){return ht})),a.d(t,"JsTrackingCodeGeneratorSitesWithoutData",(function(){return St})),a.d(t,"ImageTrackingCodeGenerator",(function(){return Mt})),a.d(t,"TrackingFailures",(function(){return ca})),"undefined"!==typeof window){var o=window.document.currentScript,n=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(a.p=n[1])}var i=a("8bbf");const r={class:"form-group row"},l={class:"col s12"},s={class:"col s12 m6"},c={class:"form-description",style:{"margin-left":"4px"}},d={for:"enableBrowserTriggerArchiving2"},m=["innerHTML"],u={class:"col s12 m6"},g=["innerHTML"],p={class:"form-group row"},b={class:"col s12"},h={class:"input-field col s12 m6"},j=["disabled"],O={class:"form-description"},v={class:"col s12 m6"},C={key:0,class:"form-help"},k={key:0},V=Object(i["createElementVNode"])("br",null,null,-1),S=Object(i["createElementVNode"])("br",null,null,-1),N=Object(i["createElementVNode"])("br",null,null,-1);function f(e,t,a,o,n,f){const T=Object(i["resolveComponent"])("SaveButton"),y=Object(i["resolveComponent"])("ContentBlock");return Object(i["openBlock"])(),Object(i["createBlock"])(y,{"content-title":e.translate("CoreAdminHome_ArchivingSettings"),anchor:"archivingSettings",class:"matomo-archiving-settings"},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("div",r,[Object(i["createElementVNode"])("h3",l,Object(i["toDisplayString"])(e.translate("General_AllowPiwikArchivingToTriggerBrowser")),1),Object(i["createElementVNode"])("div",s,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("label",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",id:"enableBrowserTriggerArchiving1",name:"enableBrowserTriggerArchiving",value:"1","onUpdate:modelValue":t[0]||(t[0]=t=>e.enableBrowserTriggerArchivingValue=t)},null,512),[[i["vModelRadio"],e.enableBrowserTriggerArchivingValue]]),Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("General_Yes")),1),Object(i["createElementVNode"])("span",c,Object(i["toDisplayString"])(e.translate("General_Default")),1)])]),Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("label",d,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"radio",id:"enableBrowserTriggerArchiving2",name:"enableBrowserTriggerArchiving",value:"0","onUpdate:modelValue":t[1]||(t[1]=t=>e.enableBrowserTriggerArchivingValue=t)},null,512),[[i["vModelRadio"],e.enableBrowserTriggerArchivingValue]]),Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("General_No")),1),Object(i["createElementVNode"])("span",{class:"form-description",innerHTML:e.$sanitize(e.archivingTriggerDesc),style:{"margin-left":"4px"}},null,8,m)])])]),Object(i["createElementVNode"])("div",u,[Object(i["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.archivingInlineHelp)},null,8,g)])]),Object(i["createElementVNode"])("div",p,[Object(i["createElementVNode"])("h3",b,Object(i["toDisplayString"])(e.translate("General_ReportsContainingTodayWillBeProcessedAtMostEvery")),1),Object(i["createElementVNode"])("div",h,[Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[2]||(t[2]=t=>e.todayArchiveTimeToLiveValue=t),id:"todayArchiveTimeToLive",disabled:!e.isGeneralSettingsAdminEnabled},null,8,j),[[i["vModelText"],e.todayArchiveTimeToLiveValue]]),Object(i["createElementVNode"])("span",O,Object(i["toDisplayString"])(e.translate("General_RearchiveTimeIntervalOnlyForTodayReports")),1)]),Object(i["createElementVNode"])("div",v,[e.isGeneralSettingsAdminEnabled?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",C,[e.showWarningCron?(Object(i["openBlock"])(),Object(i["createElementBlock"])("strong",k,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("General_NewReportsWillBeProcessedByCron")),1),V,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_ReportsWillBeProcessedAtMostEveryHour"))+" "+Object(i["toDisplayString"])(e.translate("General_IfArchivingIsFastYouCanSetupCronRunMoreOften")),1),S])):Object(i["createCommentVNode"])("",!0),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_SmallTrafficYouCanLeaveDefault",e.todayArchiveTimeToLiveDefault))+" ",1),N,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_MediumToHighTrafficItIsRecommendedTo",1800,3600)),1)])):Object(i["createCommentVNode"])("",!0)])]),Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(T,{saving:e.isLoading,onConfirm:t[3]||(t[3]=t=>e.save())},null,8,["saving"])])])]),_:1},8,["content-title"])}var T=a("19dc"),y=a("a5a2"),A=Object(i["defineComponent"])({props:{enableBrowserTriggerArchiving:Boolean,showSegmentArchiveTriggerInfo:Boolean,isGeneralSettingsAdminEnabled:Boolean,showWarningCron:Boolean,todayArchiveTimeToLive:Number,todayArchiveTimeToLiveDefault:Number},components:{ContentBlock:T["ContentBlock"],SaveButton:y["SaveButton"]},data(){return{isLoading:!1,enableBrowserTriggerArchivingValue:this.enableBrowserTriggerArchiving?1:0,todayArchiveTimeToLiveValue:this.todayArchiveTimeToLive}},watch:{enableBrowserTriggerArchiving(e){this.enableBrowserTriggerArchivingValue=e?1:0},todayArchiveTimeToLive(e){this.todayArchiveTimeToLiveValue=e}},computed:{archivingTriggerDesc(){let e="";return e+=Object(T["translate"])("General_ArchivingTriggerDescription",Object(T["externalLink"])("https://matomo.org/docs/setup-auto-archiving/"),"</a>"),this.showSegmentArchiveTriggerInfo&&(e+=Object(T["translate"])("General_ArchivingTriggerSegment")),e},archivingInlineHelp(){let e=Object(T["translate"])("General_ArchivingInlineHelp");return e+="<br/>",e+=Object(T["translate"])("General_SeeTheOfficialDocumentationForMoreInformation",Object(T["externalLink"])("https://matomo.org/docs/setup-auto-archiving/"),"</a>"),e}},methods:{save(){this.isLoading=!0,T["AjaxHelper"].post({module:"API",method:"CoreAdminHome.setArchiveSettings"},{enableBrowserTriggerArchiving:this.enableBrowserTriggerArchivingValue,todayArchiveTimeToLive:this.todayArchiveTimeToLiveValue}).then(()=>{this.isLoading=!1;const e=T["NotificationsStore"].show({message:Object(T["translate"])("CoreAdminHome_SettingsSaveSuccess"),type:"transient",id:"generalSettings",context:"success"});T["NotificationsStore"].scrollToNotification(e)}).finally(()=>{this.isLoading=!1})}}});A.render=f;var E=A;const w={id:"logoSettings"},_={id:"logoUploadForm",ref:"logoUploadForm",method:"post",enctype:"multipart/form-data",action:"index.php?module=CoreAdminHome&format=json&action=uploadCustomLogo"},H={key:0},L=["value"],D=Object(i["createElementVNode"])("input",{type:"hidden",name:"force_api_session",value:"1"},null,-1),x={key:0},B={key:0,class:"alert alert-warning uploaderror"},U={class:"row"},F={class:"col s12"},P=["src"],I={class:"row"},M={class:"col s12"},G=["src"],J={key:1},q=["innerHTML"],R={key:1},W={class:"alert alert-warning"};function K(e,t,a,o,n,r){const l=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SaveButton"),c=Object(i["resolveComponent"])("ContentBlock"),d=Object(i["resolveDirective"])("form");return Object(i["openBlock"])(),Object(i["createBlock"])(c,{"content-title":e.translate("CoreAdminHome_BrandingSettings"),anchor:"brandingSettings"},{default:Object(i["withCtx"])(()=>[Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("CoreAdminHome_CustomLogoHelpText")),1),Object(i["createVNode"])(l,{name:"useCustomLogo",uicontrol:"checkbox","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=t=>e.onUseCustomLogoChange(t)),title:e.translate("CoreAdminHome_UseCustomLogo"),"inline-help":e.help},null,8,["model-value","title","inline-help"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",w,[Object(i["createElementVNode"])("form",_,[e.fileUploadEnabled?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",H,[Object(i["createElementVNode"])("input",{type:"hidden",name:"token_auth",value:e.tokenAuth},null,8,L),D,e.logosWriteable?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",x,[Object(i["createVNode"])(i["Transition"],{name:"fade-out"},{default:Object(i["withCtx"])(()=>[e.showUploadError?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",B,Object(i["toDisplayString"])(e.translate("CoreAdminHome_LogoUploadFailed")),1)):Object(i["createCommentVNode"])("",!0)]),_:1}),Object(i["createVNode"])(l,{uicontrol:"file",name:"customLogo","model-value":e.customLogo,"onUpdate:modelValue":t[1]||(t[1]=t=>e.onCustomLogoChange(t)),title:e.translate("CoreAdminHome_LogoUpload"),"inline-help":e.translate("CoreAdminHome_LogoUploadHelp","JPG / PNG / GIF","110")},null,8,["model-value","title","inline-help"]),Object(i["createElementVNode"])("div",U,[Object(i["createElementVNode"])("div",F,[Object(i["createElementVNode"])("img",{src:e.pathUserLogoSrc,id:"currentLogo",style:{"max-height":"150px"},ref:"currentLogo"},null,8,P)])]),Object(i["createVNode"])(l,{uicontrol:"file",name:"customFavicon","model-value":e.customFavicon,"onUpdate:modelValue":t[2]||(t[2]=t=>e.onFaviconChange(t)),title:e.translate("CoreAdminHome_FaviconUpload"),"inline-help":e.translate("CoreAdminHome_LogoUploadHelp","JPG / PNG / GIF","16")},null,8,["model-value","title","inline-help"]),Object(i["createElementVNode"])("div",I,[Object(i["createElementVNode"])("div",M,[Object(i["createElementVNode"])("img",{src:e.pathUserFaviconSrc,id:"currentFavicon",width:"16",height:"16",ref:"currentFavicon"},null,8,G)])])])):Object(i["createCommentVNode"])("",!0),e.logosWriteable?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",J,[Object(i["createElementVNode"])("div",{class:"alert alert-warning",innerHTML:e.$sanitize(e.logosNotWriteableWarning)},null,8,q)]))])):Object(i["createCommentVNode"])("",!0),e.fileUploadEnabled?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",R,[Object(i["createElementVNode"])("div",W,Object(i["toDisplayString"])(e.translate("CoreAdminHome_FileUploadDisabled","file_uploads=1")),1)]))],512)],512),[[i["vShow"],e.enabled]]),Object(i["createVNode"])(s,{onConfirm:t[3]||(t[3]=t=>e.save()),saving:e.isLoading},null,8,["saving"])])),[[d]])]),_:1},8,["content-title"])}const{$:z}=window;var Q=Object(i["defineComponent"])({props:{fileUploadEnabled:{type:Boolean,required:!0},logosWriteable:{type:Boolean,required:!0},useCustomLogo:{type:Boolean,required:!0},pathUserLogoDirectory:{type:String,required:!0},pathUserLogo:{type:String,required:!0},pathUserLogoSmall:{type:String,required:!0},pathUserLogoSvg:{type:String,required:!0},hasUserLogo:{type:Boolean,required:!0},pathUserFavicon:{type:String,required:!0},hasUserFavicon:{type:Boolean,required:!0},isPluginsAdminEnabled:{type:Boolean,required:!0}},components:{Field:y["Field"],ContentBlock:T["ContentBlock"],SaveButton:y["SaveButton"]},directives:{Form:y["Form"]},data(){return{isLoading:!1,enabled:this.useCustomLogo,customLogo:this.pathUserLogo,customFavicon:this.pathUserFavicon,showUploadError:!1,currentLogoSrcExists:this.hasUserLogo,currentFaviconSrcExists:this.hasUserFavicon,newLogoBase64Src:"",newFaviconBase64Src:""}},computed:{tokenAuth(){return T["Matomo"].token_auth},logosNotWriteableWarning(){return Object(T["translate"])("CoreAdminHome_LogoNotWriteableInstruction",`<code>${this.pathUserLogoDirectory}</code><br/>`,`${this.pathUserLogo}, ${this.pathUserLogoSmall}, ${this.pathUserLogoSvg}`)},help(){if(!this.isPluginsAdminEnabled)return;const e=`"${Object(T["translate"])("General_GiveUsYourFeedback")}"`,t='<a href="?module=CorePluginsAdmin&action=plugins" rel="noreferrer noopener" target="_blank">';return Object(T["translate"])("CoreAdminHome_CustomLogoFeedbackInfo",e,t,"</a>")},pathUserLogoSrc(){return this.newLogoBase64Src?"data:image/png;base64, "+this.newLogoBase64Src:this.currentLogoSrcExists&&this.pathUserLogo?this.pathUserLogo:""},pathUserFaviconSrc(){return this.newFaviconBase64Src?"data:image/png;base64, "+this.newFaviconBase64Src:this.currentFaviconSrcExists&&this.pathUserFavicon?this.pathUserFavicon:""}},methods:{onUseCustomLogoChange(e){this.enabled=e},onCustomLogoChange(e){this.customLogo=e,this.updateLogo()},onFaviconChange(e){this.customFavicon=e,this.updateLogo()},save(){this.isLoading=!0,T["AjaxHelper"].post({module:"API",method:"CoreAdminHome.setBrandingSettings"},{useCustomLogo:this.enabled?"1":"0",hasCustomLogo:this.newLogoBase64Src.length>0||this.customLogo?"1":"0",hasCustomFavicon:this.newFaviconBase64Src.length>0||this.customFavicon?"1":"0"}).then(e=>{this.enabled=!!e.useCustomLogo,e.customLogoPath&&(this.customLogo=e.customLogoPath),e.customFaviconPath&&(this.customFavicon=e.customFaviconPath);const t=T["NotificationsStore"].show({message:Object(T["translate"])("CoreAdminHome_SettingsSaveSuccess"),type:"transient",id:"generalSettings",context:"success"});T["NotificationsStore"].scrollToNotification(t)}).finally(()=>{this.enabled||(this.currentLogoSrcExists=!1,this.currentFaviconSrcExists=!1,this.customLogo="",this.customFavicon="",this.newFaviconBase64Src="",this.newLogoBase64Src=""),this.isLoading=!1})},updateLogo(){const e=!!this.customLogo,t=!!this.customFavicon;if(!e&&!t)return;this.showUploadError=!1;const a="upload"+(new Date).getTime(),o=z(`<iframe name="${a}" />`);o.css("display","none"),o.on("load",()=>{setTimeout(()=>{let a="",n={};try{a=(z(o.contents()).find("body").text()||"").trim(),n=JSON.parse(a)}catch(i){}a&&0===Object.keys(n).length?this.showUploadError=!0:(e&&n.logo&&(this.newLogoBase64Src=n.logo),t&&n.favicon&&(this.newFaviconBase64Src=n.favicon)),a&&o.remove()},1e3)}),z("body:first").append(o);const n=z(this.$refs.logoUploadForm);n.attr("target",a),n.submit(),this.customLogo="",this.customFavicon=""}}});Q.render=K;var Y=Q;const X={id:"smtpSettings"};function Z(e,t,a,o,n,r){const l=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SaveButton"),c=Object(i["resolveComponent"])("ContentBlock"),d=Object(i["resolveDirective"])("auto-clear-password"),m=Object(i["resolveDirective"])("form");return Object(i["openBlock"])(),Object(i["createBlock"])(c,{"content-title":e.translate("CoreAdminHome_EmailServerSettings"),anchor:"mailSettings"},{default:Object(i["withCtx"])(()=>[Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"mailUseSmtp",modelValue:e.enabled,"onUpdate:modelValue":t[0]||(t[0]=t=>e.enabled=t),title:e.translate("General_UseSMTPServerForEmail"),"inline-help":e.translate("General_SelectYesIfYouWantToSendEmailsViaServer")},null,8,["modelValue","title","inline-help"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",X,[Object(i["createVNode"])(l,{uicontrol:"text",name:"mailHost","model-value":e.mailHost,"onUpdate:modelValue":t[1]||(t[1]=t=>e.onUpdateMailHost(t)),title:e.translate("General_SmtpServerAddress")},null,8,["model-value","title"]),Object(i["createVNode"])(l,{uicontrol:"text",name:"mailPort",modelValue:e.mailPort,"onUpdate:modelValue":t[2]||(t[2]=t=>e.mailPort=t),title:e.translate("General_SmtpPort"),"inline-help":e.translate("General_OptionalSmtpPort")},null,8,["modelValue","title","inline-help"]),Object(i["createVNode"])(l,{uicontrol:"select",name:"mailType",modelValue:e.mailType,"onUpdate:modelValue":t[3]||(t[3]=t=>e.mailType=t),title:e.translate("General_AuthenticationMethodSmtp"),options:e.mailTypes,"inline-help":e.translate("General_OnlyUsedIfUserPwdIsSet")},null,8,["modelValue","title","options","inline-help"]),Object(i["createVNode"])(l,{uicontrol:"text",name:"mailUsername",modelValue:e.mailUsername,"onUpdate:modelValue":t[4]||(t[4]=t=>e.mailUsername=t),title:e.translate("General_SmtpUsername"),"inline-help":e.translate("General_OnlyEnterIfRequired"),autocomplete:"off"},null,8,["modelValue","title","inline-help"]),Object(i["withDirectives"])(Object(i["createVNode"])(l,{uicontrol:"password",name:"mailPassword","model-value":e.mailPassword,"onUpdate:modelValue":t[5]||(t[5]=t=>e.onMailPasswordChange(t)),onClick:t[6]||(t[6]=t=>{!e.passwordChanged&&t.target.select()}),title:e.translate("General_SmtpPassword"),"inline-help":e.passwordHelp,autocomplete:"off"},null,8,["model-value","title","inline-help"]),[[d]]),Object(i["createVNode"])(l,{uicontrol:"text",name:"mailFromAddress",modelValue:e.mailFromAddress,"onUpdate:modelValue":t[7]||(t[7]=t=>e.mailFromAddress=t),title:e.translate("General_SmtpFromAddress"),"inline-help":e.translate("General_SmtpFromEmailHelp",e.mailHost),autocomplete:"off"},null,8,["modelValue","title","inline-help"]),Object(i["createVNode"])(l,{uicontrol:"text",name:"mailFromName",modelValue:e.mailFromName,"onUpdate:modelValue":t[8]||(t[8]=t=>e.mailFromName=t),title:e.translate("General_SmtpFromName"),"inline-help":e.translate("General_NameShownInTheSenderColumn"),autocomplete:"off"},null,8,["modelValue","title","inline-help"]),Object(i["createVNode"])(l,{uicontrol:"select",name:"mailEncryption",modelValue:e.mailEncryption,"onUpdate:modelValue":t[9]||(t[9]=t=>e.mailEncryption=t),title:e.translate("General_SmtpEncryption"),options:e.mailEncryptions,"inline-help":e.translate("General_EncryptedSmtpTransport")},null,8,["modelValue","title","options","inline-help"])],512),[[i["vShow"],e.enabled]]),Object(i["createVNode"])(s,{onConfirm:t[10]||(t[10]=t=>e.save()),saving:e.isLoading},null,8,["saving"])])),[[m]])]),_:1},8,["content-title"])}var ee=Object(i["defineComponent"])({props:{mail:{type:Object,required:!0},mailTypes:{type:Object,required:!0},mailEncryptions:{type:Object,required:!0}},data(){const e=this.mail;return{isLoading:!1,enabled:"smtp"===e.transport,mailHost:e.host,passwordChanged:!1,mailPort:e.port,mailType:e.type,mailUsername:e.username,mailPassword:e.password?"******":"",mailFromAddress:e.noreply_email_address,mailFromName:e.noreply_email_name,mailEncryption:e.encryption}},components:{ContentBlock:T["ContentBlock"],Field:y["Field"],SaveButton:y["SaveButton"]},directives:{Form:y["Form"],AutoClearPassword:T["AutoClearPassword"]},computed:{passwordHelp(){const e=Object(T["translate"])("General_OnlyEnterIfRequiredPassword")+"<br/>",t=Object(T["translate"])("General_WarningPasswordStored","<strong>","</strong>")+"<br/>";return`${e}\n${t}`}},methods:{onUpdateMailHost(e){this.mailHost=e,this.passwordChanged||(this.mailPassword="",this.passwordChanged=!0)},onMailPasswordChange(e){this.mailPassword=e,this.passwordChanged=!0},save(){this.isLoading=!0;const e={mailUseSmtp:this.enabled?"1":"0",mailPort:this.mailPort,mailHost:this.mailHost,mailType:this.mailType,mailUsername:this.mailUsername,mailFromAddress:this.mailFromAddress,mailFromName:this.mailFromName,mailEncryption:this.mailEncryption};this.passwordChanged&&(e.mailPassword=this.mailPassword),T["AjaxHelper"].post({module:"CoreAdminHome",action:"setMailSettings"},e,{withTokenInUrl:!0}).then(()=>{const e=T["NotificationsStore"].show({message:Object(T["translate"])("CoreAdminHome_SettingsSaveSuccess"),type:"transient",id:"generalSettings",context:"success"});T["NotificationsStore"].scrollToNotification(e)}).finally(()=>{this.isLoading=!1})}}});ee.render=Z;var te=ee;const ae={id:"js-code-options"},oe=Object(i["createElementVNode"])("br",null,null,-1),ne=Object(i["createElementVNode"])("br",null,null,-1),ie=["innerHTML"],re=["innerHTML"],le=Object(i["createElementVNode"])("br",null,null,-1),se=Object(i["createElementVNode"])("br",null,null,-1),ce=["innerHTML"],de=Object(i["createElementVNode"])("br",null,null,-1),me=Object(i["createElementVNode"])("br",null,null,-1),ue=["innerHTML"],ge=Object(i["createElementVNode"])("br",null,null,-1),pe=Object(i["createElementVNode"])("br",null,null,-1),be=["href"],he=["href"],je=["href"],Oe=["href"],ve=["href"],Ce=["href"],ke=["href"],Ve={id:"javascript-output-section"},Se={class:"valign-wrapper trackingHelpHeader matchWidth"},Ne={id:"javascript-email-button"},fe={id:"javascript-text"},Te=["textContent"];function ye(e,t,a,o,n,r){const l=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("JsTrackingCodeAdvancedOptions"),c=Object(i["resolveComponent"])("ContentBlock"),d=Object(i["resolveDirective"])("copy-to-clipboard");return Object(i["openBlock"])(),Object(i["createBlock"])(c,{anchor:"javaScriptTracking","content-title":e.translate("CoreAdminHome_JavaScriptTracking")},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("div",ae,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTrackingIntro1"))+" ",1),oe,ne,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTrackingIntro2"))+" ",1),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro3a)},null,8,ie),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(" "+e.jsTrackingIntro3b)},null,8,re),le,se,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro4a)},null,8,ce),de,me,Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro5)},null,8,ue),ge,pe,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("SitesManager_InstallationGuides"))+" : ",1),Object(i["createElementVNode"])("a",{href:e.externalRawLink("https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-tracking-code-on-wordpress/"),target:"_blank",rel:"noopener"},"WordPress",8,be),Object(i["createTextVNode"])(" | "),Object(i["createElementVNode"])("a",{href:e.externalRawLink("https://matomo.org/faq/new-to-piwik/how-do-i-integrate-matomo-with-squarespace-website/"),target:"_blank",rel:"noopener"},"Squarespace",8,he),Object(i["createTextVNode"])(" | "),Object(i["createElementVNode"])("a",{href:e.externalRawLink("https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-analytics-tracking-code-on-wix/"),target:"_blank",rel:"noopener"},"Wix",8,je),Object(i["createTextVNode"])(" | "),Object(i["createElementVNode"])("a",{href:e.externalRawLink("https://matomo.org/faq/how-to-install/faq_19424/"),target:"_blank",rel:"noopener"},"SharePoint",8,Oe),Object(i["createTextVNode"])(" | "),Object(i["createElementVNode"])("a",{href:e.externalRawLink("https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-analytics-tracking-code-on-joomla/"),target:"_blank",rel:"noopener"},"Joomla",8,ve),Object(i["createTextVNode"])(" | "),Object(i["createElementVNode"])("a",{href:e.externalRawLink("https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-tracking-code-on-my-shopify-store/"),target:"_blank",rel:"noopener"},"Shopify",8,Ce),Object(i["createTextVNode"])(" | "),Object(i["createElementVNode"])("a",{href:e.externalRawLink("https://matomo.org/faq/new-to-piwik/how-do-i-use-matomo-analytics-within-gtm-google-tag-manager/"),target:"_blank",rel:"noopener"},"Google Tag Manager",8,ke)]),Object(i["createVNode"])(l,{uicontrol:"site",name:"js-tracker-website",class:"jsTrackingCodeWebsite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=t=>e.site=t),ref:"site",introduction:e.translate("General_Website")},null,8,["modelValue","introduction"]),Object(i["createElementVNode"])("div",Ve,[Object(i["createElementVNode"])("div",Se,[Object(i["createElementVNode"])("div",null,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("General_JsTrackingTag")),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CodeNoteBeforeClosingHead","</head>")),1)]),Object(i["createElementVNode"])("div",Ne,[Object(i["createElementVNode"])("button",{class:"btn",id:"emailJsBtn",onClick:t[1]||(t[1]=t=>e.sendEmail())},Object(i["toDisplayString"])(e.translate("SitesManager_EmailInstructionsButton")),1)])]),Object(i["createElementVNode"])("div",fe,[Object(i["createElementVNode"])("div",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("pre",{class:"codeblock",textContent:Object(i["toDisplayString"])(e.trackingCode),ref:"trackingCode"},null,8,Te),[[d,{}]])])])])]),Object(i["createVNode"])(s,{site:e.site,"max-custom-variables":e.maxCustomVariables,"server-side-do-not-track-enabled":e.serverSideDoNotTrackEnabled,onUpdateTrackingCode:e.updateTrackingCode},null,8,["site","max-custom-variables","server-side-do-not-track-enabled","onUpdateTrackingCode"])]),_:1},8,["content-title"])}const Ae={class:"trackingCodeAdvancedOptions"},Ee={class:"advance-option"},we=Object(i["createElementVNode"])("span",{class:"icon-chevron-down"},null,-1),_e=Object(i["createElementVNode"])("span",{class:"icon-chevron-up"},null,-1),He={id:"javascript-advanced-options"},Le=["innerHTML"],De={id:"optional-js-tracking-options"},xe={id:"jsTrackAllSubdomainsInlineHelp",class:"inline-help-node"},Be=["innerHTML"],Ue=["innerHTML"],Fe={id:"jsTrackGroupByDomainInlineHelp",class:"inline-help-node"},Pe={id:"jsTrackAllAliasesInlineHelp",class:"inline-help-node"},Ie={id:"javascript-tracking-visitor-cv"},Me={class:"row"},Ge={class:"col s12 m3"},Je={class:"col s12 m3"},qe={class:"col s12 m6 l3"},$e=["onKeydown"],Re={class:"col s12 m6 l3"},We=["onKeydown"],Ke={class:"row"},ze={class:"col s12"},Qe=Object(i["createElementVNode"])("span",{class:"icon-add"},null,-1),Ye={id:"jsCrossDomain",class:"inline-help-node"},Xe=Object(i["createElementVNode"])("br",null,null,-1),Ze={id:"jsDoNotTrackInlineHelp",class:"inline-help-node"},et={key:0},tt=Object(i["createElementVNode"])("br",null,null,-1),at=["innerHTML"],ot={id:"js-campaign-query-param-extra"},nt={class:"row"},it={class:"col s12"},rt={class:"row"},lt={class:"col s12"};function st(e,t,a,o,n,r){const l=Object(i["resolveComponent"])("Field");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ae,[Object(i["createElementVNode"])("div",Ee,[Object(i["createElementVNode"])("span",null,[e.showAdvanced?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,href:"javascript:;",onClick:t[0]||(t[0]=Object(i["withModifiers"])(t=>e.showAdvanced=!0,["prevent"]))},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_ShowAdvancedOptions"))+" ",1),we])),e.showAdvanced?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:1,href:"javascript:;",onClick:t[1]||(t[1]=Object(i["withModifiers"])(t=>e.showAdvanced=!1,["prevent"]))},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_HideAdvancedOptions"))+" ",1),_e])):Object(i["createCommentVNode"])("",!0)])]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",He,[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.trackingDocumentationHelp)},null,8,Le),Object(i["createElementVNode"])("div",De,[Object(i["createElementVNode"])("div",xe,[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.mergeSubdomainsDesc)},null,8,Be),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.learnMoreText)},null,8,Ue)]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-all-subdomains","model-value":e.trackAllSubdomains,"onUpdate:modelValue":t[2]||(t[2]=t=>{e.trackAllSubdomains=t,e.updateTrackingCode()}),disabled:e.isLoading,title:`${e.translate("CoreAdminHome_JSTracking_MergeSubdomains")} ${e.currentSiteName}`,"inline-help":"#jsTrackAllSubdomainsInlineHelp"},null,8,["model-value","disabled","title"])]),Object(i["createElementVNode"])("div",Fe,Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_GroupPageTitlesByDomainDesc1",e.currentSiteHost)),1),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-group-by-domain","model-value":e.groupByDomain,"onUpdate:modelValue":t[3]||(t[3]=t=>{e.groupByDomain=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_GroupPageTitlesByDomain"),"inline-help":"#jsTrackGroupByDomainInlineHelp"},null,8,["model-value","disabled","title"]),Object(i["createElementVNode"])("div",Pe,Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_MergeAliasesDesc",e.currentSiteAlias)),1),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-all-aliases","model-value":e.trackAllAliases,"onUpdate:modelValue":t[4]||(t[4]=t=>{e.trackAllAliases=t,e.updateTrackingCode()}),disabled:e.isLoading,title:`${e.translate("CoreAdminHome_JSTracking_MergeAliases")} ${e.currentSiteName}`,"inline-help":"#jsTrackAllAliasesInlineHelp"},null,8,["model-value","disabled","title"]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-noscript","model-value":e.trackNoScript,"onUpdate:modelValue":t[5]||(t[5]=t=>{e.trackNoScript=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_TrackNoScript")},null,8,["model-value","disabled","title"]),Object(i["withDirectives"])(Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-visitor-cv-check","model-value":e.trackCustomVars,"onUpdate:modelValue":t[6]||(t[6]=t=>{e.trackCustomVars=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_VisitorCustomVars"),"inline-help":e.translate("CoreAdminHome_JSTracking_VisitorCustomVarsDesc")},null,8,["model-value","disabled","title","inline-help"]),[[i["vShow"],e.maxCustomVariables>0]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Ie,[Object(i["createElementVNode"])("div",Me,[Object(i["createElementVNode"])("div",Ge,Object(i["toDisplayString"])(e.translate("General_Name")),1),Object(i["createElementVNode"])("div",Je,Object(i["toDisplayString"])(e.translate("General_Value")),1)]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.customVars,(t,a)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"row",key:a},[Object(i["createElementVNode"])("div",qe,[Object(i["createElementVNode"])("input",{type:"text",class:"custom-variable-name",onKeydown:t=>e.onCustomVarNameKeydown(t,a),placeholder:"e.g. Type"},null,40,$e)]),Object(i["createElementVNode"])("div",Re,[Object(i["createElementVNode"])("input",{type:"text",class:"custom-variable-value",onKeydown:t=>e.onCustomVarValueKeydown(t,a),placeholder:"e.g. Customer"},null,40,We)])]))),128)),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",Ke,[Object(i["createElementVNode"])("div",ze,[Object(i["createElementVNode"])("a",{href:"javascript:;",onClick:t[7]||(t[7]=t=>e.addCustomVar()),class:"add-custom-variable"},[Qe,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_Add")),1)])])],512),[[i["vShow"],e.canAddMoreCustomVariables]])],512),[[i["vShow"],e.trackCustomVars]]),Object(i["createElementVNode"])("div",Ye,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CrossDomain"))+" ",1),Xe,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CrossDomain_NeedsMultipleDomains")),1)]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-cross-domain","model-value":e.crossDomain,"onUpdate:modelValue":t[8]||(t[8]=t=>{e.crossDomain=t,e.updateTrackingCode(),e.onCrossDomainToggle()}),disabled:e.isLoading||!e.hasManySiteUrls,title:e.translate("CoreAdminHome_JSTracking_EnableCrossDomainLinking"),"inline-help":"#jsCrossDomain"},null,8,["model-value","disabled","title"]),Object(i["createElementVNode"])("div",Ze,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_EnableDoNotTrackDesc"))+" ",1),e.serverSideDoNotTrackEnabled?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",et,[tt,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_EnableDoNotTrack_AlreadyEnabled")),1)])):Object(i["createCommentVNode"])("",!0)]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-do-not-track","model-value":e.doNotTrack,"onUpdate:modelValue":t[9]||(t[9]=t=>{e.doNotTrack=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_EnableDoNotTrack"),"inline-help":"#jsDoNotTrackInlineHelp"},null,8,["model-value","disabled","title"]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-disable-cookies","model-value":e.disableCookies,"onUpdate:modelValue":t[10]||(t[10]=t=>{e.disableCookies=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_DisableCookies"),"inline-help":e.translate("CoreAdminHome_JSTracking_DisableCookiesDesc")},null,8,["model-value","disabled","title","inline-help"]),Object(i["createElementVNode"])("div",{id:"jsTrackCampaignParamsInlineHelp",class:"inline-help-node",innerHTML:e.$sanitize(e.jsTrackCampaignParamsInlineHelp)},null,8,at),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"custom-campaign-query-params-check","model-value":e.useCustomCampaignParams,"onUpdate:modelValue":t[11]||(t[11]=t=>{e.useCustomCampaignParams=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CustomCampaignQueryParam"),"inline-help":"#jsTrackCampaignParamsInlineHelp"},null,8,["model-value","disabled","title"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",ot,[Object(i["createElementVNode"])("div",nt,[Object(i["createElementVNode"])("div",it,[Object(i["createVNode"])(l,{uicontrol:"text",name:"custom-campaign-name-query-param","model-value":e.customCampaignName,"onUpdate:modelValue":t[12]||(t[12]=t=>{e.customCampaignName=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CampaignNameParam")},null,8,["model-value","disabled","title"])])]),Object(i["createElementVNode"])("div",rt,[Object(i["createElementVNode"])("div",lt,[Object(i["createVNode"])(l,{uicontrol:"text",name:"custom-campaign-keyword-query-param","model-value":e.customCampaignKeyword,"onUpdate:modelValue":t[13]||(t[13]=t=>{e.customCampaignKeyword=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CampaignKwdParam")},null,8,["model-value","disabled","title"])])])],512),[[i["vShow"],e.useCustomCampaignParams]]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"require-consent-for-campaign-tracking","model-value":e.disableCampaignParameters,"onUpdate:modelValue":t[14]||(t[14]=t=>{e.disableCampaignParameters=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_DisableCampaignParameters"),"inline-help":e.translate("CoreAdminHome_JSTracking_DisableCampaignParametersDesc")},null,8,["model-value","disabled","title","inline-help"])],512),[[i["vShow"],e.showAdvanced]])])}function ct(e){const t=new URL(e);return t.hostname}function dt(e){return e.filter(e=>!!e.name).map(e=>[e.name,e.value])}const mt=window.location.host,ut=window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"));var gt=Object(i["defineComponent"])({props:{site:{type:Object,required:!0},maxCustomVariables:Number,serverSideDoNotTrackEnabled:Boolean},data(){return{showAdvanced:!1,trackAllSubdomains:!1,isLoading:!1,siteUrls:{},siteExcludedQueryParams:{},siteExcludedReferrers:{},crossDomain:!1,groupByDomain:!1,trackAllAliases:!1,trackNoScript:!1,trackCustomVars:!1,customVars:[],canAddMoreCustomVariables:!!this.maxCustomVariables&&this.maxCustomVariables>0,doNotTrack:!1,disableCookies:!1,useCustomCampaignParams:!1,customCampaignName:"",customCampaignKeyword:"",trackingCodeAbortController:null,disableCampaignParameters:!1}},emits:["updateTrackingCode"],components:{Field:y["Field"]},created(){this.site&&this.site.id&&this.onSiteChanged(this.site),this.onCustomVarNameKeydown=Object(T["debounce"])(this.onCustomVarNameKeydown,100),this.onCustomVarValueKeydown=Object(T["debounce"])(this.onCustomVarValueKeydown,100),this.addCustomVar()},watch:{site(e){this.onSiteChanged(e)}},methods:{onSiteChanged(e){const t=e.id,a=[];this.siteUrls[t]||(this.isLoading=!0,a.push(T["AjaxHelper"].fetch({module:"API",method:"SitesManager.getSiteUrlsFromId",idSite:t,filter_limit:"-1"}).then(e=>{this.siteUrls[t]=e||[]}))),this.siteExcludedQueryParams[t]||(this.isLoading=!0,a.push(T["AjaxHelper"].fetch({module:"API",method:"SitesManager.getExcludedQueryParameters",idSite:t,filter_limit:"-1"}).then(e=>{this.siteExcludedQueryParams[t]=e||[]}))),this.siteExcludedReferrers[t]||(this.isLoading=!0,a.push(T["AjaxHelper"].fetch({module:"API",method:"SitesManager.getExcludedReferrers",idSite:t,filter_limit:"-1"}).then(e=>{this.siteExcludedReferrers[t]=[],Object.values(e||[]).forEach(e=>{this.siteExcludedReferrers[t].push(e.replace(/^https?:\/\//,""))})}))),Promise.all(a).then(()=>{this.isLoading=!1,this.updateCurrentSiteInfo(),this.updateTrackingCode()})},updateCurrentSiteInfo(){this.hasManySiteUrls||(this.crossDomain=!1)},onCrossDomainToggle(){this.crossDomain&&(this.trackAllAliases=!0)},updateTrackingCode(){const e={piwikUrl:`${mt}${ut}`,groupPageTitlesByDomain:this.groupByDomain?1:0,mergeSubdomains:this.trackAllSubdomains?1:0,mergeAliasUrls:this.trackAllAliases?1:0,visitorCustomVariables:this.trackCustomVars?dt(this.customVars):0,customCampaignNameQueryParam:null,customCampaignKeywordParam:null,doNotTrack:this.doNotTrack?1:0,disableCookies:this.disableCookies?1:0,crossDomain:this.crossDomain?1:0,trackNoScript:this.trackNoScript?1:0,forceMatomoEndpoint:1,disableCampaignParameters:this.disableCampaignParameters?1:0};this.siteExcludedQueryParams[this.site.id]&&(e.excludedQueryParams=this.siteExcludedQueryParams[this.site.id]),this.siteExcludedReferrers[this.site.id]&&(e.excludedReferrers=this.siteExcludedReferrers[this.site.id]),this.useCustomCampaignParams&&(e.customCampaignNameQueryParam=this.customCampaignName,e.customCampaignKeywordParam=this.customCampaignKeyword),this.trackingCodeAbortController&&(this.trackingCodeAbortController.abort(),this.trackingCodeAbortController=null),this.trackingCodeAbortController=new AbortController,T["AjaxHelper"].post({module:"API",format:"json",method:"SitesManager.getJavascriptTag",idSite:this.site.id},e,{abortController:this.trackingCodeAbortController}).then(e=>{this.trackingCodeAbortController=null,this.$emit("updateTrackingCode",e.value)})},addCustomVar(){this.canAddMoreCustomVariables&&this.customVars.push({name:"",value:""}),this.canAddMoreCustomVariables=!!this.maxCustomVariables&&this.maxCustomVariables>this.customVars.length},onCustomVarNameKeydown(e,t){setTimeout(()=>{this.customVars[t].name=e.target.value,this.updateTrackingCode()})},onCustomVarValueKeydown(e,t){setTimeout(()=>{this.customVars[t].value=e.target.value,this.updateTrackingCode()})}},computed:{hasManySiteUrls(){const{site:e}=this;return this.siteUrls[e.id]&&this.siteUrls[e.id].length>1},currentSiteHost(){var e;const t=null===(e=this.siteUrls[this.site.id])||void 0===e?void 0:e[0];return t?ct(t):""},currentSiteAlias(){var e;const t="x."+this.currentSiteHost,a=null===(e=this.siteUrls[this.site.id])||void 0===e?void 0:e[1];return a||t},currentSiteName(){return T["Matomo"].helper.htmlEntities(this.site.name)},mergeSubdomainsDesc(){return Object(T["translate"])("CoreAdminHome_JSTracking_MergeSubdomainsDesc","x."+this.currentSiteHost,"y."+this.currentSiteHost)},learnMoreText(){const e=Object(T["externalRawLink"])("https://developer.matomo.org/guides/tracking-javascript-guide")+"#measuring-domains-andor-sub-domains";return Object(T["translate"])("General_LearnMore",` (<a href="${e}" rel="noreferrer noopener" target="_blank">`,"</a>)")},jsTrackCampaignParamsInlineHelp(){return Object(T["translate"])("CoreAdminHome_JSTracking_CustomCampaignQueryParamDesc",Object(T["externalLink"])("https://matomo.org/faq/general/faq_119"),"</a>")},trackingDocumentationHelp(){return Object(T["translate"])("CoreAdminHome_JSTrackingDocumentationHelp",Object(T["externalLink"])("https://developer.matomo.org/guides/tracking-javascript-guide"),"</a>")}}});gt.render=st;var pt=gt,bt=Object(i["defineComponent"])({props:{defaultSite:{type:Object,required:!0},maxCustomVariables:Number,serverSideDoNotTrackEnabled:Boolean},data(){return{site:this.defaultSite,trackingCode:"",isHighlighting:!1,consentManagerName:"",consentManagerUrl:"",consentManagerIsConnected:!1}},components:{JsTrackingCodeAdvancedOptions:pt,ContentBlock:T["ContentBlock"],Field:y["Field"]},directives:{CopyToClipboard:T["CopyToClipboard"]},created(){this.site&&this.site.id&&this.onSiteChanged(this.site)},watch:{site(e){this.onSiteChanged(e)}},methods:{updateTrackingCode(e){this.trackingCode=e;const t=$(this.$refs.trackingCode);t&&!this.isHighlighting&&(this.isHighlighting=!0,t.effect("highlight",{complete:()=>{this.isHighlighting=!1}},1500))},onSiteChanged(e){const t=e.id;T["AjaxHelper"].fetch({module:"API",format:"json",method:"SitesManager.detectConsentManager",idSite:t,filter_limit:"-1"}).then(e=>{Object.prototype.hasOwnProperty.call(e,"name")&&(this.consentManagerName=e.name),Object.prototype.hasOwnProperty.call(e,"url")&&(this.consentManagerUrl=e.url),this.consentManagerIsConnected=e.isConnected})},sendEmail(){let e=Object(T["translate"])("SitesManager_EmailInstructionsSubject");e=encodeURIComponent(e);let{trackingCode:t}=this;t=t.replace(/<[^>]+>/g,"");let a=`${Object(T["translate"])("SitesManager_JsTrackingTagHelp")}. ${Object(T["translate"])("CoreAdminHome_JSTracking_CodeNoteBeforeClosingHeadEmail","'head")}\n${t}`;""!==this.consentManagerName&&""!==this.consentManagerUrl&&(a+=Object(T["translate"])("CoreAdminHome_JSTracking_ConsentManagerDetected",this.consentManagerName,this.consentManagerUrl),this.consentManagerIsConnected&&(a+="\n"+Object(T["translate"])("CoreAdminHome_JSTracking_ConsentManagerConnected",this.consentManagerName))),a=encodeURIComponent(a);const o=`mailto:?subject=${e}&body=${a}`;window.location.href=o}},computed:{jsTrackingIntro3a(){return Object(T["translate"])("CoreAdminHome_JSTrackingIntro3a",Object(T["externalLink"])("https://matomo.org/integrate/"),"</a>")},jsTrackingIntro3b(){return Object(T["translate"])("CoreAdminHome_JSTrackingIntro3b")},jsTrackingIntro4a(){return Object(T["translate"])("CoreAdminHome_JSTrackingIntro4",'<a href="#image-tracking-link">',"</a>")},jsTrackingIntro5(){return Object(T["translate"])("CoreAdminHome_JSTrackingIntro5",Object(T["externalLink"])("https://developer.matomo.org/guides/tracking-javascript-guide"),"</a>")}}});bt.render=ye;var ht=bt;const jt={class:"list-style-decimal"},Ot={id:"javascript-text"},vt=["textContent"],Ct={key:0};function kt(e,t,a,o,n,r){const l=Object(i["resolveComponent"])("JsTrackingCodeAdvancedOptions"),s=Object(i["resolveDirective"])("copy-to-clipboard");return Object(i["openBlock"])(),Object(i["createElementBlock"])("ol",jt,[Object(i["createElementVNode"])("li",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_JsTrackingCodeAdvancedOptionsStep"))+" ",1),Object(i["createVNode"])(l,{site:e.site,"max-custom-variables":e.maxCustomVariables,"server-side-do-not-track-enabled":e.serverSideDoNotTrackEnabled,onUpdateTrackingCode:e.updateTrackingCode},null,8,["site","max-custom-variables","server-side-do-not-track-enabled","onUpdateTrackingCode"])]),Object(i["createElementVNode"])("li",null,[Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.getCopyCodeStep),1),Object(i["createElementVNode"])("div",Ot,[Object(i["createElementVNode"])("div",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("pre",{class:"codeblock",textContent:Object(i["toDisplayString"])(e.trackingCode),ref:"trackingCode"},null,8,vt),[[s,{}]])])])]),e.isJsTrackerInstallCheckAvailable?(Object(i["openBlock"])(),Object(i["createElementBlock"])("li",Ct,[(Object(i["openBlock"])(),Object(i["createBlock"])(Object(i["resolveDynamicComponent"])(e.testComponent),{site:e.site},null,8,["site"]))])):Object(i["createCommentVNode"])("",!0)])}var Vt=Object(i["defineComponent"])({props:{defaultSite:{type:Object,required:!0},maxCustomVariables:Number,serverSideDoNotTrackEnabled:Boolean,jsTag:String,isJsTrackerInstallCheckAvailable:Boolean},components:{JsTrackingCodeAdvancedOptions:pt},directives:{CopyToClipboard:T["CopyToClipboard"]},data(){return{site:this.defaultSite,trackingCode:"",isHighlighting:!1}},created(){this.jsTag&&(this.trackingCode=this.jsTag)},methods:{updateTrackingCode(e){this.trackingCode=e;const t=$(this.$refs.trackingCode);t&&!this.isHighlighting&&(this.isHighlighting=!0,t.effect("highlight",{complete:()=>{this.isHighlighting=!1}},1500))}},computed:{getCopyCodeStep(){return Object(T["translate"])("CoreAdminHome_JSTracking_CodeNoteBeforeClosingHead","</head>")},testComponent(){return this.isJsTrackerInstallCheckAvailable?Object(T["useExternalPluginComponent"])("JsTrackerInstallCheck","JsTrackerInstallCheck"):""}}});Vt.render=kt;var St=Vt;const Nt=Object(i["createElementVNode"])("a",{name:"image-tracking-link"},null,-1),ft={id:"image-tracking-code-options"},Tt=["innerHTML"],yt=["innerHTML"],At={id:"image-tracking-goal-sub"},Et={class:"row"},wt={class:"col s12 m6"},_t={class:"col s12 m6"},Ht={id:"image-link-output-section"},Lt={id:"image-tracking-text"},Dt=["textContent"];function xt(e,t,a,o,n,r){const l=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("ContentBlock"),c=Object(i["resolveDirective"])("copy-to-clipboard");return Object(i["openBlock"])(),Object(i["createBlock"])(s,{"content-title":e.translate("CoreAdminHome_ImageTracking"),anchor:"imageTracking"},{default:Object(i["withCtx"])(()=>[Nt,Object(i["createElementVNode"])("div",ft,[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.imageTrackingIntro)},null,8,Tt),Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.imageTrackingIntro3)},null,8,yt),Object(i["createVNode"])(l,{uicontrol:"site",name:"image-tracker-website",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=t=>e.site=t),introduction:e.translate("General_Website")},null,8,["modelValue","introduction"]),Object(i["createVNode"])(l,{uicontrol:"text",name:"image-tracker-action-name","model-value":e.pageName,"onUpdate:modelValue":t[1]||(t[1]=t=>{e.pageName=t,e.updateTrackingCode()}),disabled:e.isLoading,introduction:e.translate("General_Options"),title:e.translate("Actions_ColumnPageName")},null,8,["model-value","disabled","introduction","title"]),Object(i["createVNode"])(l,{uicontrol:"checkbox",name:"image-tracking-goal-check","model-value":e.trackGoal,"onUpdate:modelValue":t[2]||(t[2]=t=>{e.trackGoal=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_TrackAGoal")},null,8,["model-value","disabled","title"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",At,[Object(i["createElementVNode"])("div",Et,[Object(i["createElementVNode"])("div",wt,[Object(i["createVNode"])(l,{uicontrol:"select",name:"image-tracker-goal",options:e.siteGoals,disabled:e.isLoading,"model-value":e.trackIdGoal,"onUpdate:modelValue":t[3]||(t[3]=t=>{e.trackIdGoal=t,e.updateTrackingCode()})},null,8,["options","disabled","model-value"])]),Object(i["createElementVNode"])("div",_t,[Object(i["createVNode"])(l,{uicontrol:"text",name:"image-revenue","model-value":e.revenue,"onUpdate:modelValue":t[4]||(t[4]=t=>{e.revenue=t,e.updateTrackingCode()}),disabled:e.isLoading,"full-width":!0,title:`${e.translate("CoreAdminHome_WithOptionalRevenue")} ${e.currentSiteCurrency}`},null,8,["model-value","disabled","title"])])])],512),[[i["vShow"],e.trackGoal]]),Object(i["createElementVNode"])("div",Ht,[Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("CoreAdminHome_ImageTrackingLink")),1),Object(i["createElementVNode"])("div",Lt,[Object(i["createElementVNode"])("div",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("pre",{textContent:Object(i["toDisplayString"])(e.trackingCode),ref:"trackingCode"},null,8,Dt),[[c,{}]])])])])])]),_:1},8,["content-title"])}let Bt=null;const{$:Ut}=window,Ft=window.location.host,Pt=window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"));var It=Object(i["defineComponent"])({props:{defaultSite:{type:Object,required:!0}},components:{ContentBlock:T["ContentBlock"],Field:y["Field"]},directives:{CopyToClipboard:T["CopyToClipboard"]},data(){return{isLoading:!1,site:this.defaultSite,pageName:"",trackGoal:!1,trackIdGoal:null,revenue:"",trackingCode:"",sites:{},goals:{},trackingCodeAbortController:null,isHighlighting:!1}},created(){this.updateTrackingCode=Object(T["debounce"])(this.updateTrackingCode),this.site&&this.site.id&&this.onSiteChanged(this.site)},watch:{site(e){this.onSiteChanged(e)}},methods:{onSiteChanged(e){let t,a,o;return this.trackIdGoal=null,Bt?t=Promise.resolve(Bt):(this.isLoading=!0,t=T["AjaxHelper"].fetch({method:"SitesManager.getCurrencySymbols",filter_limit:"-1"})),this.sites[e.id]?a=Promise.resolve(this.sites[e.id]):(this.isLoading=!0,a=T["AjaxHelper"].fetch({module:"API",method:"SitesManager.getSiteFromId",idSite:e.id})),this.goals[e.id]?o=Promise.resolve(this.goals[e.id]):(this.isLoading=!0,o=T["AjaxHelper"].fetch({module:"API",method:"Goals.getGoals",filter_limit:"-1",idSite:e.id})),Promise.all([t,a,o]).then(([t,a,o])=>{this.isLoading=!1,Bt=t,this.sites[e.id]=a,this.goals[e.id]=o,this.updateTrackingCode()})},updateTrackingCode(){const e={piwikUrl:`${Ft}${Pt}`,actionName:this.pageName,forceMatomoEndpoint:1};this.trackGoal&&this.trackIdGoal&&(e.idGoal=this.trackIdGoal,e.revenue=this.revenue),this.trackingCodeAbortController&&(this.trackingCodeAbortController.abort(),this.trackingCodeAbortController=null),this.trackingCodeAbortController=new AbortController,T["AjaxHelper"].post({module:"API",format:"json",method:"SitesManager.getImageTrackingCode",idSite:this.site.id},e,{abortController:this.trackingCodeAbortController}).then(e=>{this.trackingCodeAbortController=null,this.trackingCode=e.value;const t=Ut(this.$refs.trackingCode);t&&!this.isHighlighting&&(this.isHighlighting=!0,t.effect("highlight",{complete:()=>{this.isHighlighting=!1}},1500))})}},computed:{currentSiteCurrency(){return Bt?Bt[(this.sites[this.site.id].currency||"").toUpperCase()]:""},siteGoals(){const e=this.goals[this.site.id];return[{key:"",value:Object(T["translate"])("UserCountryMap_None")}].concat(Object.values(e||[]).map(e=>({key:""+e.idgoal,value:e.name})))},imageTrackingIntro(){const e=Object(T["translate"])("CoreAdminHome_ImageTrackingIntro1"),t=Object(T["translate"])("CoreAdminHome_ImageTrackingIntro2","<code>&lt;noscript&gt;&lt;/noscript&gt;</code>");return`${e} ${t}`},imageTrackingIntro3(){const e=Object(T["externalRawLink"])("https://matomo.org/docs/tracking-api/reference/");return Object(T["translate"])("CoreAdminHome_ImageTrackingIntro3",`<a href="${e}" rel="noreferrer noopener" target="_blank">`,"</a>")}}});It.render=xt;var Mt=It;const Gt=Object(i["createElementVNode"])("br",null,null,-1),Jt=Object(i["createElementVNode"])("br",null,null,-1),qt=["value"],$t={class:"action"},Rt={colspan:"7"},Wt=Object(i["createElementVNode"])("span",{class:"icon-ok"},null,-1),Kt={class:"ui-confirm",id:"confirmDeleteAllTrackingFailures"},zt=["value"],Qt=["value"],Yt={class:"ui-confirm",id:"confirmDeleteThisTrackingFailure"},Xt=["value"],Zt=["value"];function ea(e,t,a,o,n,r){const l=Object(i["resolveComponent"])("ActivityIndicator"),s=Object(i["resolveComponent"])("FailureRow"),c=Object(i["resolveComponent"])("ContentBlock"),d=Object(i["resolveDirective"])("content-table");return Object(i["openBlock"])(),Object(i["createBlock"])(c,{class:"matomoTrackingFailures","content-title":e.translate("CoreAdminHome_TrackingFailures")},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_TrackingFailuresIntroduction","2"))+" ",1),Gt,Jt,Object(i["withDirectives"])(Object(i["createElementVNode"])("input",{class:"btn deleteAllFailures",type:"button",onClick:t[0]||(t[0]=t=>e.deleteAll()),value:e.translate("CoreAdminHome_DeleteAllFailures")},null,8,qt),[[i["vShow"],!e.isLoading&&e.failures.length>0]])]),Object(i["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("table",null,[Object(i["createElementVNode"])("thead",null,[Object(i["createElementVNode"])("tr",null,[Object(i["createElementVNode"])("th",{onClick:t[1]||(t[1]=t=>e.changeSortOrder("idsite"))},Object(i["toDisplayString"])(e.translate("General_Measurable")),1),Object(i["createElementVNode"])("th",{onClick:t[2]||(t[2]=t=>e.changeSortOrder("problem"))},Object(i["toDisplayString"])(e.translate("CoreAdminHome_Problem")),1),Object(i["createElementVNode"])("th",{onClick:t[3]||(t[3]=t=>e.changeSortOrder("solution"))},Object(i["toDisplayString"])(e.translate("CoreAdminHome_Solution")),1),Object(i["createElementVNode"])("th",{onClick:t[4]||(t[4]=t=>e.changeSortOrder("date_first_occurred"))},Object(i["toDisplayString"])(e.translate("General_Date")),1),Object(i["createElementVNode"])("th",{onClick:t[5]||(t[5]=t=>e.changeSortOrder("url"))},Object(i["toDisplayString"])(e.translate("Actions_ColumnPageURL")),1),Object(i["createElementVNode"])("th",{onClick:t[6]||(t[6]=t=>e.changeSortOrder("request_url"))},Object(i["toDisplayString"])(e.translate("CoreAdminHome_TrackingURL")),1),Object(i["createElementVNode"])("th",$t,Object(i["toDisplayString"])(e.translate("General_Action")),1)])]),Object(i["createElementVNode"])("tbody",null,[Object(i["createElementVNode"])("tr",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("td",Rt,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("CoreAdminHome_NoKnownFailures"))+" ",1),Wt],512),[[i["vShow"],!e.isLoading&&0===e.failures.length]])]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.sortedFailures,(a,o)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:o},[Object(i["createVNode"])(s,{failure:a,onDelete:t[7]||(t[7]=t=>e.deleteFailure(t.idSite,t.idFailure))},null,8,["failure"])]))),128))])])),[[d]]),Object(i["createElementVNode"])("div",Kt,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("CoreAdminHome_ConfirmDeleteAllTrackingFailures")),1),Object(i["createElementVNode"])("input",{type:"button",role:"yes",value:e.translate("General_Yes")},null,8,zt),Object(i["createElementVNode"])("input",{type:"button",role:"no",value:e.translate("General_No")},null,8,Qt)]),Object(i["createElementVNode"])("div",Yt,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("CoreAdminHome_ConfirmDeleteThisTrackingFailure")),1),Object(i["createElementVNode"])("input",{type:"button",role:"yes",value:e.translate("General_Yes")},null,8,Xt),Object(i["createElementVNode"])("input",{type:"button",role:"no",value:e.translate("General_No")},null,8,Zt)])]),_:1},8,["content-title"])}const ta=["href"],aa={class:"datetime"},oa=["title"],na=["title"];function ia(e,t,a,o,n,r){return Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],null,[Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.failure.site_name)+" ("+Object(i["toDisplayString"])(e.translate("General_Id"))+" "+Object(i["toDisplayString"])(e.failure.idsite)+")",1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.failure.problem),1),Object(i["createElementVNode"])("td",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.failure.solution)+" ",1),Object(i["withDirectives"])(Object(i["createElementVNode"])("a",{rel:"noopener noreferrer",href:e.failure.solution_url},Object(i["toDisplayString"])(e.translate("CoreAdminHome_LearnMore")),9,ta),[[i["vShow"],e.failure.solution_url]])]),Object(i["createElementVNode"])("td",aa,Object(i["toDisplayString"])(e.failure.pretty_date_first_occurred),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(e.failure.url),1),Object(i["createElementVNode"])("td",null,[Object(i["withDirectives"])(Object(i["createElementVNode"])("span",{onClick:t[0]||(t[0]=t=>e.showFullRequestUrl=!0),title:e.translate("CoreHome_ClickToSeeFullInformation")},Object(i["toDisplayString"])(e.limtedRequestUrl)+"...",9,oa),[[i["vShow"],!e.showFullRequestUrl]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.failure.request_url),513),[[i["vShow"],e.failure.showFullRequestUrl]])]),Object(i["createElementVNode"])("td",null,[Object(i["createElementVNode"])("span",{class:"table-action icon-delete",onClick:t[1]||(t[1]=t=>e.deleteFailure(e.failure.idsite,e.failure.idfailure)),title:e.translate("General_Delete")},null,8,na)])],64)}var ra=Object(i["defineComponent"])({props:{failure:{type:Object,required:!0}},emits:["delete"],data(){return{showFullRequestUrl:!1}},computed:{limtedRequestUrl(){return this.failure.request_url.substring(0,100)}},methods:{deleteFailure(e,t){this.$emit("delete",{idSite:e,idFailure:t})}}});ra.render=ia;var la=ra,sa=Object(i["defineComponent"])({components:{ContentBlock:T["ContentBlock"],ActivityIndicator:T["ActivityIndicator"],FailureRow:la},directives:{ContentTable:T["ContentTable"]},data(){return{failures:[],sortColumn:"idsite",sortReverse:!1,isLoading:!1}},created(){this.fetchAll()},methods:{changeSortOrder(e){this.sortColumn===e?this.sortReverse=!this.sortReverse:this.sortColumn=e},fetchAll(){this.failures=[],this.isLoading=!0,T["AjaxHelper"].fetch({method:"CoreAdminHome.getTrackingFailures",filter_limit:"-1"}).then(e=>{this.failures=e,this.isLoading=!1}).finally(()=>{this.isLoading=!1})},deleteAll(){T["Matomo"].helper.modalConfirm("#confirmDeleteAllTrackingFailures",{yes:()=>{this.failures=[],T["AjaxHelper"].fetch({method:"CoreAdminHome.deleteAllTrackingFailures"}).then(()=>{this.fetchAll()})}})},deleteFailure(e,t){T["Matomo"].helper.modalConfirm("#confirmDeleteThisTrackingFailure",{yes:()=>{this.failures=[],T["AjaxHelper"].fetch({method:"CoreAdminHome.deleteTrackingFailure",idSite:e,idFailure:t}).then(()=>{this.fetchAll()})}})}},computed:{sortedFailures(){const{sortColumn:e}=this,t=[...this.failures];return this.sortReverse?t.sort((t,a)=>t[e]>a[e]?-1:t[e]<a[e]?1:0):t.sort((t,a)=>t[e]<a[e]?-1:t[e]>a[e]?1:0),t}}});sa.render=ea;var ca=sa;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["Diagnostics"]=t(require("CoreHome"),require("vue")):e["Diagnostics"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var l=t[o]={i:o,l:!1,exports:{}};return e[o].call(l.exports,l,l.exports,n),l.l=!0,l.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(o,l,function(t){return e[t]}.bind(null,l));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/Diagnostics/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"ConfigFile",(function(){return k})),"undefined"!==typeof window){var o=window.document.currentScript,l=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);l&&(n.p=l[1])}var c=n("8bbf");const r=["innerHTML"],a=["innerHTML"],i=["href"],u=Object(c["createElementVNode"])("br",null,null,-1),s=Object(c["createElementVNode"])("p",null,null,-1),b={class:"diagnostics configfile"},d={colspan:"3"},f=["name"],j={class:"name"},p=["innerHTML"],O={class:"description"},m=["innerHTML"],g={key:0},h={key:0},y=["innerHTML"];function V(e,t,n,o,l,V){const v=Object(c["resolveComponent"])("Passthrough"),C=Object(c["resolveComponent"])("ContentBlock"),k=Object(c["resolveDirective"])("content-table");return Object(c["openBlock"])(),Object(c["createBlock"])(C,{"content-title":e.translate("Diagnostics_ConfigFileTitle"),feature:"true"},{default:Object(c["withCtx"])(()=>[Object(c["createElementVNode"])("p",null,[Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.configFileIntro),style:{"margin-right":"3.5px"}},null,8,r),Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("Diagnostics_HideUnchanged","<a>","</a>")),onClick:t[0]||(t[0]=t=>e.onHideUnchanged(t))},null,8,a)]),Object(c["createElementVNode"])("h3",null,Object(c["toDisplayString"])(e.translate("Diagnostics_Sections")),1),(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.allConfigValues,(e,t)=>(Object(c["openBlock"])(),Object(c["createBlock"])(v,{key:t},{default:Object(c["withCtx"])(()=>[Object(c["createElementVNode"])("a",{href:"#"+t},Object(c["toDisplayString"])(t),9,i),u]),_:2},1024))),128)),s,Object(c["withDirectives"])((Object(c["openBlock"])(),Object(c["createElementBlock"])("table",b,[Object(c["createElementVNode"])("tbody",null,[(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.allConfigValues,(t,n)=>(Object(c["openBlock"])(),Object(c["createBlock"])(v,{key:n},{default:Object(c["withCtx"])(()=>[Object(c["createElementVNode"])("tr",null,[Object(c["createElementVNode"])("td",d,[Object(c["createElementVNode"])("a",{name:n},null,8,f),Object(c["createElementVNode"])("h3",null,Object(c["toDisplayString"])(n),1)])]),(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(t,(t,n)=>Object(c["withDirectives"])((Object(c["openBlock"])(),Object(c["createElementBlock"])("tr",{key:n,class:Object(c["normalizeClass"])({"custom-value":t.isCustomValue})},[Object(c["createElementVNode"])("td",j,Object(c["toDisplayString"])(`${n}${null!==t.value&&(t.value instanceof Array||"object"===typeof t.value)?"[]":""}`),1),Object(c["createElementVNode"])("td",{class:"value",innerHTML:e.$sanitize(e.humanReadableValue(t.value))},null,8,p),Object(c["createElementVNode"])("td",O,[Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(t.description)},null,8,m),!t.isCustomValue&&null!==t.value||null===t.defaultValue?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",g,[t.description?(Object(c["openBlock"])(),Object(c["createElementBlock"])("br",h)):Object(c["createCommentVNode"])("",!0),Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("General_Default"))+": ",1),Object(c["createElementVNode"])("span",{class:"defaultValue",innerHTML:e.$sanitize(e.humanReadableValue(t.defaultValue))},null,8,y)]))])],2)),[[c["vShow"],t.isCustomValue||!e.hideGlobalConfigValues]])),128))]),_:2},1024))),128))])])),[[k]])]),_:1},8,["content-title"])}var v=n("19dc"),C=Object(c["defineComponent"])({props:{allConfigValues:{type:Object,required:!0},configFilePath:{type:String,required:!0}},components:{ContentBlock:v["ContentBlock"],Passthrough:v["Passthrough"]},directives:{ContentTable:v["ContentTable"]},data(){return{hideGlobalConfigValues:!1}},methods:{humanReadableValue(e){return!1===e?"false":!0===e?"true":null===e?"":""===e?"''":"object"===typeof e&&0===Object.keys(e).length?"[]":"object"===typeof e&&Object.keys(e).length>0?`<div class="pre">${JSON.stringify(e,null,4)}</div>`:v["Matomo"].helper.htmlEntities(""+e)},onHideUnchanged(e){"A"===e.target.tagName&&(this.hideGlobalConfigValues=!this.hideGlobalConfigValues)}},computed:{configFileIntro(){return Object(v["translate"])("Diagnostics_ConfigFileIntroduction",`<code>"${v["Matomo"].helper.htmlEntities(this.configFilePath)}"</code>`)}}});C.render=V;var k=C;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["CoreVisualizations"]=t(require("CoreHome"),require("vue")):e["CoreVisualizations"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,o),l.l=!0,l.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)o.d(n,l,function(t){return e[t]}.bind(null,l));return n},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/CoreVisualizations/vue/dist/",o(o.s="fae3")}({"19dc":function(t,o){t.exports=e},"8bbf":function(e,o){e.exports=t},fae3:function(e,t,o){"use strict";if(o.r(t),o.d(t,"SeriesPicker",(function(){return h})),o.d(t,"SingleMetricView",(function(){return M})),"undefined"!==typeof window){var n=window.document.currentScript,l=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);l&&(o.p=l[1])}var r=o("8bbf");const c={key:0,class:"jqplot-seriespicker-popover"},a={class:"headline"},i=["onClick"],s=["type","checked"],u={key:0,class:"headline recordsToPlot"},m=["onClick"],d=["type","checked"];function p(e,t,o,n,l,p){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])(["jqplot-seriespicker",{open:e.isPopupVisible}]),onMouseenter:t[1]||(t[1]=t=>e.isPopupVisible=!0),onMouseleave:t[2]||(t[2]=t=>e.onLeavePopup())},[Object(r["createElementVNode"])("a",{href:"#",onClick:t[0]||(t[0]=Object(r["withModifiers"])(()=>{},["prevent","stop"]))}," + "),e.isPopupVisible?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",c,[Object(r["createElementVNode"])("p",a,Object(r["toDisplayString"])(e.translate(e.multiselect?"General_MetricsToPlot":"General_MetricToPlot")),1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.selectableColumns,t=>(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{class:"pickColumn",onClick:o=>e.optionSelected(t.column,e.columnStates),key:t.column},[Object(r["createElementVNode"])("label",null,[Object(r["createElementVNode"])("input",{class:"select",type:e.multiselect?"checkbox":"radio",checked:!!e.columnStates[t.column]},null,8,s),Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.translation),1)])],8,i))),128)),e.selectableRows.length?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",u,Object(r["toDisplayString"])(e.translate("General_RecordsToPlot")),1)):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.selectableRows,t=>(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{class:"pickRow",onClick:o=>e.optionSelected(t.matcher,e.rowStates),key:t.matcher},[Object(r["createElementVNode"])("label",null,[Object(r["createElementVNode"])("input",{class:"select",type:e.multiselect?"checkbox":"radio",checked:!!e.rowStates[t.matcher]},null,8,d),Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.label),1)])],8,m))),128))])):Object(r["createCommentVNode"])("",!0)],34)}var b=o("19dc");function f(e,t){const o={};return e.forEach(e=>{const t=e.column||e.matcher;o[t]=!1}),t.forEach(e=>{o[e]=!0}),o}function v(e,t){return e.length===t.length&&0===e.filter(e=>-1===t.indexOf(e)).length}function j(e){Object.keys(e).forEach(t=>{e[t]=!1})}function O(e){return Object.keys(e).filter(t=>!!e[t])}var g=Object(r["defineComponent"])({props:{multiselect:Boolean,selectableColumns:{type:Array,default:()=>[]},selectableRows:{type:Array,default:()=>[]},selectedColumns:{type:Array,default:()=>[]},selectedRows:{type:Array,default:()=>[]}},data(){return{isPopupVisible:!1,columnStates:f(this.selectableColumns,this.selectedColumns),rowStates:f(this.selectableRows,this.selectedRows)}},emits:["select"],created(){this.optionSelected=Object(b["debounce"])(this.optionSelected,0)},methods:{optionSelected(e,t){this.multiselect||(j(this.columnStates),j(this.rowStates)),t[e]=!t[e],this.triggerOnSelectAndClose()},onLeavePopup(){this.isPopupVisible=!1,this.optionsChanged()&&this.triggerOnSelectAndClose()},triggerOnSelectAndClose(){this.isPopupVisible=!1,this.$emit("select",{columns:O(this.columnStates),rows:O(this.rowStates)})},optionsChanged(){return!v(O(this.columnStates),this.selectedColumns)||!v(O(this.rowStates),this.selectedRows)}}});g.render=p;var h=g;const y={class:"metric-sparkline"},k={class:"metric-value"},S=["title"],w=["title"];function V(e,t,o,n,l,c){const a=Object(r["resolveComponent"])("Sparkline");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])(["singleMetricView",{loading:e.isLoading}]),ref:"root"},[Object(r["createElementVNode"])("div",y,[Object(r["createVNode"])(a,{params:e.sparklineParams},null,8,["params"])]),Object(r["createElementVNode"])("div",k,[Object(r["createElementVNode"])("span",{title:e.metricDocumentation},[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.metricValue),1),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])((e.metricTranslation||"").toLowerCase()),1)],8,S),null!==e.pastValue?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,class:"metricEvolution",title:e.translate("General_EvolutionSummaryGeneric",e.metricValue,e.currentPeriod,e.pastValue,e.pastPeriod,e.metricChangePercent)},[Object(r["createElementVNode"])("span",{class:Object(r["normalizeClass"])({"positive-evolution":e.metricValueUnformatted>e.pastValueUnformatted,"negative-evolution":e.metricValueUnformatted<e.pastValueUnformatted})},Object(r["toDisplayString"])(e.metricChangePercent),3)],8,w)):Object(r["createCommentVNode"])("",!0)])],2)}function C(){const{startDate:e}=b["Range"].getLastNRange(b["Matomo"].period,2,b["Matomo"].currentDateString),t=b["Periods"].get(b["Matomo"].period).parse(e).getDateRange();return`${Object(b["format"])(t[0])},${Object(b["format"])(t[1])}`}const{$:P}=window;var E=Object(r["defineComponent"])({props:{metric:{type:String,required:!0},idGoal:[String,Number],metricTranslations:{type:Object,required:!0},metricDocumentations:Object,goals:{type:Object,required:!0},goalMetrics:Array},components:{Sparkline:b["Sparkline"]},setup(e){const t=Object(r["ref"])(null),o=Object(r["ref"])(!1),n=Object(r["ref"])(null),l=Object(r["ref"])(e.metric),c=Object(r["ref"])(e.idGoal),a=Object(r["computed"])(()=>[c.value?`goal${c.value}_${l.value}`:l.value]),i=Object(r["computed"])(()=>{var e;return null!==(e=n.value)&&void 0!==e&&e[1]?n.value[1][l.value]:null}),s=Object(r["computed"])(()=>{var e;return null!==(e=n.value)&&void 0!==e&&e[2]?n.value[2][l.value]||0:null}),u=Object(r["computed"])(()=>{if(!i.value)return null;const e="string"===typeof i.value?parseInt(i.value,10):i.value,t="string"===typeof s.value?parseInt(s.value,10):s.value,o=b["Matomo"].helper.calculateEvolution(e,t);return(100*o).toFixed(2)+" %"}),m=Object(r["computed"])(()=>{var e;if(null===(e=n.value)||void 0===e||!e[3])return null;const t=n.value[3];return t[l.value]||0}),d=Object(r["computed"])(()=>{var e;if(null===(e=n.value)||void 0===e||!e[0])return null;const t=n.value[0];return t[l.value]||0}),p=Object(r["computed"])(()=>{var t;return null!==(t=e.metricTranslations)&&void 0!==t&&t[l.value]?e.metricTranslations[l.value]:""}),f=Object(r["computed"])(()=>{var t;return null!==(t=e.metricDocumentations)&&void 0!==t&&t[l.value]?e.metricDocumentations[l.value]:""}),v=Object(r["computed"])(()=>b["Matomo"].startDateString===b["Matomo"].endDateString?b["Matomo"].endDateString:`${b["Matomo"].startDateString}, ${b["Matomo"].endDateString}`);function j(){return c.value||0===c.value}const O=Object(r["computed"])(()=>{const e={module:"API",action:"get",columns:l.value};return j()&&(e.idGoal=c.value,e.module="Goals"),e}),g=Object(r["computed"])(()=>{if("range"!==b["Matomo"].period)return C()}),y=Object(r["computed"])(()=>{const t=[];return Object.keys(e.metricTranslations).forEach(o=>{t.push({column:o,translation:e.metricTranslations[o]})}),Object.values(e.goals||{}).forEach(o=>{e.goalMetrics.forEach(n=>{t.push({column:`goal${o.idgoal}_${n}`,translation:`${o.name} - ${e.metricTranslations[n]}`})})}),t});function k(){let o=p.value;if(j()){var n;const t=(null===(n=e.goals[c.value])||void 0===n?void 0:n.name)||Object(b["translate"])("General_Unknown");o=`${t} - ${o}`}P(t.value).closest("div.widget").find(".widgetTop > .widgetName > span").text(o)}function S(){const e=b["Range"].getLastNRange(b["Matomo"].period,2,b["Matomo"].currentDateString);return Object(b["format"])(e.startDate)}function w(){o.value=!0;const e=[];let t="API",l="get";const r={};j()&&(r.idGoal=c.value,r.filter_add_columns_when_show_all_columns=0,t="Goals",l="get");const a=`${t}.${l}`;return e.push(b["AjaxHelper"].fetch(Object.assign({method:a,format_metrics:"all"},r))),"range"!==b["Matomo"].period&&(e.push(b["AjaxHelper"].fetch(Object.assign({method:a,format_metrics:"0"},r))),e.push(b["AjaxHelper"].fetch(Object.assign({method:a,date:S(),format_metrics:"0"},r))),e.push(b["AjaxHelper"].fetch(Object.assign({method:a,date:S(),format_metrics:"all"},r)))),Promise.all(e).then(e=>{n.value=e,o.value=!1})}function V(e){l.value=e,w().then(k),P(t.value).closest("[widgetId]").trigger("setParameters",{column:l.value,idGoal:c.value})}function E(e){let t=void 0,o=e;const n=e.match(/^goal([0-9]+)_(.*)/);n&&(t=+n[1],[,,o]=n),l.value===o&&t===c.value||(l.value=o,c.value=t,V(o))}function M(){const e=P(t.value),o=e.closest("div.widget").find(".widgetTop > .widgetName"),n=P('<div class="single-metric-view-picker"><div></div></div>'),l=Object(b["createVueApp"])({render:()=>Object(r["createVNode"])(h,{multiselect:!1,selectableColumns:y.value,selectableRows:[],selectedColumns:a.value,selectedRows:[],onSelect:({columns:e})=>{E(e[0])}})});return o.append(n),l.mount(n.children()[0]),l}let N;return Object(r["onMounted"])(()=>{N=M()}),Object(r["onBeforeUnmount"])(()=>{P(t.value).closest(".widgetContent").off("widget:destroy").off("widget:reload"),P(t.value).closest("div.widget").find(".single-metric-view-picker").remove(),N.unmount()}),Object(r["watch"])(()=>e.metric,()=>{V(e.metric)}),V(e.metric),{root:t,metricValue:d,isLoading:o,selectedColumns:a,responses:n,metricValueUnformatted:i,pastValueUnformatted:s,metricChangePercent:u,pastValue:m,metricTranslation:p,metricDocumentation:f,sparklineParams:O,pastPeriod:g,selectableColumns:y,currentPeriod:v}}});E.render=V;var M=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(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["API"]=t(require("CoreHome"),require("vue")):e["API"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function c(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,c),r.l=!0,r.exports}return c.m=e,c.c=t,c.d=function(e,t,o){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},c.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(c.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)c.d(o,r,function(t){return e[t]}.bind(null,r));return o},c.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="plugins/API/vue/dist/",c(c.s="fae3")}({"19dc":function(t,c){t.exports=e},"8bbf":function(e,c){e.exports=t},fae3:function(e,t,c){"use strict";if(c.r(t),c.d(t,"Glossary",(function(){return C})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(c.p=r[1])}var n=c("8bbf");const l={ref:"root",class:"glossaryPage"},s={class:"row"},i={class:"col s12"},a={class:"row glossary"},b={class:"col s12"},d={class:"tabs"},u=["href"],p=["id"],j={class:"card"},m={class:"card-content"},O={style:{background:"#fff",width:"100%"},class:"pushpin"},f={class:"card-title"},y={class:"pagination"},k=["href"],g=["id"],v={style:{color:"#4183C4","font-weight":"bold"}},E={key:0,style:{color:"#999","text-transform":"uppercase","font-weight":"normal","margin-top":"-16px"}},B=["innerHTML"],h={key:0},V={key:1,style:{color:"#bbb"}};function N(e,t,c,o,r,N){const S=Object(n["resolveDirective"])("content-intro");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",l,[Object(n["createElementVNode"])("div",s,[Object(n["createElementVNode"])("div",i,[Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("div",null,[Object(n["createElementVNode"])("h2",null,Object(n["toDisplayString"])(e.translate("API_Glossary")),1),Object(n["createElementVNode"])("p",null,Object(n["toDisplayString"])(e.translate("API_LearnAboutCommonlyUsedTerms2")),1)])),[[S]])])]),Object(n["createElementVNode"])("div",a,[Object(n["createElementVNode"])("div",b,[Object(n["createElementVNode"])("ul",d,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.glossaryItems,(e,t,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("li",{key:t,class:"tab col s3"},[Object(n["createElementVNode"])("a",{class:Object(n["normalizeClass"])(0===c?"active":""),href:"#"+t},Object(n["toDisplayString"])(e.title),11,u)]))),128))])]),(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.glossaryItems,(t,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:c,id:c,class:"col s12"},[Object(n["createElementVNode"])("div",j,[Object(n["createElementVNode"])("div",m,[Object(n["createElementVNode"])("div",O,[Object(n["createElementVNode"])("h2",f,Object(n["toDisplayString"])(t.title),1),Object(n["createElementVNode"])("ul",y,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(t.letters,(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("li",{key:t,class:"waves-effect",style:{"margin-right":"3.5px"}},[Object(n["createElementVNode"])("a",{href:`#${c}${e}`},Object(n["toDisplayString"])(e),9,k)]))),128))])]),(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.entriesByLetter(t.entries),([t,o])=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:t,class:"scrollspy",id:`${c}${t}`},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(o,(t,o)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:o},[Object(n["createElementVNode"])("h3",v,Object(n["toDisplayString"])(t.name),1),t.subtitle?(Object(n["openBlock"])(),Object(n["createElementBlock"])("p",E,Object(n["toDisplayString"])(e.translate(t.subtitle)),1)):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("p",null,[Object(n["createElementVNode"])("span",{innerHTML:e.$sanitize(t.documentation)},null,8,B),t.id?(Object(n["openBlock"])(),Object(n["createElementBlock"])("br",h)):Object(n["createCommentVNode"])("",!0),t.id?(Object(n["openBlock"])(),Object(n["createElementBlock"])("span",V,Object(n["toDisplayString"])(t.id)+Object(n["toDisplayString"])("metrics"===c||t.is_metric?" (API)":""),1)):Object(n["createCommentVNode"])("",!0)])]))),128))],8,g))),128))])])],8,p))),128))])],512)}var S=c("19dc");const{$:w}=window;var x=Object(n["defineComponent"])({props:{glossaryItems:{type:Object,required:!0}},directives:{ContentIntro:S["ContentIntro"]},mounted(){const e=this.$refs.root;setTimeout(()=>{w(".scrollspy",e).scrollSpy(),w(".pushpin",e).pushpin({top:w(".pushpin",e).offset().top}),w(".tabs",e).tabs()})},methods:{entriesByLetter(e){const t={};e.forEach(e=>{t[e.letter]=t[e.letter]||[],t[e.letter].push(e)});const c=Object.entries(t);return c.sort(([e],[t])=>e<t?-1:e>t?1:0),c}}});x.render=N;var C=x;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["Widgetize"]=t(require("CoreHome"),require("vue")):e["Widgetize"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/Widgetize/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"WidgetPreviewIframe",(function(){return O})),n.d(t,"WidgetPreview",(function(){return W})),n.d(t,"ExportWidget",(function(){return H})),"undefined"!==typeof window){var r=window.document.currentScript,i=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var o=n("8bbf");const a={id:"embedThisWidgetIframe"},l=["innerHTML"],d={id:"embedThisWidgetIframeInput"},c={readonly:"true",id:"iframeEmbed"},s=["innerHTML"],u={id:"embedThisWidgetDirectLink"},b={readonly:"true",id:"directLinkEmbed"},m=["href"];function p(e,t,n,r,i,p){const f=Object(o["resolveDirective"])("select-on-focus");return Object(o["openBlock"])(),Object(o["createElementBlock"])(o["Fragment"],null,[Object(o["createElementVNode"])("div",a,[Object(o["createElementVNode"])("label",{for:"embedThisWidgetIframeInput",innerHTML:e.$sanitize(e.translate("Widgetize_EmbedIframe"))},null,8,l),Object(o["createElementVNode"])("div",d,[Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",c,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.widgetIframeHtml),1)])),[[f,{}]])])]),Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("label",{for:"embedThisWidgetDirectLink",innerHTML:e.$sanitize(e.translate("Widgetize_DirectLink"))},null,8,s),Object(o["createElementVNode"])("div",u,[Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("pre",b,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.urlIframe),1)])),[[f,{}]]),Object(o["createTextVNode"])(" - "),Object(o["createElementVNode"])("a",{href:e.urlIframe,rel:"noreferrer noopener",target:"_blank"},Object(o["toDisplayString"])(e.translate("Widgetize_OpenInNewWindow")),9,m)])])],64)}var f=n("19dc"),g=Object(o["defineComponent"])({props:{urlIframe:{type:String,required:!0},widgetIframeHtml:{type:String,required:!0}},inheritAttrs:!1,directives:{SelectOnFocus:f["SelectOnFocus"]}});g.render=p;var O=g;const j={ref:"root"};function h(e,t,n,r,i,a){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",j,null,512)}const{$:v,widgetsHelper:w}=window;var y=Object(o["defineComponent"])({mounted(){const e=this.$refs.root;v(e).widgetPreview({onPreviewLoaded:(e,t)=>{this.callbackAddExportButtonsUnderWidget(e,t)}})},methods:{callbackAddExportButtonsUnderWidget(e,t){w.getWidgetObjectFromUniqueId(e,e=>{const n=e.parameters,r=v('<div id="exportButtons">'),i=this.getEmbedUrl(n,"iframe"),o=`<div id="widgetIframe"><iframe width="100%" height="350" src="${i}" scrolling="yes" frameborder="0" marginheight="0" marginwidth="0"></iframe></div>`,a=v("<div>").attr("vue-entry","Widgetize.WidgetPreviewIframe").attr("widget-iframe-html",JSON.stringify(o)).attr("url-iframe",JSON.stringify(i));v(r).append(a),v(t).parent().append(r),f["Matomo"].helper.compileVueEntryComponents(r)})},getEmbedUrl(e,t){const n=Object.assign(Object.assign({},e),{},{moduleToWidgetize:e.module,actionToWidgetize:e.action,module:"Widgetize",action:t,idSite:f["Matomo"].idSite,period:f["Matomo"].period,date:f["MatomoUrl"].urlParsed.value.date,disableLink:1,widget:1}),{protocol:r,hostname:i}=window.location,o=""===window.location.port?"":":"+window.location.port,a=window.location.pathname,l=f["MatomoUrl"].stringify(n);return`${r}//${i}${o}${a}?${l}`}}});y.render=h;var W=y;const E={class:"widgetize"},N=["innerHTML"],V=["innerHTML"],k=["innerHTML"],S=Object(o["createElementVNode"])("br",null,null,-1),x=["textContent"],I=Object(o["createElementVNode"])("br",null,null,-1),T=["innerHTML"],z=Object(o["createElementVNode"])("br",null,null,-1),M=["textContent"],D=Object(o["createElementVNode"])("br",{class:"clearfix"},null,-1);function C(e,t,n,r,i,a){const l=Object(o["resolveComponent"])("EnrichedHeadline"),d=Object(o["resolveComponent"])("ContentBlock"),c=Object(o["resolveComponent"])("WidgetPreview"),s=Object(o["resolveDirective"])("content-intro"),u=Object(o["resolveDirective"])("select-on-focus");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",E,[Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[Object(o["createElementVNode"])("h2",null,[Object(o["createVNode"])(l,null,{default:Object(o["withCtx"])(()=>[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.title),1)]),_:1})]),Object(o["createElementVNode"])("p",{innerHTML:e.$sanitize(e.intro)},null,8,N)])),[[s]]),Object(o["createVNode"])(d,{"content-title":"Authentication"},{default:Object(o["withCtx"])(()=>[Object(o["createElementVNode"])("p",{innerHTML:e.$sanitize(e.viewableAnonymously)},null,8,V)]),_:1}),Object(o["createVNode"])(d,{"content-title":"Widgetize dashboards"},{default:Object(o["withCtx"])(()=>[Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("p",null,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.displayInIframe)},null,8,k),S]),Object(o["withDirectives"])(Object(o["createElementVNode"])("pre",{textContent:Object(o["toDisplayString"])(e.dashboardCode)},null,8,x),[[u,{}]]),Object(o["createElementVNode"])("p",null,[I,Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.displayInIframeAllSites)},null,8,T),z]),Object(o["withDirectives"])(Object(o["createElementVNode"])("pre",{textContent:Object(o["toDisplayString"])(e.allWebsitesDashboardCode)},null,8,M),[[u,{}]])])]),_:1}),Object(o["createVNode"])(d,{"content-title":e.translate("Widgetize_Reports")},{default:Object(o["withCtx"])(()=>[Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("Widgetize_SelectAReport")),1),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(c)]),D])]),_:1},8,["content-title"])])}function $(e){const t=e.replace(/"/g,"&quot;");return`<iframe src="${t}" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%"></iframe>`}var _=Object(o["defineComponent"])({props:{title:{type:String,required:!0}},components:{EnrichedHeadline:f["EnrichedHeadline"],ContentBlock:f["ContentBlock"],WidgetPreview:W},directives:{ContentIntro:f["ContentIntro"],SelectOnFocus:f["SelectOnFocus"]},data(){const e=""===window.location.port?"":":"+window.location.port,t=window.location.pathname,n=`${window.location.protocol}//${window.location.hostname}${e}${t}`;return{dashboardUrl:`${n}?${f["MatomoUrl"].stringify({module:"Widgetize",action:"iframe",moduleToWidgetize:"Dashboard",actionToWidgetize:"index",idSite:f["Matomo"].idSite,period:"week",date:"yesterday"})}`,allWebsitesDashboardUrl:`${n}?${f["MatomoUrl"].stringify({module:"Widgetize",action:"iframe",moduleToWidgetize:"MultiSites",actionToWidgetize:"standalone",idSite:f["Matomo"].idSite,period:"week",date:"yesterday"})}`}},computed:{dashboardCode(){return $(this.dashboardUrl)},allWebsitesDashboardCode(){return $(this.allWebsitesDashboardUrl)},intro(){return Object(f["translate"])("Widgetize_Intro",Object(f["externalLink"])("https://matomo.org/docs/embed-piwik-report/"),"</a>")},viewableAnonymously(){return Object(f["translate"])("Widgetize_ViewableAnonymously",'<a\n          href="index.php?module=UsersManager"\n          rel="noreferrer noopener"\n          target="_blank"\n        >',"</a>",`<a\n          rel="noreferrer noopener"\n          target="_blank"\n          href="${this.linkTo({module:"UsersManager",action:"userSecurity"})}"\n        >`,"</a>")},displayInIframe(){return Object(f["translate"])("Widgetize_DisplayDashboardInIframe",`<a\n          rel="noreferrer noopener"\n          target="_blank"\n          href="${this.dashboardUrl}"\n        >`,"</a>")},displayInIframeAllSites(){return Object(f["translate"])("Widgetize_DisplayDashboardInIframeAllSites",`<a\n          rel="noreferrer noopener"\n          target="_blank"\n          id="linkAllWebsitesDashboardUrl"\n          href="${this.allWebsitesDashboardUrl}"\n        >`,"</a>")}},methods:{linkTo(e){return"?"+f["MatomoUrl"].stringify(Object.assign(Object.assign({},f["MatomoUrl"].urlParsed.value),e))}}});_.render=C;var H=_;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Transitions"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Transitions"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/Transitions/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"TransitionExporter",(function(){return N})),n.d(t,"TransitionSwitcher",(function(){return H})),n.d(t,"TransitionsPage",(function(){return q})),n.d(t,"TransitionExporterLink",(function(){return Q})),"undefined"!==typeof window){var o=window.document.currentScript,i=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var a=n("19dc"),r=n("8bbf");const s={class:"transition-export-popover row"},l={class:"col l6"},c={class:"input-field"},d={class:"matomo-field"},p={class:"col l12"},u=["href"];function m(e,t,n,o,i,a){const m=Object(r["resolveComponent"])("Field");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",s,[Object(r["createElementVNode"])("div",l,[Object(r["createElementVNode"])("div",c,[Object(r["createElementVNode"])("div",d,[Object(r["createVNode"])(m,{uicontrol:"radio",name:"exportFormat",title:e.translate("CoreHome_ExportFormat"),"model-value":e.exportFormat,"onUpdate:modelValue":t[0]||(t[0]=t=>e.exportFormat=t),"full-width":!0,options:e.exportFormatOptions},null,8,["title","model-value","options"])])])]),Object(r["createElementVNode"])("div",p,[Object(r["createElementVNode"])("a",{class:"btn",href:e.exportLink,target:"_new",title:"translate('CoreHome_ExportTooltip')"},Object(r["toDisplayString"])(e.translate("General_Export")),9,u)])])}var b=n("a5a2");
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const O=Object(r["ref"])(""),h=Object(r["ref"])(""),v=e=>{O.value=e.actionType,h.value=e.actionName};a["Matomo"].on("Transitions.dataChanged",v);var f=Object(r["defineComponent"])({props:{exportFormatOptions:{type:Object,required:!0}},components:{Field:b["Field"]},data(){return{exportFormat:"JSON"}},computed:{exportLink(){const e={module:"API",method:"Transitions.getTransitionsForAction"};e.actionType=O.value,e.actionName=h.value,e.idSite=a["Matomo"].idSite,e.period=a["Matomo"].period,e.date=a["Matomo"].currentDateString,e.format=this.exportFormat,e.token_auth=a["Matomo"].token_auth,e.force_api_session=1;const t=window.location.href,n=t.split("/");n.pop();const o=n.join("/");return`${o}/index.php?${a["MatomoUrl"].stringify(e)}`}}});f.render=m;var j=f;
/*!
 * 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_Popover:g}=window;var N={mounted(e){e.addEventListener("click",e=>{e.preventDefault();const t={exportFormat:"JSON",exportFormatOptions:[{key:"JSON",value:"JSON"},{key:"XML",value:"XML"}]},n=Object(a["createVueApp"])({template:'<popover v-bind="bind"/>',data(){return{bind:t}}});n.component("popover",j);const o=document.createElement("div");n.mount(o),g.showLoading(""),g.setTitle(`${a["Matomo"].helper.htmlEntities(h.value)} ${Object(a["translate"])("Transitions_Transitions")}`),g.setContent(o),g.onClose(()=>{n.unmount()})})}};const T={class:"row"},y={class:"col s12 m3"},_={name:"actionType"},E={class:"col s12 m9"},w={name:"actionName"},x={class:"loadingPiwik",style:{display:"none"},id:"transitions_inline_loading"},V={class:"popoverContainer"},k={id:"Transitions_Error_Container"},C={class:"dataTableWrapper"},S={class:"dataTableFeatures"},A={class:"dataTableFooterNavigation"},P={class:"dataTableControls"},D={class:"row"},F={class:"dataTableAction"},L=Object(r["createElementVNode"])("span",{class:"icon-export"},null,-1),M=[L],B={class:"alert alert-info"},U=["innerHTML"];function I(e,t,n,o,i,a){const s=Object(r["resolveComponent"])("Field"),l=Object(r["resolveComponent"])("ActivityIndicator"),c=Object(r["resolveComponent"])("MatomoLoader"),d=Object(r["resolveDirective"])("transition-exporter");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])({widgetBody:e.isWidget}),id:"transitions_report"},[Object(r["createElementVNode"])("div",T,[Object(r["createElementVNode"])("div",y,[Object(r["createElementVNode"])("div",_,[Object(r["createVNode"])(s,{uicontrol:"select",name:"actionType",modelValue:e.actionType,"onUpdate:modelValue":t[0]||(t[0]=t=>e.actionType=t),title:e.translate("Actions_ActionType"),"full-width":!0,options:e.actionTypeOptions},null,8,["modelValue","title","options"])])]),Object(r["createElementVNode"])("div",E,[Object(r["createElementVNode"])("div",w,[Object(r["createVNode"])(s,{uicontrol:"select",name:"actionName",modelValue:e.actionName,"onUpdate:modelValue":t[1]||(t[1]=t=>e.actionName=t),title:e.translate("Transitions_TopX",100),"full-width":!0,disabled:!e.isEnabled,options:e.actionNameOptions},null,8,["modelValue","title","disabled","options"])])])]),Object(r["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),Object(r["createElementVNode"])("div",x,[Object(r["createVNode"])(c),Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",V,null,512),[[r["vShow"],!e.isLoading&&e.isEnabled]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",k,null,512),[[r["vShow"],!e.isLoading]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",C,[Object(r["createElementVNode"])("div",S,[Object(r["createElementVNode"])("div",A,[Object(r["createElementVNode"])("div",P,[Object(r["createElementVNode"])("div",D,[Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("a",F,M)),[[d]])])])])])],512),[[r["vShow"],e.isEnabled]]),Object(r["createElementVNode"])("div",B,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("Transitions_AvailableInOtherReports"))+" "+Object(r["toDisplayString"])(e.translate("Actions_PageUrls"))+", "+Object(r["toDisplayString"])(e.translate("Actions_SubmenuPageTitles"))+", "+Object(r["toDisplayString"])(e.translate("Actions_SubmenuPagesEntry"))+" "+Object(r["toDisplayString"])(e.translate("General_And"))+" "+Object(r["toDisplayString"])(e.translate("Actions_SubmenuPagesExit"))+". ",1),Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.availableInOtherReports2)},null,8,U)])],2)}var R=Object(r["defineComponent"])({props:{isWidget:Boolean},components:{ActivityIndicator:a["ActivityIndicator"],Field:b["Field"],MatomoLoader:a["MatomoLoader"]},directives:{TransitionExporter:N},data(){return{actionType:"Actions.getPageUrls",actionNameOptions:[],actionTypeOptions:[{key:"Actions.getPageUrls",value:Object(a["translate"])("Actions_PageUrls")},{key:"Actions.getPageTitles",value:Object(a["translate"])("Actions_WidgetPageTitles")}],isLoading:!1,actionName:null,isEnabled:!0,noDataKey:"_____ignore_____"}},setup(){let e=null;const t=Object(r["ref"])(),n=e=>{null!==e&&void 0!==e&&e.url&&(t.value=e.url)};a["Matomo"].on("Transitions.switchTransitionsUrl",n),Object(r["onBeforeUnmount"])(()=>{a["Matomo"].off("Transitions.switchTransitionsUrl",n)});const o=(t,n)=>{e?e.reset(t,n,""):e=new window.Piwik_Transitions(t,n,null,"")},i=()=>e;return{transitionsUrl:t,createTransitionsInstance:o,getTransitionsInstance:i}},watch:{transitionsUrl(e){let t=e;this.isUrlReport&&(t=t.replace("https://","").replace("http://",""));const n=this.actionNameOptions.find(e=>{let n=e.url;return n=n&&this.isUrlReport?String(n).replace("https://","").replace("http://",""):void 0,e.key===t||t===n&&n});n?this.actionName=n.key:(this.actionNameOptions=[...this.actionNameOptions,{key:t,value:t}],this.actionName=t)},actionName(e){if(null===e||e===this.noDataKey)return;const t=this.isUrlReport?"url":"title";this.createTransitionsInstance(t,e),this.getTransitionsInstance().showPopover(!0)},actionType(e){this.fetch(e)}},created(){this.fetch(this.actionType)},methods:{detectActionName(e){const t=Object(a["translate"])("General_Others");e.forEach(e=>{if(!e)return;if(e.label===t)return;const n=this.isUrlReport?e.url:e.label;if(n){const t=Object(a["translate"])("Transitions_NumPageviews",e.nb_hits),o=`${e.label} (${t})`;this.actionNameOptions.push({key:n,value:o,url:e.url}),this.actionName||(this.actionName=n)}})},fetch(e){this.isLoading=!0,this.actionNameOptions=[],this.actionName=null,a["AjaxHelper"].fetch({method:e,flat:1,filter_limit:100,filter_sort_order:"desc",filter_sort_column:"nb_hits",showColumns:"label,nb_hits,url"}).then(e=>{this.isLoading=!1,this.actionNameOptions=[],this.actionName=null,null!==e&&void 0!==e&&e.length&&(this.isEnabled=!0,this.detectActionName(e)),null!==this.actionName&&0!==this.actionNameOptions.length||(this.isEnabled=!1,this.actionName=this.noDataKey,this.actionNameOptions.push({key:this.noDataKey,value:Object(a["translate"])("CoreHome_ThereIsNoDataForThisReport")}))}).catch(()=>{this.isLoading=!1,this.isEnabled=!1})}},computed:{isUrlReport(){return"Actions.getPageUrls"===this.actionType},availableInOtherReports2(){return Object(a["translate"])("Transitions_AvailableInOtherReports2",'<span class="icon-transition"></span>')}}});R.render=I;var H=R;function W(e,t,n,o,i,a){const s=Object(r["resolveComponent"])("TransitionSwitcher"),l=Object(r["resolveComponent"])("ContentBlock");return e.isWidget?(Object(r["openBlock"])(),Object(r["createBlock"])(s,{key:1,"is-widget":e.isWidget},null,8,["is-widget"])):(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:0,"help-text":e.translate("Transitions_FeatureDescription"),"help-url":e.externalRawLink("https://matomo.org/docs/transitions/"),"content-title":e.translate("Transitions_Transitions")},{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(s,{"is-widget":e.isWidget},null,8,["is-widget"])]),_:1},8,["help-text","help-url","content-title"]))}var $=Object(r["defineComponent"])({props:{isWidget:Boolean},components:{ContentBlock:a["ContentBlock"],TransitionSwitcher:H}});$.render=W;var q=$;const G={class:"dataTableAction"},J=Object(r["createElementVNode"])("span",{class:"icon-export"},null,-1),K=[J];function X(e,t,n,o,i,a){const s=Object(r["resolveDirective"])("transition-exporter");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("a",G,K)),[[s]])}var z=Object(r["defineComponent"])({directives:{TransitionExporter:N}});z.render=X;var Q=z;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["LanguagesManager"]=t(require("CoreHome"),require("vue")):e["LanguagesManager"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var o=t[a]={i:a,l:!1,exports:{}};return e[a].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(a,o,function(t){return e[t]}.bind(null,o));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/LanguagesManager/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"TranslationSearch",(function(){return h})),n.d(t,"TranslationSearchPage",(function(){return v})),n.d(t,"LanguageSelector",(function(){return L})),n.d(t,"LanguagesDropdown",(function(){return M})),"undefined"!==typeof window){var a=window.document.currentScript,o=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var r=n("8bbf");const l=["href"],c=Object(r["createElementVNode"])("br",null,null,-1),i=Object(r["createElementVNode"])("br",null,null,-1),u={style:{"word-break":"break-all"}},s=Object(r["createElementVNode"])("th",{style:{width:"250px"}},"Key",-1),d=Object(r["createElementVNode"])("th",null,"English translation",-1),g={key:0};function m(e,t,n,a,o,m){const p=Object(r["resolveComponent"])("Field"),b=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(" This page helps you to find existing translations that you can reuse in your Plugin. If you want to know more about translations have a look at our "),Object(r["createElementVNode"])("a",{href:e.externalRawLink("https://developer.matomo.org/guides/internationalization"),rel:"noreferrer noopener",target:"_blank"},"Internationalization guide",8,l),Object(r["createTextVNode"])(". Enter a search term to find translations and their corresponding keys: ")]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(p,{uicontrol:"text",name:"alias","inline-help":"Search for English translation. Max 1000 results will be shown.",placeholder:"Search for English translation",modelValue:e.searchTerm,"onUpdate:modelValue":t[0]||(t[0]=t=>e.searchTerm=t)},null,8,["modelValue"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(p,{uicontrol:"select",name:"translationSearch.compareLanguage","inline-help":"Optionally select a language to compare the English language with.","model-value":e.compareLanguage,"onUpdate:modelValue":t[1]||(t[1]=t=>{e.compareLanguage=t,e.doCompareLanguage()}),options:e.languages},null,8,["model-value","options"])]),c,i,Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("table",u,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[s,d,Object(r["withDirectives"])(Object(r["createElementVNode"])("th",null,"Compare translation",512),[[r["vShow"],e.compareLanguage&&e.compareTranslations]])])]),Object(r["createElementVNode"])("tbody",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.filteredTranslations,t=>(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t.label},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.label),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.value),1),e.compareLanguage&&e.compareTranslations?(Object(r["openBlock"])(),Object(r["createElementBlock"])("td",g,Object(r["toDisplayString"])(e.compareTranslations[t.label]),1)):Object(r["createCommentVNode"])("",!0)]))),128))])])),[[r["vShow"],e.searchTerm],[b]])])}var p=n("19dc");const b=Object(p["useExternalPluginComponent"])("CorePluginsAdmin","Field");var f=Object(r["defineComponent"])({components:{Field:b},directives:{ContentTable:p["ContentTable"]},data(){return{compareTranslations:null,existingTranslations:[],languages:[],compareLanguage:"",searchTerm:""}},created(){this.fetchTranslations("en"),this.fetchLanguages()},methods:{fetchTranslations(e){p["AjaxHelper"].fetch({method:"LanguagesManager.getTranslationsForLanguage",filter_limit:-1,languageCode:e}).then(t=>{t&&("en"===e?this.existingTranslations=t:(this.compareTranslations={},t.forEach(e=>{this.compareTranslations[e.label]=e.value})))})},fetchLanguages(){p["AjaxHelper"].fetch({method:"LanguagesManager.getAvailableLanguagesInfo",filter_limit:-1}).then(e=>{this.languages=[{key:"",value:"None"}],e&&e.forEach(e=>{"en"!==e.code&&this.languages.push({key:e.code,value:e.name})})})},doCompareLanguage(){this.compareLanguage&&(this.compareTranslations=null,this.fetchTranslations(this.compareLanguage))}},computed:{filteredTranslations(){let e=this.existingTranslations.filter(e=>e.label.includes(this.searchTerm)||e.value.includes(this.searchTerm));return e=e.slice(0,1e3),e}}});f.render=m;var h=f;function j(e,t,n,a,o,l){const c=Object(r["resolveComponent"])("TranslationSearch"),i=Object(r["resolveComponent"])("ContentBlock");return Object(r["openBlock"])(),Object(r["createBlock"])(i,{"content-title":e.translate("LanguagesManager_TranslationSearch"),feature:"true"},{default:Object(r["withCtx"])(()=>[Object(r["createVNode"])(c)]),_:1},8,["content-title"])}var O=Object(r["defineComponent"])({components:{ContentBlock:p["ContentBlock"],TranslationSearch:h}});O.render=j;var v=O;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:k}=window;function y(e,t){const n=k(t.target).attr("value");n&&k(e).find("#language").val(n).parents("form").submit()}var L={mounted(e,t){t.value.onClick=y.bind(null,e),k(e).on("click","a[value]",t.value.onClick)},unmounted(e,t){k(e).off("click","a[value]",t.value.onClick)}};const T={class:"languageSelection"},E=["href"],C=["value","title"],N={action:"index.php?module=LanguagesManager&action=saveLanguage",method:"post",ref:"form"},V=["value"],S=["value"],x=["value"];function w(e,t,n,a,o,l){const c=Object(r["resolveComponent"])("MenuItemsDropdown");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",T,[Object(r["createVNode"])(c,{"menu-title":e.currentLanguageName,onAfterSelect:t[0]||(t[0]=t=>e.onSelect(t))},{default:Object(r["withCtx"])(()=>[Object(r["createElementVNode"])("a",{class:"item",target:"_blank",rel:"noreferrer noopener",href:e.externalRawLink("https://matomo.org/translations/")},Object(r["toDisplayString"])(e.translate("LanguagesManager_AboutPiwikTranslations")),9,E),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.languages,t=>(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:t.code,class:Object(r["normalizeClass"])("item "+(t.code===e.currentLanguageCode?"active":"")),value:t.code,title:`${t.name} (${t.english_name})`},Object(r["toDisplayString"])(t.name),11,C))),128)),Object(r["createElementVNode"])("form",N,[Object(r["createElementVNode"])("input",{type:"hidden",name:"language",id:"language",value:e.selectedLanguage},null,8,V),Object(r["createElementVNode"])("input",{type:"hidden",name:"nonce",id:"nonce",value:e.formNonce},null,8,S),e.tokenAuth?(Object(r["openBlock"])(),Object(r["createElementBlock"])("input",{key:0,type:"hidden",name:"token_auth",value:e.tokenAuth},null,8,x)):Object(r["createCommentVNode"])("",!0)],512)]),_:1},8,["menu-title"])])}var B=Object(r["defineComponent"])({props:{tokenAuth:String,formNonce:{type:String,required:!0},languages:{type:Array,required:!0},currentLanguageCode:{type:String,required:!0},currentLanguageName:{type:String,required:!0}},components:{MenuItemsDropdown:p["MenuItemsDropdown"]},data(){return{selectedLanguage:this.currentLanguageCode}},methods:{onSelect(e){this.selectedLanguage=e.getAttribute("value"),Object(r["nextTick"])().then(()=>{this.$refs.form.submit()})}}});B.render=w;var M=B;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["Dashboard"]=t(require("CoreHome"),require("vue")):e["Dashboard"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function o(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,a){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(a,r,function(t){return e[t]}.bind(null,r));return a},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/Dashboard/vue/dist/",o(o.s="fae3")}({"19dc":function(t,o){t.exports=e},"8bbf":function(e,o){e.exports=t},fae3:function(e,t,o){"use strict";if(o.r(t),o.d(t,"DashboardStore",(function(){return l})),o.d(t,"Dashboard",(function(){return D})),o.d(t,"DashboardSettings",(function(){return T})),"undefined"!==typeof window){var a=window.document.currentScript,r=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(o.p=r[1])}var s=o("8bbf"),d=o("19dc");function n(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 i{constructor(){n(this,"privateState",Object(s["reactive"])({dashboards:[]})),n(this,"state",Object(s["computed"])(()=>Object(s["readonly"])(this.privateState))),n(this,"dashboards",Object(s["computed"])(()=>this.state.value.dashboards)),n(this,"dashboardsPromise",null)}getDashboard(e){return this.getAllDashboards().then(t=>t.find(t=>parseInt(""+t.id,10)===parseInt(""+e,10)))}getDashboardLayout(e){return d["AjaxHelper"].fetch({module:"Dashboard",action:"getDashboardLayout",idDashboard:e},{withTokenInUrl:!0})}reloadAllDashboards(){return this.dashboardsPromise=null,this.getAllDashboards()}getAllDashboards(){return this.dashboardsPromise||(this.dashboardsPromise=d["AjaxHelper"].fetch({method:"Dashboard.getDashboards",filter_limit:"-1"}).then(e=>(e&&(this.privateState.dashboards=e),this.dashboards.value))),this.dashboardsPromise}}var l=new i;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const{$:c}=window;function b(e,t,o){const a=c(".dashboardSettings");a.show(),window.initTopControls(),c("#topBars").length||(a.after(c("#Dashboard")),c("#Dashboard ul li").removeClass("active"),c("#Dashboard_embeddedIndex_"+e).addClass("active")),window.widgetsHelper.getAvailableWidgets(),c("#dashboardWidgetsArea").off("dashboardempty",window.showEmptyDashboardNotification).on("dashboardempty",window.showEmptyDashboardNotification).dashboard({idDashboard:e,layout:o,name:t?t.name:""});const r=c("#columnPreview").find(">div");r.each((function(){const e=[];c("div",this).each((function(){e.push(this.className.replace(/width-/,""))})),c(this).attr("layout",e.join("-"))})),r.off("click.renderDashboard"),r.on("click.renderDashboard",(function(){r.removeClass("choosen"),c(this).addClass("choosen")}))}function u(e){return new Promise(e=>setTimeout(e)).then(()=>Promise.resolve(window.widgetsHelper.firstGetAvailableWidgetsCall)).then(()=>{const t=c("#dashboardWidgetsArea");return t.dashboard("destroyWidgets"),t.empty(),Promise.all([l.getDashboard(e),l.getDashboardLayout(e)])}).then(([t,o])=>new Promise(a=>{c(()=>{b(e,t,o),a()})}))}function h(){c(".top_controls .dashboard-manager").hide(),c("#dashboardWidgetsArea").dashboard("destroy")}function m(e){"Widgetize"!==e.module&&"Dashboard_Dashboard"!==e.category&&h()}function p(e){u(e)}var D={mounted(e,t){u(t.value.idDashboard),Object(s["watch"])(()=>d["MatomoUrl"].parsed.value,e=>{m(e)}),d["Matomo"].off("Dashboard.loadDashboard",p),d["Matomo"].on("Dashboard.loadDashboard",p)},unmounted(){m(d["MatomoUrl"].parsed.value),d["Matomo"].off("Dashboard.loadDashboard",p)}};const g=["title"],f=Object(s["createElementVNode"])("span",{class:"icon icon-dashboard-customize"},null,-1),v={class:"dropdown positionInViewport"},O={class:"submenu"},j=["onClick","disabled","title","data-action"],y={class:"manageDashboard"},w=["onClick","disabled","title","data-action"],A={class:"addWidgetsSubmenu"},S={class:"addWidget"},C=Object(s["createElementVNode"])("ul",{class:"widgetpreview-categorylist"},null,-1),k=Object(s["createElementVNode"])("div",null,[Object(s["createElementVNode"])("ul",{class:"widgetpreview-widgetlist"}),Object(s["createElementVNode"])("div",{class:"widgetpreview-preview"})],-1);function E(e,t,o,a,r,d){const n=Object(s["resolveDirective"])("tooltips"),i=Object(s["resolveDirective"])("expand-on-click");return Object(s["withDirectives"])((Object(s["openBlock"])(),Object(s["createElementBlock"])("div",{ref:"root",class:"dashboard-manager piwikSelector borderedControl piwikTopControl dashboardSettings",onClick:t[1]||(t[1]=t=>e.onOpen())},[Object(s["withDirectives"])((Object(s["openBlock"])(),Object(s["createElementBlock"])("a",{class:"title",title:e.translate("Dashboard_ManageDashboard"),tabindex:"4",ref:"expander"},[f,Object(s["createTextVNode"])(Object(s["toDisplayString"])(e.translate("Dashboard_Dashboard")),1)],8,g)),[[n]]),Object(s["withDirectives"])((Object(s["openBlock"])(),Object(s["createElementBlock"])("div",v,[Object(s["createElementVNode"])("ul",O,[(Object(s["openBlock"])(!0),Object(s["createElementBlock"])(s["Fragment"],null,Object(s["renderList"])(e.generalActions,(t,o)=>(Object(s["openBlock"])(),Object(s["createElementBlock"])("li",{key:o,onClick:t=>e.onClickAction(t,o),class:"generalAction",disabled:e.isActionDisabled[o]?"disabled":void 0,title:e.actionTooltips[o]||void 0,"data-action":o},Object(s["toDisplayString"])(e.translate(t)),9,j))),128)),Object(s["createElementVNode"])("li",null,[Object(s["createElementVNode"])("div",y,Object(s["toDisplayString"])(e.translate("Dashboard_ManageDashboard")),1),Object(s["createElementVNode"])("ul",null,[Object(s["createElementVNode"])("li",{class:"exportDashboard","data-action":"exportDashboard",onClick:t[0]||(t[0]=t=>e.onClickExportDashboard())},Object(s["toDisplayString"])(e.translate("Dashboard_ExportThisDashboard")),1),(Object(s["openBlock"])(!0),Object(s["createElementBlock"])(s["Fragment"],null,Object(s["renderList"])(e.dashboardActions,(t,o)=>(Object(s["openBlock"])(),Object(s["createElementBlock"])("li",{key:o,onClick:t=>e.onClickAction(t,o),disabled:e.isActionDisabled[o]?"disabled":void 0,title:e.actionTooltips[o]||void 0,"data-action":o},Object(s["toDisplayString"])(e.translate(t)),9,w))),128))])]),Object(s["createElementVNode"])("li",A,[Object(s["createElementVNode"])("div",S,Object(s["toDisplayString"])(e.translate("Dashboard_AddAWidget")),1),C])]),k])),[[n,{show:!1}]])])),[[i,{expander:"expander",onClosed:e.onClose}]])}const{$:x}=window,M="scheduledReports.dashboardExportId";function _(e){return!x("#dashboardWidgetsArea").find(`[widgetId="${e}"]`).length}function N(e){window.MATOMO_DASHBOARD_SETTINGS_WIDGET_SELECTED_NOOP||x("#dashboardWidgetsArea").dashboard("addWidget",e.uniqueId,1,e.parameters,!0,!1)}var P=Object(s["defineComponent"])({name:"DashboardSettings",directives:{ExpandOnClick:d["ExpandOnClick"],Tooltips:d["Tooltips"]},data(){return{isActionDisabled:{},actionTooltips:{}}},setup(){const e=Object(s["ref"])(null),t=Object(s["ref"])(null),o=()=>{e.value.widgetPreview({isWidgetAvailable:_,onSelect:e=>{window.widgetsHelper.getWidgetObjectFromUniqueId(e,e=>{t.value.click(),N(e)})},resetOnSelect:!0})};return Object(s["onMounted"])(()=>{d["Matomo"].postEvent("Dashboard.DashboardSettings.mounted",t.value),e.value=x(t.value),o(),d["Matomo"].on("WidgetsStore.reloaded",()=>{o()}),e.value.hide()}),{root:t,rootJQuery:e}},computed:{isUserNotAnonymous(){return!!d["Matomo"].userLogin&&"anonymous"!==d["Matomo"].userLogin},isSuperUser(){return this.isUserNotAnonymous&&d["Matomo"].hasSuperUserAccess},isUserHasSomeAdminAccess(){return this.isUserNotAnonymous&&d["Matomo"].userHasSomeAdminAccess},dashboardActions(){const e={resetDashboard:"Dashboard_ResetDashboard",showChangeDashboardLayoutDialog:"Dashboard_ChangeDashboardLayout"};return this.isUserNotAnonymous&&(e.renameDashboard="Dashboard_RenameDashboard",e.removeDashboard="Dashboard_RemoveDashboard"),this.isSuperUser&&(e.setAsDefaultWidgets="Dashboard_SetAsDefaultWidgets"),this.isUserHasSomeAdminAccess&&(e.copyDashboardToUser="Dashboard_CopyDashboardToUser"),e},generalActions(){const e={};return this.isUserNotAnonymous&&(e.createDashboard="Dashboard_CreateNewDashboard"),e}},methods:{onClickAction(e,t){e.target.getAttribute("disabled")||window[t]()},onOpen(){x("#dashboardWidgetsArea").dashboard("isDefaultDashboard")?(this.isActionDisabled.removeDashboard=!0,this.actionTooltips.removeDashboard=Object(d["translate"])("Dashboard_RemoveDefaultDashboardNotPossible")):(this.isActionDisabled.removeDashboard=!1,this.actionTooltips.removeDashboard=void 0)},onClose(){this.rootJQuery.widgetPreview("reset")},redirectToCreateScheduledReports(){const e=Object.assign({},d["MatomoUrl"].urlParsed.value);delete e.category,delete e.subcategory,delete e.idDashboard,e.module="ScheduledReports",e.action="index";const t=Object.assign({},d["MatomoUrl"].hashParsed.value);delete t.category,delete t.subcategory,delete t.idDashboard,d["MatomoUrl"].updateUrl(e,t)},redirectToLoginPage(){const e={module:d["Matomo"].getLoginModule()};d["MatomoUrl"].updateUrl(e)},onClickExportDashboard(){if("undefined"!==typeof sessionStorage&&sessionStorage.removeItem(M),this.isUserNotAnonymous){const e=this.getCurrentDashboardId();return null!==e&&"undefined"!==typeof sessionStorage&&sessionStorage.setItem(M,String(e)),void this.redirectToCreateScheduledReports()}this.redirectToLoginPage()},normalizeDashboardId(e){const t=Array.isArray(e)?e[0]:e;if(null===t||void 0===t)return null;const o=String(t).trim();return/^[1-9]\d*$/.test(o)?Number(o):null},getCurrentDashboardId(){const e=this.normalizeDashboardId(d["MatomoUrl"].getSearchParam("subcategory"));if(null!==e)return e;const t=this.normalizeDashboardId(d["MatomoUrl"].urlParsed.value.idDashboard);return null!==t?t:this.normalizeDashboardId(d["MatomoUrl"].hashParsed.value.idDashboard)}}});P.render=E;var T=P;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["MultiSites"]=t(require("CoreHome"),require("vue")):e["MultiSites"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function o(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=e,o.c=t,o.d=function(e,t,a){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},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 a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)o.d(a,i,function(t){return e[t]}.bind(null,i));return a},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/MultiSites/vue/dist/",o(o.s="fae3")}({"19dc":function(t,o){t.exports=e},"8bbf":function(e,o){e.exports=t},fae3:function(e,t,o){"use strict";if(o.r(t),o.d(t,"AllWebsitesDashboard",(function(){return Fe})),"undefined"!==typeof window){var a=window.document.currentScript,i=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(o.p=i[1])}var r=o("8bbf");const s={class:"dashboardHeader"},n={class:"card-title"},l={key:0},c={class:"notification system notification-error"},u=Object(r["createElementVNode"])("br",null,null,-1),d=Object(r["createElementVNode"])("br",null,null,-1),p=["href"],b=["href"],m=["href"],v={class:"dashboardControls"},h={class:"siteSearch"},O=["placeholder"],g=["title"],j=["href"];function k(e,t,o,a,i,k){const S=Object(r["resolveComponent"])("EnrichedHeadline"),C=Object(r["resolveComponent"])("KPICardContainer"),f=Object(r["resolveComponent"])("SitesTable");return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],null,[Object(r["createElementVNode"])("div",s,[Object(r["createElementVNode"])("h1",n,[Object(r["createVNode"])(S,{"feature-name":e.translate("MultiSites_AllWebsitesDashboardTitle")},{default:Object(r["withCtx"])(()=>[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("MultiSites_AllWebsitesDashboardTitle")),1)]),_:1},8,["feature-name"])])]),e.errorLoading?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",l,[Object(r["createElementVNode"])("div",c,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("MultiSites_AllWebsitesDashboardErrorMessage"))+" ",1),u,d,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_NeedMoreHelp","",""))+" ",1),Object(r["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/faq/troubleshooting/faq_19489/")},Object(r["toDisplayString"])(e.translate("General_Faq")),9,p),Object(r["createTextVNode"])(" – "),Object(r["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://forum.matomo.org/")},Object(r["toDisplayString"])(e.translate("Feedback_CommunityHelp")),9,b),Object(r["createTextVNode"])(" – "),Object(r["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.externalRawLink("https://matomo.org/support-plans/")},Object(r["toDisplayString"])(e.translate("Feedback_ProfessionalHelp")),9,m),Object(r["createTextVNode"])(". ")])])):Object(r["createCommentVNode"])("",!0),Object(r["createVNode"])(C,{"is-loading":e.isLoadingKPIs,"model-value":e.kpis},null,8,["is-loading","model-value"]),Object(r["createElementVNode"])("div",v,[Object(r["createElementVNode"])("div",h,[Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{type:"text",onKeydown:t[0]||(t[0]=Object(r["withKeys"])(t=>e.searchSite(e.searchTerm),["enter"])),"onUpdate:modelValue":t[1]||(t[1]=t=>e.searchTerm=t),placeholder:e.translate("Actions_SubmenuSitesearch")},null,40,O),[[r["vModelText"],e.searchTerm]]),Object(r["createElementVNode"])("span",{class:"icon-search",onClick:t[2]||(t[2]=t=>e.searchSite(e.searchTerm)),title:e.translate("General_ClickToSearch")},null,8,g)]),!e.isWidgetized&&e.isUserAllowedToAddSite?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,class:"btn",href:e.addSiteUrl},Object(r["toDisplayString"])(e.translate("SitesManager_AddSite")),9,j)):Object(r["createCommentVNode"])("",!0)]),Object(r["createVNode"])(f,{"display-revenue":e.displayRevenue,"display-sparklines":e.displaySparklines,"show-ai-chatbots-requests":e.hasBotTrackingEnabled,"is-segmented":e.isSegmented},null,8,["display-revenue","display-sparklines","show-ai-chatbots-requests","is-segmented"])],64)}var S=o("19dc");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
 */const f="desc",y="nb_visits";class _{constructor(){C(this,"fetchAbort",null),C(this,"privateState",Object(r["reactive"])({dashboardKPIs:{badges:{},evolutionPeriod:"day",hits:"?",hitsCompact:"?",hitsEvolution:"",hitsTrend:0,aiChatbotsRequests:"?",aiChatbotsRequestsCompact:"?",aiChatbotsRequestsEvolution:"",aiChatbotsRequestsTrend:0,pageviews:"?",pageviewsCompact:"?",pageviewsEvolution:"",pageviewsTrend:0,revenue:"?",revenueCompact:"?",revenueEvolution:"",revenueTrend:0,visits:"?",visitsCompact:"?",visitsEvolution:"",visitsTrend:0},dashboardSites:[],errorLoading:!1,isLoadingKPIs:!1,isLoadingSites:!1,numSites:0,paginationCurrentPage:0,sortColumn:y,sortOrder:f})),C(this,"autoRefreshInterval",0),C(this,"autoRefreshTimeout",null),C(this,"pageSize",25),C(this,"searchTerm",""),C(this,"state",Object(r["computed"])(()=>Object(r["readonly"])(this.privateState))),C(this,"numberOfPages",Object(r["computed"])(()=>Math.ceil(this.state.value.numSites/this.pageSize-1))),C(this,"currentPagingOffset",Object(r["computed"])(()=>Math.ceil(this.state.value.paginationCurrentPage*this.pageSize))),C(this,"paginationLowerBound",Object(r["computed"])(()=>0===this.state.value.numSites?0:1+this.currentPagingOffset.value)),C(this,"paginationUpperBound",Object(r["computed"])(()=>{if(0===this.state.value.numSites)return 0;const e=this.pageSize+this.currentPagingOffset.value,t=this.state.value.numSites;return e<t?e:t}))}reloadDashboard(){this.privateState.sortColumn=y,this.privateState.sortOrder=f,this.privateState.paginationCurrentPage=0,this.refreshData()}navigateNextPage(){this.privateState.paginationCurrentPage!==this.numberOfPages.value&&(this.privateState.paginationCurrentPage+=1,this.refreshData(!0))}navigatePreviousPage(){0!==this.privateState.paginationCurrentPage&&(this.privateState.paginationCurrentPage-=1,this.refreshData(!0))}searchSite(e){this.searchTerm=e,this.privateState.paginationCurrentPage=0,this.refreshData(!0)}setAutoRefreshInterval(e){this.autoRefreshInterval=e}setPageSize(e){this.pageSize=e}sortBy(e){this.privateState.sortColumn===e?this.privateState.sortOrder="desc"===this.privateState.sortOrder?"asc":"desc":this.privateState.sortOrder="label"===e?"asc":"desc",this.privateState.sortColumn=e,this.refreshData(!0)}cancelAutoRefresh(){this.autoRefreshTimeout&&(clearTimeout(this.autoRefreshTimeout),this.autoRefreshTimeout=null)}refreshData(e=!1){this.fetchAbort&&(this.fetchAbort.abort(),this.fetchAbort=null,this.cancelAutoRefresh()),this.fetchAbort=new AbortController,this.privateState.errorLoading=!1,this.privateState.isLoadingKPIs=!e,this.privateState.isLoadingSites=!0;const t={method:"MultiSites.getAllWithGroups",filter_limit:this.pageSize,filter_offset:this.currentPagingOffset.value,filter_sort_column:this.privateState.sortColumn,filter_sort_order:this.privateState.sortOrder,format_metrics:0,showColumns:["hits_evolution","hits_evolution_trend","label","hits","ai_chatbots_requests","nb_pageviews","nb_visits","pageviews_evolution","pageviews_evolution_trend","revenue","revenue_evolution","revenue_evolution_trend","visits_evolution","visits_evolution_trend"].join(",")};return this.searchTerm&&(t.pattern=this.searchTerm),S["AjaxHelper"].fetch(t,{abortController:this.fetchAbort,createErrorNotification:!1}).then(t=>{e||(this.updateDashboardKPIs(t),S["Matomo"].postEvent("MultiSites.DashboardKPIs.updated",{parameters:(new S["AjaxHelper"]).mixinDefaultGetParams({filter_limit:this.pageSize,filter_offset:this.currentPagingOffset.value,filter_sort_column:this.privateState.sortColumn,filter_sort_order:this.privateState.sortOrder,pattern:this.searchTerm}),kpis:this.privateState.dashboardKPIs})),this.updateDashboardSites(t)}).catch(()=>{this.privateState.dashboardSites=[],this.privateState.errorLoading=!0}).finally(()=>{this.privateState.isLoadingKPIs=!1,this.privateState.isLoadingSites=!1,this.fetchAbort=null,this.startAutoRefresh()})}startAutoRefresh(){if(this.cancelAutoRefresh(),this.autoRefreshInterval<=0)return;let e;try{e=S["Periods"].parse(S["Matomo"].period,S["Matomo"].currentDateString)}catch(t){}e&&e.containsToday()&&(this.autoRefreshTimeout=setTimeout(()=>{this.autoRefreshTimeout=null,this.refreshData()},1e3*this.autoRefreshInterval))}updateDashboardKPIs(e){const t=!!S["MatomoUrl"].parsed.value.segment,o=e.totals.ai_chatbots_requests||0,a=e.totals.previous_ai_chatbots_requests||0;this.privateState.dashboardKPIs={badges:{hits:null,pageviews:null,revenue:null,visits:null},evolutionPeriod:S["Matomo"].period,hits:S["NumberFormatter"].formatNumber(e.totals.hits),hitsCompact:S["NumberFormatter"].formatNumberCompact(e.totals.hits),hitsEvolution:S["NumberFormatter"].calculateAndFormatEvolution(e.totals.hits,e.totals.previous_hits,!0),hitsTrend:Math.sign(e.totals.hits-e.totals.previous_hits),aiChatbotsRequests:t?"-":S["NumberFormatter"].formatNumber(o),aiChatbotsRequestsCompact:t?"-":S["NumberFormatter"].formatNumberCompact(o),aiChatbotsRequestsEvolution:t?"":S["NumberFormatter"].calculateAndFormatEvolution(o,a,!0),aiChatbotsRequestsTrend:t?0:Math.sign(o-a),pageviews:S["NumberFormatter"].formatNumber(e.totals.nb_pageviews),pageviewsCompact:S["NumberFormatter"].formatNumberCompact(e.totals.nb_pageviews),pageviewsEvolution:S["NumberFormatter"].calculateAndFormatEvolution(e.totals.nb_pageviews,e.totals.previous_nb_pageviews,!0),pageviewsTrend:Math.sign(e.totals.nb_pageviews-e.totals.previous_nb_pageviews),revenue:S["NumberFormatter"].formatCurrency(e.totals.revenue,""),revenueCompact:S["NumberFormatter"].formatCurrencyCompact(e.totals.revenue,""),revenueEvolution:S["NumberFormatter"].calculateAndFormatEvolution(e.totals.revenue,e.totals.previous_revenue,!0),revenueTrend:Math.sign(e.totals.revenue-e.totals.previous_revenue),visits:S["NumberFormatter"].formatNumber(e.totals.nb_visits),visitsCompact:S["NumberFormatter"].formatNumberCompact(e.totals.nb_visits),visitsEvolution:S["NumberFormatter"].calculateAndFormatEvolution(e.totals.nb_visits,e.totals.previous_nb_visits,!0),visitsTrend:Math.sign(e.totals.nb_visits-e.totals.previous_nb_visits)}}updateDashboardSites(e){this.privateState.dashboardSites=e.sites,this.privateState.numSites=e.numSites}}var N=new _;const E={class:"kpiCardContainer"},T={key:0,class:"kpiCard kpiCardLoading"},V=Object(r["createElementVNode"])("div",{class:"kpiCardTitle"}," ",-1),B={class:"kpiCardValue"},M=Object(r["createElementVNode"])("div",{class:"kpiCardEvolution"},[Object(r["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ")],-1),P={key:0,class:"kpiCardBadge"};function w(e,t,o,a,i,s){const n=Object(r["resolveComponent"])("MatomoLoader"),l=Object(r["resolveComponent"])("KPICard");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",E,[e.isLoading?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",T,[V,Object(r["createElementVNode"])("div",B,[Object(r["createVNode"])(n)]),M,e.hasKpiBadge?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",P," ")):Object(r["createCommentVNode"])("",!0)])):(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],{key:1},Object(r["renderList"])(e.kpis,(t,o)=>(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:"kpi-card-"+o},[o>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:0,class:Object(r["normalizeClass"])({kpiCardDivider:!0,kpiCardDividerBadge:e.hasKpiBadge})}," ",2)):Object(r["createCommentVNode"])("",!0),Object(r["createVNode"])(l,{"model-value":t},null,8,["model-value"])],64))),128))])}const D={class:"kpiCard"},R={class:"kpiCardTitle"},q={style:{display:"none"},ref:"kpiCardTooltipTemplate"},A={role:"tooltip"},x=["title"],L={class:"kpiCardEvolution"},F={key:1,class:"kpiCardEvolution"},I=Object(r["createElementVNode"])("span",{class:"kpiCardEvolutionTrend"}," ",-1),G=[I],z=["title","innerHTML"];function H(e,t,o,a,i,s){const n=Object(r["resolveDirective"])("tooltips");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",D,[Object(r["createElementVNode"])("div",R,[Object(r["createElementVNode"])("span",{class:Object(r["normalizeClass"])("kpiCardIcon "+e.kpi.icon)},null,2),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate(e.kpi.title)),1)]),Object(r["createElementVNode"])("div",q,[Object(r["createElementVNode"])("div",A,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate(e.kpi.title)),1),e.kpi.tooltipBody?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate(e.kpi.tooltipBody)),1)],64)):(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:1},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.kpi.value),1)],64))])],512),Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:"kpiCardValue",title:e.kpi.value},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.kpi.valueCompact),1)],8,x)),[[n,{duration:200,delay:200,content:e.tooltipContent}]]),Object(r["createElementVNode"])("div",L,[""!==e.kpi.evolutionValue?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[Object(r["createElementVNode"])("span",{class:Object(r["normalizeClass"])("kpiCardEvolutionTrend "+e.evolutionTrendClass)},[Object(r["createElementVNode"])("span",{class:Object(r["normalizeClass"])("kpiCardEvolutionIcon "+e.evolutionTrendIcon)},null,2),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.kpi.evolutionValue)+"  ",1)],2),Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(e.translate(e.evolutionTrendFrom)),1)],64)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",F,G))]),e.kpi.badge?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:0,class:"kpiCardBadge",title:e.kpi.badge.title,innerHTML:e.$sanitize(e.kpi.badge.label)},null,8,z)),[[n,{duration:200,delay:200}]]):Object(r["createCommentVNode"])("",!0)])}var U=Object(r["defineComponent"])({directives:{Tooltips:S["Tooltips"]},props:{modelValue:{type:Object,required:!0}},computed:{tooltipContent(){return()=>{var e;return(null===(e=this.$refs.kpiCardTooltipTemplate)||void 0===e?void 0:e.innerHTML)||""}},evolutionTrendFrom(){switch(this.kpi.evolutionPeriod){case"day":return"MultiSites_EvolutionFromPreviousDay";case"week":return"MultiSites_EvolutionFromPreviousWeek";case"month":return"MultiSites_EvolutionFromPreviousMonth";case"year":return"MultiSites_EvolutionFromPreviousYear";default:return"MultiSites_EvolutionFromPreviousPeriod"}},evolutionTrendClass(){return 1===this.kpi.evolutionTrend?"kpiTrendPositive":-1===this.kpi.evolutionTrend?"kpiTrendNegative":"kpiTrendNeutral"},evolutionTrendIcon(){return 1===this.kpi.evolutionTrend?"icon-chevron-up":-1===this.kpi.evolutionTrend?"icon-chevron-down":"icon-circle"},kpi(){return this.modelValue}}});U.render=H;var K=U,W=Object(r["defineComponent"])({components:{MatomoLoader:S["MatomoLoader"],KPICard:K},props:{isLoading:Boolean,modelValue:{type:Array,required:!0}},computed:{hasKpiBadge(){return this.kpis.some(e=>!!e.badge)},kpis(){return this.modelValue}}});W.render=w;var $=W;const J={class:"sitesTableContainer"},Y={class:"card-table dataTable sitesTable"},Q=["title"],X=["title"],Z=["title"],ee=["title"],te=["title"],oe=["title"],ae=["title"],ie={class:"sitesTableEvolutionSelector"},re=["value"],se={value:"hits_evolution"},ne={value:"visits_evolution"},le={value:"pageviews_evolution"},ce={key:0,value:"ai_chatbots_requests_evolution"},ue={key:1,value:"revenue_evolution"},de={key:0},pe=["colspan"],be={key:0,class:"sitesTablePagination"},me={class:"dataTablePages"};function ve(e,t,o,a,i,s){const n=Object(r["resolveComponent"])("MatomoLoader"),l=Object(r["resolveComponent"])("SitesTableSite"),c=Object(r["resolveDirective"])("tooltips");return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],null,[Object(r["createElementVNode"])("div",J,[Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("table",Y,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",{onClick:t[0]||(t[0]=t=>e.sortBy("label")),class:"label",title:e.translate("MultiSites_MetricDocumentationWebsite")},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("General_Website"))+" ",1),"label"===e.sortColumn?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,class:Object(r["normalizeClass"])(e.sortColumnClass)},null,2)):Object(r["createCommentVNode"])("",!0)],8,Q),Object(r["createElementVNode"])("th",{onClick:t[1]||(t[1]=t=>e.sortBy("nb_visits")),title:e.translate("MultiSites_MetricDocumentationVisits")},["nb_visits"===e.sortColumn?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,class:Object(r["normalizeClass"])(e.sortColumnClass)},null,2)):Object(r["createCommentVNode"])("",!0),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_ColumnNbVisits")),1)],8,X),Object(r["createElementVNode"])("th",{onClick:t[2]||(t[2]=t=>e.sortBy("nb_pageviews")),title:e.translate("MultiSites_MetricDocumentationPageviews")},["nb_pageviews"===e.sortColumn?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,class:Object(r["normalizeClass"])(e.sortColumnClass)},null,2)):Object(r["createCommentVNode"])("",!0),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_ColumnPageviews")),1)],8,Z),e.showAiChatbotsRequests&&!e.isSegmented?(Object(r["openBlock"])(),Object(r["createElementBlock"])("th",{key:0,onClick:t[3]||(t[3]=t=>e.sortBy("ai_chatbots_requests")),title:e.translate("MultiSites_MetricDocumentationAiChatbotsRequests")},["ai_chatbots_requests"===e.sortColumn?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,class:Object(r["normalizeClass"])(e.sortColumnClass)},null,2)):Object(r["createCommentVNode"])("",!0),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("MultiSites_AiChatbotsRequests")),1)],8,ee)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("th",{onClick:t[4]||(t[4]=t=>e.sortBy("hits")),title:e.translate(e.showAiChatbotsRequests&&!e.isSegmented?"MultiSites_MetricDocumentationHitsIncludingAi":"MultiSites_MetricDocumentationHits")},["hits"===e.sortColumn?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,class:Object(r["normalizeClass"])(e.sortColumnClass)},null,2)):Object(r["createCommentVNode"])("",!0),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_ColumnHits")),1)],8,te),e.displayRevenue?(Object(r["openBlock"])(),Object(r["createElementBlock"])("th",{key:1,onClick:t[5]||(t[5]=t=>e.sortBy("revenue")),title:e.translate("MultiSites_MetricDocumentationRevenue")},["revenue"===e.sortColumn?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,class:Object(r["normalizeClass"])(e.sortColumnClass)},null,2)):Object(r["createCommentVNode"])("",!0),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_ColumnRevenue")),1)],8,oe)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("th",{onClick:t[6]||(t[6]=t=>e.sortBy(e.evolutionSelector)),title:e.translate("MultiSites_MetricDocumentationEvolution")},[e.sortColumn===e.evolutionSelector?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,class:Object(r["normalizeClass"])(e.sortColumnClass)},null,2)):Object(r["createCommentVNode"])("",!0),Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("MultiSites_Evolution")),1)],8,ae),Object(r["createElementVNode"])("th",ie,[Object(r["createElementVNode"])("select",{class:"browser-default",value:e.evolutionSelector,onChange:t[7]||(t[7]=t=>e.changeEvolutionSelector(t.target.value))},[Object(r["createElementVNode"])("option",se,Object(r["toDisplayString"])(e.translate("General_ColumnHits")),1),Object(r["createElementVNode"])("option",ne,Object(r["toDisplayString"])(e.translate("General_ColumnNbVisits")),1),Object(r["createElementVNode"])("option",le,Object(r["toDisplayString"])(e.translate("General_ColumnPageviews")),1),e.showAiChatbotsRequests&&!e.isSegmented?(Object(r["openBlock"])(),Object(r["createElementBlock"])("option",ce,Object(r["toDisplayString"])(e.translate("MultiSites_AiChatbotsRequests")),1)):Object(r["createCommentVNode"])("",!0),e.displayRevenue?(Object(r["openBlock"])(),Object(r["createElementBlock"])("option",ue,Object(r["toDisplayString"])(e.translate("General_ColumnRevenue")),1)):Object(r["createCommentVNode"])("",!0)],40,re)])])]),Object(r["createElementVNode"])("tbody",null,[e.isLoading?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",de,[Object(r["createElementVNode"])("td",{class:"sitesTableLoading",colspan:e.loadingColspan},[Object(r["createVNode"])(n)],8,pe)])):(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],{key:1},Object(r["renderList"])(e.sites,t=>(Object(r["openBlock"])(),Object(r["createBlock"])(l,{"display-revenue":e.displayRevenue,"evolution-metric":e.evolutionMetric,key:"site-"+t.idsite,"model-value":t,"display-sparkline":e.displaySparklines,"sparkline-metric":e.sparklineMetric,"show-ai-chatbots-requests":e.showAiChatbotsRequests&&!e.isSegmented},null,8,["display-revenue","evolution-metric","model-value","display-sparkline","sparkline-metric","show-ai-chatbots-requests"]))),128))])])),[[c]])]),!e.isLoading||e.paginationUpperBound>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",be,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",{class:"dataTablePrevious",onClick:t[8]||(t[8]=t=>e.navigatePreviousPage())}," « "+Object(r["toDisplayString"])(e.translate("General_Previous")),513),[[r["vShow"],0!==e.paginationCurrentPage]]),Object(r["createElementVNode"])("span",me,Object(r["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.numberOfFilteredSites)),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",{class:"dataTableNext",onClick:t[9]||(t[9]=t=>e.navigateNextPage())},Object(r["toDisplayString"])(e.translate("General_Next"))+" » ",513),[[r["vShow"],e.paginationCurrentPage<e.paginationMaxPage]])])):Object(r["createCommentVNode"])("",!0)],64)}const he={class:"label"},Oe=["href","title"],ge=Object(r["createElementVNode"])("span",{class:"icon icon-outlink"},null,-1),je=[ge],ke=["href"],Se={key:1,class:"value"},Ce={class:"value"},fe={class:"value"},ye={key:0},_e={class:"value"},Ne={class:"value"},Ee={key:1},Te={class:"value"},Ve=["colspan"],Be=["src"],Me={key:2,class:"sitesTableSparkline"},Pe=["href","title"],we=["src"];function De(e,t,o,a,i,s){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{class:Object(r["normalizeClass"])({sitesTableGroup:!!e.site.isGroup,sitesTableGroupSite:!e.site.isGroup&&!!e.site.group,sitesTableSite:!e.site.isGroup&&!e.site.group})},[Object(r["createElementVNode"])("td",he,[e.site.isGroup?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Se,Object(r["toDisplayString"])(e.siteLabel),1)):(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[Object(r["createElementVNode"])("a",{rel:"noreferrer noopener",target:"_blank",href:e.site.main_url,title:e.translate("General_GoTo",e.site.main_url)},je,8,Oe),Object(r["createElementVNode"])("a",{title:"View reports",class:"value",href:e.dashboardUrl},Object(r["toDisplayString"])(e.siteLabel),9,ke)],64))]),Object(r["createElementVNode"])("td",null,[Object(r["createElementVNode"])("span",Ce,Object(r["toDisplayString"])(e.formatNumber(e.site.nb_visits)),1)]),Object(r["createElementVNode"])("td",null,[Object(r["createElementVNode"])("span",fe,Object(r["toDisplayString"])(e.formatNumber(e.site.nb_pageviews)),1)]),e.showAiChatbotsRequests?(Object(r["openBlock"])(),Object(r["createElementBlock"])("td",ye,[Object(r["createElementVNode"])("span",_e,Object(r["toDisplayString"])(e.formatNumber(e.site.ai_chatbots_requests)),1)])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("td",null,[Object(r["createElementVNode"])("span",Ne,Object(r["toDisplayString"])(e.formatNumber(e.site.hits)),1)]),e.displayRevenue?(Object(r["openBlock"])(),Object(r["createElementBlock"])("td",Ee,[Object(r["createElementVNode"])("span",Te,Object(r["toDisplayString"])(e.formatCurrency(e.site.revenue,e.site.currencySymbol||"")),1)])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("td",{colspan:e.displaySparkline?1:2},[!e.site.isGroup&&e.sparklineMetric in e.site?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:0},[Object(r["createElementVNode"])("img",{src:e.evolutionIconSrc,alt:""},null,8,Be),Object(r["createElementVNode"])("span",{class:Object(r["normalizeClass"])(e.evolutionTrendClass)},Object(r["toDisplayString"])(e.calculateAndFormatEvolution(e.site[e.sparklineMetric],e.site["previous_"+e.sparklineMetric]*e.site.ratio,!0)),3)],64)):Object(r["createCommentVNode"])("",!0)],8,Ve),e.displaySparkline?(Object(r["openBlock"])(),Object(r["createElementBlock"])("td",Me,[e.site.isGroup?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",target:"_blank",href:e.dashboardUrl,title:e.translate("General_GoTo",e.translate("Dashboard_DashboardOf",e.siteLabel))},[Object(r["createElementVNode"])("img",{alt:"",width:"100",height:"25",src:e.evolutionSparklineSrc},null,8,we)],8,Pe))])):Object(r["createCommentVNode"])("",!0)],2)}var Re=Object(r["defineComponent"])({props:{displayRevenue:{type:Boolean,required:!0},evolutionMetric:{type:String,required:!0},modelValue:{type:Object,required:!0},sparklineMetric:String,displaySparkline:Boolean,showAiChatbotsRequests:{type:Boolean,required:!0}},computed:{dashboardUrl(){const e=S["MatomoUrl"].stringify({module:"CoreHome",action:"index",date:S["Matomo"].currentDateString,period:S["Matomo"].period,idSite:this.site.idsite});return`?${e}${this.tokenParam}`},evolutionIconSrc(){return 1===this.evolutionTrend?"plugins/MultiSites/images/arrow_up.svg":-1===this.evolutionTrend?"plugins/MultiSites/images/arrow_down.svg":"plugins/MultiSites/images/stop.svg"},evolutionSparklineSrc(){let e=S["Matomo"].currentDateString;if("range"!==S["Matomo"].period){const{startDate:t,endDate:o}=S["Range"].getLastNRange(S["Matomo"].period,"30",S["Matomo"].currentDateString);e=`${Object(S["format"])(t)},${Object(S["format"])(o)}`}const t=S["MatomoUrl"].stringify({module:"MultiSites",action:"getEvolutionGraph",date:e,period:S["Matomo"].period,idSite:this.site.idsite,columns:this.sparklineMetric,evolutionBy:this.sparklineMetric,colors:JSON.stringify(S["Matomo"].getSparklineColors()),viewDataTable:"sparkline"});return`?${t}${this.tokenParam}`},evolutionTrend(){const e=this.evolutionMetric+"_trend";return this.site[e]},evolutionTrendClass(){return 1===this.evolutionTrend?"evolutionTrendPositive":-1===this.evolutionTrend?"evolutionTrendNegative":""},site(){return this.modelValue},siteLabel(){return S["Matomo"].helper.htmlDecode(this.site.label)},tokenParam(){const e=S["MatomoUrl"].urlParsed.value.token_auth;return e?"&token_auth="+e:""}}});Re.render=De;var qe=Re,Ae=Object(r["defineComponent"])({directives:{Tooltips:S["Tooltips"]},components:{MatomoLoader:S["MatomoLoader"],SitesTableSite:qe},props:{displayRevenue:{type:Boolean,required:!0},displaySparklines:{type:Boolean,required:!0},showAiChatbotsRequests:{type:Boolean,required:!0},isSegmented:{type:Boolean,required:!0}},data(){return{evolutionSelector:"visits_evolution"}},watch:{isSegmented(){this.ensureEvolutionSelectorIsValid()}},computed:{errorLoading(){return N.state.value.errorLoading},errorShowProfessionalHelp(){return S["Matomo"].config&&S["Matomo"].config.are_ads_enabled},evolutionMetric(){return this.evolutionSelector},isLoading(){return N.state.value.isLoadingSites},numberOfFilteredSites(){return N.state.value.numSites},paginationCurrentPage(){return N.state.value.paginationCurrentPage},paginationLowerBound(){return N.paginationLowerBound.value},paginationUpperBound(){return N.paginationUpperBound.value},paginationMaxPage(){return N.numberOfPages.value},sites(){return N.state.value.dashboardSites},sortColumn(){return N.state.value.sortColumn},sortColumnClass(){return{sitesTableSort:!0,sitesTableSortAsc:"asc"===this.sortOrder,sitesTableSortDesc:"desc"===this.sortOrder}},sortOrder(){return N.state.value.sortOrder},sparklineMetric(){switch(this.evolutionMetric){case"hits_evolution":return"hits";case"pageviews_evolution":return"nb_pageviews";case"ai_chatbots_requests_evolution":return"ai_chatbots_requests";case"revenue_evolution":return"revenue";case"visits_evolution":return"nb_visits";default:return""}},loadingColspan(){let e=6;return this.showAiChatbotsRequests&&!this.isSegmented&&(e+=1),this.displayRevenue&&(e+=1),this.displaySparklines&&(e+=1),e}},methods:{changeEvolutionSelector(e){this.evolutionSelector=e,this.sortBy(e)},ensureEvolutionSelectorIsValid(){"ai_chatbots_requests_evolution"!==this.evolutionSelector||!this.isSegmented&&this.showAiChatbotsRequests||(this.evolutionSelector="visits_evolution",this.sortBy(this.evolutionSelector))},navigateNextPage(){N.navigateNextPage()},navigatePreviousPage(){N.navigatePreviousPage()},sortBy(e){N.sortBy(e)}}});Ae.render=ve;var xe=Ae,Le=Object(r["defineComponent"])({components:{EnrichedHeadline:S["EnrichedHeadline"],KPICardContainer:$,SitesTable:xe},props:{autoRefreshInterval:{type:Number,required:!0},displayRevenue:{type:Boolean,required:!0},displaySparklines:{type:Boolean,required:!0},hasBotTrackingEnabled:{type:Boolean,required:!0},isWidgetized:{type:Boolean,required:!0},pageSize:{type:Number,required:!0}},data(){return{searchTerm:""}},mounted(){Object(r["watch"])(()=>S["MatomoUrl"].hashParsed.value,()=>N.reloadDashboard()),N.setAutoRefreshInterval(this.autoRefreshInterval),N.setPageSize(this.pageSize),N.reloadDashboard()},computed:{addSiteUrl(){return"?"+S["MatomoUrl"].stringify(Object.assign(Object.assign(Object.assign({},S["MatomoUrl"].urlParsed.value),S["MatomoUrl"].hashParsed.value),{},{module:"SitesManager",action:"index",showaddsite:"1"}))},isLoadingKPIs(){return N.state.value.isLoadingKPIs},errorLoading(){return N.state.value.errorLoading},isSegmented(){return!!S["MatomoUrl"].parsed.value.segment},kpis(){var e,t,o;const{dashboardKPIs:a}=N.state.value,{hasBotTrackingEnabled:i,isSegmented:r}=this,s=[{badge:(null===(e=a.badges)||void 0===e?void 0:e.visits)||null,icon:"icon-user",title:"MultiSites_TotalVisits",value:a.visits,valueCompact:a.visitsCompact,evolutionPeriod:a.evolutionPeriod,evolutionTrend:a.visitsTrend,evolutionValue:a.visitsEvolution},{badge:(null===(t=a.badges)||void 0===t?void 0:t.pageviews)||null,icon:"icon-show",title:"MultiSites_TotalPageviews",value:a.pageviews,valueCompact:a.pageviewsCompact,evolutionPeriod:a.evolutionPeriod,evolutionTrend:a.pageviewsTrend,evolutionValue:a.pageviewsEvolution}];var n,l;i&&s.push({badge:r?{label:Object(S["translate"])("MultiSites_SegmentationNotSupported"),title:Object(S["translate"])("MultiSites_AiChatbotsSegmentationTooltip")}:null===(n=a.badges)||void 0===n?void 0:n.aiChatbotsRequests,icon:"icon-admin-platform",title:"MultiSites_TotalAiChatbotsRequests",tooltipBody:r?"MultiSites_AiChatbotsSegmentationTooltip":void 0,value:a.aiChatbotsRequests,valueCompact:a.aiChatbotsRequestsCompact,evolutionPeriod:a.evolutionPeriod,evolutionTrend:a.aiChatbotsRequestsTrend,evolutionValue:a.aiChatbotsRequestsEvolution});(s.push({badge:(null===(o=a.badges)||void 0===o?void 0:o.hits)||null,icon:"icon-hits",title:"MultiSites_TotalHits",tooltipBody:!r&&i?"MultiSites_TotalHitsIncludingAiTooltip":void 0,value:a.hits,valueCompact:a.hitsCompact,evolutionPeriod:a.evolutionPeriod,evolutionTrend:a.hitsTrend,evolutionValue:a.hitsEvolution}),this.displayRevenue)&&s.push({badge:(null===(l=a.badges)||void 0===l?void 0:l.revenue)||null,icon:"icon-dollar-sign",title:"General_TotalRevenue",value:a.revenue,valueCompact:a.revenueCompact,evolutionPeriod:a.evolutionPeriod,evolutionTrend:a.revenueTrend,evolutionValue:a.revenueEvolution});return s},isUserAllowedToAddSite(){return S["Matomo"].hasSuperUserAccess}},methods:{searchSite(e){N.searchSite(e)}}});Le.render=k;var Fe=Le;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Referrers"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Referrers"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/Referrers/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"CampaignBuilder",(function(){return g})),"undefined"!==typeof window){var a=window.document.currentScript,i=a&&a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var l=n("8bbf");const r={class:"campaignUrlBuilder"},o={id:"urlCampaignBuilderResult"},c=["textContent"];function m(e,t,n,a,i,m){const p=Object(l["resolveComponent"])("Field"),u=Object(l["resolveComponent"])("SaveButton"),d=Object(l["resolveDirective"])("copy-to-clipboard");return Object(l["openBlock"])(),Object(l["createElementBlock"])("div",r,[Object(l["createElementVNode"])("form",null,[Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(p,{uicontrol:"text",name:"websiteurl",title:`${e.translate("Actions_ColumnPageURL")} (${e.translate("General_Required2")})`,modelValue:e.websiteUrl,"onUpdate:modelValue":t[0]||(t[0]=t=>e.websiteUrl=t),"inline-help":e.translate("Referrers_CampaignPageUrlHelp")},null,8,["title","modelValue","inline-help"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(p,{uicontrol:"text",name:"campaignname",title:`${e.translate("CoreAdminHome_JSTracking_CampaignNameParam")} (${e.translate("General_Required2")})`,modelValue:e.campaignName,"onUpdate:modelValue":t[1]||(t[1]=t=>e.campaignName=t),"inline-help":e.translate("Referrers_CampaignNameHelp")},null,8,["title","modelValue","inline-help"])]),Object(l["createElementVNode"])("div",null,[Object(l["createVNode"])(p,{uicontrol:"text",name:"campaignkeyword",title:e.translate("CoreAdminHome_JSTracking_CampaignKwdParam"),modelValue:e.campaignKeyword,"onUpdate:modelValue":t[2]||(t[2]=t=>e.campaignKeyword=t),"inline-help":`${e.translate("Goals_Optional")} ${e.translate("Referrers_CampaignKeywordHelp")}`},null,8,["title","modelValue","inline-help"])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(p,{uicontrol:"text",name:"campaignsource",title:e.translate("Referrers_CampaignSource"),modelValue:e.campaignSource,"onUpdate:modelValue":t[3]||(t[3]=t=>e.campaignSource=t),"inline-help":`${e.translate("Goals_Optional")} ${e.translate("Referrers_CampaignSourceHelp")}`},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(p,{uicontrol:"text",name:"campaignmedium",title:e.translate("Referrers_CampaignMedium"),modelValue:e.campaignMedium,"onUpdate:modelValue":t[4]||(t[4]=t=>e.campaignMedium=t),"inline-help":`${e.translate("Goals_Optional")} ${e.translate("Referrers_CampaignMediumHelp")}`},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(p,{uicontrol:"text",name:"campaigncontent",title:e.translate("Referrers_CampaignContent"),modelValue:e.campaignContent,"onUpdate:modelValue":t[5]||(t[5]=t=>e.campaignContent=t),"inline-help":`${e.translate("Goals_Optional")} ${e.translate("Referrers_CampaignContentHelp")}`},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(p,{uicontrol:"text",name:"campaignid",title:e.translate("Referrers_CampaignId"),modelValue:e.campaignId,"onUpdate:modelValue":t[6]||(t[6]=t=>e.campaignId=t),"inline-help":`${e.translate("Goals_Optional")} ${e.translate("Referrers_CampaignIdHelp")}`},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(p,{uicontrol:"text",name:"campaigngroup",title:e.translate("Referrers_CampaignGroup"),modelValue:e.campaignGroup,"onUpdate:modelValue":t[7]||(t[7]=t=>e.campaignGroup=t),"inline-help":`${e.translate("Goals_Optional")} ${e.translate("Referrers_CampaignGroupHelp")}`},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])(Object(l["createVNode"])(p,{uicontrol:"text",name:"campaignplacement",title:e.translate("Referrers_CampaignPlacement"),modelValue:e.campaignPlacement,"onUpdate:modelValue":t[8]||(t[8]=t=>e.campaignPlacement=t),"inline-help":`${e.translate("Goals_Optional")} ${e.translate("Referrers_CampaignPlacementHelp")}`},null,8,["title","modelValue","inline-help"]),[[l["vShow"],e.hasExtraPlugin]])]),Object(l["createVNode"])(u,{class:"generateCampaignUrl",onConfirm:t[9]||(t[9]=t=>e.generateUrl()),disabled:!e.websiteUrl||!e.campaignName,value:e.translate("Referrers_GenerateUrl"),style:{"margin-right":"3.5px"}},null,8,["disabled","value"]),Object(l["createVNode"])(u,{class:"resetCampaignUrl",onConfirm:t[10]||(t[10]=t=>e.reset()),value:e.translate("General_Clear")},null,8,["value"]),Object(l["withDirectives"])(Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("Referrers_URLCampaignBuilderResult")),1),Object(l["createElementVNode"])("div",null,[Object(l["withDirectives"])((Object(l["openBlock"])(),Object(l["createElementBlock"])("pre",o,[Object(l["createElementVNode"])("code",{textContent:Object(l["toDisplayString"])(e.generatedUrl)},null,8,c)])),[[d,{}]])])],512),[[l["vShow"],e.generatedUrl]])])])}var p=n("19dc"),u=n("a5a2");const{$:d}=window;var s=Object(l["defineComponent"])({props:{hasExtraPlugin:{type:Boolean,default:!0}},components:{Field:u["Field"],SaveButton:u["SaveButton"]},directives:{CopyToClipboard:p["CopyToClipboard"]},data(){return{websiteUrl:"",campaignName:"",campaignKeyword:"",campaignSource:"",campaignMedium:"",campaignId:"",campaignContent:"",campaignGroup:"",campaignPlacement:"",generatedUrl:""}},created(){this.reset()},watch:{generatedUrl(){d("#urlCampaignBuilderResult").effect("highlight",{},1500)}},methods:{reset(){this.websiteUrl="",this.campaignName="",this.campaignKeyword="",this.campaignSource="",this.campaignMedium="",this.campaignId="",this.campaignContent="",this.campaignGroup="",this.campaignPlacement="",this.generatedUrl=""},generateUrl(){let e=String(this.websiteUrl);0!==e.indexOf("http")&&(e="https://"+e.trim());const t=e.indexOf("#");let n="";t>=0&&(n=e.slice(t),e=e.slice(0,t)),e.indexOf("/",10)<0&&e.indexOf("?")<0&&(e+="/");const a=encodeURIComponent(this.campaignName.trim());e.indexOf("?")>0||e.indexOf("#")>0?e+="&":e+="?",e+="mtm_campaign="+a,this.campaignKeyword&&(e+="&mtm_kwd="+encodeURIComponent(this.campaignKeyword.trim())),this.campaignSource&&(e+="&mtm_source="+encodeURIComponent(this.campaignSource.trim())),this.campaignMedium&&(e+="&mtm_medium="+encodeURIComponent(this.campaignMedium.trim())),this.campaignContent&&(e+="&mtm_content="+encodeURIComponent(this.campaignContent.trim())),this.campaignId&&(e+="&mtm_cid="+encodeURIComponent(this.campaignId.trim())),this.campaignGroup&&(e+="&mtm_group="+encodeURIComponent(this.campaignGroup.trim())),this.campaignPlacement&&(e+="&mtm_placement="+encodeURIComponent(this.campaignPlacement.trim())),e+=n,this.generatedUrl=e}}});s.render=m;var g=s;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["DevicesDetection"]=t(require("CoreHome"),require("vue")):e["DevicesDetection"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(l){if(t[l])return t[l].exports;var c=t[l]={i:l,l:!1,exports:{}};return e[l].call(c.exports,c,c.exports,n),c.l=!0,c.exports}return n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(l,c,function(t){return e[t]}.bind(null,c));return l},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/DevicesDetection/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"DetectionPage",(function(){return k})),"undefined"!==typeof window){var l=window.document.currentScript,c=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);c&&(n.p=c[1])}var o=n("8bbf");const i={class:"detectionPage"},r={action:"",method:"POST"},a=Object(o["createElementVNode"])("br",null,null,-1),s={key:0,class:"checkbox-container usech"},d=Object(o["createElementVNode"])("br",null,null,-1),b=Object(o["createElementVNode"])("br",null,null,-1),u=["value"],j={key:0},m={key:1},O={class:"detection"},p=["src"],g=["src"],V={class:"detection"},f=["src"],N=["src"],h={class:"detection"},D=["src"],v=["src"],y={class:"ui-confirm",id:"deviceDetectionItemList",ref:"deviceDetectionItemList"},E=["innerHTML"],_=["value"];function S(e,t,n,l,c,S){const w=Object(o["resolveComponent"])("ContentBlock"),x=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",i,[Object(o["createVNode"])(w,{"content-title":e.translate("DevicesDetection_DeviceDetection")},{default:Object(o["withCtx"])(()=>[Object(o["createElementVNode"])("form",r,[Object(o["createElementVNode"])("h3",null,Object(o["toDisplayString"])(e.translate("DevicesDetection_UserAgent")),1),Object(o["withDirectives"])(Object(o["createElementVNode"])("textarea",{name:"ua","onUpdate:modelValue":t[0]||(t[0]=t=>e.userAgentText=t)},null,512),[[o["vModelText"],e.userAgentText]]),a,Object(o["createElementVNode"])("h3",null,Object(o["toDisplayString"])(e.translate("DevicesDetection_ClientHints")),1),e.isClientHintsSupported?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",s,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"usech","onUpdate:modelValue":t[1]||(t[1]=t=>e.considerClientHints=t),onChange:t[2]||(t[2]=t=>e.toggleClientHints())},null,544),[[o["vModelCheckbox"],e.considerClientHints]]),Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.translate("DevicesDetection_ConsiderClientHints")),1)])])):Object(o["createCommentVNode"])("",!0),e.isClientHintsSupported&&e.considerClientHints?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("textarea",{key:1,name:"clienthints",style:{"margin-top":"2em"},"onUpdate:modelValue":t[3]||(t[3]=t=>e.clientHintsText=t)},null,512)),[[o["vModelText"],e.clientHintsText]]):Object(o["createCommentVNode"])("",!0),Object(o["withDirectives"])(Object(o["createElementVNode"])("span",{id:"noclienthints",class:"alert alert-warning"},Object(o["toDisplayString"])(e.translate("DevicesDetection_ClientHintsNotSupported")),513),[[o["vShow"],!e.isClientHintsSupported]]),d,b,Object(o["createElementVNode"])("input",{type:"submit",value:e.translate("General_Refresh"),class:"btn"},null,8,u)]),e.bot_info?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",j,Object(o["toDisplayString"])(e.translate("DevicesDetection_BotDetected",e.bot_info.name)),1)):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",m,[Object(o["createElementVNode"])("h3",null,Object(o["toDisplayString"])(e.translate("DevicesDetection_ColumnOperatingSystem")),1),Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("table",O,[Object(o["createElementVNode"])("tbody",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_Name"))+" ",1),Object(o["createElementVNode"])("small",null,[Object(o["createTextVNode"])(" ("),Object(o["createElementVNode"])("a",{href:"",onClick:t[4]||(t[4]=Object(o["withModifiers"])(t=>e.showList("os"),["prevent"]))},Object(o["toDisplayString"])(e.translate("Mobile_ShowAll")),1),Object(o["createTextVNode"])(") ")])]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("img",{height:16,width:16,src:e.os_logo},null,8,p),Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.os_name),1)])]),Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.translate("CorePluginsAdmin_Version")),1),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.os_version),1)]),Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("DevicesDetection_OperatingSystemFamily"))+" ",1),Object(o["createElementVNode"])("small",null,[Object(o["createTextVNode"])(" ("),Object(o["createElementVNode"])("a",{href:"",onClick:t[5]||(t[5]=Object(o["withModifiers"])(t=>e.showList("osfamilies"),["prevent"]))},Object(o["toDisplayString"])(e.translate("Mobile_ShowAll")),1),Object(o["createTextVNode"])(") ")])]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("img",{height:16,width:16,src:e.os_family_logo},null,8,g),Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.os_family),1)])])])])),[[x]]),Object(o["createElementVNode"])("h3",null,Object(o["toDisplayString"])(e.translate("DevicesDetection_ColumnBrowser")),1),Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("table",V,[Object(o["createElementVNode"])("tbody",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_Name"))+" ",1),Object(o["createElementVNode"])("small",null,[Object(o["createTextVNode"])(" ("),Object(o["createElementVNode"])("a",{href:"",onClick:t[6]||(t[6]=Object(o["withModifiers"])(t=>e.showList("browsers"),["prevent"]))},Object(o["toDisplayString"])(e.translate("Mobile_ShowAll")),1),Object(o["createTextVNode"])(") ")])]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("img",{height:16,width:16,src:e.browser_logo},null,8,f),Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.browser_name),1)])]),Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.translate("CorePluginsAdmin_Version")),1),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.browser_version),1)]),Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("DevicesDetection_BrowserFamily"))+" ",1),Object(o["createElementVNode"])("small",null,[Object(o["createTextVNode"])(" ("),Object(o["createElementVNode"])("a",{href:"",onClick:t[7]||(t[7]=Object(o["withModifiers"])(t=>e.showList("browserfamilies"),["prevent"]))},Object(o["toDisplayString"])(e.translate("Mobile_ShowAll")),1),Object(o["createTextVNode"])(") ")])]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("img",{height:16,width:16,src:e.browser_family_logo},null,8,N),Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.browser_family),1)])])])])),[[x]]),Object(o["createElementVNode"])("h3",null,Object(o["toDisplayString"])(e.translate("DevicesDetection_Device")),1),Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("table",h,[Object(o["createElementVNode"])("tbody",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("DevicesDetection_dataTableLabelTypes"))+" ",1),Object(o["createElementVNode"])("small",null,[Object(o["createTextVNode"])(" ("),Object(o["createElementVNode"])("a",{href:"",onClick:t[8]||(t[8]=Object(o["withModifiers"])(t=>e.showList("devicetypes"),["prevent"]))},Object(o["toDisplayString"])(e.translate("Mobile_ShowAll")),1),Object(o["createTextVNode"])(") ")])]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("img",{height:16,width:16,src:e.device_type_logo},null,8,D),Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.device_type),1)])]),Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("DevicesDetection_dataTableLabelBrands"))+" ",1),Object(o["createElementVNode"])("small",null,[Object(o["createTextVNode"])(" ("),Object(o["createElementVNode"])("a",{href:"",onClick:t[9]||(t[9]=Object(o["withModifiers"])(t=>e.showList("brands"),["prevent"]))},Object(o["toDisplayString"])(e.translate("Mobile_ShowAll")),1),Object(o["createTextVNode"])(") ")])]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("img",{height:16,width:16,src:e.device_brand_logo},null,8,v),Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.device_brand),1)])]),Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.translate("DevicesDetection_dataTableLabelModels")),1),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(e.device_model),1)])])])),[[x]])]))]),_:1},8,["content-title"]),Object(o["createElementVNode"])("div",y,[Object(o["createElementVNode"])("div",{class:"itemList",innerHTML:e.$sanitize(e.itemListHtml)},null,8,E),Object(o["createElementVNode"])("input",{role:"close",type:"button",value:e.translate("General_Close")},null,8,_)],512)])}var w=n("19dc");function x(){const e=navigator;return e.userAgentData&&"function"===typeof e.userAgentData.getHighEntropyValues}let C=null;function T(){const e=navigator;return x()?C?Promise.resolve(C):(C={brands:e.userAgentData.brands,platform:e.userAgentData.platform},e.userAgentData.getHighEntropyValues(["brands","model","platform","platformVersion","uaFullVersion","fullVersionList"]).then(e=>(C=Object.assign({},e),C.fullVersionList&&(delete C.brands,delete C.uaFullVersion),C))):Promise.resolve(null)}var H=Object(o["defineComponent"])({props:{userAgent:{type:String,required:!0},bot_info:Object,os_logo:String,os_name:String,os_version:String,os_family_logo:String,os_family:String,browser_logo:String,browser_name:String,browser_version:String,browser_family:String,browser_family_logo:String,device_type_logo:String,device_type:String,device_brand_logo:String,device_brand:String,device_model:String,clientHintsChecked:Boolean},components:{ContentBlock:w["ContentBlock"]},directives:{ContentTable:w["ContentTable"]},created(){T().then(e=>{this.defaultClientHints=e,this.toggleClientHints()})},data(){return{itemListHtml:"",considerClientHints:!!this.clientHintsChecked,clientHintsText:"",userAgentText:this.userAgent,defaultClientHints:null}},methods:{showList(e){w["AjaxHelper"].fetch({module:"DevicesDetection",action:"showList",type:e},{format:"html"}).then(e=>{this.itemListHtml=e,w["Matomo"].helper.modalConfirm(this.$refs.deviceDetectionItemList,void 0,{fixedFooter:!0})})},toggleClientHints(){this.considerClientHints&&null!==this.defaultClientHints?this.clientHintsText=this.clientHintsText||JSON.stringify(this.defaultClientHints):this.clientHintsText=""}},computed:{isClientHintsSupported(){return x()}}});H.render=S;var k=H;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Goals"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Goals"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,a){return function(e){var t={};function a(l){if(t[l])return t[l].exports;var o=t[l]={i:l,l:!1,exports:{}};return e[l].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=e,a.c=t,a.d=function(e,t,l){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(l,o,function(t){return e[t]}.bind(null,o));return l},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="plugins/Goals/vue/dist/",a(a.s="fae3")}({"19dc":function(t,a){t.exports=e},"8bbf":function(e,a){e.exports=t},a5a2:function(e,t){e.exports=a},fae3:function(e,t,a){"use strict";if(a.r(t),a.d(t,"GoalPageLink",(function(){return s})),a.d(t,"ManageGoals",(function(){return Se})),a.d(t,"ManageGoalsStore",(function(){return Ee})),"undefined"!==typeof window){var l=window.document.currentScript,o=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(a.p=o[1])}var n=a("19dc");
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
const{$:r}=window,i={mounted(e,t){if(!n["Matomo"].helper.isReportingPage())return;const a=r(e).text(),l=r("<a></a>");l.text(a),l.attr("title",Object(n["translate"])("Goals_ClickToViewThisGoal")),l.click(e=>{e.preventDefault(),n["MatomoUrl"].updateHash(Object.assign(Object.assign({},n["MatomoUrl"].hashParsed.value),{},{category:"Goals_Goals",subcategory:t.value.idGoal}))}),r(e).html(l[0])}};var s=i;n["Matomo"].on("Matomo.processDynamicHtml",e=>{e.find("[goal-page-link]").each((e,t)=>{if(r(t).attr("goal-page-link-handled"))return;const a=r(t).attr("goal-page-link");a&&i.mounted(t,{instance:null,value:{idGoal:a},oldValue:null,modifiers:{},dir:{}}),r(t).attr("goal-page-link-handled","1")})});var c=a("8bbf");const d={class:"manageGoals"},u={id:"entityEditContainer",feature:"true",class:"managegoals"},b={class:"contentHelp"},m=["innerHTML"],p={key:0},O=Object(c["createElementVNode"])("br",null,null,-1),g=Object(c["createElementVNode"])("br",null,null,-1),j=["innerHTML"],h={class:"first"},v={class:"manageGoals-descriptionColumn"},y={class:"manageGoals-triggerColumn"},G={key:1,class:"manageGoals-actionsColumn"},_={key:0},V={colspan:"8"},E=Object(c["createElementVNode"])("br",null,null,-1),N=Object(c["createElementVNode"])("br",null,null,-1),f=Object(c["createElementVNode"])("br",null,null,-1),w=["id"],S={class:"first"},T={class:"manageGoals-descriptionColumn"},C={class:"manageGoals-triggerColumn"},D={class:"matchAttribute"},x={key:0},k={key:1},M=Object(c["createElementVNode"])("br",null,null,-1),A=["innerHTML"],B={key:1,class:"entityTable_ActionCell entityTable_ActionCell-3 manageGoals-actionsColumn"},L=["href","title","aria-label"],U=["onClick","title"],H=["onClick","title"],F={key:0,class:"tableActionBar"},$=Object(c["createElementVNode"])("span",{class:"icon-add"},null,-1),P={class:"ui-confirm",ref:"confirm"},R=["value"],I=["value"],z={class:"addEditGoal"},q=["innerHTML"],W={class:"row goalIsTriggeredWhen"},J={class:"col s12"},Y={class:"row"},K={class:"col s12 m6 goalTriggerType"},Q={class:"col s12 m6"},X=["innerHTML"],Z={class:"row whereTheMatchAttrbiute"},ee={class:"col s12"},te={class:"row"},ae={class:"col s12 m6 l4"},le={key:0,class:"col s12 m6 l4"},oe={key:1,class:"col s12 m6 l4"},ne={class:"col s12 m6 l4"},re={id:"examples_pattern",class:"col s12"},ie=Object(c["createElementVNode"])("br",null,null,-1),se=Object(c["createElementVNode"])("br",null,null,-1),ce=Object(c["createElementVNode"])("br",null,null,-1),de=Object(c["createElementVNode"])("br",null,null,-1),ue=Object(c["createElementVNode"])("br",null,null,-1),be=Object(c["createElementVNode"])("br",null,null,-1),me=Object(c["createElementVNode"])("br",null,null,-1),pe=Object(c["createElementVNode"])("br",null,null,-1),Oe={ref:"endedittable"},ge=Object(c["createElementVNode"])("input",{type:"hidden",name:"goalIdUpdate",value:""},null,-1),je={key:0},he=["innerHTML"],ve=Object(c["createElementVNode"])("a",{id:"bottom"},null,-1);function ye(e,t,a,l,o,n){var r;const i=Object(c["resolveComponent"])("ActivityIndicator"),s=Object(c["resolveComponent"])("ContentBlock"),ye=Object(c["resolveComponent"])("Field"),Ge=Object(c["resolveComponent"])("Alert"),_e=Object(c["resolveComponent"])("VueEntryContainer"),Ve=Object(c["resolveComponent"])("SaveButton"),Ee=Object(c["resolveDirective"])("content-table"),Ne=Object(c["resolveDirective"])("form");return Object(c["openBlock"])(),Object(c["createElementBlock"])("div",d,[Object(c["withDirectives"])(Object(c["createElementVNode"])("div",null,[Object(c["withDirectives"])(Object(c["createElementVNode"])("div",u,[Object(c["createVNode"])(s,{"content-title":e.translate("Goals_ManageGoals")},{default:Object(c["withCtx"])(()=>[Object(c["createVNode"])(i,{loading:e.isLoading},null,8,["loading"]),Object(c["createElementVNode"])("div",b,[Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.learnMoreAboutGoalTracking)},null,8,m),e.ecommerceEnabled?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",p,[O,g,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Goals_Optional"))+" "+Object(c["toDisplayString"])(e.translate("Goals_Ecommerce"))+": ",1),Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.youCanEnableEcommerceReports)},null,8,j)]))]),Object(c["withDirectives"])((Object(c["openBlock"])(),Object(c["createElementBlock"])("table",null,[Object(c["createElementVNode"])("thead",null,[Object(c["createElementVNode"])("tr",null,[Object(c["createElementVNode"])("th",h,Object(c["toDisplayString"])(e.translate("General_Id")),1),Object(c["createElementVNode"])("th",null,Object(c["toDisplayString"])(e.translate("Goals_GoalName")),1),Object(c["createElementVNode"])("th",v,Object(c["toDisplayString"])(e.translate("General_Description")),1),Object(c["createElementVNode"])("th",y,Object(c["toDisplayString"])(e.translate("Goals_GoalIsTriggeredWhen")),1),Object(c["createElementVNode"])("th",null,Object(c["toDisplayString"])(e.translate("General_ColumnRevenue")),1),e.beforeGoalListActionsHeadComponent?(Object(c["openBlock"])(),Object(c["createBlock"])(Object(c["resolveDynamicComponent"])(e.beforeGoalListActionsHeadComponent),{key:0})):Object(c["createCommentVNode"])("",!0),e.userCanEditGoals?(Object(c["openBlock"])(),Object(c["createElementBlock"])("th",G,Object(c["toDisplayString"])(e.translate("General_Actions")),1)):Object(c["createCommentVNode"])("",!0)])]),Object(c["createElementVNode"])("tbody",null,[Object.keys(e.goals||{}).length?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("tr",_,[Object(c["createElementVNode"])("td",V,[E,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Goals_ThereIsNoGoalToManage",e.siteName))+" ",1),N,f])])),(Object(c["openBlock"])(!0),Object(c["createElementBlock"])(c["Fragment"],null,Object(c["renderList"])(e.goals||[],t=>(Object(c["openBlock"])(),Object(c["createElementBlock"])("tr",{id:t.idgoal,key:t.idgoal},[Object(c["createElementVNode"])("td",S,Object(c["toDisplayString"])(t.idgoal),1),Object(c["createElementVNode"])("td",null,Object(c["toDisplayString"])(t.name),1),Object(c["createElementVNode"])("td",T,Object(c["toDisplayString"])(t.description),1),Object(c["createElementVNode"])("td",C,[Object(c["createElementVNode"])("span",D,Object(c["toDisplayString"])(e.goalMatchAttributeTranslations[t.match_attribute]||t.match_attribute),1),"visit_duration"===t.match_attribute?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",x,Object(c["toDisplayString"])(e.lcfirst(e.translate("General_OperationGreaterThan")))+" "+Object(c["toDisplayString"])(e.translate("Intl_NMinutes",t.pattern)),1)):t.pattern_type?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",k,[M,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Goals_Pattern"))+" "+Object(c["toDisplayString"])(t.pattern_type)+": "+Object(c["toDisplayString"])(t.pattern),1)])):Object(c["createCommentVNode"])("",!0)]),Object(c["createElementVNode"])("td",{class:"center",innerHTML:e.$sanitize(0===t.revenue||"0"===t.revenue?"-":t.revenue_pretty)},null,8,A),e.beforeGoalListActionsBodyComponent[t.idgoal]?(Object(c["openBlock"])(),Object(c["createBlock"])(Object(c["resolveDynamicComponent"])(e.beforeGoalListActionsBodyComponent[t.idgoal]),{key:0})):Object(c["createCommentVNode"])("",!0),e.userCanEditGoals?(Object(c["openBlock"])(),Object(c["createElementBlock"])("td",B,[Object(c["createElementVNode"])("a",{class:"table-action icon-show",href:e.getGoalReportUrl(t.idgoal),title:e.translate("Goals_ViewGoalReport"),"aria-label":e.translate("Goals_ViewGoalReport")},null,8,L),Object(c["createElementVNode"])("button",{onClick:a=>e.editGoal(t.idgoal),class:"table-action icon-edit",title:e.translate("General_Edit")},null,8,U),Object(c["createElementVNode"])("button",{onClick:a=>e.deleteGoal(t.idgoal),class:"table-action icon-delete",title:e.translate("General_Delete")},null,8,H)])):Object(c["createCommentVNode"])("",!0)],8,w))),128))])])),[[Ee]]),e.userCanEditGoals&&!e.onlyShowAddNewGoal?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",F,[Object(c["createElementVNode"])("button",{id:"add-goal",onClick:t[0]||(t[0]=t=>e.createGoal())},[$,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("Goals_AddNewGoal")),1)])])):Object(c["createCommentVNode"])("",!0)]),_:1},8,["content-title"])],512),[[c["vShow"],e.showGoalList]]),Object(c["createElementVNode"])("div",P,[Object(c["createElementVNode"])("h2",null,Object(c["toDisplayString"])(e.translate("Goals_DeleteGoalConfirm",`"${null===(r=e.goalToDelete)||void 0===r?void 0:r.name}"`)),1),Object(c["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,R),Object(c["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,I)],512)],512),[[c["vShow"],!e.onlyShowAddNewGoal]]),Object(c["withDirectives"])(Object(c["createElementVNode"])("div",null,[Object(c["withDirectives"])(Object(c["createElementVNode"])("div",z,[Object(c["createVNode"])(s,{"content-title":e.goal.idgoal?e.translate("Goals_UpdateGoal"):e.translate("Goals_AddNewGoal")},{default:Object(c["withCtx"])(()=>[Object(c["createElementVNode"])("div",{innerHTML:e.$sanitize(e.addNewGoalIntro)},null,8,q),Object(c["withDirectives"])((Object(c["openBlock"])(),Object(c["createElementBlock"])("div",null,[Object(c["createElementVNode"])("div",null,[Object(c["createVNode"])(ye,{uicontrol:"text",name:"goal_name",modelValue:e.goal.name,"onUpdate:modelValue":t[1]||(t[1]=t=>e.goal.name=t),maxlength:50,autocomplete:"off",title:e.translate("Goals_GoalName"),onChange:e.goalNameChanged},null,8,["modelValue","title","onChange"])]),Object(c["createElementVNode"])("div",null,[Object(c["createVNode"])(ye,{uicontrol:"text",name:"goal_description",modelValue:e.goal.description,"onUpdate:modelValue":t[2]||(t[2]=t=>e.goal.description=t),maxlength:255,autocomplete:"off",title:e.translate("General_Description")},null,8,["modelValue","title"])]),Object(c["createElementVNode"])("div",W,[Object(c["createElementVNode"])("div",J,[Object(c["createElementVNode"])("h3",null,Object(c["toDisplayString"])(e.translate("Goals_GoalIsTriggered")),1)])]),Object(c["createElementVNode"])("div",Y,[Object(c["createElementVNode"])("div",K,[Object(c["createElementVNode"])("div",null,[Object(c["createVNode"])(ye,{uicontrol:"select",name:"trigger_type","model-value":e.triggerType,"onUpdate:modelValue":t[3]||(t[3]=t=>{e.triggerType=t,e.changedTriggerType()}),"full-width":!0,options:e.goalTriggerTypeOptions},null,8,["model-value","options"])])]),Object(c["createElementVNode"])("div",Q,[Object(c["withDirectives"])(Object(c["createVNode"])(Ge,{severity:"info"},{default:Object(c["withCtx"])(()=>[Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.whereVisitedPageManuallyCallsJsTrackerText)},null,8,X)]),_:1},512),[[c["vShow"],"manually"===e.triggerType]]),Object(c["createElementVNode"])("div",null,[Object(c["withDirectives"])(Object(c["createVNode"])(ye,{uicontrol:"radio",name:"match_attribute","full-width":!0,"model-value":e.goal.match_attribute,"onUpdate:modelValue":t[4]||(t[4]=t=>{e.goal.match_attribute=t,e.initPatternType()}),options:e.goalMatchAttributeOptions},null,8,["model-value","options"]),[[c["vShow"],"manually"!==e.triggerType]])])])]),Object(c["withDirectives"])(Object(c["createElementVNode"])("div",Z,[Object(c["createElementVNode"])("h3",ee,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("Goals_WhereThe"))+" ",1),Object(c["withDirectives"])(Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.translate("Goals_URL")),513),[[c["vShow"],"url"===e.goal.match_attribute]]),Object(c["withDirectives"])(Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.translate("Goals_PageTitle")),513),[[c["vShow"],"title"===e.goal.match_attribute]]),Object(c["withDirectives"])(Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.translate("Goals_Filename")),513),[[c["vShow"],"file"===e.goal.match_attribute]]),Object(c["withDirectives"])(Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.translate("Goals_ExternalWebsiteUrl")),513),[[c["vShow"],"external_website"===e.goal.match_attribute]]),Object(c["withDirectives"])(Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.translate("Goals_VisitDuration")),513),[[c["vShow"],"visit_duration"===e.goal.match_attribute]])])],512),[[c["vShow"],"manually"!==e.triggerType]]),Object(c["withDirectives"])(Object(c["createElementVNode"])("div",te,[Object(c["withDirectives"])(Object(c["createElementVNode"])("div",ae,[Object(c["createElementVNode"])("div",null,[Object(c["createVNode"])(ye,{uicontrol:"select",name:"event_type",modelValue:e.eventType,"onUpdate:modelValue":t[5]||(t[5]=t=>e.eventType=t),"full-width":!0,options:e.eventTypeOptions},null,8,["modelValue","options"])])],512),[[c["vShow"],"event"===e.goal.match_attribute]]),e.isMatchAttributeNumeric?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",le,[Object(c["createElementVNode"])("div",null,[Object(c["createVNode"])(ye,{uicontrol:"select",name:"pattern_type",modelValue:e.goal.pattern_type,"onUpdate:modelValue":t[6]||(t[6]=t=>e.goal.pattern_type=t),"full-width":!0,options:e.patternTypeOptions},null,8,["modelValue","options"])])])),e.isMatchAttributeNumeric?(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",oe,[Object(c["createElementVNode"])("div",null,[Object(c["createVNode"])(ye,{uicontrol:"select",name:"pattern_type",modelValue:e.goal.pattern_type,"onUpdate:modelValue":t[7]||(t[7]=t=>e.goal.pattern_type=t),"full-width":!0,options:e.numericComparisonTypeOptions},null,8,["modelValue","options"])])])):Object(c["createCommentVNode"])("",!0),Object(c["createElementVNode"])("div",ne,[Object(c["createElementVNode"])("div",null,[Object(c["createVNode"])(ye,{uicontrol:"text",name:"pattern",modelValue:e.goal.pattern,"onUpdate:modelValue":t[8]||(t[8]=t=>e.goal.pattern=t),maxlength:255,autocomplete:"off",title:e.patternFieldLabel,"full-width":!0},null,8,["modelValue","title"])])]),Object(c["createElementVNode"])("div",re,[Object(c["createVNode"])(Ge,{severity:"info"},{default:Object(c["withCtx"])(()=>[Object(c["withDirectives"])(Object(c["createElementVNode"])("span",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.translate("Goals_Contains","'checkout/confirmation'"))+" ",1),ie,Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.translate("Goals_IsExactly","'http://example.com/thank-you.html'"))+" ",1),se,Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.translate("Goals_MatchesExpression","'(.*)\\/demo\\/(.*)'")),1)],512),[[c["vShow"],"url"===e.goal.match_attribute]]),Object(c["withDirectives"])(Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.translate("Goals_Contains","'Order confirmation'")),513),[[c["vShow"],"title"===e.goal.match_attribute]]),Object(c["withDirectives"])(Object(c["createElementVNode"])("span",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.translate("Goals_Contains","'files/brochure.pdf'"))+" ",1),ce,Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.translate("Goals_IsExactly","'http://example.com/files/brochure.pdf'"))+" ",1),de,Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.translate("Goals_MatchesExpression","'(.*)\\.zip'")),1)],512),[[c["vShow"],"file"===e.goal.match_attribute]]),Object(c["withDirectives"])(Object(c["createElementVNode"])("span",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.translate("Goals_Contains","'amazon.com'"))+" ",1),ue,Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.translate("Goals_IsExactly","'http://mypartner.com/landing.html'"))+" ",1),be,Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.matchesExpressionExternal),1)],512),[[c["vShow"],"external_website"===e.goal.match_attribute]]),Object(c["withDirectives"])(Object(c["createElementVNode"])("span",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.translate("Goals_Contains","'video'"))+" ",1),me,Object(c["createTextVNode"])(" "+Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.translate("Goals_IsExactly","'click'"))+" ",1),pe,Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.translate("Goals_MatchesExpression","'(.*)_banner'"))+'" ',1)],512),[[c["vShow"],"event"===e.goal.match_attribute]]),Object(c["withDirectives"])(Object(c["createElementVNode"])("span",null,Object(c["toDisplayString"])(e.translate("General_ForExampleShort"))+" "+Object(c["toDisplayString"])(e.translate("Goals_AtLeastMinutes","5","0.5")),513),[[c["vShow"],"visit_duration"===e.goal.match_attribute]])]),_:1})])],512),[[c["vShow"],"manually"!==e.triggerType]]),Object(c["createElementVNode"])("div",null,[Object(c["withDirectives"])(Object(c["createVNode"])(ye,{uicontrol:"checkbox",name:"case_sensitive",modelValue:e.goal.case_sensitive,"onUpdate:modelValue":t[9]||(t[9]=t=>e.goal.case_sensitive=t),title:e.caseSensitiveTitle},null,8,["modelValue","title"]),[[c["vShow"],"manually"!==e.triggerType&&!e.isMatchAttributeNumeric]])]),Object(c["createElementVNode"])("div",null,["visit_duration"!==e.goal.match_attribute?(Object(c["openBlock"])(),Object(c["createBlock"])(ye,{key:0,uicontrol:"radio",name:"allow_multiple","model-value":e.goal.allow_multiple&&"0"!==e.goal.allow_multiple?1:0,"onUpdate:modelValue":t[10]||(t[10]=t=>e.goal.allow_multiple=t),options:e.allowMultipleOptions,introduction:e.translate("Goals_AllowMultipleConversionsPerVisit"),"inline-help":e.translate("Goals_HelpOneConversionPerVisit")},null,8,["model-value","options","introduction","inline-help"])):Object(c["createCommentVNode"])("",!0)]),Object(c["createElementVNode"])("h3",null,Object(c["toDisplayString"])(e.translate("Goals_GoalRevenue"))+" "+Object(c["toDisplayString"])(e.translate("Goals_Optional")),1),Object(c["createElementVNode"])("div",null,[Object(c["createVNode"])(ye,{uicontrol:"number",name:"revenue",modelValue:e.goal.revenue,"onUpdate:modelValue":t[11]||(t[11]=t=>e.goal.revenue=t),placeholder:e.translate("Goals_DefaultRevenueLabel"),"inline-help":e.translate("Goals_DefaultRevenueHelp")},null,8,["modelValue","placeholder","inline-help"])]),Object(c["createElementVNode"])("div",null,[Object(c["withDirectives"])(Object(c["createVNode"])(ye,{uicontrol:"checkbox",name:"use_event_value",modelValue:e.goal.event_value_as_revenue,"onUpdate:modelValue":t[12]||(t[12]=t=>e.goal.event_value_as_revenue=t),title:e.translate("Goals_UseEventValueAsRevenue"),"inline-help":e.useEventValueAsRevenueHelp},null,8,["modelValue","title","inline-help"]),[[c["vShow"],"event"===e.goal.match_attribute]])]),Object(c["createElementVNode"])("div",Oe,[e.endEditTable?(Object(c["openBlock"])(),Object(c["createBlock"])(_e,{key:0,html:e.endEditTable},null,8,["html"])):Object(c["createCommentVNode"])("",!0)],512),ge,Object(c["createVNode"])(Ve,{saving:e.isLoading,onConfirm:t[13]||(t[13]=t=>e.save()),value:e.submitText},null,8,["saving","value"]),e.onlyShowAddNewGoal?Object(c["createCommentVNode"])("",!0):(Object(c["openBlock"])(),Object(c["createElementBlock"])("div",je,[Object(c["withDirectives"])(Object(c["createElementVNode"])("div",{class:"entityCancel",onClick:t[14]||(t[14]=t=>e.showListOfReports()),innerHTML:e.$sanitize(e.cancelText)},null,8,he),[[c["vShow"],e.showEditGoal]])]))])),[[Ne]])]),_:1},8,["content-title"])],512),[[c["vShow"],e.showEditGoal]])],512),[[c["vShow"],e.userCanEditGoals]]),ve])}var Ge=a("a5a2");function _e(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,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 Ve{constructor(){_e(this,"privateState",Object(c["reactive"])({})),_e(this,"idGoal",Object(c["computed"])(()=>this.privateState.idGoal))}setIdGoalShown(e){this.privateState.idGoal=e}}var Ee=new Ve;const Ne="Goals.ManageGoals.Notification";function fe(e){return e&&"0"!==e?1:0}var we=Object(c["defineComponent"])({inheritAttrs:!1,props:{onlyShowAddNewGoal:Boolean,userCanEditGoals:Boolean,ecommerceEnabled:Boolean,goals:{type:Object,required:!0},addNewGoalIntro:String,goalTriggerTypeOptions:Object,goalMatchAttributeOptions:Array,eventTypeOptions:Array,patternTypeOptions:Array,numericComparisonTypeOptions:Array,allowMultipleOptions:Array,showAddGoal:Boolean,showGoal:Number,beforeGoalListActionsBody:Object,endEditTable:String,beforeGoalListActionsHead:String},data(){return{showEditGoal:!1,showGoalList:!0,goal:{},isLoading:!1,eventType:"event_category",triggerType:"visitors",apiMethod:"",submitText:"",goalToDelete:null,addEditTableComponent:!1}},components:{SaveButton:Ge["SaveButton"],ContentBlock:n["ContentBlock"],ActivityIndicator:n["ActivityIndicator"],Field:Ge["Field"],Alert:n["Alert"],VueEntryContainer:n["VueEntryContainer"]},directives:{ContentTable:n["ContentTable"],Form:Ge["Form"]},created(){Ee.setIdGoalShown(this.showGoal)},unmounted(){Ee.setIdGoalShown(void 0)},mounted(){this.showAddGoal?this.createGoal():this.showGoal?this.editGoal(this.showGoal):this.showListOfReports();const e=this.getStoredNotification();e&&this.showNotificationMessage(e.goal,e.create)},methods:{scrollToTop(){setTimeout(()=>{n["Matomo"].helper.lazyScrollTo(".pageWrap",200)})},initGoalForm(e,t,a,l,o,r,i,s,c,d,u,b){n["Matomo"].postEvent("Goals.beforeInitGoalForm",e,b,a),this.apiMethod=e,this.goal={},this.goal.name=a,this.goal.description=l;let m=o;"manually"===m?(this.triggerType="manually",m="url"):this.triggerType="visitors",0===m.indexOf("event")?(this.eventType=m,m="event"):this.eventType="event_category",this.goal.match_attribute=m,this.goal.allow_multiple=d,this.goal.pattern_type=i,this.goal.pattern=r,this.goal.case_sensitive=s,this.goal.revenue=c,this.goal.event_value_as_revenue=u,this.submitText=t,this.goal.idgoal=b},showListOfReports(){n["Matomo"].postEvent("Goals.cancelForm"),this.showGoalList=!0,this.showEditGoal=!1,this.scrollToTop()},showAddEditForm(){this.showGoalList=!1,this.showEditGoal=!0},createGoal(){const e={isAllowed:!0};n["Matomo"].postEvent("Goals.initAddGoal",e),e&&!e.isAllowed||(this.showAddEditForm(),this.initGoalForm("Goals.addGoal",Object(n["translate"])("Goals_AddGoal"),"","","url","","contains",!1,0,!1,!1,0),this.scrollToTop())},editGoal(e){this.showAddEditForm();const t=this.goals[""+e];this.initGoalForm("Goals.updateGoal",Object(n["translate"])("Goals_UpdateGoal"),t.name,t.description,t.match_attribute,t.pattern,t.pattern_type,!!t.case_sensitive&&"0"!==t.case_sensitive,parseInt(""+t.revenue,10),!!t.allow_multiple&&"0"!==t.allow_multiple,!!t.event_value_as_revenue&&"0"!==t.event_value_as_revenue,e),this.scrollToTop()},deleteGoal(e){this.goalToDelete=this.goals[""+e],n["Matomo"].helper.modalConfirm(this.$refs.confirm,{yes:()=>{this.isLoading=!0,n["AjaxHelper"].fetch({idGoal:e,method:"Goals.deleteGoal"}).then(()=>{window.location.reload()}).finally(()=>{this.isLoading=!1})}})},save(){const e={};e.name=this.goal.name,e.description=this.goal.description,this.isManuallyTriggered?(e.matchAttribute="manually",e.patternType="regex",e.pattern=".*",e.caseSensitive=0):(e.matchAttribute=this.goal.match_attribute,"event"===e.matchAttribute&&(e.matchAttribute=this.eventType,e.useEventValueAsRevenue=fe(this.goal.event_value_as_revenue)),e.patternType=this.goal.pattern_type,e.pattern=this.goal.pattern,e.caseSensitive=fe(this.goal.case_sensitive)),e.revenue=this.goal.revenue||0,e.allowMultipleConversionsPerVisit=fe(this.goal.allow_multiple),e.idGoal=this.goal.idgoal,e.method=this.apiMethod;const t="Goals.addGoal"===e.method,a="Goals.updateGoal"===e.method,l={};a?n["Matomo"].postEvent("Goals.beforeUpdateGoal",{parameters:e,options:l}):t&&n["Matomo"].postEvent("Goals.beforeAddGoal",{parameters:e,options:l}),null!==e&&void 0!==e&&e.cancelRequest||(this.isLoading=!0,n["AjaxHelper"].fetch(e,l).then(async a=>{let l=e.idGoal;t&&a.value&&(l=a.value),this.storeNotification(l,t),this.scrollToTop();const o=n["MatomoUrl"].parsed.value.subcategory;"Goals_AddNewGoal"===o&&n["Matomo"].helper.isReportingPage()?(await n["ReportingMenuStore"].reloadMenuItems(),n["MatomoUrl"].updateHash(Object.assign(Object.assign({},n["MatomoUrl"].hashParsed.value),{},{subcategory:"Goals_ManageGoals"})),this.isLoading=!1):window.location.reload()}).catch(()=>{this.scrollToTop(),this.isLoading=!1}))},storeNotification(e,t){try{sessionStorage.setItem(Ne,JSON.stringify({goal:e,create:t}))}catch(a){}},getStoredNotification(){const e=sessionStorage.getItem(Ne);if(e){sessionStorage.removeItem(Ne);try{let{goal:t,create:a}=JSON.parse(e);return t&&(t=parseInt(t,10)),a=!!a,{goal:t,create:a}}catch(t){return null}}return null},getGoalReportUrl(e){const t=n["MatomoUrl"].stringify(Object.assign(Object.assign({},n["MatomoUrl"].urlParsed.value),{},{module:"CoreHome",action:"index"})),a=n["MatomoUrl"].stringify(Object.assign(Object.assign({},n["MatomoUrl"].hashParsed.value),{},{category:"Goals_Goals",subcategory:e}));return`?${t}#?${a}`},showNotificationMessage(e,t){let a=Object(n["translate"])(t?"Goals_GoalCreated":"Goals_GoalUpdated");const l=`<a href="${this.getGoalReportUrl(e)}">[${Object(n["translate"])("Goals_ViewGoalReport")}]</a>`;a=`${a} ${l}`,n["NotificationsStore"].show({id:"ManageGoals.create",message:a,context:"success",type:"toast"})},changedTriggerType(){this.isManuallyTriggered||this.goal.pattern_type||(this.goal.pattern_type="contains")},initPatternType(){this.isMatchAttributeNumeric?this.goal.pattern_type="greater_than":this.goal.pattern_type="contains"},lcfirst(e){return`${e.slice(0,1).toLowerCase()}${e.slice(1)}`},ucfirst(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`},goalNameChanged(){n["Matomo"].postEvent("Goals.goalNameChanged",this.goal.name)}},computed:{learnMoreAboutGoalTracking(){return Object(n["translate"])("Goals_LearnMoreAboutGoalTrackingDocumentation",Object(n["externalLink"])("https://matomo.org/docs/tracking-goals-web-analytics/"),"</a>")},youCanEnableEcommerceReports(){const e=n["MatomoUrl"].stringify(Object.assign(Object.assign({},n["MatomoUrl"].urlParsed.value),{},{module:"SitesManager",action:"index"})),t=Object(n["externalLink"])("https://matomo.org/docs/ecommerce-analytics/")+Object(n["translate"])("Goals_EcommerceReports")+"</a>",a=`<a href='${e}'>${Object(n["translate"])("SitesManager_WebsitesManagement")}</a>`;return Object(n["translate"])("Goals_YouCanEnableEcommerceReports",t,a)},siteName(){return n["Matomo"].helper.htmlDecode(n["Matomo"].siteName)},whereVisitedPageManuallyCallsJsTrackerText(){return Object(n["translate"])("Goals_WhereVisitedPageManuallyCallsJavascriptTrackerLearnMore",Object(n["externalLink"])("https://developer.matomo.org/guides/tracking-javascript-guide#manually-trigger-goal-conversions"),"</a>")},caseSensitiveTitle(){return`${Object(n["translate"])("Goals_CaseSensitive")} ${Object(n["translate"])("Goals_Optional")}`},useEventValueAsRevenueHelp(){return`${Object(n["translate"])("Goals_EventValueAsRevenueHelp")} <br/><br/> ${Object(n["translate"])("Goals_EventValueAsRevenueHelp2")}`},cancelText(){return Object(n["translate"])("General_OrCancel","<a class='entityCancelLink'>","</a>")},isMatchAttributeNumeric(){return["visit_duration"].indexOf(this.goal.match_attribute)>-1},patternFieldLabel(){return"visit_duration"===this.goal.match_attribute?Object(n["translate"])("Goals_TimeInMinutes"):Object(n["translate"])("Goals_Pattern")},goalMatchAttributeTranslations(){return{manually:Object(n["translate"])("Goals_ManuallyTriggeredUsingJavascriptFunction"),file:Object(n["translate"])("Goals_Download"),url:Object(n["translate"])("Goals_VisitUrl"),title:Object(n["translate"])("Goals_VisitPageTitle"),external_website:Object(n["translate"])("Goals_ClickOutlink"),event_action:`${Object(n["translate"])("Goals_SendEvent")} (${Object(n["translate"])("Events_EventAction")})`,event_category:`${Object(n["translate"])("Goals_SendEvent")} (${Object(n["translate"])("Events_EventCategory")})`,event_name:`${Object(n["translate"])("Goals_SendEvent")} (${Object(n["translate"])("Events_EventName")})`,visit_duration:""+this.ucfirst(Object(n["translate"])("Goals_VisitDuration"))}},beforeGoalListActionsBodyComponent(){if(!this.beforeGoalListActionsBody)return{};const e={};return Object.values(this.goals).forEach(t=>{const a=this.beforeGoalListActionsBody[t.idgoal];a&&(e[t.idgoal]={template:a})}),Object(c["markRaw"])(e)},beforeGoalListActionsHeadComponent(){return this.beforeGoalListActionsHead?Object(c["markRaw"])({template:this.beforeGoalListActionsHead}):null},isManuallyTriggered(){return"manually"===this.triggerType},matchesExpressionExternal(){const e="'http://www.amazon.com\\/(.*)\\/yourAffiliateId'";return Object(n["translate"])("Goals_MatchesExpression",e)}}});we.render=ye;var Se=we;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["Ecommerce"]=t(require("CoreHome"),require("vue")):e["Ecommerce"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/Ecommerce/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"ConversionOverview",(function(){return _})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var c=n("8bbf");const i={class:"ulGoalTopElements"},l=["innerHTML"],a={key:0},s=["innerHTML"],u={key:1},p=["innerHTML"],d={key:2},b=["innerHTML"],f={key:3},m=["innerHTML"],j=Object(c["createElementVNode"])("span",{class:"icon-visitor-profile rowActionIcon"},"  ",-1),O=Object(c["createElementVNode"])("br",{style:{clear:"left"}},null,-1);function v(e,t,n,o,r,v){const g=Object(c["resolveComponent"])("ContentBlock");return Object(c["openBlock"])(),Object(c["createBlock"])(g,{"content-title":e.translate("Goals_ConversionsOverview")},{default:Object(c["withCtx"])(()=>[Object(c["createElementVNode"])("ul",i,[Object(c["createElementVNode"])("li",null,[Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("General_ColumnRevenue"))+": ",1),Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.revenue)},null,8,l),e.revenue_subtotal?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",a,[Object(c["createTextVNode"])(", "+Object(c["toDisplayString"])(e.translate("General_Subtotal"))+": ",1),Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.revenue_subtotal)},null,8,s)])):Object(c["createCommentVNode"])("",!0),e.revenue_tax?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",u,[Object(c["createTextVNode"])(", "+Object(c["toDisplayString"])(e.translate("General_Tax"))+": ",1),Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.revenue_tax)},null,8,p)])):Object(c["createCommentVNode"])("",!0),e.revenue_shipping?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",d,[Object(c["createTextVNode"])(", "+Object(c["toDisplayString"])(e.translate("General_Shipping"))+": ",1),Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.revenue_shipping)},null,8,b)])):Object(c["createCommentVNode"])("",!0),e.revenue_shipping?(Object(c["openBlock"])(),Object(c["createElementBlock"])("span",f,[Object(c["createTextVNode"])(", "+Object(c["toDisplayString"])(e.translate("General_Discount"))+": ",1),Object(c["createElementVNode"])("span",{innerHTML:e.$sanitize(e.revenue_discount)},null,8,m)])):Object(c["createCommentVNode"])("",!0)])]),e.visitorLogEnabled?(Object(c["openBlock"])(),Object(c["createElementBlock"])("a",{key:0,href:"",class:"segmentedlog",onClick:t[0]||(t[0]=Object(c["withModifiers"])(t=>e.showSegmentedVisitorLog(),["prevent"]))},[j,Object(c["createTextVNode"])(Object(c["toDisplayString"])(e.translate("Live_RowActionTooltipWithDimension",e.translate("General_Goal"))),1)])):Object(c["createCommentVNode"])("",!0),O]),_:1},8,["content-title"])}var g=n("19dc"),y=Object(c["defineComponent"])({props:{idGoal:{type:[String,Number],required:!0},visitorLogEnabled:Boolean,revenue:String,revenue_subtotal:String,revenue_tax:String,revenue_shipping:String,revenue_discount:String},components:{ContentBlock:g["ContentBlock"]},methods:{showSegmentedVisitorLog(){window.SegmentedVisitorLog.show("Goals.getMetrics","visitConvertedGoalId=="+this.idGoal,{})}}});y.render=v;var _=y;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["UserCountry"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["UserCountry"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,r){return function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="plugins/UserCountry/vue/dist/",r(r.s="fae3")}({"19dc":function(t,r){t.exports=e},"8bbf":function(e,r){e.exports=t},a5a2:function(e,t){e.exports=r},fae3:function(e,t,r){"use strict";if(r.r(t),r.d(t,"LocationProviderSelection",(function(){return w})),r.d(t,"AdminPage",(function(){return G})),r.d(t,"GetDistinctCountries",(function(){return R})),"undefined"!==typeof window){var o=window.document.currentScript,n=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(r.p=n[1])}var i=r("8bbf");const c={class:"locationProviderSelection"},l=["innerHTML"],a={class:"row"},s={class:"col s12 push-m9 m3"},d={class:"col s12 m4 l2"},u=["id","disabled","checked","onChange"],p={class:"loc-provider-status"},b={key:0,class:"is-not-installed"},j={key:1,class:"is-installed"},O={key:2,class:"is-broken"},m={class:"col s12 m4 l6"},v=["innerHTML"],f=["innerHTML"],y={class:"col s12 m4 l4"},k={key:0,class:"form-help"},g={key:0},h=Object(i["createElementVNode"])("br",null,null,-1),C={style:{position:"absolute"}},P=["innerHTML"],N={class:"text-right"},B=["onClick"],E={key:1},V={key:1,class:"form-help"},L={key:0},S=["innerHTML"],I=["innerHTML"],_={key:1},x=["innerHTML"];function T(e,t,r,o,n,T){const D=Object(i["resolveComponent"])("ActivityIndicator"),H=Object(i["resolveComponent"])("Notification"),M=Object(i["resolveComponent"])("SaveButton");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",c,[e.isThereWorkingProvider?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:0,innerHTML:e.$sanitize(e.setUpGuides||"")},null,8,l)),Object(i["createElementVNode"])("div",a,[Object(i["createElementVNode"])("div",s,Object(i["toDisplayString"])(e.translate("General_InfoFor",e.thisIp)),1)]),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.visibleLocationProviders,(t,r)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:r,class:Object(i["normalizeClass"])("row form-group provider"+r)},[Object(i["createElementVNode"])("div",d,[Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("label",null,[Object(i["createElementVNode"])("input",{class:"location-provider",name:"location-provider",type:"radio",id:"provider_input_"+r,disabled:1!==t.status,checked:e.selectedProvider===r,onChange:t=>e.selectedProvider=r},null,40,u),Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translateOrDefault(t.title)),1)])]),Object(i["createElementVNode"])("p",p,[0===t.status?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",b,Object(i["toDisplayString"])(e.translate("General_NotInstalled")),1)):1===t.status?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",j,Object(i["toDisplayString"])(e.translate("General_Installed")),1)):2===t.status?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",O,Object(i["toDisplayString"])(e.translate("General_Broken")),1)):Object(i["createCommentVNode"])("",!0)])]),Object(i["createElementVNode"])("div",m,[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.translateOrDefault(t.description))},null,8,v),1!==t.status&&t.install_docs?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(t.install_docs)},null,8,f)):Object(i["createCommentVNode"])("",!0)]),Object(i["createElementVNode"])("div",y,[1===t.status?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",k,["127.0.0.1"!==e.thisIp&&"::1"!==e.thisIp?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",g,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("UserCountry_CurrentLocationIntro"))+": ",1),Object(i["createElementVNode"])("div",null,[h,Object(i["createElementVNode"])("div",C,[Object(i["createVNode"])(D,{loading:e.updateLoading[r]},null,8,["loading"])]),Object(i["createElementVNode"])("span",{class:"location",style:Object(i["normalizeStyle"])({visibility:e.providerLocations[r]?"visible":"hidden"})},[Object(i["createElementVNode"])("strong",{innerHTML:e.$sanitize(e.providerLocations[r]||" ")},null,8,P)],4)]),Object(i["createElementVNode"])("div",N,[Object(i["createElementVNode"])("a",{onClick:Object(i["withModifiers"])(t=>e.refreshProviderInfo(r),["prevent"])},Object(i["toDisplayString"])(e.translate("General_Refresh")),9,B)])])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",E,Object(i["toDisplayString"])(e.translate("UserCountry_CannotLocalizeLocalIP",e.thisIp)),1))])):Object(i["createCommentVNode"])("",!0),t.statusMessage?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",V,[2===t.status?(Object(i["openBlock"])(),Object(i["createElementBlock"])("strong",L,Object(i["toDisplayString"])(e.translate("General_Error"))+":",1)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(t.statusMessage)},null,8,S)])):Object(i["createCommentVNode"])("",!0),t.extra_message?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:2,class:"form-help",innerHTML:e.$sanitize(t.extra_message)},null,8,I)):Object(i["createCommentVNode"])("",!0)])],2))),128)),Object.keys(e.locationProvidersNotDefaultOrDisabled).length?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",_,[Object(i["createVNode"])(H,{noclear:!0,context:"warning"},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.noProvidersText)},null,8,x)]),_:1})])),Object(i["createVNode"])(M,{onConfirm:t[0]||(t[0]=t=>e.save()),saving:e.isLoading},null,8,["saving"])])}var D=r("19dc"),H=r("a5a2"),M=Object(i["defineComponent"])({props:{currentProviderId:{type:String,required:!0},isThereWorkingProvider:Boolean,setUpGuides:String,thisIp:{type:String,required:!0},locationProviders:{type:Object,required:!0},defaultProviderId:{type:String,required:!0},disabledProviderId:{type:String,required:!0}},components:{ActivityIndicator:D["ActivityIndicator"],Notification:D["Notification"],SaveButton:H["SaveButton"]},data(){return{isLoading:!1,updateLoading:{},selectedProvider:this.currentProviderId,providerLocations:Object.fromEntries(Object.entries(this.locationProviders).map(([e,t])=>[e,t.location]))}},methods:{refreshProviderInfo(e){this.updateLoading[e]=!0,delete this.providerLocations[e],D["AjaxHelper"].fetch({module:"UserCountry",action:"getLocationUsingProvider",id:e,format:"html"},{format:"html"}).then(t=>{this.providerLocations[e]=t}).finally(()=>{this.updateLoading[e]=!1})},save(){this.selectedProvider&&(this.isLoading=!0,D["AjaxHelper"].fetch({method:"UserCountry.setLocationProvider",providerId:this.selectedProvider},{withTokenInUrl:!0}).then(()=>{const e=D["NotificationsStore"].show({message:Object(D["translate"])("General_Done"),context:"success",noclear:!0,type:"toast",id:"userCountryLocationProvider"});D["NotificationsStore"].scrollToNotification(e)}).finally(()=>{this.isLoading=!1}))}},computed:{visibleLocationProviders(){return Object.fromEntries(Object.entries(this.locationProviders).filter(([,e])=>e.isVisible))},locationProvidersNotDefaultOrDisabled(){return Object.fromEntries(Object.entries(this.locationProviders).filter(([,e])=>e.id!==this.defaultProviderId&&e.id!==this.disabledProviderId))},noProvidersText(){return Object(D["translate"])("UserCountry_NoProviders",'<a rel="noreferrer noopener" href="https://db-ip.com/?refid=mtm" target="_blank">',"</a>")}}});M.render=T;var w=M;function q(e,t,r,o,n,c){const l=Object(i["resolveComponent"])("EnrichedHeadline"),a=Object(i["resolveComponent"])("LocationProviderSelection"),s=Object(i["resolveComponent"])("ContentBlock"),d=Object(i["resolveDirective"])("content-intro");return Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],null,[Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("h2",null,[Object(i["createVNode"])(l,{"help-url":e.externalRawLink("https://matomo.org/docs/geo-locate/"),id:"location-providers"},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("UserCountry_Geolocation")),1)]),_:1},8,["help-url"])]),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("UserCountry_GeolocationPageDesc")),1)])),[[d]]),Object(i["createVNode"])(s,{"content-title":e.translate("UserCountry_LocationProvider")},{default:Object(i["withCtx"])(()=>[Object(i["createVNode"])(a,{"current-provider-id":e.currentProviderId,"is-there-working-provider":e.isThereWorkingProvider,"set-up-guides":e.setUpGuides,"this-ip":e.thisIp,"location-providers":e.locationProviders,"default-provider-id":e.defaultProviderId,"disabled-provider-id":e.disabledProviderId},null,8,["current-provider-id","is-there-working-provider","set-up-guides","this-ip","location-providers","default-provider-id","disabled-provider-id"])]),_:1},8,["content-title"])],64)}var U=Object(i["defineComponent"])({props:{currentProviderId:{type:String,required:!0},isThereWorkingProvider:Boolean,setUpGuides:String,thisIp:{type:String,required:!0},locationProviders:{type:Object,required:!0},defaultProviderId:{type:String,required:!0},disabledProviderId:{type:String,required:!0}},components:{ContentBlock:D["ContentBlock"],LocationProviderSelection:w,EnrichedHeadline:D["EnrichedHeadline"]},directives:{ContentIntro:D["ContentIntro"],ContentBlock:D["ContentBlock"]}});U.render=q;var G=U;const z={class:"sparkline"},A=["innerHTML"],$=Object(i["createElementVNode"])("br",{style:{clear:"left"}},null,-1);function W(e,t,r,o,n,c){const l=Object(i["resolveComponent"])("Sparkline"),a=Object(i["resolveComponent"])("ContentBlock");return Object(i["openBlock"])(),Object(i["createBlock"])(a,null,{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("div",z,[Object(i["createVNode"])(l,{params:e.urlSparklineCountries,width:100,height:25},null,8,["params"]),Object(i["createElementVNode"])("div",{innerHTML:e.$sanitize(e.distinctCountriesText)},null,8,A)]),$]),_:1})}var F=Object(i["defineComponent"])({props:{numberDistinctCountries:{type:Number,required:!0},urlSparklineCountries:{type:[Object,String],required:!0}},components:{ContentBlock:D["ContentBlock"],Sparkline:D["Sparkline"]},computed:{distinctCountriesText(){return Object(D["translate"])("UserCountry_DistinctCountries",`<strong>${this.numberDistinctCountries}</strong>`)}}});F.render=W;var R=F;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["GeoIp2"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["GeoIp2"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,o){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},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/GeoIp2/vue/dist/",o(o.s="fae3")}({"19dc":function(t,o){t.exports=e},"8bbf":function(e,o){e.exports=t},a5a2:function(e,t){e.exports=o},fae3:function(e,t,o){"use strict";if(o.r(t),o.d(t,"GeoIp2Updater",(function(){return z})),"undefined"!==typeof window){var n=window.document.currentScript,r=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(o.p=r[1])}var a=o("8bbf");const i={key:0},l={key:0},d={id:"manage-geoip-dbs"},s={class:"row",id:"geoipdb-screen1"},c={class:"geoipdb-column-1 col s6"},p=Object(a["createElementVNode"])("sup",null,[Object(a["createElementVNode"])("small",null,"*")],-1),u={class:"geoipdb-column-2 col s6"},b=["innerHTML"],m={class:"geoipdb-column-1 col s6"},g=["value"],h={class:"geoipdb-column-2 col s6"},j=["value"],O={class:"row"},f=["innerHTML"],w={id:"geoipdb-screen2-download"},I={key:1,id:"geoipdb-update-info"},v=["innerHTML"],N=Object(a["createElementVNode"])("br",null,null,-1),U=Object(a["createElementVNode"])("br",null,null,-1),D=["innerHTML"],G=["innerHTML"],x=Object(a["createElementVNode"])("br",null,null,-1),k=Object(a["createElementVNode"])("br",null,null,-1),y={id:"locationProviderUpdatePeriodInlineHelp",class:"inline-help-node",ref:"inlineHelpNode"},V=["innerHTML"],E={key:1},P=Object(a["createElementVNode"])("br",null,null,-1),_=Object(a["createElementVNode"])("br",null,null,-1),T=["innerHTML"],L=["value"],C=Object(a["createElementVNode"])("div",{id:"done-updating-updater"},null,-1),S=Object(a["createElementVNode"])("div",{id:"geoipdb-update-info-error"},null,-1),M=["innerHTML"],B={key:1},H={class:"form-description"};function F(e,t,o,n,r,F){const R=Object(a["resolveComponent"])("Progressbar"),$=Object(a["resolveComponent"])("Field"),A=Object(a["resolveComponent"])("ContentBlock");return Object(a["openBlock"])(),Object(a["createBlock"])(A,{"content-title":e.contentTitle,id:"geoip-db-mangement"},{default:Object(a["withCtx"])(()=>[e.showGeoipUpdateSection?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",i,[e.geoipDatabaseInstalled?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",l,[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("h3",null,Object(a["toDisplayString"])(e.translate("GeoIp2_NotManagingGeoIPDBs")),1),Object(a["createElementVNode"])("div",d,[Object(a["createElementVNode"])("div",s,[Object(a["createElementVNode"])("div",c,[Object(a["createElementVNode"])("p",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("GeoIp2_IWantToDownloadFreeGeoIP")),1),p])]),Object(a["createElementVNode"])("div",u,[Object(a["createElementVNode"])("p",{innerHTML:e.$sanitize(e.purchasedGeoIpText)},null,8,b)]),Object(a["createElementVNode"])("div",m,[Object(a["createElementVNode"])("input",{type:"button",class:"btn",onClick:t[0]||(t[0]=t=>e.startDownloadFreeGeoIp()),value:e.translate("General_GetStarted")+"..."},null,8,g)]),Object(a["createElementVNode"])("div",h,[Object(a["createElementVNode"])("input",{type:"button",class:"btn",id:"start-automatic-update-geoip",onClick:t[1]||(t[1]=t=>e.startAutomaticUpdateGeoIp()),value:e.translate("General_GetStarted")+"..."},null,8,j)])]),Object(a["createElementVNode"])("div",O,[Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("sup",null,[Object(a["createTextVNode"])("* "),Object(a["createElementVNode"])("small",{innerHTML:e.$sanitize(e.accuracyNote)},null,8,f)])])])])],512),[[a["vShow"],e.showPiwikNotManagingInfo]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",w,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(R,{label:e.freeProgressbarLabel,progress:e.progressFreeDownload},null,8,["label","progress"])])],512),[[a["vShow"],e.showFreeDownload]])])),e.geoipDatabaseInstalled&&!e.downloadErrorMessage?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",I,[Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.geoIPUpdaterInstructions)},null,8,v),N,U,e.dbipLiteUrl?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.geoliteCityLink)},null,8,D)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.maxMindLinkExplanation)},null,8,G),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,[x,k,Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("GeoIp2_GeoIPUpdaterIntro"))+": ",1)],512),[[a["vShow"],e.geoipDatabaseInstalled]])]),Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])($,{uicontrol:"text",name:"geoip-location-db",introduction:e.translate("GeoIp2_LocationDatabase"),title:e.translate("Actions_ColumnDownloadURL"),"inline-help":e.translate("GeoIp2_LocationDatabaseHint"),modelValue:e.locationDbUrl,"onUpdate:modelValue":t[2]||(t[2]=t=>e.locationDbUrl=t)},null,8,["introduction","title","inline-help","modelValue"])]),Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])($,{uicontrol:"text",name:"geoip-isp-db",introduction:e.translate("GeoIp2_ISPDatabase"),title:e.translate("Actions_ColumnDownloadURL"),"inline-help":e.providerPluginHelp,modelValue:e.ispDbUrl,"onUpdate:modelValue":t[3]||(t[3]=t=>e.ispDbUrl=t),disabled:!e.isProviderPluginActive},null,8,["introduction","title","inline-help","modelValue","disabled"])]),Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])($,{uicontrol:"radio",name:"geoip-update-period",introduction:e.translate("GeoIp2_DownloadNewDatabasesEvery"),modelValue:e.updatePeriod,"onUpdate:modelValue":t[4]||(t[4]=t=>e.updatePeriod=t),options:e.updatePeriodOptions},{"inline-help":Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",y,[e.lastTimeUpdaterRun?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.translate("GeoIp2_UpdaterWasLastRun",e.lastTimeUpdaterRun))},null,8,V)):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",E,Object(a["toDisplayString"])(e.translate("GeoIp2_UpdaterHasNotBeenRun")),1)),P,_,Object(a["createElementVNode"])("div",{id:"geoip-updater-next-run-time",innerHTML:e.$sanitize(e.nextRunTimeText)},null,8,T)],512)]),_:1},8,["introduction","modelValue","options"])]),Object(a["createElementVNode"])("input",{type:"button",class:"btn",onClick:t[5]||(t[5]=t=>e.saveGeoIpLinks()),value:e.buttonUpdateSaveText},null,8,L),Object(a["createElementVNode"])("div",null,[C,S,Object(a["createElementVNode"])("div",null,[Object(a["withDirectives"])(Object(a["createVNode"])(R,{progress:e.progressUpdateDownload,label:e.progressUpdateLabel},null,8,["progress","label"]),[[a["vShow"],e.isUpdatingGeoIpDatabase]])])])])):Object(a["createCommentVNode"])("",!0),e.downloadErrorMessage?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:2,innerHTML:e.$sanitize(e.downloadErrorMessage)},null,8,M)):Object(a["createCommentVNode"])("",!0)])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",B,[Object(a["createElementVNode"])("p",H,Object(a["toDisplayString"])(e.translate("GeoIp2_CannotSetupGeoIPAutoUpdating")),1)]))]),_:1},8,["content-title"])}var R=o("19dc"),$=o("a5a2");const{$:A}=window;var q=Object(a["defineComponent"])({props:{geoipDatabaseStartedInstalled:Boolean,showGeoipUpdateSection:{type:Boolean,required:!0},dbipLiteUrl:{type:String,required:!0},dbipLiteFilename:{type:String,required:!0},geoipLocUrl:String,isProviderPluginActive:Boolean,geoipIspUrl:String,lastTimeUpdaterRun:String,geoipUpdatePeriod:String,updatePeriodOptions:{type:Object,required:!0},nextRunTime:Number,nextRunTimePretty:String},components:{Progressbar:R["Progressbar"],Field:$["Field"],ContentBlock:R["ContentBlock"]},data(){return{geoipDatabaseInstalled:!!this.geoipDatabaseStartedInstalled,showFreeDownload:!1,showPiwikNotManagingInfo:!0,progressFreeDownload:0,progressUpdateDownload:0,buttonUpdateSaveText:Object(R["translate"])("General_Save"),progressUpdateLabel:"",locationDbUrl:this.geoipLocUrl||"",ispDbUrl:this.geoipIspUrl||"",orgDbUrl:"",updatePeriod:this.geoipUpdatePeriod||"month",isUpdatingGeoIpDatabase:!1,downloadErrorMessage:null,nextRunTimePrettyUpdated:void 0}},methods:{startDownloadFreeGeoIp(){this.showFreeDownload=!0,this.showPiwikNotManagingInfo=!1,this.progressFreeDownload=0,this.downloadNextChunk("downloadFreeDBIPLiteDB",e=>{this.progressFreeDownload=e},!1,{}).then(()=>{window.location.reload()}).catch(e=>{this.geoipDatabaseInstalled=!0,this.downloadErrorMessage=e.message})},startAutomaticUpdateGeoIp(){this.buttonUpdateSaveText=Object(R["translate"])("General_Continue"),this.showGeoIpUpdateInfo()},showGeoIpUpdateInfo(){this.geoipDatabaseInstalled=!0},saveGeoIpLinks(){return R["AjaxHelper"].post({period:this.updatePeriod,module:"GeoIp2",action:"updateGeoIPLinks"},{loc_db:this.locationDbUrl,isp_db:this.ispDbUrl,org_db:this.orgDbUrl},{withTokenInUrl:!0}).then(e=>this.downloadNextFileIfNeeded(e,null)).then(e=>{this.progressUpdateLabel="",this.isUpdatingGeoIpDatabase=!1,R["NotificationsStore"].show({message:Object(R["translate"])("General_Done"),placeat:"#done-updating-updater",context:"success",noclear:!0,type:"toast",style:{display:"inline-block"},id:"userCountryGeoIpUpdate"}),this.nextRunTimePrettyUpdated=e.nextRunTime,A(this.$refs.inlineHelpNode).effect("highlight",{color:"#FFFFCB"},2e3)}).catch(e=>{this.isUpdatingGeoIpDatabase=!1,R["NotificationsStore"].show({message:e.message,placeat:"#geoipdb-update-info-error",context:"error",style:{display:"inline-block"},id:"userCountryGeoIpUpdate",type:"transient"})})},downloadNextFileIfNeeded(e,t){if(null!==e&&void 0!==e&&e.to_download){const o=t===e.to_download;return this.progressUpdateDownload=0,this.progressUpdateLabel=e.to_download_label,this.isUpdatingGeoIpDatabase=!0,this.downloadNextChunk("downloadMissingGeoIpDb",e=>{this.progressUpdateDownload=e},o,{key:e.to_download}).then(t=>this.downloadNextFileIfNeeded(t,e.to_download))}return Promise.resolve(e)},downloadNextChunk(e,t,o,n){const r=Object.assign({},n);return R["AjaxHelper"].post({module:"GeoIp2",action:e,continue:o?1:0},r,{withTokenInUrl:!0}).catch(()=>{throw new Error(Object(R["translate"])("GeoIp2_FatalErrorDuringDownload"))}).then(o=>{if(o.error)throw new Error(o.error);const r=Math.floor(o.current_size/o.expected_file_size*100);return t(Math.min(r,100)),r<100?this.downloadNextChunk(e,t,!0,n):o})}},computed:{nextRunTimeText(){return this.nextRunTimePrettyUpdated?this.nextRunTimePrettyUpdated:this.nextRunTime?1e3*this.nextRunTime<Date.now()?Object(R["translate"])("GeoIp2_UpdaterScheduledForNextRun"):Object(R["translate"])("GeoIp2_UpdaterWillRunNext",`<strong>${this.nextRunTimePretty}</strong>`):Object(R["translate"])("GeoIp2_UpdaterIsNotScheduledToRun")},providerPluginHelp(){if(this.isProviderPluginActive)return;const e=Object(R["translate"])("GeoIp2_ISPRequiresProviderPlugin");return`<div style="margin:0" class='alert alert-warning'>${e}</div>`},contentTitle(){return Object(R["translate"])(this.geoipDatabaseInstalled?"GeoIp2_SetupAutomaticUpdatesOfGeoIP":"GeoIp2_GeoIPDatabases")},accuracyNote(){return Object(R["translate"])("UserCountry_GeoIpDbIpAccuracyNote",'<a href="https://dev.maxmind.com/geoip/geoip2/geolite2/?rId=piwik" rel="noreferrer noopener" target="_blank">',"</a>")},purchasedGeoIpText(){const e="http://www.maxmind.com/en/geolocation_landing?rId=piwik";return Object(R["translate"])("GeoIp2_IPurchasedGeoIPDBs",`<a rel="noreferrer noopener" href="${e}" target="_blank">`,"</a>",'<a rel="noreferrer noopener" href="https://db-ip.com/db/?refid=mtm" target="_blank">',"</a>")},geoIPUpdaterInstructions(){return Object(R["translate"])("GeoIp2_GeoIPUpdaterInstructions",'<a href="http://www.maxmind.com/?rId=piwik" rel="noreferrer noopener" target="_blank">',"</a>",'<a rel="noreferrer noopener" href="https://db-ip.com/?refid=mtm" target="_blank">',"</a>")},geoliteCityLink(){const e=Object(R["translate"])("GeoIp2_GeoLiteCityLink",`<a rel="noreferrer noopener" href="${this.dbipLiteUrl}" target="_blank">`,this.dbipLiteUrl,"</a>");return e+"<br /><br />"},maxMindLinkExplanation(){return Object(R["translate"])("UserCountry_MaxMindLinkExplanation",Object(R["externalLink"])("https://matomo.org/faq/how-to/how-do-i-get-the-geolocation-download-url-for-the-free-maxmind-db/"),"</a>")},freeProgressbarLabel(){return Object(R["translate"])("GeoIp2_DownloadingDb",`<a href="${this.dbipLiteUrl}">${this.dbipLiteFilename}</a>...`)}}});q.render=F;var z=q;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["Feedback"]=t(require("CoreHome"),require("vue")):e["Feedback"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function a(l){if(t[l])return t[l].exports;var o=t[l]={i:l,l:!1,exports:{}};return e[l].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=e,a.c=t,a.d=function(e,t,l){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(l,o,function(t){return e[t]}.bind(null,o));return l},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="plugins/Feedback/vue/dist/",a(a.s="fae3")}({"19dc":function(t,a){t.exports=e},"8bbf":function(e,a){e.exports=t},fae3:function(e,t,a){"use strict";if(a.r(t),a.d(t,"ReviewLinks",(function(){return d})),a.d(t,"RateFeature",(function(){return de})),a.d(t,"FeedbackQuestion",(function(){return Be})),"undefined"!==typeof window){var l=window.document.currentScript,o=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(a.p=o[1])}var n=a("8bbf");const i={class:"requestReview"},c=Object(n["createStaticVNode"])('<br><br><div class="review-links"><div class="review-link"><a href="https://www.softwarereviews.com/6g24l" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/softwarereviews.svg"></div><div class="link">Software Reviews</div></a></div><div class="review-link"><a href="https://www.capterra.com/p/182627/Matomo-Analytics/" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/capterra.svg"></div><div class="link">Capterra</div></a></div><div class="review-link"><a href="https://www.g2crowd.com/products/matomo-formerly-piwik/details" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/g2crowd.svg"></div><div class="link">G2 Crowd</div></a></div><div class="review-link"><a href="https://www.producthunt.com/posts/matomo-2" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/producthunt.svg"></div><div class="link">Product Hunt</div></a></div><div class="review-link"><a href="https://www.saasworthy.com/product/matomo" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/saasworthy.png"></div><div class="link">SaaSworthy</div></a></div><div class="review-link"><a href="https://www.trustradius.com/products/matomo/reviews" target="_blank"><div class="image"><img loading="lazy" src="plugins/Feedback/images/trustradius.svg"></div><div class="link">TrustRadius</div></a></div></div>',3);function s(e,t,a,l,o,s){return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",i,[Object(n["createElementVNode"])("p",null,Object(n["toDisplayString"])(e.translate("Feedback_PleaseLeaveExternalReviewForMatomo")),1),c])}var r=Object(n["defineComponent"])({});r.render=s;var d=r;const b=["title"],u={class:"ui-confirm ratefeatureDialog"},k={key:0},m={key:0},p={key:1},j=Object(n["createElementVNode"])("br",null,null,-1),O={class:"row"},g={style:{"text-align":"left","margin-top":"16px"}},v={for:"useful",class:"ratelabel"},h=Object(n["createElementVNode"])("br",null,null,-1),f={for:"easy",class:"ratelabel"},F=Object(n["createElementVNode"])("br",null,null,-1),V={for:"configurable",class:"ratelabel"},y=Object(n["createElementVNode"])("br",null,null,-1),E={for:"likeother",class:"ratelabel"},N={key:1},R={key:0},w={key:1},M=Object(n["createElementVNode"])("br",null,null,-1),x={class:"row"},D={style:{"text-align":"left"}},B={for:"missingfeatures",class:"ratelabel"},_=Object(n["createElementVNode"])("br",null,null,-1),C={for:"makeeasier",class:"ratelabel"},S=Object(n["createElementVNode"])("br",null,null,-1),T={for:"speedup",class:"ratelabel"},L=Object(n["createElementVNode"])("br",null,null,-1),H={for:"fixbugs",class:"ratelabel"},U=Object(n["createElementVNode"])("br",null,null,-1),q={for:"dislikeother",class:"ratelabel"},z=Object(n["createElementVNode"])("br",null,null,-1),Q={key:2,class:"messageContainer",style:{"text-align":"left"}},I={key:0},P={key:1},$={key:2},A={key:3},G={key:4},Y={key:5},J={key:6},K={key:7},W={key:8},X={key:9,class:"error-text"},Z=["innerHTML"],ee=["title","value"],te=["value"],ae={class:"ui-confirm ratefeatureDialog"},le=["innerHTML"],oe={key:0},ne={key:1},ie=["value"];function ce(e,t,a,l,o,i){const c=Object(n["resolveComponent"])("MatomoDialog"),s=Object(n["resolveComponent"])("ReviewLinks");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{title:e.translate("Feedback_RateFeatureTitle",e.htmlEntities(e.title)),class:"ratefeature"},[Object(n["createElementVNode"])("div",{class:"iconContainer",onMouseenter:t[2]||(t[2]=t=>e.expanded=!0),onMouseleave:t[3]||(t[3]=t=>e.expanded=!1)},[Object(n["createElementVNode"])("img",{onClick:t[0]||(t[0]=t=>{e.likeFeature()}),class:"like-icon",src:"plugins/Feedback/vue/src/RateFeature/thumbs-up.png"}),Object(n["createElementVNode"])("img",{onClick:t[1]||(t[1]=t=>{e.dislikeFeature()}),class:"dislike-icon",src:"plugins/Feedback/vue/src/RateFeature/thumbs-down.png"})],32),Object(n["createVNode"])(c,{modelValue:e.showFeedbackForm,"onUpdate:modelValue":t[14]||(t[14]=t=>e.showFeedbackForm=t),onYes:t[15]||(t[15]=t=>e.sendFeedback()),onValidation:t[16]||(t[16]=t=>e.sendFeedback())},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",u,[e.like?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",k,[e.title?(Object(n["openBlock"])(),Object(n["createElementBlock"])("h2",m,Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeNamedFeature",e.title)),1)):Object(n["createCommentVNode"])("",!0),e.title?Object(n["createCommentVNode"])("",!0):(Object(n["openBlock"])(),Object(n["createElementBlock"])("h2",p,Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLike")),1)),j,Object(n["createElementVNode"])("div",O,[Object(n["createElementVNode"])("div",g,[Object(n["createElementVNode"])("label",v,[Object(n["withDirectives"])(Object(n["createElementVNode"])("input",{type:"radio",id:"useful",value:"useful","onUpdate:modelValue":t[4]||(t[4]=t=>e.likeReason=t),class:"rateradio"},null,512),[[n["vModelRadio"],e.likeReason]]),Object(n["createTextVNode"])(" "+Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureUsefulInfo")),1)]),h,Object(n["createElementVNode"])("label",f,[Object(n["withDirectives"])(Object(n["createElementVNode"])("input",{type:"radio",id:"easy",value:"easy","onUpdate:modelValue":t[5]||(t[5]=t=>e.likeReason=t),class:"rateradio"},null,512),[[n["vModelRadio"],e.likeReason]]),Object(n["createTextVNode"])(" "+Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureEasyToUse")),1)]),F,Object(n["createElementVNode"])("label",V,[Object(n["withDirectives"])(Object(n["createElementVNode"])("input",{type:"radio",id:"configurable",value:"configurable","onUpdate:modelValue":t[6]||(t[6]=t=>e.likeReason=t),class:"rateradio"},null,512),[[n["vModelRadio"],e.likeReason]]),Object(n["createTextVNode"])(" "+Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureConfigurable")),1)]),y,Object(n["createElementVNode"])("label",E,[Object(n["withDirectives"])(Object(n["createElementVNode"])("input",{type:"radio",id:"likeother",value:"likeother","onUpdate:modelValue":t[7]||(t[7]=t=>e.likeReason=t),class:"rateradio"},null,512),[[n["vModelRadio"],e.likeReason]]),Object(n["createTextVNode"])(" "+Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureOtherReason")),1)])])])])):Object(n["createCommentVNode"])("",!0),e.like?Object(n["createCommentVNode"])("",!0):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",N,[e.title?(Object(n["openBlock"])(),Object(n["createElementBlock"])("h2",R,Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeNamedFeature",e.title)),1)):Object(n["createCommentVNode"])("",!0),e.title?Object(n["createCommentVNode"])("",!0):(Object(n["openBlock"])(),Object(n["createElementBlock"])("h2",w,Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislike")),1)),M,Object(n["createElementVNode"])("div",x,[Object(n["createElementVNode"])("div",D,[Object(n["createElementVNode"])("label",B,[Object(n["withDirectives"])(Object(n["createElementVNode"])("input",{type:"radio",id:"missingfeatures",value:"missingfeatures","onUpdate:modelValue":t[8]||(t[8]=t=>e.dislikeReason=t),class:"rateradio"},null,512),[[n["vModelRadio"],e.dislikeReason]]),Object(n["createTextVNode"])(" "+Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeAddMissingFeatures")),1)]),_,Object(n["createElementVNode"])("label",C,[Object(n["withDirectives"])(Object(n["createElementVNode"])("input",{type:"radio",id:"makeeasier",value:"makeeasier","onUpdate:modelValue":t[9]||(t[9]=t=>e.dislikeReason=t),class:"rateradio"},null,512),[[n["vModelRadio"],e.dislikeReason]]),Object(n["createTextVNode"])(" "+Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeMakeEasier")),1)]),S,Object(n["createElementVNode"])("label",T,[Object(n["withDirectives"])(Object(n["createElementVNode"])("input",{type:"radio",id:"speedup",value:"speedup","onUpdate:modelValue":t[10]||(t[10]=t=>e.dislikeReason=t),class:"rateradio"},null,512),[[n["vModelRadio"],e.dislikeReason]]),Object(n["createTextVNode"])(" "+Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeSpeedUp")),1)]),L,Object(n["createElementVNode"])("label",H,[Object(n["withDirectives"])(Object(n["createElementVNode"])("input",{type:"radio",id:"fixbugs",value:"fixbugs","onUpdate:modelValue":t[11]||(t[11]=t=>e.dislikeReason=t),class:"rateradio"},null,512),[[n["vModelRadio"],e.dislikeReason]]),Object(n["createTextVNode"])(" "+Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureDislikeFixBugs")),1)]),U,Object(n["createElementVNode"])("label",q,[Object(n["withDirectives"])(Object(n["createElementVNode"])("input",{type:"radio",id:"dislikeother",value:"dislikeother","onUpdate:modelValue":t[12]||(t[12]=t=>e.dislikeReason=t),class:"rateradio"},null,512),[[n["vModelRadio"],e.dislikeReason]]),Object(n["createTextVNode"])(" "+Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureOtherReason")),1)]),z])])])),e.likeReason||e.dislikeReason?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Q,[e.likeReason&&"useful"===e.likeReason?(Object(n["openBlock"])(),Object(n["createElementBlock"])("p",I,Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtraUseful")),1)):Object(n["createCommentVNode"])("",!0),e.likeReason&&"easy"===e.likeReason?(Object(n["openBlock"])(),Object(n["createElementBlock"])("p",P,Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtraEasy")),1)):Object(n["createCommentVNode"])("",!0),e.likeReason&&"configurable"===e.likeReason?(Object(n["openBlock"])(),Object(n["createElementBlock"])("p",$,Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtraConfigurable")),1)):Object(n["createCommentVNode"])("",!0),e.likeReason&&"likeother"===e.likeReason?(Object(n["openBlock"])(),Object(n["createElementBlock"])("p",A,Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageLikeExtra")),1)):Object(n["createCommentVNode"])("",!0),e.dislikeReason&&"missingfeatures"===e.dislikeReason?(Object(n["openBlock"])(),Object(n["createElementBlock"])("p",G,Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraMissing")),1)):Object(n["createCommentVNode"])("",!0),e.dislikeReason&&"makeeasier"===e.dislikeReason?(Object(n["openBlock"])(),Object(n["createElementBlock"])("p",Y,Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraEasier")),1)):Object(n["createCommentVNode"])("",!0),e.dislikeReason&&"fixbugs"===e.dislikeReason?(Object(n["openBlock"])(),Object(n["createElementBlock"])("p",J,Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraBugs")),1)):Object(n["createCommentVNode"])("",!0),e.dislikeReason&&"speedup"===e.dislikeReason?(Object(n["openBlock"])(),Object(n["createElementBlock"])("p",K,Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtraSpeed")),1)):Object(n["createCommentVNode"])("",!0),e.dislikeReason&&"dislikeother"===e.dislikeReason?(Object(n["openBlock"])(),Object(n["createElementBlock"])("p",W,Object(n["toDisplayString"])(e.translate("Feedback_RateFeatureLeaveMessageDislikeExtra")),1)):Object(n["createCommentVNode"])("",!0),e.errorMessage?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",X,Object(n["toDisplayString"])(e.errorMessage),1)):Object(n["createCommentVNode"])("",!0),Object(n["withDirectives"])(Object(n["createElementVNode"])("textarea",{ref:"feedbackText",class:Object(n["normalizeClass"])(["materialize-textarea",{"has-error":e.errorMessage}]),id:"feedbacktext","onUpdate:modelValue":t[13]||(t[13]=t=>e.feedbackMessage=t)},null,2),[[n["vModelText"],e.feedbackMessage]]),e.likeReason||e.dislikeReason?(Object(n["openBlock"])(),Object(n["createElementBlock"])("p",{key:10,innerHTML:e.$sanitize(e.translate("Feedback_Policy",e.externalLink("https://matomo.org/privacy-policy/"),"</a>"))},null,8,Z)):Object(n["createCommentVNode"])("",!0)])):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("input",{class:"btn",type:"button",role:"validation",title:e.translate("Feedback_RateFeatureSendFeedbackInformation"),value:e.translate("Feedback_SendFeedback")},null,8,ee),Object(n["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Cancel")},null,8,te)])]),_:1},8,["modelValue"]),Object(n["createVNode"])(c,{modelValue:e.ratingDone,"onUpdate:modelValue":t[17]||(t[17]=t=>e.ratingDone=t)},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",ae,[Object(n["createElementVNode"])("h2",{innerHTML:e.$sanitize(e.translate("Feedback_ThankYouHeart","<i class='icon-heart red-text'></i>"))},null,8,le),e.like?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",oe,[Object(n["createVNode"])(s)])):Object(n["createCommentVNode"])("",!0),e.like?Object(n["createCommentVNode"])("",!0):(Object(n["openBlock"])(),Object(n["createElementBlock"])("p",ne,Object(n["toDisplayString"])(e.translate("Feedback_AppreciateFeedback")),1)),Object(n["createElementVNode"])("input",{type:"button",value:e.translate("General_Close"),role:"yes"},null,8,ie)])]),_:1},8,["modelValue"])],8,b)}var se=a("19dc"),re=Object(n["defineComponent"])({props:{title:String},components:{MatomoDialog:se["MatomoDialog"],ReviewLinks:d},data(){return{like:!1,likeReason:null,dislikeReason:null,ratingDone:!1,expanded:!1,showFeedbackForm:!1,feedbackMessage:"",errorMessage:null}},watch:{likeReason:"doFocusInput",dislikeReason:"doFocusInput"},methods:{dislikeFeature(){this.ratingDone=!1,this.like=!1,this.showFeedbackForm=!0,this.errorMessage=null,this.likeReason=null,this.dislikeReason=null,this.feedbackMessage=""},likeFeature(){this.ratingDone=!1,this.like=!0,this.showFeedbackForm=!0,this.errorMessage=null,this.likeReason=null,this.dislikeReason=null,this.feedbackMessage=""},doFocusInput(){this.$nextTick(()=>{this.focusInput()})},focusInput(){null!=this.$refs.feedbackText&&this.$refs.feedbackText.focus()},sendFeedback(){this.errorMessage=null,se["AjaxHelper"].fetch({method:"Feedback.sendFeedbackForFeature",featureName:this.title,like:this.like?1:0,choice:this.like?this.likeReason:this.dislikeReason,message:this.feedbackMessage}).then(e=>{"success"===e.value?(this.showFeedbackForm=!1,this.ratingDone=!0,this.feedbackMessage=""):this.errorMessage=e.value})},htmlEntities(e){return se["Matomo"].helper.htmlEntities(e)}}});re.render=ce;var de=re;const be={key:0,class:"bannerHeader"},ue=Object(n["createElementVNode"])("i",{class:"icon-heart red-text"},null,-1),ke=Object(n["createElementVNode"])("i",{class:"icon-close white-text"},null,-1),me=[ke],pe={class:"ratefeature"},je={class:"ui-confirm ratefeatureDialog"},Oe=["innerHTML"],ge=Object(n["createElementVNode"])("br",null,null,-1),ve={class:"messageContainer"},he={key:0,class:"error-text"},fe=Object(n["createElementVNode"])("br",null,null,-1),Fe=["innerHTML"],Ve=["value"],ye=["value"],Ee={class:"ui-confirm ratefeatureDialog"},Ne=["innerHTML"],Re=["value"];function we(e,t,a,l,o,i){const c=Object(n["resolveComponent"])("MatomoDialog");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",null,[e.isHidden?Object(n["createCommentVNode"])("",!0):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",be,[Object(n["createElementVNode"])("span",null,[Object(n["createTextVNode"])(Object(n["toDisplayString"])(e.translate("Feedback_FeedbackTitle"))+" ",1),ue]),Object(n["createElementVNode"])("a",{onClick:t[0]||(t[0]=(...t)=>e.showQuestion&&e.showQuestion(...t)),class:"btn"},Object(n["toDisplayString"])(e.translate("Feedback_Question"+e.question)),1),Object(n["createElementVNode"])("a",{class:"close-btn",onClick:t[1]||(t[1]=(...t)=>e.disableReminder&&e.disableReminder(...t))},me)])),Object(n["createElementVNode"])("div",pe,[Object(n["createVNode"])(c,{modelValue:e.showFeedbackForm,"onUpdate:modelValue":t[3]||(t[3]=t=>e.showFeedbackForm=t),onValidation:t[4]||(t[4]=t=>e.sendFeedback())},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",je,[Object(n["createElementVNode"])("h2",null,Object(n["toDisplayString"])(e.translate("Feedback_Question"+e.question)),1),Object(n["createElementVNode"])("p",{innerHTML:e.$sanitize(e.translate("Feedback_FeedbackSubtitle","<i class='icon-heart red-text'></i>"))},null,8,Oe),ge,Object(n["createElementVNode"])("div",ve,[e.errorMessage?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",he,Object(n["toDisplayString"])(e.errorMessage),1)):Object(n["createCommentVNode"])("",!0),Object(n["withDirectives"])(Object(n["createElementVNode"])("textarea",{id:"message",class:Object(n["normalizeClass"])({"has-error":e.errorMessage}),"onUpdate:modelValue":t[2]||(t[2]=t=>e.feedbackMessage=t)},null,2),[[n["vModelText"],e.feedbackMessage]])]),fe,Object(n["createElementVNode"])("p",{innerHTML:e.$sanitize(e.feedbackPolicy)},null,8,Fe),Object(n["createElementVNode"])("input",{type:"button",role:"validation",value:e.translate("Feedback_SendFeedback")},null,8,Ve),Object(n["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Cancel")},null,8,ye)])]),_:1},8,["modelValue"]),Object(n["createVNode"])(c,{modelValue:e.feedbackDone,"onUpdate:modelValue":t[5]||(t[5]=t=>e.feedbackDone=t)},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",Ee,[Object(n["createElementVNode"])("h2",null,Object(n["toDisplayString"])(e.translate("Feedback_ThankYou")),1),Object(n["createElementVNode"])("p",{innerHTML:e.$sanitize(e.translate("Feedback_ThankYourForFeedback","<i class='icon-heart red-text'></i>"))},null,8,Ne),Object(n["createElementVNode"])("input",{type:"button",role:"cancel",value:e.translate("General_Close")},null,8,Re)])]),_:1},8,["modelValue"])])])}const{$:Me}=window,xe="feedback-question";var De=Object(n["defineComponent"])({props:{showQuestionBanner:Boolean},components:{MatomoDialog:se["MatomoDialog"]},computed:{isHidden(){return!this.showQuestionBanner||!!this.hide},feedbackPolicy(){return Object(se["translate"])("Feedback_Policy",Object(se["externalLink"])("https://matomo.org/privacy-policy/"),"</a>")}},data(){return{questionText:"",question:0,hide:null,feedbackDone:!1,expanded:!1,showFeedbackForm:!1,feedbackMessage:null,errorMessage:null}},watch:{showFeedbackForm(e){this.questionText=Object(se["translate"])("Feedback_Question"+this.question),e&&setInterval(()=>{Me("#message").focus()},500)}},created(){this.showQuestionBanner&&this.initQuestion()},methods:{initQuestion(){Object(se["getCookie"])(xe)?this.question=parseInt(Object(se["getCookie"])(xe)):this.question=this.getRandomIntBetween(0,4);const e=(this.question+1)%4,t=6048e5;Object(se["setCookie"])(xe,""+e,t)},getRandomIntBetween(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)},showQuestion(){this.showFeedbackForm=!0,this.errorMessage=null},disableReminder(){se["AjaxHelper"].fetch({method:"Feedback.updateFeedbackReminderDate"}),this.hide=!0},sendFeedback(){this.errorMessage=null,se["AjaxHelper"].fetch({method:"Feedback.sendFeedbackForSurvey",question:this.questionText,message:this.feedbackMessage}).then(e=>{"success"===e.value?(this.showFeedbackForm=!1,this.feedbackDone=!0,this.hide=!0):this.errorMessage=e.value})}}});De.render=we;var Be=De;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["Login"]=t(require("CoreHome"),require("vue")):e["Login"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/Login/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"FormErrors",(function(){return b})),n.d(t,"BruteForceLog",(function(){return N})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var l=n("8bbf");const c=["innerHTML"],i=Object(l["createElementVNode"])("br",null,null,-1);function a(e,t,n,o,r,a){const u=Object(l["resolveComponent"])("Notification");return Object.keys(e.formErrors||{}).length?(Object(l["openBlock"])(),Object(l["createBlock"])(u,{key:0,noclear:!0,context:"error"},{default:Object(l["withCtx"])(()=>[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.formErrors,(t,n)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("span",{key:n},[Object(l["createElementVNode"])("strong",null,Object(l["toDisplayString"])(e.translate("General_Error")),1),Object(l["createTextVNode"])(": "),Object(l["createElementVNode"])("span",{innerHTML:e.$sanitize(t)},null,8,c),i]))),128))]),_:1})):Object(l["createCommentVNode"])("",!0)}var u=n("19dc"),s=Object(l["defineComponent"])({props:{formErrors:[Array,Object]},components:{Notification:u["Notification"]}});s.render=a;var b=s;const d={key:0},p={key:1,style:{"margin-left":"20px"}},j={key:2},f=Object(l["createElementVNode"])("br",null,null,-1),O=["value"],m={id:"confirmUnblockAllIps",class:"ui-confirm"},y=["value"],k=["value"],g={key:3},B={style:{"margin-left":"20px"}};function v(e,t,n,o,r,c){const i=Object(l["resolveComponent"])("ContentBlock");return Object(l["openBlock"])(),Object(l["createBlock"])(i,{"content-title":e.translate("Login_CurrentlyBlockedIPs")},{default:Object(l["withCtx"])(()=>[e.blockedIps.length?(Object(l["openBlock"])(),Object(l["createElementBlock"])("ul",p,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.blockedIps,(e,t)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{style:{"list-style":"disc"},key:t},Object(l["toDisplayString"])(e),1))),128))])):(Object(l["openBlock"])(),Object(l["createElementBlock"])("p",d,Object(l["toDisplayString"])(e.translate("UserCountryMap_None")),1)),e.blockedIps.length?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",j,[Object(l["createElementVNode"])("p",null,[f,Object(l["createTextVNode"])(Object(l["toDisplayString"])(e.translate("Login_CurrentlyBlockedIPsUnblockInfo")),1)]),Object(l["createElementVNode"])("div",null,[Object(l["createElementVNode"])("input",{type:"button",class:"btn",value:e.translate("Login_UnblockAllIPs"),onClick:t[0]||(t[0]=t=>e.unblockAllIps())},null,8,O)]),Object(l["createElementVNode"])("div",m,[Object(l["createElementVNode"])("h2",null,Object(l["toDisplayString"])(e.translate("Login_CurrentlyBlockedIPsUnblockConfirm")),1),Object(l["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,y),Object(l["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,k)])])):Object(l["createCommentVNode"])("",!0),e.disallowedIps.length?(Object(l["openBlock"])(),Object(l["createElementBlock"])("div",g,[Object(l["createElementVNode"])("h3",null,Object(l["toDisplayString"])(e.translate("Login_IPsAlwaysBlocked")),1),Object(l["createElementVNode"])("ul",B,[(Object(l["openBlock"])(!0),Object(l["createElementBlock"])(l["Fragment"],null,Object(l["renderList"])(e.disallowedIps,(e,t)=>(Object(l["openBlock"])(),Object(l["createElementBlock"])("li",{style:{"list-style":"disc"},key:t},Object(l["toDisplayString"])(e),1))),128))])])):Object(l["createCommentVNode"])("",!0)]),_:1},8,["content-title"])}var E=Object(l["defineComponent"])({props:{blockedIps:{type:Array,required:!0},disallowedIps:{type:Array,required:!0}},components:{ContentBlock:u["ContentBlock"]},methods:{unblockAllIps(){window.bruteForceLog.unblockAllIps()}}});E.render=v;var N=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(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("Login"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome","Login",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["TwoFactorAuth"]=t(require("CoreHome"),require("Login"),require("vue"),require("CorePluginsAdmin")):e["TwoFactorAuth"]=t(e["CoreHome"],e["Login"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,o,n){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},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/TwoFactorAuth/vue/dist/",o(o.s="fae3")}({"19dc":function(t,o){t.exports=e},"5b81":function(e,o){e.exports=t},"8bbf":function(e,t){e.exports=o},a5a2:function(e,t){e.exports=n},fae3:function(e,t,o){"use strict";if(o.r(t),o.d(t,"ShowRecoveryCodes",(function(){return f})),o.d(t,"ShowRecoveryCodesPage",(function(){return S})),o.d(t,"SetupTwoFactorAuth",(function(){return de})),o.d(t,"LoginTwoFactorAuth",(function(){return Me})),o.d(t,"SetupFinished",(function(){return Ge})),o.d(t,"UserSettings",(function(){return dt})),"undefined"!==typeof window){var n=window.document.currentScript,r=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(o.p=r[1])}var a=o("8bbf");const c=Object(a["createElementVNode"])("br",null,null,-1),l=Object(a["createElementVNode"])("br",null,null,-1),i={class:"alert alert-warning"},s={key:0,class:"twoFactorRecoveryCodes browser-default"},u={key:1,class:"alert alert-danger"},d=Object(a["createElementVNode"])("br",null,null,-1),b=["value"],p=["value"],m=["value"];function O(e,t,o,n,r,O){var j;const h=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",null,[Object(a["createElementVNode"])("p",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("TwoFactorAuth_RecoveryCodesExplanation")),1),c,l]),Object(a["createElementVNode"])("div",i,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_RecoveryCodesSecurity")),1),null!==(j=e.codes)&&void 0!==j&&j.length?Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("ul",s,[(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.codes,(e,t)=>(Object(a["openBlock"])(),Object(a["createElementBlock"])("li",{key:t},Object(a["toDisplayString"])(e.toUpperCase().match(/.{1,4}/g).join("-")),1))),128))])),[[h,{}]]):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",u,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_RecoveryCodesAllUsed")),1)),Object(a["createElementVNode"])("p",null,[d,Object(a["createElementVNode"])("input",{type:"button",class:"btn backupRecoveryCode",onClick:t[0]||(t[0]=t=>{e.downloadRecoveryCodes(),e.$emit("downloaded")}),value:e.translate("General_Download"),style:{"margin-right":"3.5px"}},null,8,b),Object(a["createElementVNode"])("input",{type:"button",class:"btn backupRecoveryCode",onClick:t[1]||(t[1]=t=>{e.print(),e.$emit("downloaded")}),value:e.translate("General_Print"),style:{"margin-right":"3.5px"}},null,8,p),Object(a["createElementVNode"])("input",{type:"button",class:"btn backupRecoveryCode",onClick:t[2]||(t[2]=t=>{e.copyRecoveryCodesToClipboard(),e.$emit("downloaded")}),value:e.translate("General_Copy")},null,8,m)])])}var j=o("19dc"),h=Object(a["defineComponent"])({props:{codes:{type:Array,default(){return[]}}},directives:{SelectOnFocus:j["SelectOnFocus"]},emits:["downloaded"],methods:{copyRecoveryCodesToClipboard(){const e=document.createElement("textarea");e.value=this.codes.join("\n"),e.setAttribute("readonly",""),e.style.position="absolute",e.style.left="-9999px",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)},downloadRecoveryCodes(){j["Matomo"].helper.sendContentAsDownload("analytics_recovery_codes.txt",this.codes.join("\n"))},print(){window.print()}}});h.render=O;var f=h;const w=Object(a["createElementVNode"])("br",null,null,-1),y=Object(a["createElementVNode"])("br",null,null,-1),g={key:0,class:"alert alert-success"},v={key:1,class:"alert alert-danger"},C=["action"],N=["value"],E=["value"];function V(e,t,o,n,r,c){const l=Object(a["resolveComponent"])("ShowRecoveryCodes"),i=Object(a["resolveComponent"])("ContentBlock");return Object(a["openBlock"])(),Object(a["createBlock"])(i,{"content-title":e.contentTitle},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(l,{codes:e.codes},null,8,["codes"]),Object(a["createElementVNode"])("h2",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_GenerateNewRecoveryCodes")),1),Object(a["createElementVNode"])("p",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("TwoFactorAuth_GenerateNewRecoveryCodesInfo")),1),w,y]),e.regenerateSuccess?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",g,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_RecoveryCodesRegenerated")),1)):Object(a["createCommentVNode"])("",!0),e.regenerateError?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",v,Object(a["toDisplayString"])(e.translate("General_ExceptionSecurityCheckFailed")),1)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("form",{method:"post",action:e.showRecoveryCodesLink},[Object(a["createElementVNode"])("input",{type:"hidden",name:"regenerateNonce",value:e.regenerateNonce},null,8,N),Object(a["createElementVNode"])("input",{type:"submit",class:"btn",value:e.translate("TwoFactorAuth_GenerateNewRecoveryCodes")},null,8,E)],8,C)]),_:1},8,["content-title"])}var T=Object(a["defineComponent"])({props:{codes:Array,regenerateSuccess:Boolean,regenerateError:Boolean,regenerateNonce:{type:String,required:!0}},components:{ContentBlock:j["ContentBlock"],ShowRecoveryCodes:f},computed:{contentTitle(){const e=Object(j["translate"])("TwoFactorAuth_TwoFactorAuthentication"),t=Object(j["translate"])("TwoFactorAuth_RecoveryCodes");return`${e} - ${t}`},showRecoveryCodesLink(){return"?"+j["MatomoUrl"].stringify(Object.assign(Object.assign({},j["MatomoUrl"].urlParsed.value),{},{module:"TwoFactorAuth",action:"showRecoveryCodes"}))}}});T.render=V;var S=T;const A={class:"setupTwoFactorAuthentication",ref:"root"},F={key:0,class:"alert alert-warning"},k=["disabled"],_=Object(a["createElementVNode"])("a",{name:"twoFactorStep2",id:"twoFactorStep2",style:{opacity:"0"}},null,-1),D=["innerHTML"],B=Object(a["createElementVNode"])("br",null,null,-1),x=Object(a["createElementVNode"])("a",{name:"twoFactorStep3",id:"twoFactorStep3",style:{opacity:"0"}},null,-1),M={key:0,class:"message_container"},L=["innerHTML"],R=Object(a["createElementVNode"])("br",null,null,-1),q=["action"],U=["value"],P=["disabled","value"],G={class:"ui-confirm two-fa-qr-code-dialog"},H={class:"row"},$={class:"col l8 offset-l2 m10 offset-m1 s12 center-align"},I={id:"qrcode",ref:"qrcode",title:""},z={class:"text-code"},Q=["innerHTML"],X={class:"row"},Y={class:"col l8 offset-l2 m10 offset-m1 s12"},W=["value"],J=["value"];function K(e,t,o,n,r,c){const l=Object(a["resolveComponent"])("ShowRecoveryCodes"),i=Object(a["resolveComponent"])("InstallOTPApp"),s=Object(a["resolveComponent"])("Notification"),u=Object(a["resolveComponent"])("Field"),d=Object(a["resolveComponent"])("MatomoDialog"),b=Object(a["resolveComponent"])("ContentBlock"),p=Object(a["resolveDirective"])("copy-to-clipboard");return Object(a["openBlock"])(),Object(a["createBlock"])(b,{"content-title":e.standalone?e.translate("TwoFactorAuth_RequiredToSetUpTwoFactorAuthentication"):e.translate("TwoFactorAuth_SetUpTwoFactorAuthentication")},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",A,[e.isAlreadyUsing2fa?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",F,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_WarningChangingConfiguredDevice")),1)):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_SetupIntroFollowSteps")),1),Object(a["createElementVNode"])("h2",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_StepX",1))+" - "+Object(a["toDisplayString"])(e.translate("TwoFactorAuth_RecoveryCodes")),1),Object(a["createVNode"])(l,{codes:e.codes,onDownloaded:t[0]||(t[0]=e=>this.hasDownloadedRecoveryCode=!0)},null,8,["codes"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",{class:"alert alert-info backupRecoveryCodesAlert"},Object(a["toDisplayString"])(e.translate("TwoFactorAuth_SetupBackupRecoveryCodes")),513),[[a["vShow"],1===e.step]]),Object(a["createElementVNode"])("p",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("button",{class:"btn goToStep2",onClick:t[1]||(t[1]=t=>e.nextStep()),disabled:!e.hasDownloadedRecoveryCode},Object(a["toDisplayString"])(e.translate("General_Next")),9,k),[[a["vShow"],1===e.step]])]),_,Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("h2",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_StepX",2))+" - "+Object(a["toDisplayString"])(e.translate("TwoFactorAuth_SetupAuthenticatorOnDevice")),1),Object(a["createVNode"])(i),Object(a["createElementVNode"])("p",{innerHTML:e.$sanitize(e.setupAuthenticatorOnDeviceStep2ShowCodes)},null,8,D),Object(a["createElementVNode"])("p",null,[B,Object(a["withDirectives"])(Object(a["createElementVNode"])("button",{class:"btn showOtpCodes",onClick:t[2]||(t[2]=t=>e.showQrCodeModal())},Object(a["toDisplayString"])(e.translate("TwoFactorAuth_ShowCodes")),513),[[a["vShow"],e.step>=2]])])],512),[[a["vShow"],e.step>=2]]),x,Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("h2",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_StepX",3))+" - "+Object(a["toDisplayString"])(e.translate("TwoFactorAuth_ConfirmSetup")),1),Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_VerifyAuthCodeIntro")),1),e.accessErrorString?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",M,[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(s,{noclear:!0,context:"error"},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("strong",null,Object(a["toDisplayString"])(e.translate("General_Error")),1),Object(a["createTextVNode"])(": "),Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.accessErrorString)},null,8,L),R]),_:1})])])):Object(a["createCommentVNode"])("",!0),Object(a["createElementVNode"])("form",{method:"post",class:"setupConfirmAuthCodeForm",autocorrect:"off",autocapitalize:"none",autocomplete:"off",action:e.linkTo({module:"TwoFactorAuth",action:e.submitAction})},[Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(u,{uicontrol:"text",name:"authCode",title:e.translate("TwoFactorAuth_AuthenticationCode"),modelValue:e.authCode,"onUpdate:modelValue":t[3]||(t[3]=t=>e.authCode=t),maxlength:6,placeholder:"123456",autocomplete:"one-time-code","inline-help":e.translate("TwoFactorAuth_VerifyAuthCodeHelp")},null,8,["title","modelValue","inline-help"])]),Object(a["createElementVNode"])("input",{type:"hidden",name:"authCodeNonce",value:e.authCodeNonce},null,8,U),Object(a["createElementVNode"])("input",{type:"submit",class:"btn confirmAuthCode",disabled:6!==e.authCode.length,value:e.translate("General_Confirm")},null,8,P)],8,q)],512),[[a["vShow"],e.step>=3]]),Object(a["createVNode"])(d,{modelValue:e.qrCodeDialogVisible,"onUpdate:modelValue":t[4]||(t[4]=t=>e.qrCodeDialogVisible=t),onValidation:t[5]||(t[5]=t=>{e.closeQrCodeModal(),e.nextStep()}),options:{focusSelector:".modal-action.btn"}},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",G,[Object(a["createElementVNode"])("h2",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_Your2FaAuthSecret")),1),Object(a["createElementVNode"])("div",H,[Object(a["createElementVNode"])("div",$,[Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_ShowCodeModalInstructions1")),1),Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("span",I,null,512)]),Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_ShowCodeModalInstructions2")),1),Object(a["createElementVNode"])("div",z,[Object(a["withDirectives"])((Object(a["openBlock"])(),Object(a["createElementBlock"])("pre",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.newSecret),1)])),[[p,{}]])]),Object(a["createElementVNode"])("p",{innerHTML:e.$sanitize(e.showCodeModalInstructions3)},null,8,Q)])]),Object(a["createElementVNode"])("div",X,[Object(a["createElementVNode"])("div",Y,[Object(a["createElementVNode"])("h3",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_DontHaveOTPApp")),1),Object(a["createVNode"])(i)])]),Object(a["createElementVNode"])("input",{role:"validation",type:"button",value:e.translate("General_Continue")},null,8,W),Object(a["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_Cancel")},null,8,J)])]),_:1},8,["modelValue","options"])],512)]),_:1},8,["content-title"])}var Z=o("a5a2");
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */const ee=Object(a["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:"https://github.com/andOTP/andOTP#downloads"},"andOTP",-1),te=Object(a["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:"https://authy.com/guides/github/"},"Authy",-1),oe=Object(a["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:"https://support.1password.com/one-time-passwords/"},"1Password",-1),ne=Object(a["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:"https://helpdesk.lastpass.com/multifactor-authentication-options/lastpass-authenticator/"},"LastPass Authenticator",-1),re=Object(a["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:"https://support.google.com/accounts/answer/1066447"},"Google Authenticator",-1);function ae(e,t,o,n,r,c){return Object(a["openBlock"])(),Object(a["createElementBlock"])("p",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("TwoFactorAuth_SetupAuthenticatorOnDeviceStep1"))+" ",1),ee,Object(a["createTextVNode"])(", "),te,Object(a["createTextVNode"])(", "),oe,Object(a["createTextVNode"])(", "),ne,Object(a["createTextVNode"])(", "+Object(a["toDisplayString"])(e.translate("General_Or"))+" ",1),re,Object(a["createTextVNode"])(". ")])}var ce=Object(a["defineComponent"])({});ce.render=ae;var le=ce;const{QRCode:ie,$:se}=window;var ue=Object(a["defineComponent"])({props:{isAlreadyUsing2fa:Boolean,accessErrorString:String,submitAction:{type:String,required:!0},authCodeNonce:{type:String,required:!0},newSecret:{type:String,required:!0},codes:Array,twoFaBarCodeSetupUrl:{type:String,required:!0},standalone:Boolean},components:{InstallOTPApp:le,MatomoDialog:j["MatomoDialog"],ShowRecoveryCodes:f,Notification:j["Notification"],Field:Z["Field"],ContentBlock:j["ContentBlock"]},directives:{CopyToClipboard:j["CopyToClipboard"]},data(){return{step:1,hasDownloadedRecoveryCode:!1,authCode:"",qrCodeDialogVisible:!1}},mounted(){setTimeout(()=>{const e=this.$refs.qrcode;new ie(e,{text:this.twoFaBarCodeSetupUrl,width:200,height:200}),se(e).attr("title",""),this.accessErrorString&&(this.step=3,this.scrollToEnd())})},methods:{scrollToEnd(){setTimeout(()=>{let e="";2===this.step?e="#twoFactorStep2":3===this.step&&(e="#twoFactorStep3"),e&&j["Matomo"].helper.lazyScrollTo(e,50,!0)},50)},showQrCodeModal(){this.qrCodeDialogVisible=!0},closeQrCodeModal(){this.qrCodeDialogVisible=!1},nextStep(){this.step+=1,this.step>3&&(this.step=3),this.scrollToEnd()},linkTo(e){return"?"+j["MatomoUrl"].stringify(Object.assign(Object.assign({},j["MatomoUrl"].urlParsed.value),e))}},computed:{setupAuthenticatorOnDeviceStep2ShowCodes(){return Object(j["translate"])("TwoFactorAuth_SetupAuthenticatorOnDeviceStep2ShowCodes",Object(j["translate"])("TwoFactorAuth_ShowCodes"))},showCodeModalInstructions3(){return Object(j["translate"])("TwoFactorAuth_ShowCodeModalInstructions3",Object(j["translate"])("General_Continue"))}}});ue.render=K;var de=ue;const be={class:"message_container"},pe=["innerHTML"],me=Object(a["createElementVNode"])("br",null,null,-1),Oe={class:"row"},je={class:"col s12 input-field"},he=["value"],fe=Object(a["createElementVNode"])("input",{type:"text",name:"form_authcode",placeholder:"",id:"form_authcode",class:"input",value:"",size:"20",autocorrect:"off",autocapitalize:"none",autocomplete:"one-time-code",tabindex:"10",autofocus:"autofocus"},null,-1),we={for:"form_authcode"},ye=Object(a["createElementVNode"])("i",{class:"icon-user icon"},null,-1),ge={class:"row actions"},ve={class:"col s12"},Ce=["value"],Ne=["innerHTML"],Ee=Object(a["createElementVNode"])("br",null,null,-1),Ve=Object(a["createElementVNode"])("br",null,null,-1),Te=Object(a["createElementVNode"])("br",null,null,-1),Se=["href"],Ae=Object(a["createElementVNode"])("br",null,null,-1),Fe=["href"],ke=Object(a["createElementVNode"])("br",null,null,-1),_e=["href"];function De(e,t,o,n,r,c){const l=Object(a["resolveComponent"])("FormErrors"),i=Object(a["resolveComponent"])("Notification"),s=Object(a["resolveComponent"])("ContentBlock");return Object(a["openBlock"])(),Object(a["createBlock"])(s,{"content-title":e.translate("TwoFactorAuth_TwoFactorAuthentication")},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",be,[Object(a["createVNode"])(l,{"form-errors":e.formData.errors},null,8,["form-errors"]),e.accessErrorString?(Object(a["openBlock"])(),Object(a["createBlock"])(i,{key:0,noclear:!0,context:"error"},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("strong",null,Object(a["toDisplayString"])(e.translate("General_Error")),1),Object(a["createTextVNode"])(": "),Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.accessErrorString)},null,8,pe),me]),_:1})):Object(a["createCommentVNode"])("",!0)]),Object(a["createElementVNode"])("form",Object(a["mergeProps"])(e.formDataAttributes,{class:"loginTwoFaForm"}),[Object(a["createElementVNode"])("div",Oe,[Object(a["createElementVNode"])("div",je,[Object(a["createElementVNode"])("input",{type:"hidden",name:"form_nonce",id:"login_form_nonce",value:e.formNonce},null,8,he),fe,Object(a["createElementVNode"])("label",we,[ye,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("TwoFactorAuth_AuthenticationCode")),1)])])]),Object(a["createElementVNode"])("div",ge,[Object(a["createElementVNode"])("div",ve,[Object(a["createElementVNode"])("input",{class:"submit btn btn-block",id:"login_form_submit",type:"submit",value:e.translate("TwoFactorAuth_Verify"),tabindex:"100"},null,8,Ce)])])],16),Object(a["createElementVNode"])("p",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("TwoFactorAuth_VerifyIdentifyExplanation"))+" ",1),Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.learnMoreText)},null,8,Ne),Ee,Ve,Object(a["createElementVNode"])("strong",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_DontHaveYourMobileDevice")),1),Te,Object(a["createElementVNode"])("a",{href:e.externalRawLink("https://matomo.org/faq/how-to/faq_27248"),rel:"noreferrer noopener",target:"_blank"},Object(a["toDisplayString"])(e.translate("TwoFactorAuth_EnterRecoveryCodeInstead")),9,Se),Ae,Object(a["createElementVNode"])("a",{href:e.mailToLink,rel:"noreferrer noopener"},Object(a["toDisplayString"])(e.translate("TwoFactorAuth_AskSuperUserResetAuthenticationCode")),9,Fe),ke,Object(a["createElementVNode"])("a",{href:e.logoutLink,rel:"noreferrer noopener"},Object(a["toDisplayString"])(e.translate("General_Logout")),9,_e)])]),_:1},8,["content-title"])}var Be=o("5b81"),xe=Object(a["defineComponent"])({props:{formData:{type:Object,required:!0},accessErrorString:String,formNonce:{type:String,required:!0},loginModule:{type:String,required:!0},piwikUrl:String,userLogin:{type:String,required:!0},contactEmail:{type:String,required:!0}},components:{ContentBlock:j["ContentBlock"],Notification:j["Notification"],FormErrors:Be["FormErrors"]},computed:{learnMoreText(){return Object(j["translate"])("General_LearnMore",Object(j["externalLink"])("https://matomo.org/faq/general/faq_27245"),"</a>")},mailToLink(){return`mailto:${this.contactEmail}?${j["MatomoUrl"].stringify({subject:Object(j["translate"])("TwoFactorAuth_NotPossibleToLogIn"),body:Object(j["translate"])("TwoFactorAuth_LostAuthenticationDevice","\n\n","\n\n",this.piwikUrl||"","\n\n",this.userLogin,Object(j["externalRawLink"])("https://matomo.org/faq/how-to/faq_27248"))})}`},logoutLink(){return"?"+j["MatomoUrl"].stringify({module:this.loginModule,action:"logout"})},formDataAttributes(){return Object.fromEntries(this.formData.attributes.split(/\s+/g).filter(e=>e).map(e=>e.split("=")).map(([e,t])=>[e,j["Matomo"].helper.htmlDecode(t.substr(1,t.length-2))]))}}});xe.render=De;var Me=xe;const Le={class:"successMessage"},Re=Object(a["createElementVNode"])("br",null,null,-1),qe=["href"];function Ue(e,t,o,n,r,c){const l=Object(a["resolveComponent"])("ContentBlock");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{class:"twoFactorSetupFinished"},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("h2",Le,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_SetupFinishedTitle")),1),Object(a["createElementVNode"])("h3",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_SetupFinishedSubtitle")),1),Object(a["createElementVNode"])("p",null,[Re,Object(a["createElementVNode"])("a",{class:"btn",href:e.userSecurityLink},Object(a["toDisplayString"])(e.translate("General_Continue")),9,qe)])]),_:1})}var Pe=Object(a["defineComponent"])({components:{ContentBlock:j["ContentBlock"]},computed:{userSecurityLink(){return"?"+j["MatomoUrl"].stringify(Object.assign(Object.assign({},j["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"userSecurity"}))}}});Pe.render=Ue;var Ge=Pe;const He=["innerHTML"],$e={key:0},Ie={class:"twoFaStatusEnabled"},ze={key:1},Qe={key:0},Xe=Object(a["createElementVNode"])("br",null,null,-1),Ye=Object(a["createElementVNode"])("br",null,null,-1),We=["href"],Je={key:1},Ke=["href"],Ze=["href"],et=["value"],tt=["href"],ot={key:2},nt=Object(a["createElementVNode"])("br",null,null,-1),rt=Object(a["createElementVNode"])("br",null,null,-1),at=["href"],ct={id:"confirmDisable2FA",class:"ui-confirm",ref:"confirmDisable2FA"},lt=["value"],it=["value"];function st(e,t,o,n,r,c){const l=Object(a["resolveComponent"])("ContentBlock");return Object(a["openBlock"])(),Object(a["createBlock"])(l,{"content-title":e.contentTitle,class:"userSettings2FA"},{default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("p",{innerHTML:e.$sanitize(e.twoFactorAuthIntro)},null,8,He),e.isEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("p",$e,[Object(a["createElementVNode"])("strong",Ie,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_TwoFactorAuthenticationIsEnabled")),1)])):Object(a["createCommentVNode"])("",!0),e.isEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("p",ze,[e.isForced?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Qe,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("TwoFactorAuth_TwoFactorAuthenticationRequired"))+" ",1),Xe,Ye,Object(a["createElementVNode"])("a",{class:"btn btn-link enable2FaLink",href:e.setupTwoFactorAuthLink,style:{"margin-right":"3.5px"}},Object(a["toDisplayString"])(e.translate("TwoFactorAuth_ConfigureDifferentDevice")),9,We)])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Je,[Object(a["createElementVNode"])("a",{class:"btn btn-link enable2FaLink",href:e.setupTwoFactorAuthLink,style:{"margin-right":"3.5px"}},Object(a["toDisplayString"])(e.translate("TwoFactorAuth_ConfigureDifferentDevice")),9,Ke),Object(a["createElementVNode"])("a",{href:e.disableTwoFactorAuthLink,style:{display:"none"},id:"disable2fa"},"disable2fa",8,Ze),Object(a["createElementVNode"])("input",{type:"button",class:"btn btn-link disable2FaLink",onClick:t[0]||(t[0]=t=>e.onDisable2FaLinkClick()),value:e.translate("TwoFactorAuth_DisableTwoFA"),style:{"margin-right":"3.5px"}},null,8,et)])),Object(a["createElementVNode"])("a",{class:"btn btn-link showRecoveryCodesLink",href:e.showRecoveryCodesLink},Object(a["toDisplayString"])(e.translate("TwoFactorAuth_ShowRecoveryCodes")),9,tt)])):(Object(a["openBlock"])(),Object(a["createElementBlock"])("p",ot,[Object(a["createElementVNode"])("strong",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_TwoFactorAuthenticationIsDisabled")),1),nt,rt,Object(a["createElementVNode"])("a",{class:"btn btn-link enable2FaLink",href:e.setupTwoFactorAuthLink},Object(a["toDisplayString"])(e.translate("TwoFactorAuth_EnableTwoFA")),9,at)])),Object(a["createElementVNode"])("div",ct,[Object(a["createElementVNode"])("h2",null,Object(a["toDisplayString"])(e.translate("TwoFactorAuth_ConfirmDisableTwoFA")),1),Object(a["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,lt),Object(a["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,it)],512)]),_:1},8,["content-title"])}var ut=Object(a["defineComponent"])({props:{isEnabled:Boolean,isForced:Boolean,disableNonce:{type:String,required:!0}},components:{ContentBlock:j["ContentBlock"]},computed:{contentTitle(){const e=Object(j["translate"])("TwoFactorAuth_TwoFactorAuthentication"),t=Object(j["translate"])("TwoFactorAuth_TwoFAShort");return`${e} (${t})`},twoFactorAuthIntro(){return Object(j["translate"])("TwoFactorAuth_TwoFactorAuthenticationIntro",Object(j["externalLink"])("https://matomo.org/faq/general/faq_27245"),"</a>")},setupTwoFactorAuthLink(){return"?"+j["MatomoUrl"].stringify(Object.assign(Object.assign({},j["MatomoUrl"].urlParsed.value),{},{module:"TwoFactorAuth",action:"setupTwoFactorAuth"}))},disableTwoFactorAuthLink(){return"?"+j["MatomoUrl"].stringify(Object.assign(Object.assign({},j["MatomoUrl"].urlParsed.value),{},{module:"TwoFactorAuth",action:"disableTwoFactorAuth",disableNonce:this.disableNonce}))},showRecoveryCodesLink(){return"?"+j["MatomoUrl"].stringify(Object.assign(Object.assign({},j["MatomoUrl"].urlParsed.value),{},{module:"TwoFactorAuth",action:"showRecoveryCodes"}))}},methods:{onDisable2FaLinkClick(){const e=this.disableNonce;j["Matomo"].helper.modalConfirm(this.$refs.confirmDisable2FA,{yes(){j["MatomoUrl"].updateUrl({module:"TwoFactorAuth",action:"disableTwoFactorAuth",disableNonce:e})}})}}});ut.render=st;var dt=ut;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# 