Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CoreHome.umd.min.js.map « dist « vue « CoreHome « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c85381199276c68d896a4bc5a9a0ba0f685c9586 (plain)
1
{"version":3,"sources":["webpack://CoreHome/webpack/universalModuleDefinition","webpack://CoreHome/webpack/bootstrap","webpack://CoreHome/./plugins/CoreHome/vue/src/noAdblockFlag.ts","webpack://CoreHome/external {\"commonjs\":\"vue\",\"commonjs2\":\"vue\",\"root\":\"Vue\"}","webpack://CoreHome/./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoUrl/MatomoUrl.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Periods.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/utilities.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Matomo/Matomo.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Matomo/Matomo.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/translate.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Day.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Week.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Month.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Year.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Range.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Periods/Periods.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/AjaxHelper/AjaxHelper.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/PiwikUrl/PiwikUrl.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/PiwikUrl/PiwikUrl.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Piwik/Piwik.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Piwik/Piwik.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?c435","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.vue?7b62","webpack://CoreHome/./plugins/CoreHome/vue/src/createAngularJsAdapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/MatomoDialog/MatomoDialog.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?0bf6","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.vue?6f80","webpack://CoreHome/./plugins/CoreHome/vue/src/ActivityIndicator/ActivityIndicator.adapter.ts","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue?14a2","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.vue?cc69","webpack://CoreHome/./plugins/CoreHome/vue/src/Alert/Alert.adapter.ts"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__8bbf__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","hasBlockedContent","currentScript","document","src","match","MatomoUrl","paramName","hash","location","href","split","regex","RegExp","test","decodeURIComponent","valueFromHash","broadcast","getValueFromHash","getValueFromUrl","search","piwikUrl","model","getSearchParam","$inject","angular","service","Periods","periodClass","periods","Error","periodOrder","push","Array","concat","strPeriod","strDate","parse","format","date","$","datepicker","formatDate","getToday","Date","now","setTime","getTime","getTimezoneOffset","setHours","getHours","piwik","timezoneOffset","setMinutes","setSeconds","setMilliseconds","parseDate","yesterday","setDate","getDate","lastWeek","lastMonth","setMonth","getMonth","lastYear","setFullYear","getFullYear","err","console","error","message","todayIsInRange","dateRange","length","originalTitle","piwikHelper","isValidPeriod","periodStr","dateStr","e","helper","updatePeriodParamsFromUrl","period","currentDateString","getDateRange","startDateString","endDateString","updateDateInTitle","title","indexOf","siteName","dateString","getPrettyString","substr","hasUserCapability","capability","isArray","userCapabilities","Matomo","piwikService","initPiwikService","$rootScope","$on","run","translate","translationStringId","values","_pk_translate","dateInPeriod","addCustomPeriod","weekDates","startWeek","endWeek","daysToMonday","getDay","month","startMonth","endMonth","toString","startYear","endYear","startDate","endDate","childPeriodType","strAmount","strEndDate","nAmount","Math","max","parseInt","Number","isNaN","startPeriod","endPeriod","firstWebsiteDate","rangeEndDate","countBack","ed","getLastNRange","substring","parts","start","end","piwikPeriods","getAllLabels","isRecognizedPeriod","RangePeriod","defaultErrorCallback","deferred","status","loadingError","Piwik_Popover","isOpen","body","html","escape","responseText","show","globalAjaxQueue","active","clean","readyState","splice","args","abort","forEach","x","errorCallback","params","type","getValuesFromUrl","arrayParams","keys","toLowerCase","getParams","postParams","withToken","url","addParams","urls","urlsProcessed","map","u","param","method","timeout","callback","useRegularCallbackInCaseOfError","setCallback","redirect","completeCallback","element","loadingElement","errorElement","parameter","defaultParams","hide","fadeIn","requestHandle","buildAjaxCall","parameters","mixinDefaultGetParams","getUrl","segment","ajaxCall","async","dataType","complete","apply","arguments","success","response","request","result","placeAt","UI","notification","Notification","placeat","context","id","scrollToNotification","ajaxRequestFinished","data","mixinDefaultPostParams","undefined","ajax","isRequestToApiMethod","shouldPropagateTokenAuth","token_auth","force_api_session","isWidgetizeRequestWithoutSession","getDefaultPostParams","mergedParams","originalParams","idSite","useGETDefaultParameter","ajaxQueue","ajaxHelper","PiwikUrl","Piwik","props","Boolean","required","HTMLElement","emits","slotElement","$slots","default","el","style","display","watch","newValue","oldValue","modalConfirm","yes","$emit","no","onCloseEnd","render","createAngularJsAdapter","options","component","scope","events","directiveName","transclude","mountPointFactory","postCreate","noScope","angularJsScope","angularJsAdapter","injectedServices","adapter","restrict","compile","post","ngScope","ngElement","ngAttrs","clone","find","rootVueTemplate","entries","info","vue","eventName","app","template","initialData","scopeVarName","Function","transcludeTarget","methods","config","globalProperties","$sanitize","vueSanitize","mountPoint","vm","mount","angularJsBind","$watch","append","directive","MatomoDialog","attrs","$eval","setTimeout","$apply","close","closeEnd","$parse","piwikDialog","assign","vueRootPlaceholder","appendTo","class","alt","loadingMessage","loading","String","ActivityIndicator","severity","Alert"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,QACR,oBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIJ,GACe,kBAAZC,QACdA,QAAQ,YAAcD,EAAQG,QAAQ,QAEtCJ,EAAK,YAAcC,EAAQD,EAAK,SARlC,CASoB,qBAATO,KAAuBA,KAAOC,MAAO,SAASC,GACzD,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUV,QAGnC,IAAIC,EAASO,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHZ,QAAS,IAUV,OANAa,EAAQH,GAAUI,KAAKb,EAAOD,QAASC,EAAQA,EAAOD,QAASS,GAG/DR,EAAOW,GAAI,EAGJX,EAAOD,QA0Df,OArDAS,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASjB,EAASkB,EAAMC,GAC3CV,EAAoBW,EAAEpB,EAASkB,IAClCG,OAAOC,eAAetB,EAASkB,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAASzB,GACX,qBAAX0B,QAA0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AAAC,WCJA,oCAAgB,CAC7BhF,MAAO,CACLgF,QAAS,CACPxJ,KAAMyE,QACNC,UAAU,EACVK,SAAS,GAEXwE,eAAgB,CACdvJ,KAAMyJ,OACN/E,UAAU,EACVK,QAAShJ,EAAU,2BCXzB,GAAO4J,OAAS,GAED,UCMA,GAAAC,GAAuB,CACpCE,UAAW4D,GACX3D,MAAO,CACLyD,QAAS,CACPnC,IAAK,UACLgB,cAAe,KAEjBkB,eAAgB,CACdlC,IAAK,iBACLgB,cAAe,IACftD,QAAS,IAAMhJ,EAAU,yBAG7BhF,QAAS,GACTkP,cAAe;;;;;;4DCjBf,gCAKM,OAJJoD,MAAK,6BAAC,QAAO,WACO,EAAAM,WAAQ,M,CAE5B,wBAAa,qB,GCTF,oCAAgB,CAC7BnF,MAAO,CACLmF,SAAU,CACR3J,KAAMyJ,OACN/E,UAAU,MCJhB,GAAOiB,OAAS,GAED,UCKA,GAAAC,GAAuB,CACpCE,UAAW8D,GACX7D,MAAO,CACL4D,SAAU,CACRtC,IAAK,WACLgB,cAAe,gBAGnBpC,cAAe,aACfC,YAAY","file":"CoreHome.umd.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"vue\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"CoreHome\"] = factory(require(\"vue\"));\n\telse\n\t\troot[\"CoreHome\"] = factory(root[\"Vue\"]);\n})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__8bbf__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"plugins/CoreHome/vue/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"fae3\");\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n// see https://github.com/matomo-org/matomo/issues/5094 used to detect an ad blocker\nwindow.hasBlockedContent = false;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;","// This file is imported into lib/wc client bundles.\n\nif (typeof window !== 'undefined') {\n  var currentScript = window.document.currentScript\n  if (process.env.NEED_CURRENTSCRIPT_POLYFILL) {\n    var getCurrentScript = require('@soda/get-current-script')\n    currentScript = getCurrentScript()\n\n    // for backward compatibility, because previously we directly included the polyfill\n    if (!('currentScript' in document)) {\n      Object.defineProperty(document, 'currentScript', { get: getCurrentScript })\n    }\n  }\n\n  var src = currentScript && currentScript.src.match(/(.+\\/)[^/]+\\.js(\\?.*)?$/)\n  if (src) {\n    __webpack_public_path__ = src[1] // eslint-disable-line\n  }\n}\n\n// Indicate to webpack that this file can be concatenated\nexport default null\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n/**\n * Similar to angulars $location but works around some limitation. Use it if you need to access\n * search params\n */\nconst MatomoUrl = {\n  getSearchParam(paramName: string): string {\n    const hash = window.location.href.split('#');\n\n    const regex = new RegExp(`${paramName}(\\\\[]|=)`);\n    if (hash && hash[1] && regex.test(decodeURIComponent(hash[1]))) {\n      const valueFromHash = window.broadcast.getValueFromHash(paramName, window.location.href);\n\n      // for date, period and idsite fall back to parameter from url, if non in hash was provided\n      if (valueFromHash\n        || (paramName !== 'date' && paramName !== 'period' && paramName !== 'idSite')\n      ) {\n        return valueFromHash;\n      }\n    }\n\n    return window.broadcast.getValueFromUrl(paramName, window.location.search);\n  },\n};\n\nexport default MatomoUrl;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\nimport MatomoUrl from './MatomoUrl';\n\nfunction piwikUrl() {\n  const model = {\n    getSearchParam: MatomoUrl.getSearchParam.bind(MatomoUrl),\n  };\n\n  return model;\n}\n\npiwikUrl.$inject = [];\n\nangular.module('piwikApp.service').service('piwikUrl', piwikUrl);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\ninterface Period {\n  getPrettyString(): string;\n  getDateRange(): Date[];\n  containsToday(): boolean;\n}\n\ninterface PeriodClass {\n  parse(strDate: string|Date): Period;\n  getDisplayText(): string;\n}\n\n/**\n * Matomo period management service for the frontend.\n *\n * Usage:\n *\n *     var DayPeriod = matomoPeriods.get('day');\n *     var day = new DayPeriod(new Date());\n *\n * or\n *\n *     var day = matomoPeriods.parse('day', '2013-04-05');\n *\n * Adding custom periods:\n *\n * To add your own period to the frontend, create a period class for it\n * w/ the following methods:\n *\n * - **getPrettyString()**: returns a human readable display string for the period.\n * - **getDateRange()**: returns an array w/ two elements, the first being the start\n *                       Date of the period, the second being the end Date. The dates\n *                       must be Date objects, not strings, and are inclusive.\n * - **containsToday()**: returns true if the date period contains today. False if not.\n * - (_static_) **parse(strDate)**: creates a new instance of this period from the\n *                                  value of the 'date' query parameter.\n * - (_static_) **getDisplayText**: returns translated text for the period, eg, 'month',\n *                                  'week', etc.\n *\n * Then call Periods.addCustomPeriod w/ your period class:\n *\n *     Periods.addCustomPeriod('mycustomperiod', MyCustomPeriod);\n *\n * NOTE: currently only single date periods like day, week, month year can\n *       be extended. Other types of periods that require a special UI to\n *       view/edit aren't, since there is currently no way to use a\n *       custom UI for a custom period.\n */\nclass Periods {\n  periods: {[name: string]: PeriodClass} = {};\n\n  periodOrder: string[] = [];\n\n  addCustomPeriod(name: string, periodClass: PeriodClass) {\n    if (this.periods[name]) {\n      throw new Error(`The \"${name}\" period already exists! It cannot be overridden.`);\n    }\n\n    this.periods[name] = periodClass;\n    this.periodOrder.push(name);\n  }\n\n  getAllLabels(): string[] {\n    return Array<string>().concat(this.periodOrder);\n  }\n\n  get(strPeriod: string): PeriodClass {\n    const periodClass = this.periods[strPeriod];\n    if (!periodClass) {\n      throw new Error(`Invalid period label: ${strPeriod}`);\n    }\n    return periodClass;\n  }\n\n  parse(strPeriod: string, strDate: string): Period {\n    return this.get(strPeriod).parse(strDate);\n  }\n\n  isRecognizedPeriod(strPeriod: string): boolean {\n    return !!this.periods[strPeriod];\n  }\n}\n\nexport default new Periods();\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport function format(date: Date): string {\n  return $.datepicker.formatDate('yy-mm-dd', date);\n}\n\nexport function getToday(): Date {\n  const date = new Date(Date.now());\n\n  // undo browser timezone\n  date.setTime(date.getTime() + date.getTimezoneOffset() * 60 * 1000);\n\n  // apply Matomo site timezone (if it exists)\n  date.setHours(date.getHours() + ((window.piwik.timezoneOffset || 0) / 3600));\n\n  // get rid of hours/minutes/seconds/etc.\n  date.setHours(0);\n  date.setMinutes(0);\n  date.setSeconds(0);\n  date.setMilliseconds(0);\n  return date;\n}\n\nexport function parseDate(date: string|Date): Date {\n  if (date instanceof Date) {\n    return date;\n  }\n\n  const strDate = decodeURIComponent(date);\n\n  if (strDate === 'today'\n    || strDate === 'now'\n  ) {\n    return getToday();\n  }\n\n  if (strDate === 'yesterday'\n    // note: ignoring the 'same time' part since the frontend doesn't care about the time\n    || strDate === 'yesterdaySameTime'\n  ) {\n    const yesterday = getToday();\n    yesterday.setDate(yesterday.getDate() - 1);\n    return yesterday;\n  }\n\n  if (strDate.match(/last[ -]?week/i)) {\n    const lastWeek = getToday();\n    lastWeek.setDate(lastWeek.getDate() - 7);\n    return lastWeek;\n  }\n\n  if (strDate.match(/last[ -]?month/i)) {\n    const lastMonth = getToday();\n    lastMonth.setDate(1);\n    lastMonth.setMonth(lastMonth.getMonth() - 1);\n    return lastMonth;\n  }\n\n  if (strDate.match(/last[ -]?year/i)) {\n    const lastYear = getToday();\n    lastYear.setFullYear(lastYear.getFullYear() - 1);\n    return lastYear;\n  }\n\n  try {\n    return $.datepicker.parseDate('yy-mm-dd', strDate);\n  } catch (err) {\n    // angular swallows this error, so manual console log here\n    console.error(err.message || err);\n    throw err;\n  }\n}\n\nexport function todayIsInRange(dateRange: Date[]): boolean {\n  if (dateRange.length !== 2) {\n    return false;\n  }\n\n  if (getToday() >= dateRange[0] && getToday() <= dateRange[1]) {\n    return true;\n  }\n\n  return false;\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport MatomoUrl from '../MatomoUrl/MatomoUrl';\nimport Periods from '../Periods/Periods';\nimport { format } from '../Periods/utilities';\n\nlet originalTitle: string;\n\nconst { piwik, broadcast, piwikHelper } = window;\n\npiwik.helper = piwikHelper;\npiwik.broadcast = broadcast;\n\nfunction isValidPeriod(periodStr: string, dateStr: string) {\n  try {\n    Periods.parse(periodStr, dateStr);\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\npiwik.updatePeriodParamsFromUrl = function updatePeriodParamsFromUrl() {\n  let date = MatomoUrl.getSearchParam('date');\n  const period = MatomoUrl.getSearchParam('period');\n  if (!isValidPeriod(period, date)) {\n    // invalid data in URL\n    return;\n  }\n\n  if (piwik.period === period && piwik.currentDateString === date) {\n    // this period / date is already loaded\n    return;\n  }\n\n  piwik.period = period;\n\n  const dateRange = Periods.parse(period, date).getDateRange();\n  piwik.startDateString = format(dateRange[0]);\n  piwik.endDateString = format(dateRange[1]);\n\n  piwik.updateDateInTitle(date, period);\n\n  // do not set anything to previousN/lastN, as it's more useful to plugins\n  // to have the dates than previousN/lastN.\n  if (piwik.period === 'range') {\n    date = `${piwik.startDateString},${piwik.endDateString}`;\n  }\n\n  piwik.currentDateString = date;\n};\n\npiwik.updateDateInTitle = function updateDateInTitle(date: string, period: string) {\n  if (!$('.top_controls #periodString').length) {\n    return;\n  }\n\n  // Cache server-rendered page title\n  originalTitle = originalTitle || document.title;\n\n  if (originalTitle.indexOf(piwik.siteName) === 0) {\n    const dateString = ` - ${Periods.parse(period, date).getPrettyString()} `;\n    document.title = `${piwik.siteName}${dateString}${originalTitle.substr(piwik.siteName.length)}`;\n  }\n};\n\npiwik.hasUserCapability = function hasUserCapability(capability: string) {\n  return window.angular.isArray(piwik.userCapabilities)\n    && piwik.userCapabilities.indexOf(capability) !== -1;\n};\n\nconst Matomo = piwik;\nexport default Matomo;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Matomo from './Matomo';\n\nfunction piwikService() {\n  return Matomo;\n}\n\nangular.module('piwikApp.service').service('piwik', piwikService);\n\nfunction initPiwikService(piwik, $rootScope) {\n  $rootScope.$on('$locationChangeSuccess', piwik.updatePeriodParamsFromUrl);\n}\n\ninitPiwikService.$inject = ['piwik', '$rootScope'];\n\nangular.module('piwikApp.service').run(initPiwikService);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nexport default function translate(translationStringId: string, values: string[] = []): string {\n  return window._pk_translate(translationStringId, values); // eslint-disable-line\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nexport default class DayPeriod {\n  constructor(private dateInPeriod: Date) {}\n\n  static parse(strDate: string): DayPeriod {\n    return new DayPeriod(parseDate(strDate));\n  }\n\n  static getDisplayText(): string {\n    return translate('Intl_PeriodDay');\n  }\n\n  getPrettyString(): string {\n    return format(this.dateInPeriod);\n  }\n\n  getDateRange(): Date[] {\n    return [new Date(this.dateInPeriod.getTime()), new Date(this.dateInPeriod.getTime())];\n  }\n\n  containsToday(): boolean {\n    return todayIsInRange(this.getDateRange());\n  }\n}\n\nPeriods.addCustomPeriod('day', DayPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nexport default class WeekPeriod {\n  constructor(private dateInPeriod: Date) {}\n\n  static parse(strDate: string): WeekPeriod {\n    return new WeekPeriod(parseDate(strDate));\n  }\n\n  static getDisplayText(): string {\n    return translate('Intl_PeriodWeek');\n  }\n\n  getPrettyString(): string {\n    const weekDates = this.getDateRange();\n    const startWeek = format(weekDates[0]);\n    const endWeek = format(weekDates[1]);\n\n    return translate('General_DateRangeFromTo', [startWeek, endWeek]);\n  }\n\n  getDateRange(): Date[] {\n    const daysToMonday = (this.dateInPeriod.getDay() + 6) % 7;\n\n    const startWeek = new Date(this.dateInPeriod.getTime());\n    startWeek.setDate(this.dateInPeriod.getDate() - daysToMonday);\n\n    const endWeek = new Date(startWeek.getTime());\n    endWeek.setDate(startWeek.getDate() + 6);\n\n    return [startWeek, endWeek];\n  }\n\n  containsToday(): boolean {\n    return todayIsInRange(this.getDateRange());\n  }\n}\n\nPeriods.addCustomPeriod('week', WeekPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, todayIsInRange } from './utilities';\n\nexport default class MonthPeriod {\n  constructor(private dateInPeriod: Date) {}\n\n  static parse(strDate: string): MonthPeriod {\n    return new MonthPeriod(parseDate(strDate));\n  }\n\n  static getDisplayText(): string {\n    return translate('Intl_PeriodMonth');\n  }\n\n  getPrettyString(): string {\n    const month = translate(`Intl_Month_Long_StandAlone_${this.dateInPeriod.getMonth() + 1}`);\n    return `${month} ${this.dateInPeriod.getFullYear()}`;\n  }\n\n  getDateRange(): Date[] {\n    const startMonth = new Date(this.dateInPeriod.getTime());\n    startMonth.setDate(1);\n\n    const endMonth = new Date(this.dateInPeriod.getTime());\n    endMonth.setDate(1);\n    endMonth.setMonth(endMonth.getMonth() + 1);\n    endMonth.setDate(0);\n\n    return [startMonth, endMonth];\n  }\n\n  containsToday(): boolean {\n    return todayIsInRange(this.getDateRange());\n  }\n}\n\nPeriods.addCustomPeriod('month', MonthPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport { parseDate, todayIsInRange } from './utilities';\n\nexport default class YearPeriod {\n  constructor(private dateInPeriod: Date) {}\n\n  static parse(strDate: string): YearPeriod {\n    return new YearPeriod(parseDate(strDate));\n  }\n\n  static getDisplayText(): string {\n    return translate('Intl_PeriodYear');\n  }\n\n  getPrettyString(): string {\n    return this.dateInPeriod.getFullYear().toString();\n  }\n\n  getDateRange(): Date[] {\n    const startYear = new Date(this.dateInPeriod.getTime());\n    startYear.setMonth(0);\n    startYear.setDate(1);\n\n    const endYear = new Date(this.dateInPeriod.getTime());\n    endYear.setMonth(12);\n    endYear.setDate(0);\n\n    return [startYear, endYear];\n  }\n\n  containsToday(): boolean {\n    return todayIsInRange(this.getDateRange());\n  }\n}\n\nPeriods.addCustomPeriod('year', YearPeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport translate from '../translate';\nimport Periods from './Periods';\nimport {\n  parseDate,\n  format,\n  getToday,\n  todayIsInRange,\n} from './utilities';\n\nexport default class RangePeriod {\n  constructor(\n    public readonly startDate: Date,\n    public readonly endDate: Date,\n    public readonly childPeriodType: string,\n  ) {}\n\n  /**\n   * Returns a range representing the last N childPeriodType periods, including the current one.\n   */\n  static getLastNRange(\n    childPeriodType: string,\n    strAmount: string|number,\n    strEndDate?: Date|string,\n  ): RangePeriod {\n    const nAmount = Math.max(parseInt(strAmount.toString(), 10) - 1, 0);\n    if (Number.isNaN(nAmount)) {\n      throw new Error('Invalid range strAmount');\n    }\n\n    let endDate = strEndDate ? parseDate(strEndDate) : getToday();\n\n    let startDate = new Date(endDate.getTime());\n    if (childPeriodType === 'day') {\n      startDate.setDate(startDate.getDate() - nAmount);\n    } else if (childPeriodType === 'week') {\n      startDate.setDate(startDate.getDate() - (nAmount * 7));\n    } else if (childPeriodType === 'month') {\n      startDate.setDate(1);\n      startDate.setMonth(startDate.getMonth() - nAmount);\n    } else if (childPeriodType === 'year') {\n      startDate.setFullYear(startDate.getFullYear() - nAmount);\n    } else {\n      throw new Error(`Unknown period type '${childPeriodType}'.`);\n    }\n\n    if (childPeriodType !== 'day') {\n      const startPeriod = Periods.periods[childPeriodType].parse(startDate);\n      const endPeriod = Periods.periods[childPeriodType].parse(endDate);\n\n      [startDate] = startPeriod.getDateRange();\n      [, endDate] = endPeriod.getDateRange();\n    }\n\n    const firstWebsiteDate = new Date(1991, 7, 6);\n    if (startDate.getTime() - firstWebsiteDate.getTime() < 0) {\n      switch (childPeriodType) {\n        case 'year':\n          startDate = new Date(1992, 0, 1);\n          break;\n        case 'month':\n          startDate = new Date(1991, 8, 1);\n          break;\n        case 'week':\n          startDate = new Date(1991, 8, 12);\n          break;\n        case 'day':\n        default:\n          startDate = firstWebsiteDate;\n          break;\n      }\n    }\n\n    return new RangePeriod(startDate, endDate, childPeriodType);\n  }\n\n  /**\n   * Returns a range representing a specific child date range counted back from the end date\n   *\n   * @param childPeriodType Type of the period, eg. day, week, year\n   * @param rangeEndDate\n   * @param countBack Return only the child date range for this specific period number\n   * @returns {RangePeriod}\n   */\n  static getLastNRangeChild(\n    childPeriodType: string,\n    rangeEndDate: Date|string,\n    countBack: number,\n  ): RangePeriod {\n    const ed = rangeEndDate ? parseDate(rangeEndDate) : getToday();\n    let startDate = new Date(ed.getTime());\n    let endDate = new Date(ed.getTime());\n\n    if (childPeriodType === 'day') {\n      startDate.setDate(startDate.getDate() - countBack);\n      endDate.setDate(endDate.getDate() - countBack);\n    } else if (childPeriodType === 'week') {\n      startDate.setDate(startDate.getDate() - (countBack * 7));\n      endDate.setDate(endDate.getDate() - (countBack * 7));\n    } else if (childPeriodType === 'month') {\n      startDate.setDate(1);\n      startDate.setMonth(startDate.getMonth() - countBack);\n      endDate.setDate(1);\n      endDate.setMonth(endDate.getMonth() - countBack);\n    } else if (childPeriodType === 'year') {\n      startDate.setFullYear(startDate.getFullYear() - countBack);\n      endDate.setFullYear(endDate.getFullYear() - countBack);\n    } else {\n      throw new Error(`Unknown period type '${childPeriodType}'.`);\n    }\n\n    if (childPeriodType !== 'day') {\n      const startPeriod = Periods.periods[childPeriodType].parse(startDate);\n      const endPeriod = Periods.periods[childPeriodType].parse(endDate);\n\n      [startDate] = startPeriod.getDateRange();\n      [, endDate] = endPeriod.getDateRange();\n    }\n\n    const firstWebsiteDate = new Date(1991, 7, 6);\n    if (startDate.getTime() - firstWebsiteDate.getTime() < 0) {\n      switch (childPeriodType) {\n        case 'year':\n          startDate = new Date(1992, 0, 1);\n          break;\n        case 'month':\n          startDate = new Date(1991, 8, 1);\n          break;\n        case 'week':\n          startDate = new Date(1991, 8, 12);\n          break;\n        case 'day':\n        default:\n          startDate = firstWebsiteDate;\n          break;\n      }\n    }\n\n    return new RangePeriod(startDate, endDate, childPeriodType);\n  }\n\n  static parse(strDate: string, childPeriodType = 'day'): RangePeriod {\n    if (/^previous/.test(strDate)) {\n      const endDate = RangePeriod.getLastNRange(childPeriodType, '2').startDate;\n      return RangePeriod.getLastNRange(childPeriodType, strDate.substring(8), endDate);\n    }\n\n    if (/^last/.test(strDate)) {\n      return RangePeriod.getLastNRange(childPeriodType, strDate.substring(4));\n    }\n\n    const parts = decodeURIComponent(strDate).split(',');\n    return new RangePeriod(parseDate(parts[0]), parseDate(parts[1]), childPeriodType);\n  }\n\n  static getDisplayText(): string {\n    return translate('General_DateRangeInPeriodList');\n  }\n\n  getPrettyString(): string {\n    const start = format(this.startDate);\n    const end = format(this.endDate);\n    return translate('General_DateRangeFromTo', [start, end]);\n  }\n\n  getDateRange(): Date[] {\n    return [this.startDate, this.endDate];\n  }\n\n  containsToday(): boolean {\n    return todayIsInRange(this.getDateRange());\n  }\n}\n\nPeriods.addCustomPeriod('range', RangePeriod);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Periods from './Periods';\nimport RangePeriod from './Range';\nimport { parseDate, format, todayIsInRange } from './utilities';\n\nwindow.piwik.addCustomPeriod = Periods.addCustomPeriod.bind(Periods);\n\nfunction piwikPeriods() {\n  return {\n    getAllLabels: Periods.getAllLabels.bind(Periods),\n    isRecognizedPeriod: Periods.isRecognizedPeriod.bind(Periods),\n    get: Periods.get.bind(Periods),\n    parse: Periods.parse.bind(Periods),\n    parseDate,\n    format,\n    RangePeriod,\n    todayIsInRange,\n  };\n}\n\nangular.module('piwikApp.service').factory('piwikPeriods', piwikPeriods);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport MatomoUrl from '../MatomoUrl/MatomoUrl';\nimport Matomo from '../Matomo/Matomo';\n\nwindow.globalAjaxQueue = [] as GlobalAjaxQueue;\nwindow.globalAjaxQueue.active = 0;\n\nwindow.globalAjaxQueue.clean = function globalAjaxQueueClean() {\n  for (let i = this.length; i >= 0; i -= 1) {\n    if (!this[i] || this[i].readyState === 4) {\n      this.splice(i, 1);\n    }\n  }\n};\n\nwindow.globalAjaxQueue.push = function globalAjaxQueuePush(...args: (XMLHttpRequest|null)[]) {\n  this.active += args.length;\n\n  // cleanup ajax queue\n  this.clean();\n\n  // call original array push\n  return Array.prototype.push.call(this, ...args);\n};\n\nwindow.globalAjaxQueue.abort = function globalAjaxQueueAbort() {\n  // abort all queued requests if possible\n  this.forEach((x) => x && x.abort && x.abort());\n\n  // remove all elements from array\n  this.splice(0, this.length);\n\n  this.active = 0;\n};\n\ntype ParameterValue = string | number | null | undefined | ParameterValue[];\ntype Parameters = {[name: string]: ParameterValue | Parameters};\ntype AnyFunction = (...params:any[]) => any; // eslint-disable-line\n\n/**\n * error callback to use by default\n */\nfunction defaultErrorCallback(deferred: XMLHttpRequest, status: string): void {\n  // do not display error message if request was aborted\n  if (status === 'abort') {\n    return;\n  }\n\n  const loadingError = $('#loadingError');\n  if (Piwik_Popover.isOpen() && deferred && deferred.status === 500) {\n    if (deferred && deferred.status === 500) {\n      $(document.body).html(piwikHelper.escape(deferred.responseText));\n    }\n  } else {\n    loadingError.show();\n  }\n}\n\n/**\n * Global ajax helper to handle requests within Matomo\n */\nexport default class AjaxHelper {\n  /**\n   * Format of response\n   */\n  format = 'json';\n\n  /**\n   * A timeout for the request which will override any global timeout\n   */\n  timeout = null;\n\n  /**\n   * Callback function to be executed on success\n   */\n  callback: AnyFunction = null;\n\n  /**\n   * Use this.callback if an error is returned\n   */\n  useRegularCallbackInCaseOfError = false;\n\n  /**\n   * Callback function to be executed on error\n   *\n   * @deprecated use the jquery promise API\n   */\n  errorCallback: AnyFunction;\n\n  withToken = false;\n\n  /**\n   * Callback function to be executed on complete (after error or success)\n   *\n   * @deprecated use the jquery promise API\n   */\n  completeCallback: AnyFunction;\n\n  /**\n   * Params to be passed as GET params\n   * @see ajaxHelper.mixinDefaultGetParams\n   */\n  getParams: Parameters = {};\n\n  /**\n   * Base URL used in the AJAX request. Can be set by setUrl.\n   *\n   * It is set to '?' rather than 'index.php?' to increase chances that it works\n   * including for users who have an automatic 301 redirection from index.php? to ?\n   * POST values are missing when there is such 301 redirection. So by by-passing\n   * this 301 redirection, we avoid this issue.\n   *\n   * @see ajaxHelper.setUrl\n   */\n  getUrl = '?';\n\n  /**\n   * Params to be passed as GET params\n   * @see ajaxHelper.mixinDefaultPostParams\n   */\n  postParams: Parameters = {};\n\n  /**\n   * Element to be displayed while loading\n   */\n  loadingElement: HTMLElement|null|JQuery|JQLite|string = null;\n\n  /**\n   * Element to be displayed on error\n   */\n  errorElement: HTMLElement|JQuery|JQLite|string = '#ajaxError';\n\n  /**\n   * Handle for current request\n   */\n  requestHandle: XMLHttpRequest|JQuery.jqXHR|null = null;\n\n  defaultParams = ['idSite', 'period', 'date', 'segment'];\n\n  constructor() {\n    this.errorCallback = defaultErrorCallback;\n  }\n\n  /**\n   * Adds params to the request.\n   * If params are given more then once, the latest given value is used for the request\n   *\n   * @param  params\n   * @param  type  type of given parameters (POST or GET)\n   * @return {void}\n   */\n  addParams(params: Parameters|string, type: string): void {\n    if (typeof params === 'string') {\n      // TODO: add global types for broadcast (multiple uses below)\n      params = window['broadcast'].getValuesFromUrl(params); // eslint-disable-line\n    }\n\n    const arrayParams = ['compareSegments', 'comparePeriods', 'compareDates'];\n    Object.keys(params).forEach((key) => {\n      const value = params[key];\n      if (arrayParams.indexOf(key) !== -1\n        && !value\n      ) {\n        return;\n      }\n\n      if (type.toLowerCase() === 'get') {\n        this.getParams[key] = value;\n      } else if (type.toLowerCase() === 'post') {\n        this.postParams[key] = value;\n      }\n    });\n  }\n\n  withTokenInUrl(): void {\n    this.withToken = true;\n  }\n\n  /**\n   * Sets the base URL to use in the AJAX request.\n   */\n  setUrl(url: string): void {\n    this.addParams(broadcast.getValuesFromUrl(url), 'GET');\n  }\n\n  /**\n   * Gets this helper instance ready to send a bulk request. Each argument to this\n   * function is a single request to use.\n   */\n  setBulkRequests(...urls: string[]): void {\n    const urlsProcessed = urls.map((u) => $.param(u));\n\n    this.addParams({\n      module: 'API',\n      method: 'API.getBulkRequest',\n      urls: urlsProcessed,\n      format: 'json',\n    }, 'post');\n  }\n\n  /**\n   * Set a timeout (in milliseconds) for the request. This will override any global timeout.\n   *\n   * @param timeout  Timeout in milliseconds\n   */\n  setTimeout(timeout: number): void {\n    this.timeout = timeout;\n  }\n\n  /**\n   * Sets the callback called after the request finishes\n   *\n   * @param callback  Callback function\n   * @deprecated use the jquery promise API\n   */\n  setCallback(callback: AnyFunction): void {\n    this.callback = callback;\n  }\n\n  /**\n   * Set that the callback passed to setCallback() should be used if an application error (i.e. an\n   * Exception in PHP) is returned.\n   */\n  useCallbackInCaseOfError(): void {\n    this.useRegularCallbackInCaseOfError = true;\n  }\n\n  /**\n   * Set callback to redirect on success handler\n   * &update=1(+x) will be appended to the current url\n   *\n   * @param [params] to modify in redirect url\n   * @return {void}\n   */\n  redirectOnSuccess(params: Parameters): void {\n    this.setCallback(() => {\n      piwikHelper.redirect(params);\n    });\n  }\n\n  /**\n   * Sets the callback called in case of an error within the request\n   *\n   * @deprecated use the jquery promise API\n   */\n  setErrorCallback(callback: AnyFunction): void {\n    this.errorCallback = callback;\n  }\n\n  /**\n   * Sets the complete callback which is called after an error or success callback.\n   *\n   * @deprecated use the jquery promise API\n   */\n  setCompleteCallback(callback: AnyFunction): void {\n    this.completeCallback = callback;\n  }\n\n  /**\n   * Sets the response format for the request\n   *\n   * @param format  response format (e.g. json, html, ...)\n   */\n  setFormat(format: string): void {\n    this.format = format;\n  }\n\n  /**\n   * Set the div element to show while request is loading\n   *\n   * @param [element]  selector for the loading element\n   */\n  setLoadingElement(element: string|HTMLElement|JQuery): void {\n    this.loadingElement = element || '#ajaxLoadingDiv';\n  }\n\n  /**\n   * Set the div element to show on error\n   *\n   * @param element  selector for the error element\n   */\n  setErrorElement(element: HTMLElement|JQuery|string): void {\n    if (!element) {\n      return;\n    }\n    this.errorElement = element;\n  }\n\n  /**\n   * Detect whether are allowed to use the given default parameter or not\n   */\n  private useGETDefaultParameter(parameter: string): boolean {\n    if (parameter && this.defaultParams) {\n      for (let i = 0; i < this.defaultParams.length; i += 1) {\n        if (this.defaultParams[i] === parameter) {\n          return true;\n        }\n      }\n    }\n\n    return false;\n  }\n\n  /**\n   * Removes a default parameter that is usually send automatically along the request.\n   *\n   * @param parameter  A name such as \"period\", \"date\", \"segment\".\n   */\n  removeDefaultParameter(parameter: string): void {\n    if (parameter && this.defaultParams) {\n      for (let i = 0; i < this.defaultParams.length; i += 1) {\n        if (this.defaultParams[i] === parameter) {\n          this.defaultParams.splice(i, 1);\n        }\n      }\n    }\n  }\n\n  /**\n   * Send the request\n   */\n  send(): JQuery.jqXHR {\n    if ($(this.errorElement).length) {\n      $(this.errorElement).hide();\n    }\n\n    if (this.loadingElement) {\n      $(this.loadingElement).fadeIn();\n    }\n\n    this.requestHandle = this.buildAjaxCall();\n    globalAjaxQueue.push(this.requestHandle);\n\n    return this.requestHandle;\n  }\n\n  /**\n   * Aborts the current request if it is (still) running\n   */\n  abort(): void {\n    if (this.requestHandle && typeof this.requestHandle.abort === 'function') {\n      this.requestHandle.abort();\n      this.requestHandle = null;\n    }\n  }\n\n  /**\n   * Builds and sends the ajax requests\n   */\n  private buildAjaxCall(): JQuery.jqXHR {\n    const self = this;\n    const parameters = this.mixinDefaultGetParams(this.getParams);\n\n    let url = this.getUrl;\n    if (url[url.length - 1] !== '?') {\n      url += '&';\n    }\n\n    // we took care of encoding &segment properly already, so we don't use $.param for it ($.param\n    // URL encodes the values)\n    if (parameters.segment) {\n      url = `${url}segment=${parameters.segment}&`;\n      delete parameters.segment;\n    }\n    if (parameters.date) {\n      url = `${url}date=${decodeURIComponent(parameters.date.toString())}&`;\n      delete parameters.date;\n    }\n    url += $.param(parameters);\n    const ajaxCall = {\n      type: 'POST',\n      async: true,\n      url,\n      dataType: this.format || 'json',\n      complete: this.completeCallback,\n      error: function errorCallback() {\n        globalAjaxQueue.active -= 1;\n\n        if (self.errorCallback) {\n          self.errorCallback.apply(this, arguments); // eslint-disable-line\n        }\n      },\n      success: (response, status, request) => {\n        if (this.loadingElement) {\n          $(this.loadingElement).hide();\n        }\n\n        if (response && response.result === 'error' && !this.useRegularCallbackInCaseOfError) {\n          let placeAt = null;\n          let type = 'toast';\n          if ($(this.errorElement).length && response.message) {\n            $(this.errorElement).show();\n            placeAt = this.errorElement;\n            type = null;\n          }\n\n          if (response.message) {\n            const UI = window['require']('piwik/UI'); // eslint-disable-line\n            const notification = new UI.Notification();\n            notification.show(response.message, {\n              placeat: placeAt,\n              context: 'error',\n              type,\n              id: 'ajaxHelper',\n            });\n            notification.scrollToNotification();\n          }\n        } else if (this.callback) {\n          this.callback(response, status, request);\n        }\n\n        globalAjaxQueue.active -= 1;\n        if (Matomo.ajaxRequestFinished) {\n          Matomo.ajaxRequestFinished();\n        }\n      },\n      data: this.mixinDefaultPostParams(this.postParams),\n      timeout: this.timeout !== null ? this.timeout : undefined,\n    };\n\n    return $.ajax(ajaxCall);\n  }\n\n  private isRequestToApiMethod() {\n    return (this.getParams && this.getParams.module === 'API' && this.getParams.method)\n      || (this.postParams && this.postParams.module === 'API' && this.postParams.method);\n  }\n\n  isWidgetizedRequest(): boolean {\n    return (broadcast.getValueFromUrl('module') === 'Widgetize');\n  }\n\n  private getDefaultPostParams() {\n    if (this.withToken || this.isRequestToApiMethod() || Matomo.shouldPropagateTokenAuth) {\n      return {\n        token_auth: Matomo.token_auth,\n        // When viewing a widgetized report there won't be any session that can be used, so don't\n        // force session usage\n        force_api_session: broadcast.isWidgetizeRequestWithoutSession() ? 0 : 1,\n      };\n    }\n\n    return {};\n  }\n\n  /**\n   * Mixin the default parameters to send as POST\n   *\n   * @param params   parameter object\n   */\n  private mixinDefaultPostParams(params): Parameters {\n    const defaultParams = this.getDefaultPostParams();\n\n    const mergedParams = {\n      ...defaultParams,\n      ...params,\n    };\n\n    return mergedParams;\n  }\n\n  /**\n   * Mixin the default parameters to send as GET\n   *\n   * @param   params   parameter object\n   */\n  private mixinDefaultGetParams(originalParams): Parameters {\n    const segment = MatomoUrl.getSearchParam('segment');\n\n    const defaultParams = {\n      idSite: Matomo.idSite || broadcast.getValueFromUrl('idSite'),\n      period: Matomo.period || broadcast.getValueFromUrl('period'),\n      segment,\n    };\n\n    const params = originalParams;\n\n    // never append token_auth to url\n    if (params.token_auth) {\n      params.token_auth = null;\n      delete params.token_auth;\n    }\n\n    Object.keys(defaultParams).forEach((key) => {\n      if (this.useGETDefaultParameter(key)\n        && !params[key]\n        && !this.postParams[key]\n        && defaultParams[key]\n      ) {\n        params[key] = defaultParams[key];\n      }\n    });\n\n    // handle default date & period if not already set\n    if (this.useGETDefaultParameter('date') && !params.date && !this.postParams.date) {\n      params.date = Matomo.currentDateString;\n    }\n\n    return params;\n  }\n}\n","import AjaxHelper from './AjaxHelper';\n\ndeclare global {\n  interface Window {\n    ajaxHelper: AjaxHelper;\n  }\n}\n\nwindow.ajaxHelper = AjaxHelper;\n\nfunction ajaxQueue() {\n  return globalAjaxQueue;\n}\n\nangular.module('piwikApp.service').service('globalAjaxQueue', ajaxQueue);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\n/**\n * Similar to angulars $location but works around some limitation. Use it if you need to access\n * search params\n */\nconst PiwikUrl = {\n  getSearchParam(paramName: string): string {\n    const hash = window.location.href.split('#');\n\n    const regex = new RegExp(`${paramName}(\\\\[]|=)`);\n    if (hash && hash[1] && regex.test(decodeURIComponent(hash[1]))) {\n      const valueFromHash = window.broadcast.getValueFromHash(paramName, window.location.href);\n\n      // for date, period and idsite fall back to parameter from url, if non in hash was provided\n      if (valueFromHash\n        || (paramName !== 'date' && paramName !== 'period' && paramName !== 'idSite')\n      ) {\n        return valueFromHash;\n      }\n    }\n\n    return window.broadcast.getValueFromUrl(paramName, window.location.search);\n  },\n};\n\nexport default PiwikUrl;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\nimport PiwikUrl from './PiwikUrl';\n\nfunction piwikUrl() {\n  const model = {\n    getSearchParam: PiwikUrl.getSearchParam.bind(PiwikUrl),\n  };\n\n  return model;\n}\n\npiwikUrl.$inject = [];\n\nangular.module('piwikApp.service').service('piwikUrl', piwikUrl);\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport PiwikUrl from '../PiwikUrl/PiwikUrl';\nimport Periods from '../Periods/Periods';\nimport { format } from '../Periods/utilities';\n\nlet originalTitle: string;\n\nconst { piwik, broadcast, piwikHelper } = window;\n\npiwik.helper = piwikHelper;\npiwik.broadcast = broadcast;\n\nfunction isValidPeriod(periodStr: string, dateStr: string) {\n  try {\n    Periods.parse(periodStr, dateStr);\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\npiwik.updatePeriodParamsFromUrl = function updatePeriodParamsFromUrl() {\n  let date = PiwikUrl.getSearchParam('date');\n  const period = PiwikUrl.getSearchParam('period');\n  if (!isValidPeriod(period, date)) {\n    // invalid data in URL\n    return;\n  }\n\n  if (piwik.period === period && piwik.currentDateString === date) {\n    // this period / date is already loaded\n    return;\n  }\n\n  piwik.period = period;\n\n  const dateRange = Periods.parse(period, date).getDateRange();\n  piwik.startDateString = format(dateRange[0]);\n  piwik.endDateString = format(dateRange[1]);\n\n  piwik.updateDateInTitle(date, period);\n\n  // do not set anything to previousN/lastN, as it's more useful to plugins\n  // to have the dates than previousN/lastN.\n  if (piwik.period === 'range') {\n    date = `${piwik.startDateString},${piwik.endDateString}`;\n  }\n\n  piwik.currentDateString = date;\n};\n\npiwik.updateDateInTitle = function updateDateInTitle(date: string, period: string) {\n  if (!$('.top_controls #periodString').length) {\n    return;\n  }\n\n  // Cache server-rendered page title\n  originalTitle = originalTitle || document.title;\n\n  if (originalTitle.indexOf(piwik.siteName) === 0) {\n    const dateString = ` - ${Periods.parse(period, date).getPrettyString()} `;\n    document.title = `${piwik.siteName}${dateString}${originalTitle.substr(piwik.siteName.length)}`;\n  }\n};\n\npiwik.hasUserCapability = function hasUserCapability(capability: string) {\n  return window.angular.isArray(piwik.userCapabilities)\n    && piwik.userCapabilities.indexOf(capability) !== -1;\n};\n\nconst Piwik = piwik;\nexport default Piwik;\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Piwik from './Piwik';\n\nfunction piwikService() {\n  return Piwik;\n}\n\nangular.module('piwikApp.service').service('piwik', piwikService);\n\nfunction initPiwikService(piwik, $rootScope) {\n  $rootScope.$on('$locationChangeSuccess', piwik.updatePeriodParamsFromUrl);\n}\n\ninitPiwikService.$inject = ['piwik', '$rootScope'];\n\nangular.module('piwikApp.service').run(initPiwikService);\n","<!--\n  Matomo - free/libre analytics platform\n\n  @link https://matomo.org\n  @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n<template>\n  <slot></slot>\n</template>\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport Matomo from '../Matomo/Matomo';\n\nexport default defineComponent({\n  props: {\n    /**\n     * Whether the modal is displayed or not;\n     */\n    show: {\n      type: Boolean,\n      required: true,\n    },\n\n    /**\n     * Only here for backwards compatibility w/ AngularJS. If supplied, we use this\n     * element to launch the modal instead of the element in the slot. This should not\n     * be used for new Vue code.\n     *\n     * @deprecated\n     */\n    element: {\n      type: HTMLElement,\n      required: false,\n    },\n  },\n  emits: ['yes', 'no', 'closeEnd', 'close'],\n  activated() {\n    const slotElement = this.element || this.$slots.default()[0].el;\n    slotElement.style.display = 'none';\n  },\n  watch: {\n    show(newValue, oldValue) {\n      if (newValue) {\n        const slotElement = this.element || this.$slots.default()[0].el;\n        Matomo.helper.modalConfirm(slotElement, {\n          yes: () => { this.$emit('yes'); },\n          no: () => { this.$emit('no'); },\n        }, {\n          onCloseEnd: () => { this.$emit('closeEnd'); },\n        });\n      } else if (newValue === false && oldValue === true) {\n        // the user closed the dialog, e.g. by pressing Esc or clicking away from it\n        this.$emit('close');\n      }\n    },\n  },\n});\n</script>\n","\nimport { defineComponent } from 'vue';\nimport Matomo from '../Matomo/Matomo';\n\nexport default defineComponent({\n  props: {\n    /**\n     * Whether the modal is displayed or not;\n     */\n    show: {\n      type: Boolean,\n      required: true,\n    },\n\n    /**\n     * Only here for backwards compatibility w/ AngularJS. If supplied, we use this\n     * element to launch the modal instead of the element in the slot. This should not\n     * be used for new Vue code.\n     *\n     * @deprecated\n     */\n    element: {\n      type: HTMLElement,\n      required: false,\n    },\n  },\n  emits: ['yes', 'no', 'closeEnd', 'close'],\n  activated() {\n    const slotElement = this.element || this.$slots.default()[0].el;\n    slotElement.style.display = 'none';\n  },\n  watch: {\n    show(newValue, oldValue) {\n      if (newValue) {\n        const slotElement = this.element || this.$slots.default()[0].el;\n        Matomo.helper.modalConfirm(slotElement, {\n          yes: () => { this.$emit('yes'); },\n          no: () => { this.$emit('no'); },\n        }, {\n          onCloseEnd: () => { this.$emit('closeEnd'); },\n        });\n      } else if (newValue === false && oldValue === true) {\n        // the user closed the dialog, e.g. by pressing Esc or clicking away from it\n        this.$emit('close');\n      }\n    },\n  },\n});\n","import { render } from \"./MatomoDialog.vue?vue&type=template&id=42c028e0\"\nimport script from \"./MatomoDialog.vue?vue&type=script&lang=ts\"\nexport * from \"./MatomoDialog.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport {\n  createApp,\n  defineComponent,\n  ref,\n  ComponentPublicInstance,\n} from 'vue';\n\ninterface SingleScopeVarInfo {\n  vue: string;\n  default?: any; // eslint-disable-line\n  angularJsBind?: string;\n}\n\ntype ScopeMapping = { [scopeVarName: string]: SingleScopeVarInfo };\n\ntype AdapterFunction<InjectTypes, R = void> = (\n  scope: ng.IScope,\n  element: ng.IAugmentedJQuery,\n  attrs: ng.IAttributes,\n  ...injected: InjectTypes,\n) => R;\n\ntype PostCreateFunction<InjectTypes, R = void> = (\n  vm: ComponentPublicInstance,\n  scope: ng.IScope,\n  element: ng.IAugmentedJQuery,\n  attrs: ng.IAttributes,\n  ...injected: InjectTypes,\n) => R;\n\ntype EventMapping<InjectTypes> = { [vueEventName: string]: AdapterFunction<InjectTypes> };\n\ntype ComponentType = ReturnType<typeof defineComponent>;\n\nexport default function createAngularJsAdapter<InjectTypes = []>(options: {\n  component: ComponentType,\n  scope?: ScopeMapping,\n  directiveName: string,\n  events?: EventMapping<InjectTypes>,\n  $inject?: string[],\n  transclude?: boolean,\n  mountPointFactory?: AdapterFunction<InjectTypes, HTMLElement>,\n  postCreate?: PostCreateFunction<InjectTypes>,\n  noScope?: boolean,\n}): ng.IDirectiveFactory {\n  const {\n    component,\n    scope = {},\n    events = {},\n    $inject,\n    directiveName,\n    transclude,\n    mountPointFactory,\n    postCreate,\n    noScope,\n  } = options;\n\n  const angularJsScope = {};\n  Object.entries(scope).forEach(([scopeVarName, info]) => {\n    if (info.angularJsBind) {\n      angularJsScope[scopeVarName] = info.angularJsBind;\n    }\n  });\n\n  function angularJsAdapter(...injectedServices: InjectTypes) {\n    const adapter: ng.IDirective = {\n      restrict: 'A',\n      scope: noScope ? undefined : angularJsScope,\n      compile: function angularJsAdapterCompile() {\n        return {\n          post: function angularJsAdapterLink(\n            ngScope: ng.IScope,\n            ngElement: ng.IAugmentedJQuery,\n            ngAttrs: ng.IAttributes,\n          ) {\n            const clone = ngElement.find('[ng-transclude]');\n\n            let rootVueTemplate = '<root-component';\n            Object.entries(scope).forEach(([, info]) => {\n              rootVueTemplate += ` :${info.vue}=\"${info.vue}\"`;\n            });\n            Object.entries(events).forEach((info) => {\n              const [eventName] = info;\n              rootVueTemplate += ` @${eventName}=\"onEventHandler('${eventName}')\"`;\n            });\n            rootVueTemplate += '>';\n            if (transclude) {\n              rootVueTemplate += '<div ref=\"transcludeTarget\"/>';\n            }\n            rootVueTemplate += '</root-component>';\n            const app = createApp({\n              template: rootVueTemplate,\n              data() {\n                const initialData = {};\n                Object.entries(scope).forEach(([scopeVarName, info]) => {\n                  let value = ngScope[scopeVarName];\n                  if (typeof value === 'undefined' && typeof info.default !== 'undefined') {\n                    value = info.default instanceof Function\n                      ? info.default(ngScope, ngElement, ngAttrs, ...injectedServices)\n                      : info.default;\n                  }\n                  initialData[info.vue] = value;\n                });\n                return initialData;\n              },\n              setup() {\n                if (transclude) {\n                  const transcludeTarget = ref(null);\n                  return {\n                    transcludeTarget,\n                  };\n                }\n\n                return undefined;\n              },\n              methods: {\n                onEventHandler(name: string) {\n                  if (events[name]) {\n                    events[name](ngScope, ngElement, ngAttrs, ...injectedServices);\n                  }\n                },\n              },\n            });\n            app.config.globalProperties.$sanitize = window.vueSanitize;\n            app.component('root-component', component);\n\n            const mountPoint = mountPointFactory\n              ? mountPointFactory(ngScope, ngElement, ngAttrs, ...injectedServices)\n              : ngElement[0];\n            const vm = app.mount(mountPoint);\n\n            Object.entries(scope).forEach(([scopeVarName, info]) => {\n              if (!info.angularJsBind) {\n                return;\n              }\n\n              ngScope.$watch(scopeVarName, (newValue: any) => { // eslint-disable-line\n                if (typeof info.default !== 'undefined' && typeof newValue === 'undefined') {\n                  vm[scopeVarName] = info.default instanceof Function\n                    ? info.default(ngScope, ngElement, ngAttrs, ...injectedServices)\n                    : info.default;\n                } else {\n                  vm[scopeVarName] = newValue;\n                }\n              });\n            });\n\n            if (transclude) {\n              $(vm.transcludeTarget).append(clone);\n            }\n\n            if (postCreate) {\n              postCreate(vm, ngScope, ngElement, ngAttrs, ...injectedServices);\n            }\n          },\n        };\n      },\n    };\n\n    if (transclude) {\n      adapter.transclude = true;\n      adapter.template = '<div ng-transclude/>';\n    }\n\n    return adapter;\n  }\n\n  angularJsAdapter.$inject = $inject || [];\n\n  angular.module('piwikApp').directive(directiveName, angularJsAdapter);\n\n  return angularJsAdapter;\n}\n","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport { IParseService } from 'angular';\nimport { ComponentPublicInstance } from 'vue';\nimport MatomoDialog from './MatomoDialog.vue';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter<[IParseService]>({\n  component: MatomoDialog,\n  scope: {\n    show: {\n      vue: 'show',\n      default: false,\n    },\n    element: {\n      vue: 'element',\n      default: (scope, element) => element[0],\n    },\n  },\n  events: {\n    yes: (scope, element, attrs) => {\n      if (attrs.yes) {\n        scope.$eval(attrs.yes);\n        setTimeout(() => { scope.$apply(); }, 0);\n      }\n    },\n    no: (scope, element, attrs) => {\n      if (attrs.no) {\n        scope.$eval(attrs.no);\n        setTimeout(() => { scope.$apply(); }, 0);\n      }\n    },\n    close: (scope, element, attrs) => {\n      if (attrs.close) {\n        scope.$eval(attrs.close);\n        setTimeout(() => { scope.$apply(); }, 0);\n      }\n    },\n    closeEnd: (scope, element, attrs, $parse: IParseService) => {\n      setTimeout(() => {\n        scope.$apply($parse(attrs.piwikDialog).assign(scope, false));\n      }, 0);\n    },\n  },\n  $inject: ['$parse'],\n  directiveName: 'piwikDialog',\n  transclude: true,\n  mountPointFactory: (scope, element) => {\n    const vueRootPlaceholder = $('<div class=\"vue-placeholder\"/>');\n    vueRootPlaceholder.appendTo(element);\n    return vueRootPlaceholder[0];\n  },\n  postCreate: (vm: ComponentPublicInstance, scope, element, attrs) => {\n    scope.$watch(attrs.piwikDialog, (newValue: boolean) => {\n      vm.show = newValue || false;\n    });\n  },\n  noScope: true,\n});\n","<!--\n  Matomo - free/libre analytics platform\n\n  @link https://matomo.org\n  @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n  <div v-show=\"loading\" class=\"loadingPiwik\">\n    <img src=\"plugins/Morpheus/images/loading-blue.gif\" alt=\"\"/>\n    <span>{{ loadingMessage }}</span>\n  </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\nimport translate from '../translate';\n\nexport default defineComponent({\n  props: {\n    loading: {\n      type: Boolean,\n      required: true,\n      default: false,\n    },\n    loadingMessage: {\n      type: String,\n      required: false,\n      default: translate('General_LoadingData'),\n    },\n  },\n});\n</script>\n","\nimport { defineComponent } from 'vue';\nimport translate from '../translate';\n\nexport default defineComponent({\n  props: {\n    loading: {\n      type: Boolean,\n      required: true,\n      default: false,\n    },\n    loadingMessage: {\n      type: String,\n      required: false,\n      default: translate('General_LoadingData'),\n    },\n  },\n});\n","import { render } from \"./ActivityIndicator.vue?vue&type=template&id=6af4d064\"\nimport script from \"./ActivityIndicator.vue?vue&type=script&lang=ts\"\nexport * from \"./ActivityIndicator.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport ActivityIndicator from './ActivityIndicator.vue';\nimport translate from '../translate';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter({\n  component: ActivityIndicator,\n  scope: {\n    loading: {\n      vue: 'loading',\n      angularJsBind: '<',\n    },\n    loadingMessage: {\n      vue: 'loadingMessage',\n      angularJsBind: '<',\n      default: () => translate('General_LoadingData'),\n    },\n  },\n  $inject: [],\n  directiveName: 'piwikActivityIndicator',\n});\n","<!--\n  Matomo - free/libre analytics platform\n\n  @link https://matomo.org\n  @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n-->\n\n<template>\n  <div\n    class=\"alert\"\n    :class=\"{ [`alert-${severity}`]: true }\"\n  >\n    <slot></slot>\n  </div>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n  props: {\n    severity: {\n      type: String,\n      required: true,\n    },\n  },\n});\n</script>\n","\nimport { defineComponent } from 'vue';\n\nexport default defineComponent({\n  props: {\n    severity: {\n      type: String,\n      required: true,\n    },\n  },\n});\n","import { render } from \"./Alert.vue?vue&type=template&id=c3863ae2\"\nimport script from \"./Alert.vue?vue&type=script&lang=ts\"\nexport * from \"./Alert.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script","/*!\n * Matomo - free/libre analytics platform\n *\n * @link https://matomo.org\n * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later\n */\n\nimport Alert from './Alert.vue';\nimport createAngularJsAdapter from '../createAngularJsAdapter';\n\nexport default createAngularJsAdapter({\n  component: Alert,\n  scope: {\n    severity: {\n      vue: 'severity',\n      angularJsBind: '@piwikAlert',\n    },\n  },\n  directiveName: 'piwikAlert',\n  transclude: true,\n});\n"],"sourceRoot":""}