1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-22 15:07:44 +00:00
Files
matomo/plugins/Marketplace/vue/dist/Marketplace.umd.min.js
dependabot[bot] b4d7affb4e [NPM] Bump the all-dependencies group across 1 directory with 18 updates (#23205)
* [NPM] Bump the all-dependencies group across 1 directory with 18 updates

Bumps the all-dependencies group with 17 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@types/jquery](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jquery) | `3.5.6` | `3.5.32` |
| [@types/jqueryui](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jqueryui) | `1.12.16` | `1.12.24` |
| [jquery-ui-dist](https://github.com/jquery/jquery-ui) | `1.13.2` | `1.13.3` |
| [sprintf-js](https://github.com/alexei/sprintf.js) | `1.1.2` | `1.1.3` |
| [vue](https://github.com/vuejs/core) | `3.2.6` | `3.2.47` |
| [@types/materialize-css](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/materialize-css) | `1.0.11` | `1.0.14` |
| [@types/mousetrap](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mousetrap) | `1.6.8` | `1.6.15` |
| [@vue/cli-plugin-babel](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-babel) | `4.5.13` | `4.5.19` |
| [@vue/cli-plugin-eslint](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-eslint) | `4.5.13` | `4.5.19` |
| [@vue/cli-plugin-typescript](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-typescript) | `4.5.13` | `4.5.19` |
| [@vue/cli-plugin-unit-jest](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-plugin-unit-jest) | `4.5.13` | `4.5.19` |
| [@vue/cli-service](https://github.com/vuejs/vue-cli/tree/HEAD/packages/@vue/cli-service) | `4.5.13` | `4.5.19` |
| [abortcontroller-polyfill](https://github.com/mo/abortcontroller-polyfill) | `1.7.3` | `1.7.8` |
| [babel-loader](https://github.com/babel/babel-loader) | `8.2.2` | `8.2.5` |
| [dompurify](https://github.com/cure53/DOMPurify) | `3.2.4` | `3.2.5` |
| [husky](https://github.com/typicode/husky) | `8.0.2` | `8.0.3` |
| [less](https://github.com/less/less.js) | `4.1.2` | `4.1.3` |



Updates `@types/jquery` from 3.5.6 to 3.5.32
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jquery)

Updates `@types/jqueryui` from 1.12.16 to 1.12.24
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jqueryui)

Updates `jquery-ui-dist` from 1.13.2 to 1.13.3
- [Release notes](https://github.com/jquery/jquery-ui/releases)
- [Commits](https://github.com/jquery/jquery-ui/compare/1.13.2...1.13.3)

Updates `sprintf-js` from 1.1.2 to 1.1.3
- [Changelog](https://github.com/alexei/sprintf.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/alexei/sprintf.js/compare/1.1.2...1.1.3)

Updates `vue` from 3.2.6 to 3.2.47
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/v3.2.47/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/compare/v3.2.6...v3.2.47)

Updates `@types/materialize-css` from 1.0.11 to 1.0.14
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/materialize-css)

Updates `@types/mousetrap` from 1.6.8 to 1.6.15
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mousetrap)

Updates `@vue/cli-plugin-babel` from 4.5.13 to 4.5.19
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.19/packages/@vue/cli-plugin-babel)

Updates `@vue/cli-plugin-eslint` from 4.5.13 to 4.5.19
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.19/packages/@vue/cli-plugin-eslint)

Updates `@vue/cli-plugin-typescript` from 4.5.13 to 4.5.19
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.19/packages/@vue/cli-plugin-typescript)

Updates `@vue/cli-plugin-unit-jest` from 4.5.13 to 4.5.19
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.19/packages/@vue/cli-plugin-unit-jest)

Updates `@vue/cli-service` from 4.5.13 to 4.5.19
- [Release notes](https://github.com/vuejs/vue-cli/releases)
- [Changelog](https://github.com/vuejs/vue-cli/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/vuejs/vue-cli/commits/v4.5.19/packages/@vue/cli-service)

Updates `@vue/compiler-sfc` from 3.2.6 to 3.2.47
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/v3.2.47/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/commits/v3.2.47/packages/compiler-sfc)

Updates `abortcontroller-polyfill` from 1.7.3 to 1.7.8
- [Commits](https://github.com/mo/abortcontroller-polyfill/compare/v1.7.3...v1.7.8)

Updates `babel-loader` from 8.2.2 to 8.2.5
- [Release notes](https://github.com/babel/babel-loader/releases)
- [Changelog](https://github.com/babel/babel-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel-loader/compare/v8.2.2...v8.2.5)

Updates `dompurify` from 3.2.4 to 3.2.5
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.2.4...3.2.5)

Updates `husky` from 8.0.2 to 8.0.3
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](https://github.com/typicode/husky/compare/v8.0.2...v8.0.3)

Updates `less` from 4.1.2 to 4.1.3
- [Release notes](https://github.com/less/less.js/releases)
- [Changelog](https://github.com/less/less.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/less/less.js/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: "@types/jquery"
  dependency-version: 3.5.32
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: "@types/jqueryui"
  dependency-version: 1.12.24
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: jquery-ui-dist
  dependency-version: 1.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: sprintf-js
  dependency-version: 1.1.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: vue
  dependency-version: 3.2.47
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: "@types/materialize-css"
  dependency-version: 1.0.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: "@types/mousetrap"
  dependency-version: 1.6.15
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: "@vue/cli-plugin-babel"
  dependency-version: 4.5.19
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: "@vue/cli-plugin-eslint"
  dependency-version: 4.5.19
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: "@vue/cli-plugin-typescript"
  dependency-version: 4.5.19
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: "@vue/cli-plugin-unit-jest"
  dependency-version: 4.5.19
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: "@vue/cli-service"
  dependency-version: 4.5.19
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: "@vue/compiler-sfc"
  dependency-version: 3.2.47
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: abortcontroller-polyfill
  dependency-version: 1.7.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: babel-loader
  dependency-version: 8.2.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: dompurify
  dependency-version: 3.2.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: husky
  dependency-version: 8.0.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: less
  dependency-version: 4.1.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update babel.config.js

* remove unneeded push target

* Improve handling of password confirmation overlay

* Improve handling of setting super user permission

* fix failing UI test

* Update npm dependencies

* Build vue files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Stefan Giehl <stefan@matomo.org>
Co-authored-by: innocraft-automation <innocraft-automation@users.noreply.github.com>
2025-04-23 09:51:39 +02:00

8 خطوط
83 KiB
JavaScript
Generated

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["Marketplace"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["Marketplace"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(l){if(t[l])return t[l].exports;var a=t[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(l,a,function(t){return e[t]}.bind(null,a));return l},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/Marketplace/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"Marketplace",(function(){return cn})),n.d(t,"ManageLicenseKey",(function(){return On})),n.d(t,"GetNewPlugins",(function(){return Tn})),n.d(t,"GetNewPluginsAdmin",(function(){return Rn})),n.d(t,"GetPremiumFeatures",(function(){return nl})),n.d(t,"MissingReqsNotice",(function(){return Zt})),n.d(t,"OverviewIntro",(function(){return sl})),n.d(t,"SubscriptionOverview",(function(){return Ll})),n.d(t,"RichMenuButton",(function(){return Hl})),n.d(t,"PluginList",(function(){return an})),"undefined"!==typeof window){var l=window.document.currentScript,a=l&&l.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(n.p=a[1])}var i=n("8bbf");const r={class:"row marketplaceActions",ref:"root"},o={class:"col s12 m6 l4"},c={class:"col s12 m6 l4"},s={key:0,class:"col s12 m12 l4"},u={class:"plugin-search"},d=Object(i["createElementVNode"])("span",{class:"icon-search"},null,-1),p=["alt"];function m(e,t,n,l,a,m){var b;const g=Object(i["resolveComponent"])("Field"),O=Object(i["resolveComponent"])("PluginList"),j=Object(i["resolveComponent"])("ContentBlock");return Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],null,[Object(i["createElementVNode"])("div",r,[Object(i["createElementVNode"])("div",o,[Object(i["createVNode"])(g,{uicontrol:"select",name:"plugin_type","model-value":e.pluginTypeFilter,"onUpdate:modelValue":e.updateType,title:e.translate("Marketplace_Show"),"full-width":!0,options:e.pluginTypeOptions},null,8,["model-value","onUpdate:modelValue","title","options"])]),Object(i["createElementVNode"])("div",c,[Object(i["createVNode"])(g,{uicontrol:"select",name:"plugin_sort","model-value":e.pluginSort,"onUpdate:modelValue":e.updateSort,title:e.translate("Marketplace_Sort"),"full-width":!0,options:e.pluginSortOptions},null,8,["model-value","onUpdate:modelValue","title","options"])]),(null===(b=e.pluginsToShow)||void 0===b?void 0:b.length)>20||e.searchQuery?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",s,[Object(i["createElementVNode"])("div",u,[Object(i["createElementVNode"])("div",null,[Object(i["createVNode"])(g,{uicontrol:"text",name:"query",title:e.queryInputTitle,"full-width":!0,"model-value":e.searchQuery,"onUpdate:modelValue":e.updateQuery},null,8,["title","model-value","onUpdate:modelValue"])]),d])])):Object(i["createCommentVNode"])("",!0)],512),!e.loading&&e.pluginsToShow.length>0?(Object(i["openBlock"])(),Object(i["createBlock"])(O,{key:0,"plugins-to-show":e.pluginsToShow,"current-user-email":e.currentUserEmail,"is-auto-update-possible":e.isAutoUpdatePossible,"is-super-user":e.isSuperUser,"is-multi-server-environment":e.isMultiServerEnvironment,"has-some-admin-access":e.hasSomeAdminAccess,"is-plugins-admin-enabled":e.isPluginsAdminEnabled,"is-valid-consumer":e.isValidConsumer,"deactivate-nonce":e.deactivateNonce,"activate-nonce":e.activateNonce,"install-nonce":e.installNonce,"update-nonce":e.updateNonce,"num-users":e.numUsers,onTriggerUpdate:t[0]||(t[0]=e=>this.updateMarketplace()),onStartTrialStart:t[1]||(t[1]=e=>this.$emit("startTrialStart")),onStartTrialStop:t[2]||(t[2]=e=>this.$emit("startTrialStop"))},null,8,["plugins-to-show","current-user-email","is-auto-update-possible","is-super-user","is-multi-server-environment","has-some-admin-access","is-plugins-admin-enabled","is-valid-consumer","deactivate-nonce","activate-nonce","install-nonce","update-nonce","num-users"])):Object(i["createCommentVNode"])("",!0),e.loading||0!=e.pluginsToShow.length?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createBlock"])(j,{key:1},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate(e.showThemes?"Marketplace_NoThemesFound":"Marketplace_NoPluginsFound")),1)]),_:1})),e.loading?(Object(i["openBlock"])(),Object(i["createBlock"])(j,{key:2},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif",alt:e.translate("General_LoadingData")},null,8,p),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.loadingMessage),1)]),_:1})):Object(i["createCommentVNode"])("",!0)],64)}var b=n("19dc"),g=n("a5a2");const O={key:0,class:"pluginListContainer row"},j=["onClick"],h={class:"card"},k={class:"card-content"},y=["src"],v={class:"content-container"},N={class:"card-content-top"},V={key:0,class:"matomo-badge matomo-badge-top",src:"plugins/Marketplace/images/matomo-badge.png","aria-label":"Matomo plugin",alt:""},S={class:"price"},E=["onClick"],B=Object(i["createElementVNode"])("div",{class:"card-focus"},null,-1),M={class:"card-title"},f=Object(i["createElementVNode"])("span",{class:"card-title-chevron"}," ",-1),T={class:"card-description"},w={class:"card-content-bottom"},C={key:0,class:"downloads"},P={class:"owner"},D={key:0},A={key:1},_={class:"cta-container"},L={key:1,class:"matomo-badge matomo-badge-bottom",src:"plugins/Marketplace/images/matomo-badge.png","aria-label":"Matomo plugin",alt:""};function U(e,t,n,l,a,r){const o=Object(i["resolveComponent"])("RequestTrial"),c=Object(i["resolveComponent"])("StartFreeTrial"),s=Object(i["resolveComponent"])("PluginDetailsModal"),u=Object(i["resolveComponent"])("CTAContainer");return Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],null,[Object(i["createVNode"])(o,{modelValue:e.showRequestTrialForPlugin,"onUpdate:modelValue":t[0]||(t[0]=t=>e.showRequestTrialForPlugin=t),onTrialRequested:t[1]||(t[1]=e=>this.$emit("triggerUpdate"))},null,8,["modelValue"]),Object(i["createVNode"])(c,{"current-user-email":e.currentUserEmail,"is-valid-consumer":e.isValidConsumer,modelValue:e.showStartFreeTrialForPlugin,"onUpdate:modelValue":t[2]||(t[2]=t=>e.showStartFreeTrialForPlugin=t),onTrialStarted:t[3]||(t[3]=e=>{this.$emit("triggerUpdate")}),onStartTrialStart:t[4]||(t[4]=e=>{this.$emit("startTrialStart")}),onStartTrialStop:t[5]||(t[5]=e=>{this.$emit("startTrialStop")})},null,8,["current-user-email","is-valid-consumer","modelValue"]),Object(i["createVNode"])(s,{modelValue:e.showPluginDetailsForPlugin,"onUpdate:modelValue":t[6]||(t[6]=t=>e.showPluginDetailsForPlugin=t),"is-super-user":e.isSuperUser,"is-plugins-admin-enabled":e.isPluginsAdminEnabled,"is-multi-server-environment":e.isMultiServerEnvironment,"is-valid-consumer":e.isValidConsumer,"is-auto-update-possible":e.isAutoUpdatePossible,"has-some-admin-access":e.hasSomeAdminAccess,"deactivate-nonce":e.deactivateNonce,"activate-nonce":e.activateNonce,"install-nonce":e.installNonce,"update-nonce":e.updateNonce,"num-users":e.numUsers,onRequestTrial:t[7]||(t[7]=e=>this.requestTrial(e)),onStartFreeTrial:t[8]||(t[8]=e=>this.startFreeTrial(e))},null,8,["modelValue","is-super-user","is-plugins-admin-enabled","is-multi-server-environment","is-valid-consumer","is-auto-update-possible","has-some-admin-access","deactivate-nonce","activate-nonce","install-nonce","update-nonce","num-users"]),e.pluginsToShow.length>0?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",O,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.pluginsToShow,t=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"col s12 m6 l4",key:t.name},[Object(i["createElementVNode"])("div",{class:Object(i["normalizeClass"])("card-holder "+(t.numDownloads>0?"card-with-downloads":"")),onClick:n=>e.clickCard(n,t)},[Object(i["createElementVNode"])("div",h,[Object(i["createElementVNode"])("div",k,[Object(i["createElementVNode"])("img",{src:t.coverImage+"?w=880&h=480",alt:"",class:"cover-image"},null,8,y),Object(i["createElementVNode"])("div",v,[Object(i["createElementVNode"])("div",N,["piwik"==t.owner||"matomo-org"==t.owner?(Object(i["openBlock"])(),Object(i["createElementBlock"])("img",V)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",S,[t.priceFrom?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:0},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Marketplace_PriceFromPerPeriod",t.priceFrom.prettyPrice,t.priceFrom.period)),1)],64)):t.isFree?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:1},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Marketplace_Free")),1)],64)):Object(i["createCommentVNode"])("",!0)]),Object(i["createElementVNode"])("a",{onClick:Object(i["withModifiers"])(n=>e.clickCard(n,t),["prevent"]),class:"card-title-link",href:"#",tabindex:"7"},[B,Object(i["createElementVNode"])("h2",M,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.displayName),1),f])],8,E),Object(i["createElementVNode"])("div",T,Object(i["toDisplayString"])(t.description),1)]),Object(i["createElementVNode"])("div",w,[t.numDownloads>0?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",C,Object(i["toDisplayString"])(t.numDownloadsPretty)+" "+Object(i["toDisplayString"])(e.translate("General_Downloads").toLowerCase()),1)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",P,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Marketplace_CreatedBy"))+" ",1),"piwik"===t.owner||"matomo-org"===t.owner?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",D," Matomo")):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",A,Object(i["toDisplayString"])(t.owner),1))]),Object(i["createElementVNode"])("div",_,[Object(i["createVNode"])(u,{"is-super-user":e.isSuperUser,"is-plugins-admin-enabled":e.isPluginsAdminEnabled,"is-multi-server-environment":e.isMultiServerEnvironment,"is-valid-consumer":e.isValidConsumer,"is-auto-update-possible":e.isAutoUpdatePossible,"activate-nonce":e.activateNonce,"deactivate-nonce":e.deactivateNonce,"install-nonce":e.installNonce,"update-nonce":e.updateNonce,plugin:t,"in-modal":!1,onOpenDetailsModal:e=>this.openDetailsModal(t),onRequestTrial:e=>this.requestTrial(t),onStartFreeTrial:e=>this.startFreeTrial(t)},null,8,["is-super-user","is-plugins-admin-enabled","is-multi-server-environment","is-valid-consumer","is-auto-update-possible","activate-nonce","deactivate-nonce","install-nonce","update-nonce","plugin","onOpenDetailsModal","onRequestTrial","onStartFreeTrial"])]),"piwik"==t.owner||"matomo-org"==t.owner?(Object(i["openBlock"])(),Object(i["createElementBlock"])("img",L)):Object(i["createCommentVNode"])("",!0)])])])])],10,j)]))),128))])):Object(i["createCommentVNode"])("",!0)],64)}const q={key:0,class:"alert alert-danger alert-no-background"},x={key:0,style:{"white-space":"nowrap"}},F=["href"],R={key:2,class:"alert alert-danger alert-no-background"},$={key:0,style:{"white-space":"nowrap"}},I=["href"],H={key:1,class:"alert alert-warning alert-no-background"},K={key:0,style:{"white-space":"nowrap"}},z={key:4,class:"alert alert-success alert-no-background"},G=["href"],Q=["href"],W=["title"],J=["title","href"],Y={key:8,class:"alert alert-warning alert-no-background"},Z={key:0,style:{"white-space":"nowrap"}},X=["href"],ee=["title"],te=["title"];function ne(e,t,n,l,a,r){const o=Object(i["resolveComponent"])("MoreDetailsAction"),c=Object(i["resolveComponent"])("DownloadButton");return e.isSuperUser?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:0},[e.plugin.isMissingLicense?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",q,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Marketplace_LicenseMissing"))+" ",1),e.inModal?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",x,[Object(i["createTextVNode"])("("),Object(i["createVNode"])(o,{onAction:t[0]||(t[0]=t=>e.$emit("openDetailsModal"))}),Object(i["createTextVNode"])(")")]))])):e.inModal&&e.plugin.hasExceededLicense&&e.plugin.consumer.loginUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:1,class:"btn btn-block",tabindex:"7",target:"_blank",rel:"noreferrer noopener",href:e.externalRawLink(e.plugin.consumer.loginUrl)},Object(i["toDisplayString"])(e.translate("Marketplace_UpgradeSubscription")),9,F)):e.plugin.hasExceededLicense?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",R,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Marketplace_LicenseExceeded"))+" ",1),e.inModal?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",$,[Object(i["createTextVNode"])("("),Object(i["createVNode"])(o,{onAction:t[1]||(t[1]=t=>e.$emit("openDetailsModal"))}),Object(i["createTextVNode"])(")")]))])):e.plugin.canBeUpdated&&0==e.plugin.missingRequirements.length?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:3},[e.isAutoUpdatePossible&&e.isPluginsAdminEnabled?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,tabindex:"7",class:"btn btn-block",href:e.linkToUpdate(e.plugin.name)},Object(i["toDisplayString"])(e.translate("CoreUpdater_UpdateTitle")),9,I)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",H,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Marketplace_CannotUpdate"))+" ",1),!e.inModal||0===e.plugin.missingRequirements.length&&e.plugin.isDownloadable&&!e.isAutoUpdatePossible?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",K,[Object(i["createTextVNode"])("("),e.inModal?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createBlock"])(o,{key:0,onAction:t[2]||(t[2]=t=>e.$emit("openDetailsModal"))})),Object(i["createVNode"])(c,{plugin:e.plugin,"show-or":!e.inModal,"is-auto-update-possible":e.isAutoUpdatePossible},null,8,["plugin","show-or","is-auto-update-possible"]),Object(i["createTextVNode"])(")")])):Object(i["createCommentVNode"])("",!0)]))],64)):e.plugin.isInstalled?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",z,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("General_Installed"))+" ",1),e.plugin.missingRequirements.length>0||!e.isAutoUpdatePossible?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:0},[Object(i["createTextVNode"])(" ("),Object(i["createVNode"])(c,{plugin:e.plugin,"show-or":!1,"is-auto-update-possible":e.isAutoUpdatePossible},null,8,["plugin","is-auto-update-possible"]),Object(i["createTextVNode"])(") ")],64)):e.plugin.isInvalid||e.isMultiServerEnvironment||!e.isPluginsAdminEnabled?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:1},[Object(i["createTextVNode"])(" ("),e.plugin.isActivated?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,tabindex:"7",href:e.linkToDeactivate(e.plugin.name)},Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_Deactivate")),9,G)):e.plugin.missingRequirements.length>0?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:1},[Object(i["createTextVNode"])(" - ")],64)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:2,tabindex:"7",href:e.linkToActivate(e.plugin.name)},Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_Activate")),9,Q)),Object(i["createTextVNode"])(") ")],64))])):e.plugin.isEligibleForFreeTrial&&!e.inModal&&e.isPluginsAdminEnabled?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:5,class:"btn btn-block purchaseable",title:e.translate("Marketplace_StartFreeTrial")},Object(i["toDisplayString"])(e.translate("Marketplace_StartFreeTrial")),9,W)):e.plugin.isEligibleForFreeTrial&&e.inModal?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:6,class:"btn btn-block addToCartLink",target:"_blank",title:e.translate("Marketplace_ClickToCompletePurchase"),rel:"noreferrer noopener",href:e.shopVariationUrl},Object(i["toDisplayString"])(e.translate("Marketplace_AddToCart")),9,J)):e.inModal||e.plugin.isDownloadable||!(e.plugin.isPaid||e.plugin.missingRequirements.length>0)&&e.isAutoUpdatePossible?e.plugin.missingRequirements.length>0||!e.isAutoUpdatePossible?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Y,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Marketplace_CannotInstall"))+" ",1),!e.inModal||0===e.plugin.missingRequirements.length&&e.plugin.isDownloadable&&!e.isAutoUpdatePossible?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Z,[Object(i["createTextVNode"])("("),e.inModal?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createBlock"])(o,{key:0,onAction:t[4]||(t[4]=t=>e.$emit("openDetailsModal"))})),Object(i["createVNode"])(c,{plugin:e.plugin,"show-or":!e.inModal,"is-auto-update-possible":e.isAutoUpdatePossible},null,8,["plugin","show-or","is-auto-update-possible"]),Object(i["createTextVNode"])(")")])):Object(i["createCommentVNode"])("",!0)])):e.isPluginsAdminEnabled&&e.plugin.hasDownloadLink?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:9,tabindex:"7",href:e.linkToInstall(e.plugin.name),class:"btn btn-block"},Object(i["toDisplayString"])(e.translate("Marketplace_ActionInstall")),9,X)):(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:10},[e.inModal?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createBlock"])(o,{key:0,"show-as-button":!0,label:e.translate("General_MoreDetails"),onAction:t[5]||(t[5]=t=>e.$emit("openDetailsModal"))},null,8,["label"]))],64)):(Object(i["openBlock"])(),Object(i["createBlock"])(o,{key:7,"show-as-button":!0,label:e.translate("General_MoreDetails"),onAction:t[3]||(t[3]=t=>e.$emit("openDetailsModal"))},null,8,["label"]))],64)):e.plugin.isTrialRequested?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:1,tabindex:"7",class:"btn btn-block purchaseable disabled",href:"",title:e.translate("Marketplace_TrialRequested")},Object(i["toDisplayString"])(e.translate("Marketplace_TrialRequested")),9,ee)):e.plugin.canTrialBeRequested&&!e.plugin.isMissingLicense?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:2,tabindex:"7",class:"btn btn-block purchaseable",href:"",onClick:t[6]||(t[6]=Object(i["withModifiers"])(e=>{this.$emit("requestTrial")},["prevent"])),title:e.translate("Marketplace_RequestTrial")},Object(i["toDisplayString"])(e.translate("Marketplace_RequestTrial")),9,te)):(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:3},[e.inModal?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createBlock"])(o,{key:0,"show-as-button":!0,label:e.translate("General_MoreDetails"),onAction:t[7]||(t[7]=t=>e.$emit("openDetailsModal"))},null,8,["label"]))],64))}const le={key:0,onclick:"$(this).css('display', 'none')"},ae=["href"];function ie(e,t,n,l,a,r){return 0===e.plugin.missingRequirements.length&&e.plugin.isDownloadable&&!e.isAutoUpdatePossible?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",le,[e.showOr?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:0},[Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("General_Or"))+" ",1)],64)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("a",{tabindex:"7",class:"plugin-details download",href:e.linkTo({module:"Marketplace",action:"download",pluginName:e.plugin.name,nonce:e.plugin.downloadNonce})},Object(i["toDisplayString"])(e.translate("General_Download")),9,ae)])):Object(i["createCommentVNode"])("",!0)}var re=Object(i["defineComponent"])({props:{plugin:{type:Object,required:!0},showOr:{type:Boolean,default:!1},isAutoUpdatePossible:{type:Boolean,required:!0}},methods:{linkTo(e){return"?"+b["MatomoUrl"].stringify(Object.assign(Object.assign({},b["MatomoUrl"].urlParsed.value),e))}}});re.render=ie;var oe=re;const ce=["title"];function se(e,t,n,l,a,r){return Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{tabindex:"7",class:Object(i["normalizeClass"])({"btn btn-block":e.showAsButton}),href:"",title:e.translate("General_MoreDetails"),onClick:t[0]||(t[0]=Object(i["withModifiers"])(t=>e.$emit("action"),["prevent"])),onKeyup:t[1]||(t[1]=Object(i["withKeys"])(t=>e.$emit("action"),["enter"]))},Object(i["toDisplayString"])(e.label?e.label:e.translate("General_Help")),43,ce)}var ue=Object(i["defineComponent"])({props:{showAsButton:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1}},emits:["action"]});ue.render=se;var de=ue,pe=Object(i["defineComponent"])({props:{plugin:{type:Object,required:!0},activateNonce:{type:String,required:!0},deactivateNonce:{type:String,required:!0},installNonce:{type:String,required:!0},updateNonce:{type:String,required:!0},isAutoUpdatePossible:{type:Boolean,required:!0},isValidConsumer:{type:Boolean,required:!0},isMultiServerEnvironment:{type:Boolean,required:!0},isPluginsAdminEnabled:{type:Boolean,required:!0},isSuperUser:{type:Boolean,required:!0},inModal:{type:Boolean,required:!0},shopVariationUrl:{type:String,required:!1,default:""}},emits:["openDetailsModal","requestTrial","startFreeTrial"],components:{MoreDetailsAction:de,DownloadButton:oe},methods:{linkToActivate(e){return this.linkTo({module:"CorePluginsAdmin",action:"activate",redirectTo:"referrer",nonce:this.activateNonce,pluginName:e})},linkToDeactivate(e){return this.linkTo({module:"CorePluginsAdmin",action:"deactivate",redirectTo:"referrer",nonce:this.deactivateNonce,pluginName:e})},linkToInstall(e){return this.linkTo({module:"Marketplace",action:"installPlugin",nonce:this.installNonce,pluginName:e})},linkToUpdate(e){return this.linkTo({module:"Marketplace",action:"updatePlugin",nonce:this.updateNonce,pluginName:e})},linkTo(e){return"?"+b["MatomoUrl"].stringify(Object.assign(Object.assign({},b["MatomoUrl"].urlParsed.value),e))}}});pe.render=ne;var me=pe;const be={class:"ui-confirm",ref:"confirm"},ge=["value"],Oe=["value"];function je(e,t,n,l,a,r){var o;return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",be,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("Marketplace_RequestTrialConfirmTitle",null===(o=e.plugin)||void 0===o?void 0:o.displayName)),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("Marketplace_RequestTrialConfirmEmailWarning")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,ge),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Oe)],512)}var he=Object(i["defineComponent"])({props:{modelValue:{type:Object,default:()=>({})}},emits:["update:modelValue","trialRequested"],watch:{modelValue(e){e&&b["Matomo"].helper.modalConfirm(this.$refs.confirm,{yes:()=>{this.requestTrial(e)}},{onCloseEnd:()=>{this.$emit("update:modelValue",null)}})}},computed:{plugin(){return this.modelValue}},methods:{requestTrial(e){b["AjaxHelper"].post({module:"API",method:"Marketplace.requestTrial"},{pluginName:e.name}).then(()=>{const t=b["NotificationsStore"].show({message:Object(b["translate"])("Marketplace_RequestTrialSubmitted",e.displayName),context:"success",id:"requestTrialSuccess",placeat:"#notificationContainer",type:"transient"});b["NotificationsStore"].scrollToNotification(t),this.$emit("trialRequested")})}}});he.render=je;var ke=he;const ye={class:"modal",id:"startFreeTrial"},ve={key:0,class:"btn-close modal-close"},Ne=Object(i["createElementVNode"])("i",{class:"icon-close"},null,-1),Ve=[Ne],Se={key:1,class:"modal-content trial-start-in-progress"},Ee={class:"Piwik_Popover_Loading"},Be={class:"Piwik_Popover_Loading_Name"},Me={key:2,class:"modal-content trial-start-error"},fe={class:"modal-text"},Te={key:3,class:"modal-content trial-start-no-license"},we={class:"modal-text"},Ce=["innerHTML"],Pe=["innerHTML"],De=["disabled"],Ae=["innerHTML"];function _e(e,t,n,l,a,r){const o=Object(i["resolveComponent"])("Field");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ye,[e.trialStartInProgress?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",ve,Ve)),e.trialStartInProgress?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Se,[Object(i["createElementVNode"])("div",Ee,[Object(i["createElementVNode"])("div",Be,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("Marketplace_TrialStartInProgressTitle")),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("Marketplace_TrialStartInProgressText")),1)])])])):e.trialStartError?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Me,[Object(i["createElementVNode"])("div",fe,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("Marketplace_TrialStartErrorTitle")),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.trialStartError),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("Marketplace_TrialStartErrorSupport")),1)])])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Te,[Object(i["createElementVNode"])("div",we,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("Marketplace_TrialStartNoLicenseTitle")),1),Object(i["createElementVNode"])("p",null,Object(i["toDisplayString"])(e.translate("Marketplace_TrialStartNoLicenseText")),1),Object(i["createVNode"])(o,{uicontrol:"text",name:"email",modelValue:e.createAccountEmail,"onUpdate:modelValue":t[0]||(t[0]=t=>e.createAccountEmail=t),"full-width":!0,title:e.translate("UsersManager_Email")},null,8,["modelValue","title"]),e.createAccountError?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:0,class:"alert alert-danger",innerHTML:e.$sanitize(e.createAccountError)},null,8,Ce)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("p",{class:"trial-start-legal-hint",innerHTML:e.$sanitize(e.trialStartNoLicenseLegalHintText)},null,8,Pe),Object(i["createElementVNode"])("p",null,[Object(i["createElementVNode"])("button",{class:"btn",disabled:!e.createAccountEmail,onClick:t[1]||(t[1]=t=>e.createAccountAndStartFreeTrial())},Object(i["toDisplayString"])(e.translate("Marketplace_TrialStartNoLicenseCreateAccount")),9,De)]),Object(i["createElementVNode"])("p",{class:"add-existing-license",innerHTML:e.$sanitize(e.trialStartNoLicenseAddHereText)},null,8,Ae)])]))])}const{$:Le}=window;var Ue=Object(i["defineComponent"])({components:{Field:g["Field"]},props:{modelValue:{type:Object,default:()=>({})},currentUserEmail:String,isValidConsumer:Boolean},data(){return{createAccountEmail:this.currentUserEmail||"",createAccountError:null,trialStartError:null,loadingModalCloseCallback:void 0,trialStartInProgress:!1,trialStartSuccessNotificationMessage:"",trialStartSuccessNotificationTitle:""}},emits:["update:modelValue","trialStarted","startTrialStart","startTrialStop"],watch:{modelValue(e){e&&(this.isValidConsumer?(this.trialStartSuccessNotificationMessage=Object(b["translate"])("CorePluginsAdmin_PluginFreeTrialStarted","<strong>","</strong>",this.plugin.displayName),this.startFreeTrial()):(this.trialStartSuccessNotificationTitle=Object(b["translate"])("CorePluginsAdmin_PluginFreeTrialStartedAccountCreatedTitle"),this.trialStartSuccessNotificationMessage=Object(b["translate"])("CorePluginsAdmin_PluginFreeTrialStartedAccountCreatedMessage",this.plugin.displayName),this.showLicenseDialog(!1)))}},computed:{plugin(){return this.modelValue},trialStartNoLicenseAddHereText(){const e="?"+b["MatomoUrl"].stringify({module:"Marketplace",action:"manageLicenseKey"});return Object(b["translate"])("Marketplace_TrialStartNoLicenseAddHere",`<a href="${e}">`,"</a>")},trialStartNoLicenseLegalHintText(){return Object(b["translate"])("Marketplace_TrialStartNoLicenseLegalHint",Object(b["externalLink"])("https://shop.matomo.org/terms-conditions/"),"</a>",Object(b["externalLink"])("https://matomo.org/privacy-policy/"),"</a>")}},methods:{closeModal(){Le("#startFreeTrial").modal("close")},createAccountAndStartFreeTrial(){this.createAccountEmail&&(this.showLoadingModal(!0),b["AjaxHelper"].post({module:"API",method:"Marketplace.createAccount"},{email:this.createAccountEmail},{createErrorNotification:!1}).then(()=>{this.startFreeTrial()}).catch(e=>{e.message.startsWith("Marketplace_CreateAccountError")?(this.showErrorModal(Object(b["translate"])(e.message)),this.trialStartInProgress=!1,this.$emit("update:modelValue",null)):(this.createAccountError=e.message,this.trialStartInProgress=!1,this.showLicenseDialog(!0))}))},showLicenseDialog(e){const t=e=>{const t=e.keyCode?e.keyCode:e.which;13===t&&(this.closeModal(),this.createAccountAndStartFreeTrial())},n={dismissible:!0,onOpenEnd:()=>{const e=".modal.open #email";Le(e).focus(),Le(e).off("keypress").keypress(t)},onCloseEnd:()=>{this.createAccountError=null,this.trialStartInProgress||this.$emit("update:modelValue",null)}};e&&(n.inDuration=0),Le("#startFreeTrial").modal(n).modal("open")},showErrorModal(e){this.trialStartError||(this.trialStartError=e,Le("#startFreeTrial").modal({dismissible:!0,inDuration:0,onCloseEnd:()=>{this.trialStartError=null}}).modal("open"))},showLoadingModal(e){this.trialStartInProgress||(this.trialStartInProgress=!0,this.loadingModalCloseCallback=void 0,Le("#startFreeTrial").modal({dismissible:!1,inDuration:e?0:void 0,onCloseEnd:()=>{this.loadingModalCloseCallback&&(this.loadingModalCloseCallback(),this.loadingModalCloseCallback=void 0)}}).modal("open"))},startFreeTrial(){this.showLoadingModal(!1),this.$emit("startTrialStart"),b["AjaxHelper"].post({module:"API",method:"Marketplace.startFreeTrial"},{pluginName:this.plugin.name},{createErrorNotification:!1}).then(()=>{this.loadingModalCloseCallback=this.startFreeTrialSuccess,this.closeModal()}).catch(e=>{this.showErrorModal(b["Matomo"].helper.htmlDecode(e.message)),this.trialStartInProgress=!1,this.$emit("startTrialStop")}).finally(()=>{this.$emit("update:modelValue",null)})},startFreeTrialSuccess(){const e=b["NotificationsStore"].show({message:this.trialStartSuccessNotificationMessage,title:this.trialStartSuccessNotificationTitle,context:"success",id:"startTrialSuccess",placeat:"#notificationContainer",type:"transient"});b["NotificationsStore"].scrollToNotification(e),this.trialStartInProgress=!1,this.$emit("trialStarted")}}});Ue.render=_e;var qe=Ue;const xe={ref:"root",class:"modal",id:"pluginDetailsModal"},Fe={class:"modal-content__header"},Re=Object(i["createElementVNode"])("span",{class:"btn-close modal-close"},[Object(i["createElementVNode"])("i",{class:"icon-close"})],-1),$e={key:0,class:"plugin-metadata-part1"},Ie=Object(i["createElementVNode"])("h3",{class:"sr-only"},"Plugin details — part 1",-1),He={key:0,class:"pair"},Ke=Object(i["createElementVNode"])("img",{class:"star-icon reviews-icon",src:"plugins/Marketplace/images/star.svg",alt:""},null,-1),ze={key:1,class:"pair"},Ge={key:2,class:"pair"},Qe={key:3,class:"pair"},We={key:4,class:"pair"},Je={class:"plugin-description"},Ye={key:1,class:"alert alert-warning"},Ze={key:2,class:"alert alert-warning"},Xe={key:3,class:"alert alert-danger"},et={key:4,class:"alert alert-warning"},tt=["innerHTML"],nt=["innerHTML"],lt=["innerHTML"],at=["innerHTML"],it={class:"plugin-metadata-part2"},rt=Object(i["createElementVNode"])("hr",null,null,-1),ot=Object(i["createElementVNode"])("h3",{class:"sr-only"},"Plugin details — part 2",-1),ct={key:0,class:"pair"},st={key:1,class:"pair"},ut={class:"pair"},dt=["href"],pt=["href"],mt={key:2},bt={key:3},gt={class:"pair"},Ot=["href"],jt=["href"],ht=["href"],kt={key:0,class:"pair"},yt={key:1,class:"pair"},vt=["href"],Nt={key:1},Vt=["innerHTML"],St={key:0},Et=["href"],Bt={key:1},Mt=["href"],ft=["innerHTML"],Tt={key:0,class:"plugin-screenshots"},wt=Object(i["createElementVNode"])("hr",null,null,-1),Ct={class:"thumbnails"},Pt=["src"],Dt={key:1,class:"plugin-documentation"},At=Object(i["createElementVNode"])("hr",null,null,-1),_t=["innerHTML"],Lt={key:2,class:"plugin-faq"},Ut=Object(i["createElementVNode"])("hr",null,null,-1),qt=["innerHTML"],xt={key:3,class:"plugin-reviews",id:"reviews"},Ft=Object(i["createElementVNode"])("hr",null,null,-1),Rt=["id","src"],$t={key:0,class:"matomo-badge matomo-badge-modal",src:"plugins/Marketplace/images/matomo-badge.png","aria-label":"Matomo plugin",alt:""},It={class:"cta-container cta-container-modal"},Ht={key:0,class:"free-trial"},Kt={class:"free-trial-lead-in"},zt=["title"],Gt=["value","title"],Qt={key:1,class:"matomo-badge matomo-badge-modal",src:"plugins/Marketplace/images/matomo-badge.png","aria-label":"Matomo plugin",alt:""};function Wt(e,t,n,l,a,r){var o,c,s,u,d,p;const m=Object(i["resolveComponent"])("MissingReqsNotice"),b=Object(i["resolveComponent"])("CTAContainer");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",xe,[e.isLoading?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:0,class:Object(i["normalizeClass"])(["modal-content",{"modal-content--simple-header":!e.hasHeaderMetadata}])},[Object(i["createElementVNode"])("div",Fe,[Re,Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.plugin&&e.plugin.displayName?e.plugin.displayName:"Plugin details"),1),e.hasHeaderMetadata?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",$e,[Ie,Object(i["createElementVNode"])("dl",null,[e.showReviews?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",He,[Object(i["createElementVNode"])("dt",null,Object(i["toDisplayString"])(e.translate("Marketplace_Reviews")),1),Object(i["createElementVNode"])("dd",null,[Ke,Object(i["createElementVNode"])("a",{onClick:t[0]||(t[0]=t=>e.scrollElementIntoView("#reviews"))},Object(i["toDisplayString"])(e.pluginReviews.averageRating),1)])])):Object(i["createCommentVNode"])("",!0),e.plugin.isBundle?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ze,[Object(i["createElementVNode"])("dt",null,Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_Version")),1),Object(i["createElementVNode"])("dd",null,Object(i["toDisplayString"])(e.plugin.latestVersion),1)])),e.plugin.numDownloads>0?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ge,[Object(i["createElementVNode"])("dt",null,Object(i["toDisplayString"])(e.translate("General_Downloads")),1),Object(i["createElementVNode"])("dd",null,Object(i["toDisplayString"])(e.plugin.numDownloadsPretty),1)])):Object(i["createCommentVNode"])("",!0),e.plugin.lastUpdated&&!e.plugin.isBundle?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Qe,[Object(i["createElementVNode"])("dt",null,Object(i["toDisplayString"])(e.translate("Marketplace_LastUpdated")),1),Object(i["createElementVNode"])("dd",null,Object(i["toDisplayString"])(e.plugin.lastUpdated),1)])):Object(i["createCommentVNode"])("",!0),e.plugin.isBundle?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",We,[Object(i["createElementVNode"])("dt",null,Object(i["toDisplayString"])(e.translate("Marketplace_Developer")),1),Object(i["createElementVNode"])("dd",null,Object(i["toDisplayString"])(e.pluginOwner),1)]))])])):Object(i["createCommentVNode"])("",!0)]),Object(i["createElementVNode"])("div",{class:Object(i["normalizeClass"])(["modal-content__main",{"modal-content__main--with-free-trial":e.showFreeTrialDropdown}])},[Object(i["createElementVNode"])("div",Je,[e.showMissingRequirementsNoticeIfApplicable?(Object(i["openBlock"])(),Object(i["createBlock"])(m,{key:0,plugin:e.plugin},null,8,["plugin"])):Object(i["createCommentVNode"])("",!0),e.isMultiServerEnvironment?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ye,Object(i["toDisplayString"])(e.translate("Marketplace_MultiServerEnvironmentWarning")),1)):e.isAutoUpdatePossible?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ze,Object(i["toDisplayString"])(e.translate("Marketplace_AutoUpdateDisabledWarning","'[General]enable_auto_update=1'","'config/config.ini.php'")),1)),e.showMissingLicenseDescription?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Xe,Object(i["toDisplayString"])(e.translate("Marketplace_PluginLicenseMissingDescription")),1)):e.showExceededLicenseDescription?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",et,Object(i["toDisplayString"])(e.translate("Marketplace_PluginLicenseExceededDescription")),1)):"Pending"!==e.plugin.licenseStatus||e.isMultiServerEnvironment?"Cancelled"!==e.plugin.licenseStatus||e.isMultiServerEnvironment?e.plugin.hasDownloadLink||e.isMultiServerEnvironment||!e.plugin.licenseStatus&&e.plugin.isPaid?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:7,class:"alert alert-warning",innerHTML:e.$sanitize(e.getDownloadLinkMissingHelpText(e.plugin.displayName))},null,8,lt)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:6,class:"alert alert-warning",innerHTML:e.$sanitize(e.getCancelledLicenseHelpText(e.plugin.displayName))},null,8,nt)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:5,class:"alert alert-warning",innerHTML:e.$sanitize(e.getPendingLicenseHelpText(e.plugin.displayName))},null,8,tt)),Object(i["createElementVNode"])("div",{innerHTML:e.$sanitize(e.pluginDescription)},null,8,at)]),Object(i["createElementVNode"])("div",it,[rt,ot,Object(i["createElementVNode"])("dl",null,[e.plugin.isBundle?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ct,[Object(i["createElementVNode"])("dt",null,Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_Version")),1),Object(i["createElementVNode"])("dd",null,Object(i["toDisplayString"])(e.plugin.latestVersion),1)])),e.pluginKeywords?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",st,[Object(i["createElementVNode"])("dt",null,Object(i["toDisplayString"])(e.translate("Marketplace_PluginKeywords")),1),Object(i["createElementVNode"])("dd",null,Object(i["toDisplayString"])(e.pluginKeywords.join(", ")),1)])):Object(i["createCommentVNode"])("",!0),e.plugin.isBundle?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:2},[Object(i["createElementVNode"])("div",ut,[Object(i["createElementVNode"])("dt",null,Object(i["toDisplayString"])(e.translate("Marketplace_Authors")),1),Object(i["createElementVNode"])("dd",null,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.pluginAuthors,(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:"author-"+n},[t.homepage?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,target:"_blank",rel:"noreferrer noopener",href:t.homepage},Object(i["toDisplayString"])(t.name),9,dt)):t.email&&e.isValidEmail(t.email)?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:1,href:"mailto:"+encodeURIComponent(t.email)},Object(i["toDisplayString"])(t.name),9,pt)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",mt,Object(i["toDisplayString"])(t.name),1)),n<e.pluginAuthors.length-1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",bt,", ")):Object(i["createCommentVNode"])("",!0)],64))),128))])]),Object(i["createElementVNode"])("div",gt,[Object(i["createElementVNode"])("dt",null,Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_Websites")),1),Object(i["createElementVNode"])("dd",null,[e.plugin.homepage?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,target:"_blank",rel:"noreferrer noopener",href:e.plugin.homepage},Object(i["toDisplayString"])(e.translate("Marketplace_PluginWebsite")),9,Ot)):Object(i["createCommentVNode"])("",!0),e.pluginChangelogUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:1},[e.plugin.homepage?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:0},[Object(i["createTextVNode"])(", ")],64)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:e.externalRawLink(e.pluginChangelogUrl)},Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_Changelog")),9,jt)],64)):Object(i["createCommentVNode"])("",!0),e.plugin.repositoryUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:2},[e.plugin.homepage||e.pluginChangelogUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:0},[Object(i["createTextVNode"])(", ")],64)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:e.externalRawLink(e.plugin.repositoryUrl)},"GitHub",8,ht)],64)):Object(i["createCommentVNode"])("",!0)])]),e.pluginActivity&&e.pluginActivity.numCommits?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",kt,[Object(i["createElementVNode"])("dt",null,Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_Activity")),1),Object(i["createElementVNode"])("dd",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.plugin.activity.numCommits)+" commits ",1),(null===(o=e.pluginActivity)||void 0===o?void 0:o.numContributors)>1?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:0},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(" "+e.translate("Marketplace_ByXDevelopers",e.pluginActivity.numContributors)),1)],64)):Object(i["createCommentVNode"])("",!0),null!==(c=e.pluginActivity)&&void 0!==c&&c.lastCommitDate?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:1},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(" "+e.translate("Marketplace_LastCommitTime",e.pluginActivity.lastCommitDate)),1)],64)):Object(i["createCommentVNode"])("",!0)])])):Object(i["createCommentVNode"])("",!0),e.showLicenseName?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",yt,[Object(i["createElementVNode"])("dt",null,Object(i["toDisplayString"])(e.translate("Marketplace_License")),1),Object(i["createElementVNode"])("dd",null,[null!==(s=e.pluginLatestVersion.license)&&void 0!==s&&s.url?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,rel:"noreferrer noopener",href:null===(u=e.pluginLatestVersion.license)||void 0===u?void 0:u.url,target:"_blank"},Object(i["toDisplayString"])(null===(d=e.pluginLatestVersion.license)||void 0===d?void 0:d.name),9,vt)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Nt,Object(i["toDisplayString"])(null===(p=e.pluginLatestVersion.license)||void 0===p?void 0:p.name),1))])])):Object(i["createCommentVNode"])("",!0),e.pluginSupport.length?(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],{key:2},Object(i["renderList"])(e.pluginSupport,(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"pair",key:"support-"+n},[t.name&&t.value?(Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],{key:0},[Object(i["createElementVNode"])("dt",{innerHTML:e.$sanitize(t.name)},null,8,Vt),this.isValidHttpUrl(t.value)?(Object(i["openBlock"])(),Object(i["createElementBlock"])("dd",St,[Object(i["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:e.externalRawLink(e.$sanitize(t.value))},Object(i["toDisplayString"])(e.$sanitize(t.value)),9,Et)])):this.isValidEmail(t.value)?(Object(i["openBlock"])(),Object(i["createElementBlock"])("dd",Bt,[Object(i["createElementVNode"])("a",{href:"mailto:"+encodeURIComponent(t.value)},Object(i["toDisplayString"])(e.$sanitize(t.value)),9,Mt)])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("dd",{key:2,innerHTML:e.$sanitize(t.value)},null,8,ft))],64)):Object(i["createCommentVNode"])("",!0)]))),128)):Object(i["createCommentVNode"])("",!0)],64))])]),e.pluginScreenshots.length?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Tt,[wt,Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("Marketplace_Screenshots")),1),Object(i["createElementVNode"])("div",Ct,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.pluginScreenshots,e=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("figure",{key:"screenshot-"+e},[Object(i["createElementVNode"])("img",{src:e+"?w=800",width:"800",alt:""},null,8,Pt),Object(i["createElementVNode"])("figcaption",null,Object(i["toDisplayString"])(this.getScreenshotBaseName(e)),1)]))),128))])])):Object(i["createCommentVNode"])("",!0),e.pluginDocumentation?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Dt,[At,Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("General_Documentation")),1),Object(i["createElementVNode"])("div",{innerHTML:e.$sanitize(e.pluginDocumentation)},null,8,_t)])):Object(i["createCommentVNode"])("",!0),e.pluginFaq?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Lt,[Ut,Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("General_Faq")),1),Object(i["createElementVNode"])("div",{innerHTML:e.$sanitize(e.pluginFaq)},null,8,qt)])):Object(i["createCommentVNode"])("",!0),e.showReviews?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",xt,[Ft,Object(i["createElementVNode"])("h3",null,Object(i["toDisplayString"])(e.translate("Marketplace_Reviews")),1),Object(i["createElementVNode"])("iframe",{class:"reviewIframe",style:Object(i["normalizeStyle"])(e.pluginReviews.height?`height: ${e.pluginReviews.height}px;`:""),id:e.pluginReviews.embedUrl.replace(/[\W_]+/g," "),src:e.pluginReviews.embedUrl},null,12,Rt)])):Object(i["createCommentVNode"])("",!0)],2),Object(i["createElementVNode"])("div",{class:Object(i["normalizeClass"])(["modal-content__footer",{"modal-content__footer--with-free-trial":e.showFreeTrialDropdown}])},[e.showFreeTrialDropdown&&e.isMatomoPlugin?(Object(i["openBlock"])(),Object(i["createElementBlock"])("img",$t)):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("div",It,[e.showFreeTrialDropdown?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ht,[Object(i["createElementVNode"])("div",Kt,Object(i["toDisplayString"])(e.translate("Marketplace_TryFreeTrialTitle")),1),Object(i["withDirectives"])(Object(i["createElementVNode"])("select",{class:"free-trial-dropdown",title:`${e.translate("Marketplace_ShownPriceIsExclTax")} ${e.translate("Marketplace_CurrentNumPiwikUsers",e.numUsers)}`,"onUpdate:modelValue":t[1]||(t[1]=t=>e.selectedPluginShopVariationUrl=t),onChange:t[2]||(t[2]=(...t)=>e.changeSelectedPluginShopVariationUrl&&e.changeSelectedPluginShopVariationUrl(...t))},[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.plugin.shop.variations,(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("option",{key:"var-"+n,value:t.addToCartUrl,title:`${e.translate("Marketplace_PriceExclTax",t.price,t.currency)} ${e.translate("Marketplace_CurrentNumPiwikUsers",e.numUsers)}`},Object(i["toDisplayString"])(t.name)+" - "+Object(i["toDisplayString"])(t.prettyPrice)+" / "+Object(i["toDisplayString"])(t.period),9,Gt))),128))],40,zt),[[i["vModelSelect"],e.selectedPluginShopVariationUrl]])])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(b,{"is-super-user":e.isSuperUser,"is-plugins-admin-enabled":e.isPluginsAdminEnabled,"is-multi-server-environment":e.isMultiServerEnvironment,"is-valid-consumer":e.isValidConsumer,"is-auto-update-possible":e.isAutoUpdatePossible,"activate-nonce":e.activateNonce,"deactivate-nonce":e.deactivateNonce,"install-nonce":e.installNonce,"update-nonce":e.updateNonce,plugin:e.plugin,"in-modal":!0,"shop-variation-url":e.selectedShopVariationUrl,onRequestTrial:t[3]||(t[3]=t=>e.emitTrialEvent("requestTrial")),onStartFreeTrial:t[4]||(t[4]=t=>e.emitTrialEvent("startFreeTrial"))},null,8,["is-super-user","is-plugins-admin-enabled","is-multi-server-environment","is-valid-consumer","is-auto-update-possible","activate-nonce","deactivate-nonce","install-nonce","update-nonce","plugin","shop-variation-url"])]),!e.showFreeTrialDropdown&&e.isMatomoPlugin?(Object(i["openBlock"])(),Object(i["createElementBlock"])("img",Qt)):Object(i["createCommentVNode"])("",!0)],2)],2))],512)}function Jt(e,t,n,l,a,r){return Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.plugin.missingRequirements||[],(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{key:n,class:"alert alert-danger"},Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_MissingRequirementsNotice",e.requirement(t.requirement),t.actualVersion,t.requiredVersion)),1))),128)}var Yt=Object(i["defineComponent"])({props:{plugin:{type:Object,required:!0}},methods:{requirement(e){return"php"===e?"PHP":`${e[0].toUpperCase()}${e.substr(1)}`}}});Yt.render=Jt;var Zt=Yt;const{$:Xt}=window;var en=Object(i["defineComponent"])({components:{MissingReqsNotice:Zt,CTAContainer:me},props:{modelValue:{type:Object,default:()=>({})},activateNonce:{type:String,required:!0},deactivateNonce:{type:String,required:!0},installNonce:{type:String,required:!0},updateNonce:{type:String,required:!0},isAutoUpdatePossible:{type:Boolean,required:!0},isValidConsumer:{type:Boolean,required:!0},isMultiServerEnvironment:{type:Boolean,required:!0},isPluginsAdminEnabled:{type:Boolean,required:!0},isSuperUser:{type:Boolean,required:!0},hasSomeAdminAccess:{type:Boolean,required:!0},numUsers:{type:Number,required:!0}},data(){return{isLoading:!0,currentPluginShopVariationUrl:""}},emits:["requestTrial","startFreeTrial","update:modelValue"],watch:{modelValue(e){e&&this.showPluginDetailsDialog()},isLoading(e){!1===e&&(this.applyExternalTarget(),this.applyIframeResize())}},computed:{plugin(){return this.modelValue},pluginLatestVersion(){const e=this.plugin.versions||[{}];return e[e.length-1]},pluginReadmeHtml(){var e;return(null===(e=this.pluginLatestVersion)||void 0===e?void 0:e.readmeHtml)||{}},pluginDescription(){var e;return(null===(e=this.pluginReadmeHtml)||void 0===e?void 0:e.description)||""},pluginDocumentation(){var e;return(null===(e=this.pluginReadmeHtml)||void 0===e?void 0:e.documentation)||""},pluginFaq(){var e;return(null===(e=this.pluginReadmeHtml)||void 0===e?void 0:e.faq)||""},pluginShop(){return this.plugin.shop},pluginShopVariations(){var e;return(null===(e=this.pluginShop)||void 0===e?void 0:e.variations)||[]},pluginReviews(){var e;return(null===(e=this.pluginShop)||void 0===e?void 0:e.reviews)||{}},pluginKeywords(){var e;return(null===(e=this.plugin)||void 0===e?void 0:e.keywords)||[]},pluginAuthors(){const e=this.plugin.authors||[];return e.filter(e=>e.name)},pluginActivity(){return this.plugin.activity||{}},pluginChangelogUrl(){return this.plugin.changelog.url||""},pluginSupport(){return this.plugin.support||[]},isMatomoPlugin(){return["piwik","matomo-org"].includes(this.plugin.owner)},pluginOwner(){return this.isMatomoPlugin?"Matomo":this.plugin.owner},showReviews(){return this.pluginReviews&&this.pluginReviews.embedUrl&&this.pluginReviews.averageRating},showMissingLicenseDescription(){return this.hasSomeAdminAccess&&this.plugin.isMissingLicense},showExceededLicenseDescription(){return this.hasSomeAdminAccess&&this.plugin.hasExceededLicense},showMissingRequirementsNoticeIfApplicable(){return this.isSuperUser&&(this.plugin.isDownloadable||this.plugin.isInstalled)},showLicenseName(){var e;const t=(null===(e=this.pluginLatestVersion)||void 0===e?void 0:e.license)||{};return!!t.name},showFreeTrialDropdown(){return this.isSuperUser&&!this.plugin.isMissingLicense&&!this.plugin.isInstalled&&!this.plugin.hasExceededLicense&&this.plugin.isEligibleForFreeTrial},pluginScreenshots(){return this.plugin.screenshots||[]},hasHeaderMetadata(){return this.showReviews||!this.plugin.isBundle||(this.plugin.numDownloads||0)>0||this.plugin.lastUpdated&&!this.plugin.isBundle},pluginShopVariationsPretty(){return this.pluginShopVariations.map(e=>`${e.name} - ${e.prettyPrice} / ${e.period}`)},pluginShopRecommendedVariation(){const e=this.pluginShopVariations.filter(e=>e.recommended),t=this.pluginShopVariations.length?this.pluginShopVariations[0]:null;return e.length?e[0]:t},selectedPluginShopVariationUrl(){var e;return this.currentPluginShopVariationUrl?this.currentPluginShopVariationUrl:(null===(e=this.pluginShopRecommendedVariation)||void 0===e?void 0:e.addToCartUrl)||""},selectedShopVariationUrl(){return this.selectedPluginShopVariationUrl||""}},methods:{changeSelectedPluginShopVariationUrl(e){e&&(this.currentPluginShopVariationUrl=e.target.value)},applyExternalTarget(){setTimeout(()=>{const e=this.$refs.root;Xt(".modal-content__main a",e).each((e,t)=>{const n=Xt(t).attr("href");n&&0===n.indexOf("http")&&Xt(t).attr("target","_blank")})})},scrollElementIntoView(e){setTimeout(()=>{const t=this.$refs.root,n=Xt(e,t);n.length&&n[0]&&n[0].scrollIntoView&&n[0].scrollIntoView({block:"nearest",behavior:"smooth"})})},isValidEmail(e){return e.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)},isValidHttpUrl(e){try{const t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch(t){return!1}},getProtocolAndDomain(e){const t=new URL(e);return`${t.protocol}//${t.hostname}`},applyIframeResize(){setTimeout(()=>{const{iFrameResize:e}=window;this.pluginReviews&&Xt(()=>{const t=Xt("#pluginDetailsModal iframe.reviewIframe");for(let n=0;n<t.length;n+=1)e({checkOrigin:[this.getProtocolAndDomain(this.pluginReviews.embedUrl)]},t[n])})})},getScreenshotBaseName(e){const t=e.split("/").pop()||"";return t.substring(0,t.lastIndexOf(".")).split("_").join(" ")},emitTrialEvent(e){const{plugin:t}=this;Xt("#pluginDetailsModal").modal("close"),setTimeout(()=>{this.$emit(e,t)},250)},showPluginDetailsDialog(){Xt("#pluginDetailsModal").modal({dismissible:!0,onCloseEnd:()=>{b["MatomoUrl"].updateHash(Object.assign(Object.assign({},b["MatomoUrl"].hashParsed.value),{},{showPlugin:null})),this.$emit("update:modelValue",null),this.isLoading=!0}}).modal("open"),setTimeout(()=>{this.isLoading=!1},10)},getPendingLicenseHelpText(e){return Object(b["translate"])("Marketplace_PluginLicenseStatusPending",e,Object(b["externalLink"])("https://shop.matomo.org/my-account/"),"</a>")},getCancelledLicenseHelpText(e){return Object(b["translate"])("Marketplace_PluginLicenseStatusCancelled",e,Object(b["externalLink"])("https://shop.matomo.org/my-account/"),"</a>")},getDownloadLinkMissingHelpText(e){return Object(b["translate"])("Marketplace_PluginDownloadLinkMissingDescription",e,Object(b["externalLink"])("https://matomo.org/faq/plugins/faq_21/"),"</a>")}}});en.render=Wt;var tn=en;const{$:nn}=window;var ln=Object(i["defineComponent"])({props:{currentUserEmail:String,pluginsToShow:{type:Array,required:!0},isAutoUpdatePossible:{type:Boolean,required:!0},isSuperUser:{type:Boolean,required:!0},isValidConsumer:{type:Boolean,required:!0},isMultiServerEnvironment:{type:Boolean,required:!0},isPluginsAdminEnabled:{type:Boolean,required:!0},hasSomeAdminAccess:{type:Boolean,required:!0},activateNonce:{type:String,required:!0},deactivateNonce:{type:String,required:!0},installNonce:{type:String,required:!0},updateNonce:{type:String,required:!0},numUsers:{type:Number,required:!0}},data(){return{showRequestTrialForPlugin:null,showStartFreeTrialForPlugin:null,showPluginDetailsForPlugin:null}},components:{PluginDetailsModal:tn,CTAContainer:me,RequestTrial:ke,StartFreeTrial:qe},emits:["triggerUpdate","startTrialStart","startTrialStop"],watch:{pluginsToShow(e,t){e&&e!==t&&(this.shrinkDescriptionIfMultilineTitle(),this.parseShowPluginParameter())}},mounted(){nn(window).resize(()=>{this.shrinkDescriptionIfMultilineTitle()}),Object(i["watch"])(()=>b["MatomoUrl"].hashParsed.value.showPlugin,(e,t)=>{e&&e!==t&&this.parseShowPluginParameter()}),this.parseShowPluginParameter()},methods:{parseShowPluginParameter(){const{showPlugin:e,pluginType:t,query:n}=b["MatomoUrl"].hashParsed.value;if(!e)return;const l=this.pluginsToShow.filter(t=>t.name===e);if(1===l.length){const[e]=l;this.openDetailsModal(e),this.scrollPluginCardIntoView(e)}else""===t&&""===n||b["MatomoUrl"].updateHash(Object.assign(Object.assign({},b["MatomoUrl"].hashParsed.value),{},{pluginType:"plugins",query:null}))},shrinkDescriptionIfMultilineTitle(){const e=nn(".marketplace .card-holder");e&&e.length&&e.each((e,t)=>{const n=nn(t),l=n.find(".card-title"),a=n.find(".card-content-bottom .alert"),i=n.hasClass("card-with-downloads");let r=1;if(l.length){const e=+l.height(),t=+l.css("line-height").replace("px","");var o;if(t)r=null!==(o=Math.ceil(e/t))&&void 0!==o?o:1}let c=0;if(a.length){const e=+a.height(),t=+a.css("line-height").replace("px","");var s;if(t)c=null!==(s=Math.ceil(e/t))&&void 0!==s?s:1}const u=n.find(".card-description");if(u.length){const e=u[0];let t=0;i?((r>=2||c>2||r+c>=4)&&(t=2),r+c>=5&&(t=1)):r+c>=5&&(t=2),t?e.setAttribute("data-clamp",""+t):e.removeAttribute("data-clamp")}})},clickCard(e,t){nn(e.target).closest("a:not(.card-title-link)").length||(e.stopPropagation(),this.openDetailsModal(t))},openDetailsModal(e){this.showPluginDetailsForPlugin=e},scrollPluginCardIntoView(e){const t=nn(`.pluginListContainer .card-title:contains("${e.displayName}")`);if(1!==t.length)return;const n=t.parents(".card");1===n.length&&n[0].scrollIntoView&&n[0].scrollIntoView({block:"start",behavior:"smooth"})},requestTrial(e){this.showRequestTrialForPlugin=e},startFreeTrial(e){this.showStartFreeTrialForPlugin=e}}});ln.render=U;var an=ln;const rn=e=>`${e[0].toLowerCase()}${e.substring(1)}`;var on=Object(i["defineComponent"])({props:{pluginTypeOptions:{type:Object,required:!0},defaultSort:{type:String,required:!0},pluginSortOptions:{type:Object,required:!0},numAvailablePluginsByType:{type:Object,required:!0},currentUserEmail:String,isValidConsumer:Boolean,isSuperUser:Boolean,isAutoUpdatePossible:Boolean,isPluginsAdminEnabled:Boolean,isMultiServerEnvironment:Boolean,hasSomeAdminAccess:Boolean,installNonce:{type:String,required:!0},activateNonce:{type:String,required:!0},deactivateNonce:{type:String,required:!0},updateNonce:{type:String,required:!0},numUsers:{type:Number,required:!0}},components:{ContentBlock:b["ContentBlock"],PluginList:an,Field:g["Field"]},data(){return{loading:!1,fetchRequest:null,fetchRequestAbortController:null,pluginSort:this.defaultSort,pluginTypeFilter:"plugins",searchQuery:"",pluginsToShow:[]}},emits:["triggerUpdate","startTrialStart","startTrialStop"],mounted(){b["Matomo"].postEvent("Marketplace.Marketplace.mounted",{element:this.$refs.root}),Object(i["watch"])(()=>b["MatomoUrl"].hashParsed.value,()=>{this.updateValuesFromHash(!1)}),this.updateValuesFromHash(!0)},unmounted(){b["Matomo"].postEvent("Marketplace.Marketplace.unmounted",{element:this.$refs.root})},methods:{updateValuesFromHash(e){let t=e;const n=b["MatomoUrl"].hashParsed.value.query||"",l=b["MatomoUrl"].hashParsed.value.sort||"",a=b["MatomoUrl"].hashParsed.value.pluginType||"";(n||this.searchQuery)&&(t=t||n!==this.searchQuery,this.searchQuery=n),l&&(t=t||l!==this.pluginSort,this.pluginSort=l),a&&(t=t||a!==this.pluginTypeFilter,this.pluginTypeFilter=a),t&&this.fetchPlugins()},updateQuery(e){b["MatomoUrl"].updateHash(Object.assign(Object.assign({},b["MatomoUrl"].hashParsed.value),{},{query:e}))},updateType(e){b["MatomoUrl"].updateHash(Object.assign(Object.assign({},b["MatomoUrl"].hashParsed.value),{},{pluginType:e}))},updateSort(e){b["MatomoUrl"].updateHash(Object.assign(Object.assign({},b["MatomoUrl"].hashParsed.value),{},{sort:e}))},updateMarketplace(){this.fetchPlugins(()=>this.$emit("triggerUpdate"))},fetchPlugins(e){this.loading=!0,this.pluginsToShow=[],this.fetchRequestAbortController&&(this.fetchRequestAbortController.abort(),this.fetchRequestAbortController=null),this.fetchRequestAbortController=new AbortController,this.fetchRequest=b["AjaxHelper"].post({module:"Marketplace",action:"searchPlugins",format:"JSON"},{query:this.searchQuery,sort:this.pluginSort,themesOnly:this.showThemes,purchaseType:"premium"===this.pluginTypeFilter?"paid":""},{withTokenInUrl:!0,abortController:this.fetchRequestAbortController}).then(t=>{this.pluginsToShow=t,"function"===typeof e&&e()}).finally(()=>{this.loading=!1,this.fetchRequestAbortController=null})}},computed:{queryInputTitle(){const e=rn(Object(b["translate"])("General_Plugins")),t=this.numAvailablePluginsByType[this.pluginTypeFilter]||0;return`${Object(b["translate"])("General_Search")} ${t} ${e}...`},loadingMessage(){return Object(b["translate"])("Mobile_LoadingReport",Object(b["translate"])(this.showThemes?"CorePluginsAdmin_Themes":"General_Plugins"))},showThemes(){return"themes"===this.pluginTypeFilter}}});on.render=m;var cn=on;const sn=["innerHTML"],un={class:"manage-license-key-input"},dn={class:"ui-confirm",id:"confirmRemoveLicense",ref:"confirmRemoveLicense"},pn=["value"],mn=["value"];function bn(e,t,n,l,a,r){const o=Object(i["resolveComponent"])("InstallAllPaidPluginsButton"),c=Object(i["resolveComponent"])("Field"),s=Object(i["resolveComponent"])("SaveButton"),u=Object(i["resolveComponent"])("ActivityIndicator"),d=Object(i["resolveComponent"])("ContentBlock");return Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],null,[Object(i["createVNode"])(d,{"content-title":e.translate("Marketplace_LicenseKey"),class:"manage-license-key"},{default:Object(i["withCtx"])(()=>[Object(i["createElementVNode"])("div",{class:"manage-license-key-intro",innerHTML:e.$sanitize(e.manageLicenseKeyIntro)},null,8,sn),Object(i["createVNode"])(o,{disabled:e.isUpdating},null,8,["disabled"]),Object(i["createElementVNode"])("div",un,[Object(i["createVNode"])(c,{uicontrol:"text",name:"license_key",modelValue:e.licenseKey,"onUpdate:modelValue":t[0]||(t[0]=t=>e.licenseKey=t),placeholder:e.licenseKeyPlaceholder,"full-width":!0},null,8,["modelValue","placeholder"])]),Object(i["createVNode"])(s,{onConfirm:t[1]||(t[1]=t=>e.updateLicense()),value:e.saveButtonText,disabled:!e.licenseKey||e.isUpdating,id:"submit_license_key"},null,8,["value","disabled"]),e.hasValidLicense?(Object(i["openBlock"])(),Object(i["createBlock"])(s,{key:0,id:"remove_license_key",onConfirm:t[2]||(t[2]=t=>e.removeLicense()),disabled:e.isUpdating,value:e.translate("General_Remove")},null,8,["disabled","value"])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(u,{loading:e.isUpdating},null,8,["loading"])]),_:1},8,["content-title"]),Object(i["createElementVNode"])("div",dn,[Object(i["createElementVNode"])("h2",null,Object(i["toDisplayString"])(e.translate("Marketplace_ConfirmRemoveLicense")),1),Object(i["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,pn),Object(i["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,mn)],512)],64)}var gn=Object(i["defineComponent"])({props:{hasValidLicenseKey:Boolean},components:{Field:g["Field"],ContentBlock:b["ContentBlock"],SaveButton:g["SaveButton"],ActivityIndicator:b["ActivityIndicator"],InstallAllPaidPluginsButton:g["InstallAllPaidPluginsButton"]},data(){return{licenseKey:"",hasValidLicense:this.hasValidLicenseKey,isUpdating:!1}},methods:{updateLicenseKey(e,t,n){b["NotificationsStore"].remove("ManageLicenseKeySuccess"),b["AjaxHelper"].post({module:"API",method:"Marketplace."+e,format:"JSON"},{licenseKey:this.licenseKey},{withTokenInUrl:!0}).then(t=>{this.isUpdating=!1,t&&t.value&&(b["NotificationsStore"].show({id:"ManageLicenseKeySuccess",message:n,context:"success",type:"toast"}),this.hasValidLicense="deleteLicenseKey"!==e,this.licenseKey="")},()=>{this.isUpdating=!1})},removeLicense(){b["Matomo"].helper.modalConfirm(this.$refs.confirmRemoveLicense,{yes:()=>{this.isUpdating=!0,this.updateLicenseKey("deleteLicenseKey","",Object(b["translate"])("Marketplace_LicenseKeyDeletedSuccess"))}})},updateLicense(){this.isUpdating=!0,this.updateLicenseKey("saveLicenseKey",this.licenseKey,Object(b["translate"])("Marketplace_LicenseKeyActivatedSuccess"))}},computed:{manageLicenseKeyIntro(){const e="?"+b["MatomoUrl"].stringify(Object.assign(Object.assign({},b["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"overview"}));return Object(b["translate"])("Marketplace_ManageLicenseKeyIntro",`<a href="${e}">`,"</a>",Object(b["externalLink"])("https://shop.matomo.org/my-account"),"</a>")},licenseKeyPlaceholder(){return this.hasValidLicense?Object(b["translate"])("Marketplace_LicenseKeyIsValidShort"):Object(b["translate"])("Marketplace_LicenseKey")},saveButtonText(){return this.hasValidLicense?Object(b["translate"])("CoreUpdater_UpdateTitle"):Object(b["translate"])("Marketplace_ActivateLicenseKey")}}});gn.render=bn;var On=gn;const jn={class:"getNewPlugins"},hn={class:"row"},kn={class:"pluginName"},yn=Object(i["createElementVNode"])("br",null,null,-1),vn={key:0},Nn=Object(i["createElementVNode"])("br",null,null,-1),Vn=Object(i["createElementVNode"])("br",null,null,-1),Sn=[Nn,Vn],En={class:"widgetBody"},Bn=["href"];function Mn(e,t,n,l,a,r){const o=Object(i["resolveDirective"])("plugin-name");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",jn,[Object(i["createElementVNode"])("div",hn,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.plugins,(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"col s12",key:t.name},[Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("h3",kn,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.displayName),1)])),[[o,{pluginName:t.name}]]),Object(i["createElementVNode"])("span",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.description)+" ",1),yn,Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("a",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("General_MoreDetails")),1)])),[[o,{pluginName:t.name}]])]),n<e.plugins.length-1?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",vn,Sn)):Object(i["createCommentVNode"])("",!0)]))),128))]),Object(i["createElementVNode"])("div",En,[Object(i["createElementVNode"])("a",{href:e.overviewLink},Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_ViewAllMarketplacePlugins")),9,Bn)])])}var fn=Object(i["defineComponent"])({props:{plugins:{type:Array,required:!0}},directives:{PluginName:g["PluginName"]},computed:{overviewLink(){return"?"+b["MatomoUrl"].stringify(Object.assign(Object.assign({},b["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"overview"}))}}});fn.render=Mn;var Tn=fn;const wn={class:"getNewPlugins isAdminPage",ref:"root"},Cn={class:"row"},Pn=["title"],Dn=["title"],An={key:0},_n=Object(i["createElementVNode"])("br",null,null,-1),Ln=["src"],Un={class:"widgetBody"},qn=["href"];function xn(e,t,n,l,a,r){const o=Object(i["resolveDirective"])("plugin-name");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",wn,[Object(i["createElementVNode"])("div",Cn,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.plugins,e=>{var t;return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"col s12 m4",key:e.name},[Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("h3",{class:"pluginName",title:e.description},[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.displayName),1)],8,Pn)),[[o,{pluginName:e.name}]]),Object(i["createElementVNode"])("p",{class:"description",title:e.description},Object(i["toDisplayString"])(e.description),9,Dn),null!==(t=e.screenshots)&&void 0!==t&&t.length?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",An,[_n,Object(i["withDirectives"])(Object(i["createElementVNode"])("img",{class:"screenshot",src:e.screenshots[0]+"?w=600",style:{width:"100%"},alt:""},null,8,Ln),[[o,{pluginName:e.name}]])])):Object(i["createCommentVNode"])("",!0)])}),128))]),Object(i["createElementVNode"])("div",Un,[Object(i["createElementVNode"])("a",{href:e.marketplaceOverviewLink},Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_ViewAllMarketplacePlugins")),9,qn)])],512)}var Fn=Object(i["defineComponent"])({props:{plugins:{type:Array,required:!0}},directives:{PluginName:g["PluginName"]},computed:{marketplaceOverviewLink(){return"?"+b["MatomoUrl"].stringify({module:"Marketplace",action:"overview"})}}});Fn.render=xn;var Rn=Fn;const $n={class:"getNewPlugins getPremiumFeatures widgetBody"},In={key:0,class:"col s12 m12"},Hn=["innerHTML"],Kn={style:{"margin-bottom":"28px",color:"#5bb75b"}},zn=Object(i["createElementVNode"])("i",{class:"icon-heart red-text"},null,-1),Gn={class:"pluginName"},Qn={key:0,class:"pluginSubtitle"},Wn={class:"pluginBody"},Jn=Object(i["createElementVNode"])("br",null,null,-1),Yn={class:"pluginMoreDetails"},Zn={class:"widgetBody"},Xn=["href"];function el(e,t,n,l,a,r){const o=Object(i["resolveDirective"])("plugin-name");return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",$n,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.pluginRows,(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"row",key:n},[0===n?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",In,[Object(i["createElementVNode"])("h3",{style:{"font-weight":"bold",color:"#5bb75b"},innerHTML:e.$sanitize(e.trialHintsText)},null,8,Hn),Object(i["createElementVNode"])("h3",Kn,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Marketplace_SupportMatomoThankYou"))+" ",1),zn])])):Object(i["createCommentVNode"])("",!0),(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(t,t=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",{class:"col s12 m4",key:t.name},[Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("h3",Gn,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.displayName),1)])),[[o,{pluginName:t.name}]]),t.specialOffer?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Qn,[Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("Marketplace_SpecialOffer"))+":",1),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(t.specialOffer),1)])):Object(i["createCommentVNode"])("",!0),Object(i["createElementVNode"])("span",Wn,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(t.isBundle?e.translate("Marketplace_SpecialOffer")+": ":"")+Object(i["toDisplayString"])(t.description)+" ",1),Jn,Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("a",Yn,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("General_MoreDetails")),1)])),[[o,{pluginName:t.name}]])])]))),128))]))),128)),Object(i["createElementVNode"])("div",Zn,[Object(i["createElementVNode"])("a",{href:e.overviewLink},Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_ViewAllMarketplacePlugins")),9,Xn)])])}var tl=Object(i["defineComponent"])({props:{plugins:{type:Array,required:!0}},directives:{PluginName:g["PluginName"]},computed:{trialHintsText(){const e=Object(b["externalRawLink"])("https://shop.matomo.org/free-trial/"),t="color:#5bb75b;text-decoration: underline;";return Object(b["translate"])("Marketplace_TrialHints",`<a style="${t}" href="${e}" target="_blank" rel="noreferrer noopener">`,"</a>")},pluginRows(){const e=[];return this.plugins.forEach((t,n)=>{const l=Math.floor(n/3);e[l]=e[l]||[],e[l].push(t)}),e},overviewLink(){const e=b["MatomoUrl"].stringify({module:"Marketplace",action:"overview"}),t=b["MatomoUrl"].stringify({pluginType:"premium"});return`?${e}#?${t}`}}});tl.render=el;var nl=tl;const ll={class:"marketplaceIntro"},al={key:0},il={key:1},rl={key:0,class:"installAllPaidPlugins"};function ol(e,t,n,l,a,r){const o=Object(i["resolveComponent"])("EnrichedHeadline"),c=Object(i["resolveComponent"])("InstallAllPaidPluginsButton"),s=Object(i["resolveComponent"])("Marketplace"),u=Object(i["resolveDirective"])("content-intro");return Object(i["withDirectives"])((Object(i["openBlock"])(),Object(i["createElementBlock"])("div",null,[Object(i["createElementVNode"])("h2",null,[Object(i["createVNode"])(o,{"feature-name":e.translate("CorePluginsAdmin_Marketplace")},{default:Object(i["withCtx"])(()=>[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Marketplace_Marketplace")),1)]),_:1},8,["feature-name"])]),Object(i["createElementVNode"])("div",ll,[e.isSuperUser?(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",il,Object(i["toDisplayString"])(e.translate("Marketplace_IntroSuperUser")),1)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("p",al,Object(i["toDisplayString"])(e.translate("Marketplace_Intro")),1))]),e.installAllPaidPluginsVisible?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",rl,[Object(i["createVNode"])(c,{disabled:e.installDisabled},null,8,["disabled"])])):Object(i["createCommentVNode"])("",!0),Object(i["createVNode"])(s,{"plugin-type-options":e.pluginTypeOptions,"default-sort":e.defaultSort,"plugin-sort-options":e.pluginSortOptions,"num-available-plugins-by-type":e.numAvailablePluginsByType,"current-user-email":e.currentUserEmail,"is-auto-update-possible":e.isAutoUpdatePossible,"is-super-user":e.isSuperUser,"is-multi-server-environment":e.isMultiServerEnvironment,"is-plugins-admin-enabled":e.isPluginsAdminEnabled,"is-valid-consumer":e.getIsValidConsumer,"deactivate-nonce":e.deactivateNonce,"activate-nonce":e.activateNonce,"install-nonce":e.installNonce,"update-nonce":e.updateNonce,"has-some-admin-access":e.hasSomeAdminAccess,"num-users":e.numUsers,onTriggerUpdate:t[0]||(t[0]=e=>this.updateOverviewData()),onStartTrialStart:t[1]||(t[1]=e=>this.disableInstallAllPlugins(!0)),onStartTrialStop:t[2]||(t[2]=e=>this.disableInstallAllPlugins(!1))},null,8,["plugin-type-options","default-sort","plugin-sort-options","num-available-plugins-by-type","current-user-email","is-auto-update-possible","is-super-user","is-multi-server-environment","is-plugins-admin-enabled","is-valid-consumer","deactivate-nonce","activate-nonce","install-nonce","update-nonce","has-some-admin-access","num-users"])])),[[u]])}var cl=Object(i["defineComponent"])({props:{currentUserEmail:String,inReportingMenu:Boolean,isValidConsumer:Boolean,isSuperUser:Boolean,isAutoUpdatePossible:Boolean,isPluginsAdminEnabled:Boolean,isMultiServerEnvironment:Boolean,hasSomeAdminAccess:Boolean,installNonce:{type:String,required:!0},activateNonce:{type:String,required:!0},deactivateNonce:{type:String,required:!0},updateNonce:{type:String,required:!0},isPluginUploadEnabled:Boolean,uploadLimit:[String,Number],pluginTypeOptions:{type:Object,required:!0},defaultSort:{type:String,required:!0},pluginSortOptions:{type:Object,required:!0},numAvailablePluginsByType:{type:Object,required:!0},numUsers:{type:Number,required:!0}},components:{InstallAllPaidPluginsButton:g["InstallAllPaidPluginsButton"],EnrichedHeadline:b["EnrichedHeadline"],Marketplace:cn},directives:{ContentIntro:b["ContentIntro"]},data(){return{updating:!1,fetchRequest:null,fetchRequestAbortController:null,updateData:null,installDisabled:!1,installLoading:!1}},computed:{getIsValidConsumer(){return this.updateData&&"undefined"!==typeof this.updateData.isValidConsumer?this.updateData.isValidConsumer:this.isValidConsumer},installAllPaidPluginsVisible(){return this.getIsValidConsumer&&this.isSuperUser&&this.isAutoUpdatePossible&&this.isPluginsAdminEnabled||this.installDisabled&&this.installLoading},showThemes(){return"themes"===b["MatomoUrl"].hashParsed.value.pluginType}},methods:{disableInstallAllPlugins(e){this.installDisabled=!0,this.installLoading=e},enableInstallAllPlugins(){this.installDisabled=!1,this.installLoading=!1},updateOverviewData(){this.updating=!0,this.isSuperUser&&this.disableInstallAllPlugins(!0),this.fetchRequestAbortController&&(this.fetchRequestAbortController.abort(),this.fetchRequestAbortController=null),this.fetchRequestAbortController=new AbortController,this.fetchRequest=b["AjaxHelper"].post({module:"Marketplace",action:"updateOverview",format:"JSON"},{},{withTokenInUrl:!0,abortController:this.fetchRequestAbortController}).then(e=>{this.updateData=e}).finally(()=>{this.updating=!1,this.fetchRequestAbortController=null,this.enableInstallAllPlugins()})}}});cl.render=ol;var sl=cl;const ul={key:0},dl=["href"],pl=Object(i["createElementVNode"])("br",null,null,-1),ml=Object(i["createElementVNode"])("br",null,null,-1),bl=["innerHTML"],gl=Object(i["createElementVNode"])("br",null,null,-1),Ol={class:"subscriptionName"},jl=["href"],hl={key:1},kl={class:"subscriptionType"},yl=["title"],vl={key:0,class:"icon-error"},Nl={key:1,class:"icon-warning"},Vl={key:2,class:"icon-error"},Sl={key:3,class:"icon-ok"},El=["title"],Bl=Object(i["createElementVNode"])("span",{class:"icon-error"},null,-1),Ml={key:0},fl={colspan:"6"},Tl={class:"tableActionBar"},wl=["href"],Cl=Object(i["createElementVNode"])("span",{class:"icon-table"},null,-1),Pl={key:1},Dl=["innerHTML"];function Al(e,t,n,l,a,r){const o=Object(i["resolveComponent"])("ContentBlock"),c=Object(i["resolveDirective"])("content-table");return Object(i["openBlock"])(),Object(i["createBlock"])(o,{"content-title":e.translate("Marketplace_OverviewPluginSubscriptions"),class:"subscriptionOverview"},{default:Object(i["withCtx"])(()=>[e.hasLicenseKey?(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",ul,[Object(i["createElementVNode"])("p",null,[Object(i["createTextVNode"])(Object(i["toDisplayString"])(e.translate("Marketplace_PluginSubscriptionsList"))+" ",1),e.loginUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,target:"_blank",rel:"noreferrer noopener",href:e.loginUrl},Object(i["toDisplayString"])(e.translate("Marketplace_OverviewPluginSubscriptionsAllDetails")),9,dl)):Object(i["createCommentVNode"])("",!0),pl,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Marketplace_OverviewPluginSubscriptionsMissingInfo"))+" ",1),ml,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Marketplace_NoValidSubscriptionNoUpdates"))+" ",1),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("Marketplace_CurrentNumPiwikUsers",`<strong>${e.numUsers}</strong>`))},null,8,bl)]),gl,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",null,Object(i["toDisplayString"])(e.translate("General_Name")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("Marketplace_SubscriptionType")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("Marketplace_SubscriptionStartDate")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("Marketplace_SubscriptionEndDate")),1),Object(i["createElementVNode"])("th",null,Object(i["toDisplayString"])(e.translate("Marketplace_SubscriptionNextPaymentDate")),1)])]),Object(i["createElementVNode"])("tbody",null,[(Object(i["openBlock"])(!0),Object(i["createElementBlock"])(i["Fragment"],null,Object(i["renderList"])(e.subscriptions||[],(t,n)=>(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",{key:n},[Object(i["createElementVNode"])("td",Ol,[t.plugin.htmlUrl?(Object(i["openBlock"])(),Object(i["createElementBlock"])("a",{key:0,href:t.plugin.htmlUrl,rel:"noreferrer noopener",target:"_blank"},Object(i["toDisplayString"])(t.plugin.displayName),9,jl)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",hl,Object(i["toDisplayString"])(t.plugin.displayName),1))]),Object(i["createElementVNode"])("td",kl,Object(i["toDisplayString"])(t.productType),1),Object(i["createElementVNode"])("td",{class:"subscriptionStatus",title:e.getSubscriptionStatusTitle(t)},[t.isValid?t.isExpiredSoon?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Nl)):""!==t.status&&"Active"!==t.status?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Vl)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",Sl)):(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",vl)),Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(t.status)+" ",1),t.isExceeded?(Object(i["openBlock"])(),Object(i["createElementBlock"])("span",{key:4,class:"errorMessage",title:e.translate("Marketplace_LicenseExceededPossibleCause")},[Bl,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Marketplace_Exceeded")),1)],8,El)):Object(i["createCommentVNode"])("",!0)],8,yl),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.start),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.isValid&&t.nextPayment?e.translate("Marketplace_LicenseRenewsNextPaymentDate"):t.end),1),Object(i["createElementVNode"])("td",null,Object(i["toDisplayString"])(t.nextPayment),1)]))),128)),e.subscriptions.length?Object(i["createCommentVNode"])("",!0):(Object(i["openBlock"])(),Object(i["createElementBlock"])("tr",Ml,[Object(i["createElementVNode"])("td",fl,Object(i["toDisplayString"])(e.translate("Marketplace_NoSubscriptionsFound")),1)]))])])),[[c]]),Object(i["createElementVNode"])("div",Tl,[Object(i["createElementVNode"])("a",{href:e.marketplaceOverviewLink,class:""},[Cl,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Marketplace_BrowseMarketplace")),1)],8,wl)])])):(Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Pl,[Object(i["createElementVNode"])("p",{innerHTML:e.$sanitize(e.missingLicenseText)},null,8,Dl)]))]),_:1},8,["content-title"])}var _l=Object(i["defineComponent"])({props:{loginUrl:{type:String,required:!0},numUsers:{type:Number,required:!0},hasLicenseKey:Boolean,subscriptions:{type:Array,required:!0}},components:{ContentBlock:b["ContentBlock"]},directives:{ContentTable:b["ContentTable"]},methods:{getSubscriptionStatusTitle(e){return e.isValid?e.isExpiredSoon?Object(b["translate"])("Marketplace_SubscriptionExpiresSoon"):void 0:Object(b["translate"])("Marketplace_SubscriptionInvalid")}},computed:{marketplaceOverviewLink(){return"?"+b["MatomoUrl"].stringify({module:"Marketplace",action:"overview"})},licenseKeyLink(){return"?"+b["MatomoUrl"].stringify({module:"Marketplace",action:"manageLicenseKey"})},missingLicenseText(){return Object(b["translate"])("Marketplace_OverviewPluginSubscriptionsMissingLicenseMessage",`<a href="${this.licenseKeyLink}">`,"</a>",`<a href="${this.marketplaceOverviewLink}">`,"</a>")}}});_l.render=Al;var Ll=_l;const Ul={class:"richMarketplaceMenuButton"},ql=Object(i["createElementVNode"])("hr",null,null,-1),xl={class:"intro"},Fl={class:"cta"},Rl=Object(i["createElementVNode"])("span",{class:"icon-marketplace"}," ",-1);function $l(e,t,n,l,a,r){return Object(i["openBlock"])(),Object(i["createElementBlock"])("div",Ul,[ql,Object(i["createElementVNode"])("p",xl,Object(i["toDisplayString"])(e.translate("Marketplace_RichMenuIntro")),1),Object(i["createElementVNode"])("p",Fl,[Object(i["createElementVNode"])("a",{class:"btn btn-outline",tabindex:"5",href:"",onClick:t[0]||(t[0]=Object(i["withModifiers"])(t=>e.$emit("action"),["prevent"])),onKeyup:t[1]||(t[1]=Object(i["withKeys"])(t=>e.$emit("action"),["enter"]))},[Rl,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("Marketplace_Marketplace")),1)],32)])])}var Il=Object(i["defineComponent"])({});Il.render=$l;var Hl=Il;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/}})}));
//# sourceMappingURL=Marketplace.umd.min.js.map