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

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--composer.json2
-rw-r--r--composer.lock45
-rw-r--r--core/RankingQuery.php2
-rw-r--r--plugins/CoreAdminHome/OptOutManager.php12
-rw-r--r--plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.js20
-rw-r--r--plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.min.js2
-rw-r--r--plugins/CoreAdminHome/vue/src/SmtpSettings/SmtpSettings.vue8
-rw-r--r--plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js45
-rw-r--r--plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js4
-rw-r--r--plugins/CorePluginsAdmin/vue/src/Field/Field.vue2
-rw-r--r--plugins/CorePluginsAdmin/vue/src/PasswordConfirmation/PasswordConfirmation.vue2
-rw-r--r--plugins/PrivacyManager/tests/Integration/PrivacyManagerTest.php44
-rw-r--r--plugins/Transitions/API.php39
-rw-r--r--plugins/Transitions/tests/Integration/TransitionsMaxAllowedPeriodTest.php15
-rw-r--r--plugins/Transitions/tests/System/TransitionsTest.php4
-rw-r--r--tests/PHPUnit/Unit/RankingQueryTest.php7
16 files changed, 173 insertions, 80 deletions
diff --git a/composer.json b/composer.json
index 3ddb117cf0..ceb498f02e 100644
--- a/composer.json
+++ b/composer.json
@@ -36,7 +36,7 @@
"require": {
"php": ">=7.2.5",
"composer/ca-bundle": "^1.2",
- "composer/semver": "~1.3.0",
+ "composer/semver": "^1.3.0",
"davaxi/sparkline": "~2.0",
"geoip2/geoip2": "^2.8",
"lox/xhprof": "dev-master",
diff --git a/composer.lock b/composer.lock
index 6025de5f9c..3066e9224b 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "8abf91a75153ccb117e1cacc82cc9fb5",
+ "content-hash": "fa4f82257142ad552c71348f6c0f6da0",
"packages": [
{
"name": "composer/ca-bundle",
@@ -84,24 +84,23 @@
},
{
"name": "composer/semver",
- "version": "1.3.0",
+ "version": "1.7.2",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
- "reference": "df4463baa9f44fe6cf0a6da4fde2934d4c0a2747"
+ "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/semver/zipball/df4463baa9f44fe6cf0a6da4fde2934d4c0a2747",
- "reference": "df4463baa9f44fe6cf0a6da4fde2934d4c0a2747",
+ "url": "https://api.github.com/repos/composer/semver/zipball/647490bbcaf7fc4891c58f47b825eb99d19c377a",
+ "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a",
"shasum": ""
},
"require": {
- "php": "^5.3.2 || ^7.0"
+ "php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.5 || ^5.0.5",
- "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0"
+ "phpunit/phpunit": "^4.5 || ^5.0.5"
},
"type": "library",
"extra": {
@@ -145,9 +144,23 @@
"support": {
"irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/semver/issues",
- "source": "https://github.com/composer/semver/tree/master"
+ "source": "https://github.com/composer/semver/tree/1.7.2"
},
- "time": "2016-02-25T22:23:39+00:00"
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-12-03T15:47:16+00:00"
},
{
"name": "davaxi/sparkline",
@@ -3083,16 +3096,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "8.5.30",
+ "version": "8.5.31",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "4fd448df9affda65a5faa58f8b93087d415216ce"
+ "reference": "33c126b09a42de5c99e5e8032b54e8221264a74e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4fd448df9affda65a5faa58f8b93087d415216ce",
- "reference": "4fd448df9affda65a5faa58f8b93087d415216ce",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/33c126b09a42de5c99e5e8032b54e8221264a74e",
+ "reference": "33c126b09a42de5c99e5e8032b54e8221264a74e",
"shasum": ""
},
"require": {
@@ -3160,7 +3173,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.30"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.31"
},
"funding": [
{
@@ -3176,7 +3189,7 @@
"type": "tidelift"
}
],
- "time": "2022-09-25T03:43:00+00:00"
+ "time": "2022-10-28T05:57:37+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
diff --git a/core/RankingQuery.php b/core/RankingQuery.php
index 162b24cd19..0ee5ee5b54 100644
--- a/core/RankingQuery.php
+++ b/core/RankingQuery.php
@@ -96,7 +96,7 @@ class RankingQuery
*/
public function __construct($limit = false)
{
- if ($limit !== false) {
+ if ($limit !==false) {
$this->setLimit($limit);
}
}
diff --git a/plugins/CoreAdminHome/OptOutManager.php b/plugins/CoreAdminHome/OptOutManager.php
index 53fce0d4d6..81b71a6b4c 100644
--- a/plugins/CoreAdminHome/OptOutManager.php
+++ b/plugins/CoreAdminHome/OptOutManager.php
@@ -356,10 +356,8 @@ HTML;
_paq.push(['setCookiePath', settings.cookiePath]);
}
if (this.isUserOptedOut()) {
- _paq.push(['forgetUserOptOut']);
showContent(false, null, true);
} else {
- _paq.push(['optUserOut']);
showContent(true, null, true);
}
}]);
@@ -457,12 +455,16 @@ JS;
}
},
hasConsent: function() {
- var value = this.getCookie(this.CONSENT_COOKIE_NAME);
- if (this.getCookie(this.CONSENT_REMOVED_COOKIE_NAME) && value) {
+ var consentCookie = this.getCookie(this.CONSENT_COOKIE_NAME);
+ var removedCookie = this.getCookie(this.CONSENT_REMOVED_COOKIE_NAME);
+ if (!consentCookie && !removedCookie) {
+ return true; // No cookies set, so opted in
+ }
+ if (removedCookie && consentCookie) {
this.setCookie(this.CONSENT_COOKIE_NAME, '', -129600000);
return false;
}
- return (value || value !== 0);
+ return (consentCookie || consentCookie !== 0);
},
consentGiven: function() {
this.setCookie(this.CONSENT_REMOVED_COOKIE_NAME, '', -129600000);
diff --git a/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.js b/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.js
index 7d1933be79..d38d44d017 100644
--- a/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.js
+++ b/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.js
@@ -681,12 +681,12 @@ var _window = window,
BrandingSettingsvue_type_script_lang_ts.render = BrandingSettingsvue_type_template_id_1802cbc6_render
/* harmony default export */ var BrandingSettings = (BrandingSettingsvue_type_script_lang_ts);
-// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreAdminHome/vue/src/SmtpSettings/SmtpSettings.vue?vue&type=template&id=a947f986
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreAdminHome/vue/src/SmtpSettings/SmtpSettings.vue?vue&type=template&id=14e9a186
-var SmtpSettingsvue_type_template_id_a947f986_hoisted_1 = {
+var SmtpSettingsvue_type_template_id_14e9a186_hoisted_1 = {
id: "smtpSettings"
};
-function SmtpSettingsvue_type_template_id_a947f986_render(_ctx, _cache, $props, $setup, $data, $options) {
+function SmtpSettingsvue_type_template_id_14e9a186_render(_ctx, _cache, $props, $setup, $data, $options) {
var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field");
var _component_SaveButton = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SaveButton");
@@ -709,7 +709,7 @@ function SmtpSettingsvue_type_template_id_a947f986_render(_ctx, _cache, $props,
}),
title: _ctx.translate('General_UseSMTPServerForEmail'),
"inline-help": _ctx.translate('General_SelectYesIfYouWantToSendEmailsViaServer')
- }, null, 8, ["modelValue", "title", "inline-help"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SmtpSettingsvue_type_template_id_a947f986_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
+ }, null, 8, ["modelValue", "title", "inline-help"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", SmtpSettingsvue_type_template_id_14e9a186_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
uicontrol: "text",
name: "mailHost",
"model-value": _ctx.mailHost,
@@ -745,7 +745,7 @@ function SmtpSettingsvue_type_template_id_a947f986_render(_ctx, _cache, $props,
}),
title: _ctx.translate('General_SmtpUsername'),
"inline-help": _ctx.translate('General_OnlyEnterIfRequired'),
- autocomplete: false
+ autocomplete: 'off'
}, null, 8, ["modelValue", "title", "inline-help"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
uicontrol: "password",
name: "mailPassword",
@@ -758,7 +758,7 @@ function SmtpSettingsvue_type_template_id_a947f986_render(_ctx, _cache, $props,
}),
title: _ctx.translate('General_SmtpPassword'),
"inline-help": _ctx.passwordHelp,
- autocomplete: false
+ autocomplete: 'off'
}, null, 8, ["model-value", "title", "inline-help"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
uicontrol: "text",
name: "mailFromAddress",
@@ -768,7 +768,7 @@ function SmtpSettingsvue_type_template_id_a947f986_render(_ctx, _cache, $props,
}),
title: _ctx.translate('General_SmtpFromAddress'),
"inline-help": _ctx.translate('General_SmtpFromEmailHelp', _ctx.mailHost),
- autocomplete: false
+ autocomplete: 'off'
}, null, 8, ["modelValue", "title", "inline-help"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
uicontrol: "text",
name: "mailFromName",
@@ -778,7 +778,7 @@ function SmtpSettingsvue_type_template_id_a947f986_render(_ctx, _cache, $props,
}),
title: _ctx.translate('General_SmtpFromName'),
"inline-help": _ctx.translate('General_NameShownInTheSenderColumn'),
- autocomplete: false
+ autocomplete: 'off'
}, null, 8, ["modelValue", "title", "inline-help"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
uicontrol: "select",
name: "mailEncryption",
@@ -799,7 +799,7 @@ function SmtpSettingsvue_type_template_id_a947f986_render(_ctx, _cache, $props,
_: 1
}, 8, ["content-title"]);
}
-// CONCATENATED MODULE: ./plugins/CoreAdminHome/vue/src/SmtpSettings/SmtpSettings.vue?vue&type=template&id=a947f986
+// CONCATENATED MODULE: ./plugins/CoreAdminHome/vue/src/SmtpSettings/SmtpSettings.vue?vue&type=template&id=14e9a186
// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreAdminHome/vue/src/SmtpSettings/SmtpSettings.vue?vue&type=script&lang=ts
@@ -910,7 +910,7 @@ function SmtpSettingsvue_type_template_id_a947f986_render(_ctx, _cache, $props,
-SmtpSettingsvue_type_script_lang_ts.render = SmtpSettingsvue_type_template_id_a947f986_render
+SmtpSettingsvue_type_script_lang_ts.render = SmtpSettingsvue_type_template_id_14e9a186_render
/* harmony default export */ var SmtpSettings = (SmtpSettingsvue_type_script_lang_ts);
// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CoreAdminHome/vue/src/JsTrackingCodeGenerator/JsTrackingCodeGenerator.vue?vue&type=template&id=ab152b6e
diff --git a/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.min.js b/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.min.js
index aa90cafd3f..daffcebdcc 100644
--- a/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.min.js
+++ b/plugins/CoreAdminHome/vue/dist/CoreAdminHome.umd.min.js
@@ -1,4 +1,4 @@
-(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["CoreAdminHome"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["CoreAdminHome"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CoreAdminHome/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,"ArchivingSettings",(function(){return E})),n.d(t,"BrandingSettings",(function(){return Y})),n.d(t,"SmtpSettings",(function(){return te})),n.d(t,"JsTrackingCodeGenerator",(function(){return bt})),n.d(t,"ImageTrackingCodeGenerator",(function(){return Gt})),n.d(t,"TrackingFailures",(function(){return bn})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var a=n("8bbf"),i={class:"form-group row"},l={class:"col s12"},c={class:"col s12 m6"},s={class:"form-description",style:{"margin-left":"4px"}},d={for:"enableBrowserTriggerArchiving2"},u=["innerHTML"],m={class:"col s12 m6"},g=["innerHTML"],p={class:"form-group row"},b={class:"col s12"},h={class:"input-field col s12 m6"},j=["disabled"],f={class:"form-description"},v={class:"col s12 m6"},O={key:0,class:"form-help"},C={key:0},k=Object(a["createElementVNode"])("br",null,null,-1),V=Object(a["createElementVNode"])("br",null,null,-1),S=Object(a["createElementVNode"])("br",null,null,-1);function N(e,t,n,o,r,N){var y=Object(a["resolveComponent"])("SaveButton"),T=Object(a["resolveComponent"])("ContentBlock");return Object(a["openBlock"])(),Object(a["createBlock"])(T,{"content-title":e.translate("CoreAdminHome_ArchivingSettings"),anchor:"archivingSettings",class:"matomo-archiving-settings"},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",i,[Object(a["createElementVNode"])("h3",l,Object(a["toDisplayString"])(e.translate("General_AllowPiwikArchivingToTriggerBrowser")),1),Object(a["createElementVNode"])("div",c,[Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("label",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"radio",id:"enableBrowserTriggerArchiving1",name:"enableBrowserTriggerArchiving",value:"1","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.enableBrowserTriggerArchivingValue=t})},null,512),[[a["vModelRadio"],e.enableBrowserTriggerArchivingValue]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("General_Yes")),1),Object(a["createElementVNode"])("span",s,Object(a["toDisplayString"])(e.translate("General_Default")),1)])]),Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("label",d,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"radio",id:"enableBrowserTriggerArchiving2",name:"enableBrowserTriggerArchiving",value:"0","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.enableBrowserTriggerArchivingValue=t})},null,512),[[a["vModelRadio"],e.enableBrowserTriggerArchivingValue]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("General_No")),1),Object(a["createElementVNode"])("span",{class:"form-description",innerHTML:e.$sanitize(e.archivingTriggerDesc),style:{"margin-left":"4px"}},null,8,u)])])]),Object(a["createElementVNode"])("div",m,[Object(a["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.archivingInlineHelp)},null,8,g)])]),Object(a["createElementVNode"])("div",p,[Object(a["createElementVNode"])("h3",b,Object(a["toDisplayString"])(e.translate("General_ReportsContainingTodayWillBeProcessedAtMostEvery")),1),Object(a["createElementVNode"])("div",h,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[2]||(t[2]=function(t){return e.todayArchiveTimeToLiveValue=t}),id:"todayArchiveTimeToLive",disabled:!e.isGeneralSettingsAdminEnabled},null,8,j),[[a["vModelText"],e.todayArchiveTimeToLiveValue]]),Object(a["createElementVNode"])("span",f,Object(a["toDisplayString"])(e.translate("General_RearchiveTimeIntervalOnlyForTodayReports")),1)]),Object(a["createElementVNode"])("div",v,[e.isGeneralSettingsAdminEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",O,[e.showWarningCron?(Object(a["openBlock"])(),Object(a["createElementBlock"])("strong",C,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_NewReportsWillBeProcessedByCron")),1),k,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_ReportsWillBeProcessedAtMostEveryHour"))+" "+Object(a["toDisplayString"])(e.translate("General_IfArchivingIsFastYouCanSetupCronRunMoreOften")),1),V])):Object(a["createCommentVNode"])("",!0),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_SmallTrafficYouCanLeaveDefault",e.todayArchiveTimeToLiveDefault))+" ",1),S,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_MediumToHighTrafficItIsRecommendedTo",1800,3600)),1)])):Object(a["createCommentVNode"])("",!0)])]),Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(y,{saving:e.isLoading,onConfirm:t[3]||(t[3]=function(t){return e.save()})},null,8,["saving"])])])]})),_:1},8,["content-title"])}var y=n("19dc"),T=n("a5a2"),A=Object(a["defineComponent"])({props:{enableBrowserTriggerArchiving:Boolean,showSegmentArchiveTriggerInfo:Boolean,isGeneralSettingsAdminEnabled:Boolean,showWarningCron:Boolean,todayArchiveTimeToLive:Number,todayArchiveTimeToLiveDefault:Number},components:{ContentBlock:y["ContentBlock"],SaveButton:T["SaveButton"]},data:function(){return{isLoading:!1,enableBrowserTriggerArchivingValue:this.enableBrowserTriggerArchiving?1:0,todayArchiveTimeToLiveValue:this.todayArchiveTimeToLive}},watch:{enableBrowserTriggerArchiving:function(e){this.enableBrowserTriggerArchivingValue=e?1:0},todayArchiveTimeToLive:function(e){this.todayArchiveTimeToLiveValue=e}},computed:{archivingTriggerDesc:function(){var e="";return e+=Object(y["translate"])("General_ArchivingTriggerDescription",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/docs/setup-auto-archiving/">',"</a>"),this.showSegmentArchiveTriggerInfo&&(e+=Object(y["translate"])("General_ArchivingTriggerSegment")),e},archivingInlineHelp:function(){var e=Object(y["translate"])("General_ArchivingInlineHelp");return e+="<br/>",e+=Object(y["translate"])("General_SeeTheOfficialDocumentationForMoreInformation",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/docs/setup-auto-archiving/">',"</a>"),e}},methods:{save:function(){var e=this;this.isLoading=!0,y["AjaxHelper"].post({module:"API",method:"CoreAdminHome.setArchiveSettings"},{enableBrowserTriggerArchiving:this.enableBrowserTriggerArchivingValue,todayArchiveTimeToLive:this.todayArchiveTimeToLiveValue}).then((function(){e.isLoading=!1;var t=y["NotificationsStore"].show({message:Object(y["translate"])("CoreAdminHome_SettingsSaveSuccess"),type:"transient",id:"generalSettings",context:"success"});y["NotificationsStore"].scrollToNotification(t)})).finally((function(){e.isLoading=!1}))}}});A.render=N;var E=A,w={id:"logoSettings"},_={id:"logoUploadForm",ref:"logoUploadForm",method:"post",enctype:"multipart/form-data",action:"index.php?module=CoreAdminHome&format=json&action=uploadCustomLogo"},H={key:0},D=["value"],L=Object(a["createElementVNode"])("input",{type:"hidden",name:"force_api_session",value:"1"},null,-1),x={key:0},B={key:0,class:"alert alert-warning uploaderror"},U={class:"row"},F={class:"col s12"},I=["src"],G={class:"row"},P={class:"col s12"},M=["src"],q={key:1},J=["innerHTML"],R={key:1},W={class:"alert alert-warning"};function $(e,t,n,o,r,i){var l=Object(a["resolveComponent"])("Field"),c=Object(a["resolveComponent"])("SaveButton"),s=Object(a["resolveComponent"])("ContentBlock"),d=Object(a["resolveDirective"])("form");return Object(a["openBlock"])(),Object(a["createBlock"])(s,{"content-title":e.translate("CoreAdminHome_BrandingSettings"),anchor:"brandingSettings"},{default:Object(a["withCtx"])((function(){return[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CoreAdminHome_CustomLogoHelpText")),1),Object(a["createVNode"])(l,{name:"useCustomLogo",uicontrol:"checkbox","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onUseCustomLogoChange(t)}),title:e.translate("CoreAdminHome_UseCustomLogo"),"inline-help":e.help},null,8,["model-value","title","inline-help"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",w,[Object(a["createElementVNode"])("form",_,[e.fileUploadEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",H,[Object(a["createElementVNode"])("input",{type:"hidden",name:"token_auth",value:e.tokenAuth},null,8,D),L,e.logosWriteable?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",x,[Object(a["createVNode"])(a["Transition"],{name:"fade-out"},{default:Object(a["withCtx"])((function(){return[e.showUploadError?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",B,Object(a["toDisplayString"])(e.translate("CoreAdminHome_LogoUploadFailed")),1)):Object(a["createCommentVNode"])("",!0)]})),_:1}),Object(a["createVNode"])(l,{uicontrol:"file",name:"customLogo","model-value":e.customLogo,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.onCustomLogoChange(t)}),title:e.translate("CoreAdminHome_LogoUpload"),"inline-help":e.translate("CoreAdminHome_LogoUploadHelp","JPG / PNG / GIF","110")},null,8,["model-value","title","inline-help"]),Object(a["createElementVNode"])("div",U,[Object(a["createElementVNode"])("div",F,[Object(a["createElementVNode"])("img",{src:e.pathUserLogoWithBuster,id:"currentLogo",style:{"max-height":"150px"},ref:"currentLogo"},null,8,I)])]),Object(a["createVNode"])(l,{uicontrol:"file",name:"customFavicon","model-value":e.customFavicon,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.onFaviconChange(t)}),title:e.translate("CoreAdminHome_FaviconUpload"),"inline-help":e.translate("CoreAdminHome_LogoUploadHelp","JPG / PNG / GIF","16")},null,8,["model-value","title","inline-help"]),Object(a["createElementVNode"])("div",G,[Object(a["createElementVNode"])("div",P,[Object(a["createElementVNode"])("img",{src:e.pathUserFaviconWithBuster,id:"currentFavicon",width:"16",height:"16",ref:"currentFavicon"},null,8,M)])])])):Object(a["createCommentVNode"])("",!0),e.logosWriteable?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",q,[Object(a["createElementVNode"])("div",{class:"alert alert-warning",innerHTML:e.$sanitize(e.logosNotWriteableWarning)},null,8,J)]))])):Object(a["createCommentVNode"])("",!0),e.fileUploadEnabled?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",R,[Object(a["createElementVNode"])("div",W,Object(a["toDisplayString"])(e.translate("CoreAdminHome_FileUploadDisabled","file_uploads=1")),1)]))],512)],512),[[a["vShow"],e.enabled]]),Object(a["createVNode"])(c,{onConfirm:t[3]||(t[3]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512),[[d]])]})),_:1},8,["content-title"])}var K=window,z=K.$,Q=Object(a["defineComponent"])({props:{fileUploadEnabled:{type:Boolean,required:!0},logosWriteable:{type:Boolean,required:!0},useCustomLogo:{type:Boolean,required:!0},pathUserLogoDirectory:{type:String,required:!0},pathUserLogo:{type:String,required:!0},pathUserLogoSmall:{type:String,required:!0},pathUserLogoSvg:{type:String,required:!0},hasUserLogo:{type:Boolean,required:!0},pathUserFavicon:{type:String,required:!0},hasUserFavicon:{type:Boolean,required:!0},isPluginsAdminEnabled:{type:Boolean,required:!0}},components:{Field:T["Field"],ContentBlock:y["ContentBlock"],SaveButton:T["SaveButton"]},directives:{Form:T["Form"]},data:function(){return{isLoading:!1,enabled:this.useCustomLogo,customLogo:this.pathUserLogo,customFavicon:this.pathUserFavicon,showUploadError:!1,currentLogoSrcExists:this.hasUserLogo,currentFaviconSrcExists:this.hasUserFavicon,currentLogoCacheBuster:(new Date).getTime(),currentFaviconCacheBuster:(new Date).getTime()}},computed:{tokenAuth:function(){return y["Matomo"].token_auth},logosNotWriteableWarning:function(){return Object(y["translate"])("CoreAdminHome_LogoNotWriteableInstruction","<code>".concat(this.pathUserLogoDirectory,"</code><br/>"),"".concat(this.pathUserLogo,", ").concat(this.pathUserLogoSmall,", ").concat(this.pathUserLogoSvg))},help:function(){if(this.isPluginsAdminEnabled){var e='"'.concat(Object(y["translate"])("General_GiveUsYourFeedback"),'"'),t='<a href="?module=CorePluginsAdmin&action=plugins" rel="noreferrer noopener" target="_blank">';return Object(y["translate"])("CoreAdminHome_CustomLogoFeedbackInfo",e,t,"</a>")}},pathUserLogoWithBuster:function(){return this.currentLogoSrcExists&&this.pathUserLogo?"".concat(this.pathUserLogo,"?").concat(this.currentLogoCacheBuster):""},pathUserFaviconWithBuster:function(){return this.currentFaviconSrcExists&&this.pathUserFavicon?"".concat(this.pathUserFavicon,"?").concat(this.currentFaviconCacheBuster):""}},methods:{onUseCustomLogoChange:function(e){this.enabled=e},onCustomLogoChange:function(e){this.customLogo=e,this.updateLogo()},onFaviconChange:function(e){this.customFavicon=e,this.updateLogo()},save:function(){var e=this;this.isLoading=!0,y["AjaxHelper"].post({module:"API",method:"CoreAdminHome.setBrandingSettings"},{useCustomLogo:this.enabled?"1":"0"}).then((function(){var e=y["NotificationsStore"].show({message:Object(y["translate"])("CoreAdminHome_SettingsSaveSuccess"),type:"transient",id:"generalSettings",context:"success"});y["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))},updateLogo:function(){var e=this,t=!!this.customLogo,n=!!this.customFavicon;if(t||n){this.showUploadError=!1;var o="upload".concat((new Date).getTime()),r=z('<iframe name="'.concat(o,'" />'));r.css("display","none"),r.on("load",(function(){setTimeout((function(){var o=(z(r.contents()).find("body").html()||"").trim();"0"===o?e.showUploadError=!0:(t&&(e.currentLogoSrcExists=!0,e.currentLogoCacheBuster=(new Date).getTime()),n&&(e.currentFaviconSrcExists=!0,e.currentFaviconCacheBuster=(new Date).getTime())),"1"!==o&&"0"!==o||r.remove()}),1e3)})),z("body:first").append(r);var a=z(this.$refs.logoUploadForm);a.attr("target",o),a.submit(),this.customLogo="",this.customFavicon=""}}}});Q.render=$;var Y=Q,X={id:"smtpSettings"};function Z(e,t,n,o,r,i){var l=Object(a["resolveComponent"])("Field"),c=Object(a["resolveComponent"])("SaveButton"),s=Object(a["resolveComponent"])("ContentBlock"),d=Object(a["resolveDirective"])("form");return Object(a["openBlock"])(),Object(a["createBlock"])(s,{"content-title":e.translate("CoreAdminHome_EmailServerSettings"),anchor:"mailSettings"},{default:Object(a["withCtx"])((function(){return[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"mailUseSmtp",modelValue:e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.enabled=t}),title:e.translate("General_UseSMTPServerForEmail"),"inline-help":e.translate("General_SelectYesIfYouWantToSendEmailsViaServer")},null,8,["modelValue","title","inline-help"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",X,[Object(a["createVNode"])(l,{uicontrol:"text",name:"mailHost","model-value":e.mailHost,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.onUpdateMailHost(t)}),title:e.translate("General_SmtpServerAddress")},null,8,["model-value","title"]),Object(a["createVNode"])(l,{uicontrol:"text",name:"mailPort",modelValue:e.mailPort,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.mailPort=t}),title:e.translate("General_SmtpPort"),"inline-help":e.translate("General_OptionalSmtpPort")},null,8,["modelValue","title","inline-help"]),Object(a["createVNode"])(l,{uicontrol:"select",name:"mailType",modelValue:e.mailType,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.mailType=t}),title:e.translate("General_AuthenticationMethodSmtp"),options:e.mailTypes,"inline-help":e.translate("General_OnlyUsedIfUserPwdIsSet")},null,8,["modelValue","title","options","inline-help"]),Object(a["createVNode"])(l,{uicontrol:"text",name:"mailUsername",modelValue:e.mailUsername,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.mailUsername=t}),title:e.translate("General_SmtpUsername"),"inline-help":e.translate("General_OnlyEnterIfRequired"),autocomplete:!1},null,8,["modelValue","title","inline-help"]),Object(a["createVNode"])(l,{uicontrol:"password",name:"mailPassword","model-value":e.mailPassword,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.onMailPasswordChange(t)}),onClick:t[6]||(t[6]=function(t){!e.passwordChanged&&t.target.select()}),title:e.translate("General_SmtpPassword"),"inline-help":e.passwordHelp,autocomplete:!1},null,8,["model-value","title","inline-help"]),Object(a["createVNode"])(l,{uicontrol:"text",name:"mailFromAddress",modelValue:e.mailFromAddress,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.mailFromAddress=t}),title:e.translate("General_SmtpFromAddress"),"inline-help":e.translate("General_SmtpFromEmailHelp",e.mailHost),autocomplete:!1},null,8,["modelValue","title","inline-help"]),Object(a["createVNode"])(l,{uicontrol:"text",name:"mailFromName",modelValue:e.mailFromName,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.mailFromName=t}),title:e.translate("General_SmtpFromName"),"inline-help":e.translate("General_NameShownInTheSenderColumn"),autocomplete:!1},null,8,["modelValue","title","inline-help"]),Object(a["createVNode"])(l,{uicontrol:"select",name:"mailEncryption",modelValue:e.mailEncryption,"onUpdate:modelValue":t[9]||(t[9]=function(t){return e.mailEncryption=t}),title:e.translate("General_SmtpEncryption"),options:e.mailEncryptions,"inline-help":e.translate("General_EncryptedSmtpTransport")},null,8,["modelValue","title","options","inline-help"])],512),[[a["vShow"],e.enabled]]),Object(a["createVNode"])(c,{onConfirm:t[10]||(t[10]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512),[[d]])]})),_:1},8,["content-title"])}var ee=Object(a["defineComponent"])({props:{mail:{type:Object,required:!0},mailTypes:{type:Object,required:!0},mailEncryptions:{type:Object,required:!0}},data:function(){var e=this.mail;return{isLoading:!1,enabled:"smtp"===e.transport,mailHost:e.host,passwordChanged:!1,mailPort:e.port,mailType:e.type,mailUsername:e.username,mailPassword:e.password?"******":"",mailFromAddress:e.noreply_email_address,mailFromName:e.noreply_email_name,mailEncryption:e.encryption}},components:{ContentBlock:y["ContentBlock"],Field:T["Field"],SaveButton:T["SaveButton"]},directives:{Form:T["Form"]},computed:{passwordHelp:function(){var e="".concat(Object(y["translate"])("General_OnlyEnterIfRequiredPassword"),"<br/>"),t="".concat(Object(y["translate"])("General_WarningPasswordStored","<strong>","</strong>"),"<br/>");return"".concat(e,"\n").concat(t)}},methods:{onUpdateMailHost:function(e){this.mailHost=e,this.passwordChanged||(this.mailPassword="",this.passwordChanged=!0)},onMailPasswordChange:function(e){this.mailPassword=e,this.passwordChanged=!0},save:function(){var e=this;this.isLoading=!0;var t={mailUseSmtp:this.enabled?"1":"0",mailPort:this.mailPort,mailHost:this.mailHost,mailType:this.mailType,mailUsername:this.mailUsername,mailFromAddress:this.mailFromAddress,mailFromName:this.mailFromName,mailEncryption:this.mailEncryption};this.passwordChanged&&(t.mailPassword=this.mailPassword),y["AjaxHelper"].post({module:"CoreAdminHome",action:"setMailSettings"},t,{withTokenInUrl:!0}).then((function(){var e=y["NotificationsStore"].show({message:Object(y["translate"])("CoreAdminHome_SettingsSaveSuccess"),type:"transient",id:"generalSettings",context:"success"});y["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))}}});ee.render=Z;var te=ee,ne={id:"js-code-options"},oe=Object(a["createElementVNode"])("br",null,null,-1),re=Object(a["createElementVNode"])("br",null,null,-1),ae=["innerHTML"],ie=["innerHTML"],le=Object(a["createElementVNode"])("br",null,null,-1),ce=Object(a["createElementVNode"])("br",null,null,-1),se=["innerHTML"],de=Object(a["createElementVNode"])("br",null,null,-1),ue=Object(a["createElementVNode"])("br",null,null,-1),me=["innerHTML"],ge=Object(a["createElementVNode"])("br",null,null,-1),pe=Object(a["createElementVNode"])("br",null,null,-1),be=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-tracking-code-on-wordpress/",target:"_blank",rel:"noopener"},"WordPress",-1),he=Object(a["createTextVNode"])(" | "),je=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/new-to-piwik/how-do-i-integrate-matomo-with-squarespace-website/",target:"_blank",rel:"noopener"},"Squarespace",-1),fe=Object(a["createTextVNode"])(" | "),ve=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-analytics-tracking-code-on-wix/",target:"_blank",rel:"noopener"},"Wix",-1),Oe=Object(a["createTextVNode"])(" | "),Ce=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/how-to-install/faq_19424/",target:"_blank",rel:"noopener"},"SharePoint",-1),ke=Object(a["createTextVNode"])(" | "),Ve=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-analytics-tracking-code-on-joomla/",target:"_blank",rel:"noopener"},"Joomla",-1),Se=Object(a["createTextVNode"])(" | "),Ne=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-tracking-code-on-my-shopify-store/",target:"_blank",rel:"noopener"},"Shopify",-1),ye=Object(a["createTextVNode"])(" | "),Te=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/new-to-piwik/how-do-i-use-matomo-analytics-within-gtm-google-tag-manager/",target:"_blank",rel:"noopener"},"Google Tag Manager",-1),Ae={id:"javascript-output-section"},Ee={class:"valign-wrapper trackingHelpHeader matchWidth"},we={id:"javascript-text"},_e=["textContent"],He={id:"optional-js-tracking-options"},De={id:"jsTrackAllSubdomainsInlineHelp",class:"inline-help-node"},Le=["innerHTML"],xe=["innerHTML"],Be={id:"jsTrackGroupByDomainInlineHelp",class:"inline-help-node"},Ue={id:"jsTrackAllAliasesInlineHelp",class:"inline-help-node"},Fe={id:"javascript-advanced-options"},Ie={id:"javascript-tracking-visitor-cv"},Ge={class:"row"},Pe={class:"col s12 m3"},Me={class:"col s12 m3"},qe={class:"col s12 m6 l3"},Je=["onKeydown"],Re={class:"col s12 m6 l3"},We=["onKeydown"],$e={class:"row"},Ke={class:"col s12"},ze=Object(a["createElementVNode"])("span",{class:"icon-add"},null,-1),Qe={id:"jsCrossDomain",class:"inline-help-node"},Ye=Object(a["createElementVNode"])("br",null,null,-1),Xe={id:"jsDoNotTrackInlineHelp",class:"inline-help-node"},Ze={key:0},et=Object(a["createElementVNode"])("br",null,null,-1),tt=["innerHTML"],nt={id:"js-campaign-query-param-extra"},ot={class:"row"},rt={class:"col s12"},at={class:"row"},it={class:"col s12"};function lt(e,t,n,o,r,i){var l=Object(a["resolveComponent"])("Field"),c=Object(a["resolveComponent"])("ContentBlock"),s=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createBlock"])(c,{anchor:"javaScriptTracking","content-title":e.translate("CoreAdminHome_JavaScriptTracking")},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",ne,[Object(a["createElementVNode"])("p",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTrackingIntro1"))+" ",1),oe,re,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTrackingIntro2"))+" ",1),Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro3a)},null,8,ae),Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(" "+e.jsTrackingIntro3b)},null,8,ie),le,ce,Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro4a)},null,8,se),de,ue,Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro5)},null,8,me),ge,pe,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("SitesManager_InstallationGuides"))+" : ",1),be,he,je,fe,ve,Oe,Ce,ke,Ve,Se,Ne,ye,Te]),Object(a["createVNode"])(l,{uicontrol:"site",name:"js-tracker-website",class:"jsTrackingCodeWebsite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),introduction:e.translate("General_Website")},null,8,["modelValue","introduction"]),Object(a["createElementVNode"])("div",Ae,[Object(a["createElementVNode"])("div",Ee,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("h3",null,Object(a["toDisplayString"])(e.translate("General_JsTrackingTag")),1),Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CodeNoteBeforeClosingHead","</head>")),1)]),Object(a["createElementVNode"])("button",{class:"btn",id:"emailJsBtn",onClick:t[1]||(t[1]=function(t){return e.sendEmail()})},Object(a["toDisplayString"])(e.translate("SitesManager_EmailInstructionsButton")),1)]),Object(a["createElementVNode"])("div",we,[Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",{class:"codeblock",textContent:Object(a["toDisplayString"])(e.trackingCode),ref:"trackingCode"},null,8,_e),[[s,{}]])])]),Object(a["createElementVNode"])("div",He,[Object(a["createElementVNode"])("div",De,[Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.mergeSubdomainsDesc)},null,8,Le),Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.learnMoreText)},null,8,xe)]),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-all-subdomains","model-value":e.trackAllSubdomains,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.trackAllSubdomains=t,e.updateTrackingCode()}),disabled:e.isLoading,introduction:e.translate("General_Options"),title:"".concat(e.translate("CoreAdminHome_JSTracking_MergeSubdomains")," ").concat(e.currentSiteName),"inline-help":"#jsTrackAllSubdomainsInlineHelp"},null,8,["model-value","disabled","introduction","title"])]),Object(a["createElementVNode"])("div",Be,Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_GroupPageTitlesByDomainDesc1",e.currentSiteHost)),1),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-group-by-domain","model-value":e.groupByDomain,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.groupByDomain=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_GroupPageTitlesByDomain"),"inline-help":"#jsTrackGroupByDomainInlineHelp"},null,8,["model-value","disabled","title"]),Object(a["createElementVNode"])("div",Ue,Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_MergeAliasesDesc",e.currentSiteAlias)),1),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-all-aliases","model-value":e.trackAllAliases,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.trackAllAliases=t,e.updateTrackingCode()}),disabled:e.isLoading,title:"".concat(e.translate("CoreAdminHome_JSTracking_MergeAliases")," ").concat(e.currentSiteName),"inline-help":"#jsTrackAllAliasesInlineHelp"},null,8,["model-value","disabled","title"])]),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-noscript","model-value":e.trackNoScript,"onUpdate:modelValue":t[5]||(t[5]=function(t){e.trackNoScript=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_TrackNoScript")},null,8,["model-value","disabled","title"]),Object(a["createElementVNode"])("h3",null,Object(a["toDisplayString"])(e.translate("Mobile_Advanced")),1),Object(a["createElementVNode"])("p",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("a",{href:"javascript:;",onClick:t[6]||(t[6]=Object(a["withModifiers"])((function(t){return e.showAdvanced=!0}),["prevent"]))},Object(a["toDisplayString"])(e.translate("General_Show")),513),[[a["vShow"],!e.showAdvanced]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("a",{href:"javascript:;",onClick:t[7]||(t[7]=Object(a["withModifiers"])((function(t){return e.showAdvanced=!1}),["prevent"]))},Object(a["toDisplayString"])(e.translate("General_Hide")),513),[[a["vShow"],e.showAdvanced]])]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Fe,[Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-visitor-cv-check","model-value":e.trackCustomVars,"onUpdate:modelValue":t[8]||(t[8]=function(t){e.trackCustomVars=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_VisitorCustomVars"),"inline-help":e.translate("CoreAdminHome_JSTracking_VisitorCustomVarsDesc")},null,8,["model-value","disabled","title","inline-help"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Ie,[Object(a["createElementVNode"])("div",Ge,[Object(a["createElementVNode"])("div",Pe,Object(a["toDisplayString"])(e.translate("General_Name")),1),Object(a["createElementVNode"])("div",Me,Object(a["toDisplayString"])(e.translate("General_Value")),1)]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.customVars,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"row",key:n},[Object(a["createElementVNode"])("div",qe,[Object(a["createElementVNode"])("input",{type:"text",class:"custom-variable-name",onKeydown:function(t){return e.onCustomVarNameKeydown(t,n)},placeholder:"e.g. Type"},null,40,Je)]),Object(a["createElementVNode"])("div",Re,[Object(a["createElementVNode"])("input",{type:"text",class:"custom-variable-value",onKeydown:function(t){return e.onCustomVarValueKeydown(t,n)},placeholder:"e.g. Customer"},null,40,We)])])})),128)),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",$e,[Object(a["createElementVNode"])("div",Ke,[Object(a["createElementVNode"])("a",{href:"javascript:;",onClick:t[9]||(t[9]=function(t){return e.addCustomVar()}),class:"add-custom-variable"},[ze,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_Add")),1)])])],512),[[a["vShow"],e.canAddMoreCustomVariables]])],512),[[a["vShow"],e.trackCustomVars]]),Object(a["createElementVNode"])("div",Qe,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CrossDomain"))+" ",1),Ye,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CrossDomain_NeedsMultipleDomains")),1)]),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-cross-domain","model-value":e.crossDomain,"onUpdate:modelValue":t[10]||(t[10]=function(t){e.crossDomain=t,e.updateTrackingCode(),e.onCrossDomainToggle()}),disabled:e.isLoading||!e.hasManySiteUrls,title:e.translate("CoreAdminHome_JSTracking_EnableCrossDomainLinking"),"inline-help":"#jsCrossDomain"},null,8,["model-value","disabled","title"]),Object(a["createElementVNode"])("div",Xe,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_EnableDoNotTrackDesc"))+" ",1),e.serverSideDoNotTrackEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Ze,[et,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_EnableDoNotTrack_AlreadyEnabled")),1)])):Object(a["createCommentVNode"])("",!0)]),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-do-not-track","model-value":e.doNotTrack,"onUpdate:modelValue":t[11]||(t[11]=function(t){e.doNotTrack=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_EnableDoNotTrack"),"inline-help":"#jsDoNotTrackInlineHelp"},null,8,["model-value","disabled","title"]),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-disable-cookies","model-value":e.disableCookies,"onUpdate:modelValue":t[12]||(t[12]=function(t){e.disableCookies=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_DisableCookies"),"inline-help":e.translate("CoreAdminHome_JSTracking_DisableCookiesDesc")},null,8,["model-value","disabled","title","inline-help"]),Object(a["createElementVNode"])("div",{id:"jsTrackCampaignParamsInlineHelp",class:"inline-help-node",innerHTML:e.$sanitize(e.jsTrackCampaignParamsInlineHelp)},null,8,tt),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"custom-campaign-query-params-check","model-value":e.useCustomCampaignParams,"onUpdate:modelValue":t[13]||(t[13]=function(t){e.useCustomCampaignParams=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CustomCampaignQueryParam"),"inline-help":"#jsTrackCampaignParamsInlineHelp"},null,8,["model-value","disabled","title"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",nt,[Object(a["createElementVNode"])("div",ot,[Object(a["createElementVNode"])("div",rt,[Object(a["createVNode"])(l,{uicontrol:"text",name:"custom-campaign-name-query-param","model-value":e.customCampaignName,"onUpdate:modelValue":t[14]||(t[14]=function(t){e.customCampaignName=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CampaignNameParam")},null,8,["model-value","disabled","title"])])]),Object(a["createElementVNode"])("div",at,[Object(a["createElementVNode"])("div",it,[Object(a["createVNode"])(l,{uicontrol:"text",name:"custom-campaign-keyword-query-param","model-value":e.customCampaignKeyword,"onUpdate:modelValue":t[15]||(t[15]=function(t){e.customCampaignKeyword=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CampaignKwdParam")},null,8,["model-value","disabled","title"])])])],512),[[a["vShow"],e.useCustomCampaignParams]])],512),[[a["vShow"],e.showAdvanced]])]})),_:1},8,["content-title"])}function ct(e){var t=new URL(e);return t.hostname}function st(e){return e.map((function(e){return[e.name,e.value]}))}var dt=window,ut=dt.$,mt=window.location.host,gt=window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/")),pt=Object(a["defineComponent"])({props:{defaultSite:{type:Object,required:!0},maxCustomVariables:Number,serverSideDoNotTrackEnabled:Boolean},data:function(){return{showAdvanced:!1,site:this.defaultSite,trackingCode:"",trackAllSubdomains:!1,isLoading:!1,siteUrls:{},siteExcludedQueryParams:{},siteExcludedReferrers:{},crossDomain:!1,groupByDomain:!1,trackAllAliases:!1,trackNoScript:!1,trackCustomVars:!1,customVars:[],canAddMoreCustomVariables:!!this.maxCustomVariables&&this.maxCustomVariables>0,doNotTrack:!1,disableCookies:!1,useCustomCampaignParams:!1,customCampaignName:"",customCampaignKeyword:"",trackingCodeAbortController:null,isHighlighting:!1}},components:{ContentBlock:y["ContentBlock"],Field:T["Field"]},directives:{SelectOnFocus:y["SelectOnFocus"]},created:function(){this.onCustomVarNameKeydown=Object(y["debounce"])(this.onCustomVarNameKeydown,100),this.onCustomVarValueKeydown=Object(y["debounce"])(this.onCustomVarValueKeydown,100),this.addCustomVar(),this.site&&this.site.id&&this.onSiteChanged(this.site)},watch:{site:function(e){this.onSiteChanged(e)}},methods:{onSiteChanged:function(e){var t=this,n=e.id,o=[];this.siteUrls[n]||(this.isLoading=!0,o.push(y["AjaxHelper"].fetch({module:"API",method:"SitesManager.getSiteUrlsFromId",idSite:n,filter_limit:"-1"}).then((function(e){t.siteUrls[n]=e||[]})))),this.siteExcludedQueryParams[n]||(this.isLoading=!0,o.push(y["AjaxHelper"].fetch({module:"API",method:"Overlay.getExcludedQueryParameters",idSite:n,filter_limit:"-1"}).then((function(e){t.siteExcludedQueryParams[n]=e||[]})))),this.siteExcludedReferrers[n]||(this.isLoading=!0,o.push(y["AjaxHelper"].fetch({module:"API",method:"SitesManager.getExcludedReferrers",idSite:n,filter_limit:"-1"}).then((function(e){t.siteExcludedReferrers[n]=[],Object.values(e||[]).forEach((function(e){t.siteExcludedReferrers[n].push(e.replace(/^https?:\/\//,""))}))})))),Promise.all(o).then((function(){t.isLoading=!1,t.updateCurrentSiteInfo(),t.updateTrackingCode()}))},sendEmail:function(){var e=Object(y["translate"])("SitesManager_EmailInstructionsSubject");e=encodeURIComponent(e);var t=this.trackingCode;t=t.replace(/<[^>]+>/g,"");var n="".concat(Object(y["translate"])("SitesManager_JsTrackingTagHelp"),". ").concat(Object(y["translate"])("CoreAdminHome_JSTracking_CodeNoteBeforeClosingHeadEmail","'head"),"\n").concat(t);n=encodeURIComponent(n);var o="mailto:?subject=".concat(e,"&body=").concat(n);window.location.href=o},onCrossDomainToggle:function(){this.crossDomain&&(this.trackAllAliases=!0)},updateTrackingCode:function(){var e=this,t=this.site,n={piwikUrl:"".concat(mt).concat(gt),groupPageTitlesByDomain:this.groupByDomain?1:0,mergeSubdomains:this.trackAllSubdomains?1:0,mergeAliasUrls:this.trackAllAliases?1:0,visitorCustomVariables:this.trackCustomVars?st(this.customVars):0,customCampaignNameQueryParam:null,customCampaignKeywordParam:null,doNotTrack:this.doNotTrack?1:0,disableCookies:this.disableCookies?1:0,crossDomain:this.crossDomain?1:0,trackNoScript:this.trackNoScript?1:0,forceMatomoEndpoint:1};this.siteExcludedQueryParams[t.id]&&(n.excludedQueryParams=this.siteExcludedQueryParams[t.id]),this.siteExcludedReferrers[t.id]&&(n.excludedReferrers=this.siteExcludedReferrers[t.id]),this.useCustomCampaignParams&&(n.customCampaignNameQueryParam=this.customCampaignName,n.customCampaignKeywordParam=this.customCampaignKeyword),this.trackingCodeAbortController&&(this.trackingCodeAbortController.abort(),this.trackingCodeAbortController=null),this.trackingCodeAbortController=new AbortController,y["AjaxHelper"].post({module:"API",format:"json",method:"SitesManager.getJavascriptTag",idSite:t.id},n,{abortController:this.trackingCodeAbortController}).then((function(t){e.trackingCodeAbortController=null,e.trackingCode=t.value;var n=ut(e.$refs.trackingCode);n&&!e.isHighlighting&&(e.isHighlighting=!0,n.effect("highlight",{complete:function(){e.isHighlighting=!1}},1500))}))},updateCurrentSiteInfo:function(){this.hasManySiteUrls||(this.crossDomain=!1)},addCustomVar:function(){this.canAddMoreCustomVariables&&this.customVars.push({name:"",value:""}),this.canAddMoreCustomVariables=!!this.maxCustomVariables&&this.maxCustomVariables>this.customVars.length},onCustomVarNameKeydown:function(e,t){var n=this;setTimeout((function(){n.customVars[t].name=e.target.value,n.updateTrackingCode()}))},onCustomVarValueKeydown:function(e,t){var n=this;setTimeout((function(){n.customVars[t].value=e.target.value,n.updateTrackingCode()}))}},computed:{hasManySiteUrls:function(){var e=this.site;return this.siteUrls[e.id]&&this.siteUrls[e.id].length>1},currentSiteHost:function(){var e,t=null===(e=this.siteUrls[this.site.id])||void 0===e?void 0:e[0];return t?ct(t):""},currentSiteAlias:function(){var e,t="x.".concat(this.currentSiteHost),n=null===(e=this.siteUrls[this.site.id])||void 0===e?void 0:e[1];return n||t},currentSiteName:function(){return y["Matomo"].helper.htmlEntities(this.site.name)},jsTrackingIntro3a:function(){return Object(y["translate"])("CoreAdminHome_JSTrackingIntro3a",'<a href="https://matomo.org/integrate/" rel="noreferrer noopener" target="_blank">',"</a>")},jsTrackingIntro3b:function(){return Object(y["translate"])("CoreAdminHome_JSTrackingIntro3b")},jsTrackingIntro4a:function(){return Object(y["translate"])("CoreAdminHome_JSTrackingIntro4",'<a href="#image-tracking-link">',"</a>")},jsTrackingIntro5:function(){return Object(y["translate"])("CoreAdminHome_JSTrackingIntro5",'<a rel="noreferrer noopener" target="_blank" href="https://developer.matomo.org/guides/tracking-javascript-guide">',"</a>")},mergeSubdomainsDesc:function(){return Object(y["translate"])("CoreAdminHome_JSTracking_MergeSubdomainsDesc","x.".concat(this.currentSiteHost),"y.".concat(this.currentSiteHost))},learnMoreText:function(){var e="https://developer.matomo.org/guides/tracking-javascript-guide#measuring-domains-andor-sub-domains";return Object(y["translate"])("General_LearnMore",' (<a href="'.concat(e,'" rel="noreferrer noopener" target="_blank">'),"</a>)")},jsTrackCampaignParamsInlineHelp:function(){return Object(y["translate"])("CoreAdminHome_JSTracking_CustomCampaignQueryParamDesc",'<a href="https://matomo.org/faq/general/faq_119" rel="noreferrer noopener" target="_blank">',"</a>")}}});pt.render=lt;var bt=pt,ht=Object(a["createElementVNode"])("a",{name:"image-tracking-link"},null,-1),jt={id:"image-tracking-code-options"},ft=["innerHTML"],vt=["innerHTML"],Ot={id:"image-tracking-goal-sub"},Ct={class:"row"},kt={class:"col s12 m6"},Vt={class:"col s12 m6"},St={id:"image-link-output-section"},Nt={id:"image-tracking-text"},yt=["textContent"];function Tt(e,t,n,o,r,i){var l=Object(a["resolveComponent"])("Field"),c=Object(a["resolveComponent"])("ContentBlock"),s=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createBlock"])(c,{"content-title":e.translate("CoreAdminHome_ImageTracking"),anchor:"imageTracking"},{default:Object(a["withCtx"])((function(){return[ht,Object(a["createElementVNode"])("div",jt,[Object(a["createElementVNode"])("p",{innerHTML:e.$sanitize(e.imageTrackingIntro)},null,8,ft),Object(a["createElementVNode"])("p",{innerHTML:e.$sanitize(e.imageTrackingIntro3)},null,8,vt),Object(a["createVNode"])(l,{uicontrol:"site",name:"image-tracker-website",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),introduction:e.translate("General_Website")},null,8,["modelValue","introduction"]),Object(a["createVNode"])(l,{uicontrol:"text",name:"image-tracker-action-name","model-value":e.pageName,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.pageName=t,e.updateTrackingCode()}),disabled:e.isLoading,introduction:e.translate("General_Options"),title:e.translate("Actions_ColumnPageName")},null,8,["model-value","disabled","introduction","title"]),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"image-tracking-goal-check","model-value":e.trackGoal,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.trackGoal=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_TrackAGoal")},null,8,["model-value","disabled","title"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Ot,[Object(a["createElementVNode"])("div",Ct,[Object(a["createElementVNode"])("div",kt,[Object(a["createVNode"])(l,{uicontrol:"select",name:"image-tracker-goal",options:e.siteGoals,disabled:e.isLoading,"model-value":e.trackIdGoal,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.trackIdGoal=t,e.updateTrackingCode()})},null,8,["options","disabled","model-value"])]),Object(a["createElementVNode"])("div",Vt,[Object(a["createVNode"])(l,{uicontrol:"text",name:"image-revenue","model-value":e.revenue,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.revenue=t,e.updateTrackingCode()}),disabled:e.isLoading,"full-width":!0,title:"".concat(e.translate("CoreAdminHome_WithOptionalRevenue")," ").concat(e.currentSiteCurrency)},null,8,["model-value","disabled","title"])])])],512),[[a["vShow"],e.trackGoal]]),Object(a["createElementVNode"])("div",St,[Object(a["createElementVNode"])("h3",null,Object(a["toDisplayString"])(e.translate("CoreAdminHome_ImageTrackingLink")),1),Object(a["createElementVNode"])("div",Nt,[Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",{textContent:Object(a["toDisplayString"])(e.trackingCode),ref:"trackingCode"},null,8,yt),[[s,{}]])])])])]})),_:1},8,["content-title"])}function At(e,t){return Dt(e)||Ht(e,t)||wt(e,t)||Et()}function Et(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function wt(e,t){if(e){if("string"===typeof e)return _t(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_t(e,t):void 0}}function _t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Ht(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(o=n.next()).done);i=!0)if(a.push(o.value),t&&a.length===t)break}catch(c){l=!0,r=c}finally{try{i||null==n["return"]||n["return"]()}finally{if(l)throw r}}return a}}function Dt(e){if(Array.isArray(e))return e}var Lt=null,xt=window,Bt=xt.$,Ut=window.location.host,Ft=window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/")),It=Object(a["defineComponent"])({props:{defaultSite:{type:Object,required:!0}},components:{ContentBlock:y["ContentBlock"],Field:T["Field"]},directives:{SelectOnFocus:y["SelectOnFocus"]},data:function(){return{isLoading:!1,site:this.defaultSite,pageName:"",trackGoal:!1,trackIdGoal:null,revenue:"",trackingCode:"",sites:{},goals:{},trackingCodeAbortController:null,isHighlighting:!1}},created:function(){this.updateTrackingCode=Object(y["debounce"])(this.updateTrackingCode),this.site&&this.site.id&&this.onSiteChanged(this.site)},watch:{site:function(e){this.onSiteChanged(e)}},methods:{onSiteChanged:function(e){var t,n,o,r=this;return this.trackIdGoal=null,Lt?t=Promise.resolve(Lt):(this.isLoading=!0,t=y["AjaxHelper"].fetch({method:"SitesManager.getCurrencySymbols",filter_limit:"-1"})),this.sites[e.id]?n=Promise.resolve(this.sites[e.id]):(this.isLoading=!0,n=y["AjaxHelper"].fetch({module:"API",method:"SitesManager.getSiteFromId",idSite:e.id})),this.goals[e.id]?o=Promise.resolve(this.goals[e.id]):(this.isLoading=!0,o=y["AjaxHelper"].fetch({module:"API",method:"Goals.getGoals",filter_limit:"-1",idSite:e.id})),Promise.all([t,n,o]).then((function(t){var n=At(t,3),o=n[0],a=n[1],i=n[2];r.isLoading=!1,Lt=o,r.sites[e.id]=a,r.goals[e.id]=i,r.updateTrackingCode()}))},updateTrackingCode:function(){var e=this,t={piwikUrl:"".concat(Ut).concat(Ft),actionName:this.pageName,forceMatomoEndpoint:1};this.trackGoal&&this.trackIdGoal&&(t.idGoal=this.trackIdGoal,t.revenue=this.revenue),this.trackingCodeAbortController&&(this.trackingCodeAbortController.abort(),this.trackingCodeAbortController=null),this.trackingCodeAbortController=new AbortController,y["AjaxHelper"].post({module:"API",format:"json",method:"SitesManager.getImageTrackingCode",idSite:this.site.id},t,{abortController:this.trackingCodeAbortController}).then((function(t){e.trackingCodeAbortController=null,e.trackingCode=t.value;var n=Bt(e.$refs.trackingCode);n&&!e.isHighlighting&&(e.isHighlighting=!0,n.effect("highlight",{complete:function(){e.isHighlighting=!1}},1500))}))}},computed:{currentSiteCurrency:function(){return Lt?Lt[(this.sites[this.site.id].currency||"").toUpperCase()]:""},siteGoals:function(){var e=this.goals[this.site.id];return[{key:"",value:Object(y["translate"])("UserCountryMap_None")}].concat(Object.values(e||[]).map((function(e){return{key:"".concat(e.idgoal),value:e.name}})))},imageTrackingIntro:function(){var e=Object(y["translate"])("CoreAdminHome_ImageTrackingIntro1"),t=Object(y["translate"])("CoreAdminHome_ImageTrackingIntro2","<code>&lt;noscript&gt;&lt;/noscript&gt;</code>");return"".concat(e," ").concat(t)},imageTrackingIntro3:function(){var e="https://matomo.org/docs/tracking-api/reference/";return Object(y["translate"])("CoreAdminHome_ImageTrackingIntro3",'<a href="'.concat(e,'" rel="noreferrer noopener" target="_blank">'),"</a>")}}});It.render=Tt;var Gt=It,Pt=Object(a["createElementVNode"])("br",null,null,-1),Mt=Object(a["createElementVNode"])("br",null,null,-1),qt=["value"],Jt={class:"action"},Rt={colspan:"7"},Wt=Object(a["createElementVNode"])("span",{class:"icon-ok"},null,-1),$t={class:"ui-confirm",id:"confirmDeleteAllTrackingFailures"},Kt=["value"],zt=["value"],Qt={class:"ui-confirm",id:"confirmDeleteThisTrackingFailure"},Yt=["value"],Xt=["value"];function Zt(e,t,n,o,r,i){var l=Object(a["resolveComponent"])("ActivityIndicator"),c=Object(a["resolveComponent"])("FailureRow"),s=Object(a["resolveComponent"])("ContentBlock"),d=Object(a["resolveDirective"])("content-table");return Object(a["openBlock"])(),Object(a["createBlock"])(s,{class:"matomoTrackingFailures","content-title":e.translate("CoreAdminHome_TrackingFailures")},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("p",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CoreAdminHome_TrackingFailuresIntroduction","2"))+" ",1),Pt,Mt,Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{class:"btn deleteAllFailures",type:"button",onClick:t[0]||(t[0]=function(t){return e.deleteAll()}),value:e.translate("CoreAdminHome_DeleteAllFailures")},null,8,qt),[[a["vShow"],!e.isLoading&&e.failures.length>0]])]),Object(a["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("table",null,[Object(a["createElementVNode"])("thead",null,[Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("th",{onClick:t[1]||(t[1]=function(t){return e.changeSortOrder("idsite")})},Object(a["toDisplayString"])(e.translate("General_Measurable")),1),Object(a["createElementVNode"])("th",{onClick:t[2]||(t[2]=function(t){return e.changeSortOrder("problem")})},Object(a["toDisplayString"])(e.translate("CoreAdminHome_Problem")),1),Object(a["createElementVNode"])("th",{onClick:t[3]||(t[3]=function(t){return e.changeSortOrder("solution")})},Object(a["toDisplayString"])(e.translate("CoreAdminHome_Solution")),1),Object(a["createElementVNode"])("th",{onClick:t[4]||(t[4]=function(t){return e.changeSortOrder("date_first_occurred")})},Object(a["toDisplayString"])(e.translate("General_Date")),1),Object(a["createElementVNode"])("th",{onClick:t[5]||(t[5]=function(t){return e.changeSortOrder("url")})},Object(a["toDisplayString"])(e.translate("Actions_ColumnPageURL")),1),Object(a["createElementVNode"])("th",{onClick:t[6]||(t[6]=function(t){return e.changeSortOrder("request_url")})},Object(a["toDisplayString"])(e.translate("CoreAdminHome_TrackingURL")),1),Object(a["createElementVNode"])("th",Jt,Object(a["toDisplayString"])(e.translate("General_Action")),1)])]),Object(a["createElementVNode"])("tbody",null,[Object(a["createElementVNode"])("tr",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("td",Rt,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CoreAdminHome_NoKnownFailures"))+" ",1),Wt],512),[[a["vShow"],!e.isLoading&&0===e.failures.length]])]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sortedFailures,(function(n,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("tr",{key:o},[Object(a["createVNode"])(c,{failure:n,onDelete:t[7]||(t[7]=function(t){return e.deleteFailure(t.idSite,t.idFailure)})},null,8,["failure"])])})),128))])],512),[[d]]),Object(a["createElementVNode"])("div",$t,[Object(a["createElementVNode"])("h2",null,Object(a["toDisplayString"])(e.translate("CoreAdminHome_ConfirmDeleteAllTrackingFailures")),1),Object(a["createElementVNode"])("input",{type:"button",role:"yes",value:e.translate("General_Yes")},null,8,Kt),Object(a["createElementVNode"])("input",{type:"button",role:"no",value:e.translate("General_No")},null,8,zt)]),Object(a["createElementVNode"])("div",Qt,[Object(a["createElementVNode"])("h2",null,Object(a["toDisplayString"])(e.translate("CoreAdminHome_ConfirmDeleteThisTrackingFailure")),1),Object(a["createElementVNode"])("input",{type:"button",role:"yes",value:e.translate("General_Yes")},null,8,Yt),Object(a["createElementVNode"])("input",{type:"button",role:"no",value:e.translate("General_No")},null,8,Xt)])]})),_:1},8,["content-title"])}var en=["href"],tn={class:"datetime"},nn=["title"],on=["title"];function rn(e,t,n,o,r,i){return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[Object(a["createElementVNode"])("td",null,Object(a["toDisplayString"])(e.failure.site_name)+" ("+Object(a["toDisplayString"])(e.translate("General_Id"))+" "+Object(a["toDisplayString"])(e.failure.idsite)+")",1),Object(a["createElementVNode"])("td",null,Object(a["toDisplayString"])(e.failure.problem),1),Object(a["createElementVNode"])("td",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.failure.solution)+" ",1),Object(a["withDirectives"])(Object(a["createElementVNode"])("a",{rel:"noopener noreferrer",href:e.failure.solution_url},Object(a["toDisplayString"])(e.translate("CoreAdminHome_LearnMore")),9,en),[[a["vShow"],e.failure.solution_url]])]),Object(a["createElementVNode"])("td",tn,Object(a["toDisplayString"])(e.failure.pretty_date_first_occurred),1),Object(a["createElementVNode"])("td",null,Object(a["toDisplayString"])(e.failure.url),1),Object(a["createElementVNode"])("td",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:t[0]||(t[0]=function(t){return e.showFullRequestUrl=!0}),title:e.translate("CoreHome_ClickToSeeFullInformation")},Object(a["toDisplayString"])(e.limtedRequestUrl)+"...",9,nn),[[a["vShow"],!e.showFullRequestUrl]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.failure.request_url),513),[[a["vShow"],e.failure.showFullRequestUrl]])]),Object(a["createElementVNode"])("td",null,[Object(a["createElementVNode"])("span",{class:"table-action icon-delete",onClick:t[1]||(t[1]=function(t){return e.deleteFailure(e.failure.idsite,e.failure.idfailure)}),title:e.translate("General_Delete")},null,8,on)])],64)}var an=Object(a["defineComponent"])({props:{failure:{type:Object,required:!0}},emits:["delete"],data:function(){return{showFullRequestUrl:!1}},computed:{limtedRequestUrl:function(){return this.failure.request_url.substring(0,100)}},methods:{deleteFailure:function(e,t){this.$emit("delete",{idSite:e,idFailure:t})}}});an.render=rn;var ln=an;function cn(e){return mn(e)||un(e)||dn(e)||sn()}function sn(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function dn(e,t){if(e){if("string"===typeof e)return gn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gn(e,t):void 0}}function un(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function mn(e){if(Array.isArray(e))return gn(e)}function gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var pn=Object(a["defineComponent"])({components:{ContentBlock:y["ContentBlock"],ActivityIndicator:y["ActivityIndicator"],FailureRow:ln},directives:{ContentTable:y["ContentTable"]},data:function(){return{failures:[],sortColumn:"idsite",sortReverse:!1,isLoading:!1}},created:function(){this.fetchAll()},methods:{changeSortOrder:function(e){this.sortColumn===e?this.sortReverse=!this.sortReverse:this.sortColumn=e},fetchAll:function(){var e=this;this.failures=[],this.isLoading=!0,y["AjaxHelper"].fetch({method:"CoreAdminHome.getTrackingFailures",filter_limit:"-1"}).then((function(t){e.failures=t,e.isLoading=!1})).finally((function(){e.isLoading=!1}))},deleteAll:function(){var e=this;y["Matomo"].helper.modalConfirm("#confirmDeleteAllTrackingFailures",{yes:function(){e.failures=[],y["AjaxHelper"].fetch({method:"CoreAdminHome.deleteAllTrackingFailures"}).then((function(){e.fetchAll()}))}})},deleteFailure:function(e,t){var n=this;y["Matomo"].helper.modalConfirm("#confirmDeleteThisTrackingFailure",{yes:function(){n.failures=[],y["AjaxHelper"].fetch({method:"CoreAdminHome.deleteTrackingFailure",idSite:e,idFailure:t}).then((function(){n.fetchAll()}))}})}},computed:{sortedFailures:function(){var e=this.sortColumn,t=cn(this.failures);return this.sortReverse?t.sort((function(t,n){return t[e]>n[e]?-1:t[e]<n[e]?1:0})):t.sort((function(t,n){return t[e]<n[e]?-1:t[e]>n[e]?1:0})),t}}});pn.render=Zt;var bn=pn;
+(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["CoreAdminHome"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["CoreAdminHome"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CoreAdminHome/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,"ArchivingSettings",(function(){return E})),n.d(t,"BrandingSettings",(function(){return Y})),n.d(t,"SmtpSettings",(function(){return te})),n.d(t,"JsTrackingCodeGenerator",(function(){return bt})),n.d(t,"ImageTrackingCodeGenerator",(function(){return Gt})),n.d(t,"TrackingFailures",(function(){return bn})),"undefined"!==typeof window){var o=window.document.currentScript,r=o&&o.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var a=n("8bbf"),i={class:"form-group row"},l={class:"col s12"},c={class:"col s12 m6"},s={class:"form-description",style:{"margin-left":"4px"}},d={for:"enableBrowserTriggerArchiving2"},u=["innerHTML"],m={class:"col s12 m6"},g=["innerHTML"],p={class:"form-group row"},b={class:"col s12"},h={class:"input-field col s12 m6"},j=["disabled"],f={class:"form-description"},v={class:"col s12 m6"},O={key:0,class:"form-help"},C={key:0},k=Object(a["createElementVNode"])("br",null,null,-1),V=Object(a["createElementVNode"])("br",null,null,-1),S=Object(a["createElementVNode"])("br",null,null,-1);function N(e,t,n,o,r,N){var y=Object(a["resolveComponent"])("SaveButton"),T=Object(a["resolveComponent"])("ContentBlock");return Object(a["openBlock"])(),Object(a["createBlock"])(T,{"content-title":e.translate("CoreAdminHome_ArchivingSettings"),anchor:"archivingSettings",class:"matomo-archiving-settings"},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",i,[Object(a["createElementVNode"])("h3",l,Object(a["toDisplayString"])(e.translate("General_AllowPiwikArchivingToTriggerBrowser")),1),Object(a["createElementVNode"])("div",c,[Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("label",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"radio",id:"enableBrowserTriggerArchiving1",name:"enableBrowserTriggerArchiving",value:"1","onUpdate:modelValue":t[0]||(t[0]=function(t){return e.enableBrowserTriggerArchivingValue=t})},null,512),[[a["vModelRadio"],e.enableBrowserTriggerArchivingValue]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("General_Yes")),1),Object(a["createElementVNode"])("span",s,Object(a["toDisplayString"])(e.translate("General_Default")),1)])]),Object(a["createElementVNode"])("p",null,[Object(a["createElementVNode"])("label",d,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"radio",id:"enableBrowserTriggerArchiving2",name:"enableBrowserTriggerArchiving",value:"0","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.enableBrowserTriggerArchivingValue=t})},null,512),[[a["vModelRadio"],e.enableBrowserTriggerArchivingValue]]),Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.translate("General_No")),1),Object(a["createElementVNode"])("span",{class:"form-description",innerHTML:e.$sanitize(e.archivingTriggerDesc),style:{"margin-left":"4px"}},null,8,u)])])]),Object(a["createElementVNode"])("div",m,[Object(a["createElementVNode"])("div",{class:"form-help",innerHTML:e.$sanitize(e.archivingInlineHelp)},null,8,g)])]),Object(a["createElementVNode"])("div",p,[Object(a["createElementVNode"])("h3",b,Object(a["toDisplayString"])(e.translate("General_ReportsContainingTodayWillBeProcessedAtMostEvery")),1),Object(a["createElementVNode"])("div",h,[Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{type:"text","onUpdate:modelValue":t[2]||(t[2]=function(t){return e.todayArchiveTimeToLiveValue=t}),id:"todayArchiveTimeToLive",disabled:!e.isGeneralSettingsAdminEnabled},null,8,j),[[a["vModelText"],e.todayArchiveTimeToLiveValue]]),Object(a["createElementVNode"])("span",f,Object(a["toDisplayString"])(e.translate("General_RearchiveTimeIntervalOnlyForTodayReports")),1)]),Object(a["createElementVNode"])("div",v,[e.isGeneralSettingsAdminEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",O,[e.showWarningCron?(Object(a["openBlock"])(),Object(a["createElementBlock"])("strong",C,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("General_NewReportsWillBeProcessedByCron")),1),k,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_ReportsWillBeProcessedAtMostEveryHour"))+" "+Object(a["toDisplayString"])(e.translate("General_IfArchivingIsFastYouCanSetupCronRunMoreOften")),1),V])):Object(a["createCommentVNode"])("",!0),Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_SmallTrafficYouCanLeaveDefault",e.todayArchiveTimeToLiveDefault))+" ",1),S,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_MediumToHighTrafficItIsRecommendedTo",1800,3600)),1)])):Object(a["createCommentVNode"])("",!0)])]),Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(y,{saving:e.isLoading,onConfirm:t[3]||(t[3]=function(t){return e.save()})},null,8,["saving"])])])]})),_:1},8,["content-title"])}var y=n("19dc"),T=n("a5a2"),A=Object(a["defineComponent"])({props:{enableBrowserTriggerArchiving:Boolean,showSegmentArchiveTriggerInfo:Boolean,isGeneralSettingsAdminEnabled:Boolean,showWarningCron:Boolean,todayArchiveTimeToLive:Number,todayArchiveTimeToLiveDefault:Number},components:{ContentBlock:y["ContentBlock"],SaveButton:T["SaveButton"]},data:function(){return{isLoading:!1,enableBrowserTriggerArchivingValue:this.enableBrowserTriggerArchiving?1:0,todayArchiveTimeToLiveValue:this.todayArchiveTimeToLive}},watch:{enableBrowserTriggerArchiving:function(e){this.enableBrowserTriggerArchivingValue=e?1:0},todayArchiveTimeToLive:function(e){this.todayArchiveTimeToLiveValue=e}},computed:{archivingTriggerDesc:function(){var e="";return e+=Object(y["translate"])("General_ArchivingTriggerDescription",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/docs/setup-auto-archiving/">',"</a>"),this.showSegmentArchiveTriggerInfo&&(e+=Object(y["translate"])("General_ArchivingTriggerSegment")),e},archivingInlineHelp:function(){var e=Object(y["translate"])("General_ArchivingInlineHelp");return e+="<br/>",e+=Object(y["translate"])("General_SeeTheOfficialDocumentationForMoreInformation",'<a target="_blank" rel="noreferrer noopener" href="https://matomo.org/docs/setup-auto-archiving/">',"</a>"),e}},methods:{save:function(){var e=this;this.isLoading=!0,y["AjaxHelper"].post({module:"API",method:"CoreAdminHome.setArchiveSettings"},{enableBrowserTriggerArchiving:this.enableBrowserTriggerArchivingValue,todayArchiveTimeToLive:this.todayArchiveTimeToLiveValue}).then((function(){e.isLoading=!1;var t=y["NotificationsStore"].show({message:Object(y["translate"])("CoreAdminHome_SettingsSaveSuccess"),type:"transient",id:"generalSettings",context:"success"});y["NotificationsStore"].scrollToNotification(t)})).finally((function(){e.isLoading=!1}))}}});A.render=N;var E=A,w={id:"logoSettings"},_={id:"logoUploadForm",ref:"logoUploadForm",method:"post",enctype:"multipart/form-data",action:"index.php?module=CoreAdminHome&format=json&action=uploadCustomLogo"},H={key:0},D=["value"],L=Object(a["createElementVNode"])("input",{type:"hidden",name:"force_api_session",value:"1"},null,-1),x={key:0},B={key:0,class:"alert alert-warning uploaderror"},U={class:"row"},F={class:"col s12"},I=["src"],G={class:"row"},P={class:"col s12"},M=["src"],q={key:1},J=["innerHTML"],R={key:1},W={class:"alert alert-warning"};function $(e,t,n,o,r,i){var l=Object(a["resolveComponent"])("Field"),c=Object(a["resolveComponent"])("SaveButton"),s=Object(a["resolveComponent"])("ContentBlock"),d=Object(a["resolveDirective"])("form");return Object(a["openBlock"])(),Object(a["createBlock"])(s,{"content-title":e.translate("CoreAdminHome_BrandingSettings"),anchor:"brandingSettings"},{default:Object(a["withCtx"])((function(){return[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CoreAdminHome_CustomLogoHelpText")),1),Object(a["createVNode"])(l,{name:"useCustomLogo",uicontrol:"checkbox","model-value":e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onUseCustomLogoChange(t)}),title:e.translate("CoreAdminHome_UseCustomLogo"),"inline-help":e.help},null,8,["model-value","title","inline-help"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",w,[Object(a["createElementVNode"])("form",_,[e.fileUploadEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",H,[Object(a["createElementVNode"])("input",{type:"hidden",name:"token_auth",value:e.tokenAuth},null,8,D),L,e.logosWriteable?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",x,[Object(a["createVNode"])(a["Transition"],{name:"fade-out"},{default:Object(a["withCtx"])((function(){return[e.showUploadError?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",B,Object(a["toDisplayString"])(e.translate("CoreAdminHome_LogoUploadFailed")),1)):Object(a["createCommentVNode"])("",!0)]})),_:1}),Object(a["createVNode"])(l,{uicontrol:"file",name:"customLogo","model-value":e.customLogo,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.onCustomLogoChange(t)}),title:e.translate("CoreAdminHome_LogoUpload"),"inline-help":e.translate("CoreAdminHome_LogoUploadHelp","JPG / PNG / GIF","110")},null,8,["model-value","title","inline-help"]),Object(a["createElementVNode"])("div",U,[Object(a["createElementVNode"])("div",F,[Object(a["createElementVNode"])("img",{src:e.pathUserLogoWithBuster,id:"currentLogo",style:{"max-height":"150px"},ref:"currentLogo"},null,8,I)])]),Object(a["createVNode"])(l,{uicontrol:"file",name:"customFavicon","model-value":e.customFavicon,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.onFaviconChange(t)}),title:e.translate("CoreAdminHome_FaviconUpload"),"inline-help":e.translate("CoreAdminHome_LogoUploadHelp","JPG / PNG / GIF","16")},null,8,["model-value","title","inline-help"]),Object(a["createElementVNode"])("div",G,[Object(a["createElementVNode"])("div",P,[Object(a["createElementVNode"])("img",{src:e.pathUserFaviconWithBuster,id:"currentFavicon",width:"16",height:"16",ref:"currentFavicon"},null,8,M)])])])):Object(a["createCommentVNode"])("",!0),e.logosWriteable?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",q,[Object(a["createElementVNode"])("div",{class:"alert alert-warning",innerHTML:e.$sanitize(e.logosNotWriteableWarning)},null,8,J)]))])):Object(a["createCommentVNode"])("",!0),e.fileUploadEnabled?Object(a["createCommentVNode"])("",!0):(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",R,[Object(a["createElementVNode"])("div",W,Object(a["toDisplayString"])(e.translate("CoreAdminHome_FileUploadDisabled","file_uploads=1")),1)]))],512)],512),[[a["vShow"],e.enabled]]),Object(a["createVNode"])(c,{onConfirm:t[3]||(t[3]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512),[[d]])]})),_:1},8,["content-title"])}var K=window,z=K.$,Q=Object(a["defineComponent"])({props:{fileUploadEnabled:{type:Boolean,required:!0},logosWriteable:{type:Boolean,required:!0},useCustomLogo:{type:Boolean,required:!0},pathUserLogoDirectory:{type:String,required:!0},pathUserLogo:{type:String,required:!0},pathUserLogoSmall:{type:String,required:!0},pathUserLogoSvg:{type:String,required:!0},hasUserLogo:{type:Boolean,required:!0},pathUserFavicon:{type:String,required:!0},hasUserFavicon:{type:Boolean,required:!0},isPluginsAdminEnabled:{type:Boolean,required:!0}},components:{Field:T["Field"],ContentBlock:y["ContentBlock"],SaveButton:T["SaveButton"]},directives:{Form:T["Form"]},data:function(){return{isLoading:!1,enabled:this.useCustomLogo,customLogo:this.pathUserLogo,customFavicon:this.pathUserFavicon,showUploadError:!1,currentLogoSrcExists:this.hasUserLogo,currentFaviconSrcExists:this.hasUserFavicon,currentLogoCacheBuster:(new Date).getTime(),currentFaviconCacheBuster:(new Date).getTime()}},computed:{tokenAuth:function(){return y["Matomo"].token_auth},logosNotWriteableWarning:function(){return Object(y["translate"])("CoreAdminHome_LogoNotWriteableInstruction","<code>".concat(this.pathUserLogoDirectory,"</code><br/>"),"".concat(this.pathUserLogo,", ").concat(this.pathUserLogoSmall,", ").concat(this.pathUserLogoSvg))},help:function(){if(this.isPluginsAdminEnabled){var e='"'.concat(Object(y["translate"])("General_GiveUsYourFeedback"),'"'),t='<a href="?module=CorePluginsAdmin&action=plugins" rel="noreferrer noopener" target="_blank">';return Object(y["translate"])("CoreAdminHome_CustomLogoFeedbackInfo",e,t,"</a>")}},pathUserLogoWithBuster:function(){return this.currentLogoSrcExists&&this.pathUserLogo?"".concat(this.pathUserLogo,"?").concat(this.currentLogoCacheBuster):""},pathUserFaviconWithBuster:function(){return this.currentFaviconSrcExists&&this.pathUserFavicon?"".concat(this.pathUserFavicon,"?").concat(this.currentFaviconCacheBuster):""}},methods:{onUseCustomLogoChange:function(e){this.enabled=e},onCustomLogoChange:function(e){this.customLogo=e,this.updateLogo()},onFaviconChange:function(e){this.customFavicon=e,this.updateLogo()},save:function(){var e=this;this.isLoading=!0,y["AjaxHelper"].post({module:"API",method:"CoreAdminHome.setBrandingSettings"},{useCustomLogo:this.enabled?"1":"0"}).then((function(){var e=y["NotificationsStore"].show({message:Object(y["translate"])("CoreAdminHome_SettingsSaveSuccess"),type:"transient",id:"generalSettings",context:"success"});y["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))},updateLogo:function(){var e=this,t=!!this.customLogo,n=!!this.customFavicon;if(t||n){this.showUploadError=!1;var o="upload".concat((new Date).getTime()),r=z('<iframe name="'.concat(o,'" />'));r.css("display","none"),r.on("load",(function(){setTimeout((function(){var o=(z(r.contents()).find("body").html()||"").trim();"0"===o?e.showUploadError=!0:(t&&(e.currentLogoSrcExists=!0,e.currentLogoCacheBuster=(new Date).getTime()),n&&(e.currentFaviconSrcExists=!0,e.currentFaviconCacheBuster=(new Date).getTime())),"1"!==o&&"0"!==o||r.remove()}),1e3)})),z("body:first").append(r);var a=z(this.$refs.logoUploadForm);a.attr("target",o),a.submit(),this.customLogo="",this.customFavicon=""}}}});Q.render=$;var Y=Q,X={id:"smtpSettings"};function Z(e,t,n,o,r,i){var l=Object(a["resolveComponent"])("Field"),c=Object(a["resolveComponent"])("SaveButton"),s=Object(a["resolveComponent"])("ContentBlock"),d=Object(a["resolveDirective"])("form");return Object(a["openBlock"])(),Object(a["createBlock"])(s,{"content-title":e.translate("CoreAdminHome_EmailServerSettings"),anchor:"mailSettings"},{default:Object(a["withCtx"])((function(){return[Object(a["withDirectives"])(Object(a["createElementVNode"])("div",null,[Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"mailUseSmtp",modelValue:e.enabled,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.enabled=t}),title:e.translate("General_UseSMTPServerForEmail"),"inline-help":e.translate("General_SelectYesIfYouWantToSendEmailsViaServer")},null,8,["modelValue","title","inline-help"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",X,[Object(a["createVNode"])(l,{uicontrol:"text",name:"mailHost","model-value":e.mailHost,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.onUpdateMailHost(t)}),title:e.translate("General_SmtpServerAddress")},null,8,["model-value","title"]),Object(a["createVNode"])(l,{uicontrol:"text",name:"mailPort",modelValue:e.mailPort,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.mailPort=t}),title:e.translate("General_SmtpPort"),"inline-help":e.translate("General_OptionalSmtpPort")},null,8,["modelValue","title","inline-help"]),Object(a["createVNode"])(l,{uicontrol:"select",name:"mailType",modelValue:e.mailType,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.mailType=t}),title:e.translate("General_AuthenticationMethodSmtp"),options:e.mailTypes,"inline-help":e.translate("General_OnlyUsedIfUserPwdIsSet")},null,8,["modelValue","title","options","inline-help"]),Object(a["createVNode"])(l,{uicontrol:"text",name:"mailUsername",modelValue:e.mailUsername,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.mailUsername=t}),title:e.translate("General_SmtpUsername"),"inline-help":e.translate("General_OnlyEnterIfRequired"),autocomplete:"off"},null,8,["modelValue","title","inline-help"]),Object(a["createVNode"])(l,{uicontrol:"password",name:"mailPassword","model-value":e.mailPassword,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.onMailPasswordChange(t)}),onClick:t[6]||(t[6]=function(t){!e.passwordChanged&&t.target.select()}),title:e.translate("General_SmtpPassword"),"inline-help":e.passwordHelp,autocomplete:"off"},null,8,["model-value","title","inline-help"]),Object(a["createVNode"])(l,{uicontrol:"text",name:"mailFromAddress",modelValue:e.mailFromAddress,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.mailFromAddress=t}),title:e.translate("General_SmtpFromAddress"),"inline-help":e.translate("General_SmtpFromEmailHelp",e.mailHost),autocomplete:"off"},null,8,["modelValue","title","inline-help"]),Object(a["createVNode"])(l,{uicontrol:"text",name:"mailFromName",modelValue:e.mailFromName,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.mailFromName=t}),title:e.translate("General_SmtpFromName"),"inline-help":e.translate("General_NameShownInTheSenderColumn"),autocomplete:"off"},null,8,["modelValue","title","inline-help"]),Object(a["createVNode"])(l,{uicontrol:"select",name:"mailEncryption",modelValue:e.mailEncryption,"onUpdate:modelValue":t[9]||(t[9]=function(t){return e.mailEncryption=t}),title:e.translate("General_SmtpEncryption"),options:e.mailEncryptions,"inline-help":e.translate("General_EncryptedSmtpTransport")},null,8,["modelValue","title","options","inline-help"])],512),[[a["vShow"],e.enabled]]),Object(a["createVNode"])(c,{onConfirm:t[10]||(t[10]=function(t){return e.save()}),saving:e.isLoading},null,8,["saving"])],512),[[d]])]})),_:1},8,["content-title"])}var ee=Object(a["defineComponent"])({props:{mail:{type:Object,required:!0},mailTypes:{type:Object,required:!0},mailEncryptions:{type:Object,required:!0}},data:function(){var e=this.mail;return{isLoading:!1,enabled:"smtp"===e.transport,mailHost:e.host,passwordChanged:!1,mailPort:e.port,mailType:e.type,mailUsername:e.username,mailPassword:e.password?"******":"",mailFromAddress:e.noreply_email_address,mailFromName:e.noreply_email_name,mailEncryption:e.encryption}},components:{ContentBlock:y["ContentBlock"],Field:T["Field"],SaveButton:T["SaveButton"]},directives:{Form:T["Form"]},computed:{passwordHelp:function(){var e="".concat(Object(y["translate"])("General_OnlyEnterIfRequiredPassword"),"<br/>"),t="".concat(Object(y["translate"])("General_WarningPasswordStored","<strong>","</strong>"),"<br/>");return"".concat(e,"\n").concat(t)}},methods:{onUpdateMailHost:function(e){this.mailHost=e,this.passwordChanged||(this.mailPassword="",this.passwordChanged=!0)},onMailPasswordChange:function(e){this.mailPassword=e,this.passwordChanged=!0},save:function(){var e=this;this.isLoading=!0;var t={mailUseSmtp:this.enabled?"1":"0",mailPort:this.mailPort,mailHost:this.mailHost,mailType:this.mailType,mailUsername:this.mailUsername,mailFromAddress:this.mailFromAddress,mailFromName:this.mailFromName,mailEncryption:this.mailEncryption};this.passwordChanged&&(t.mailPassword=this.mailPassword),y["AjaxHelper"].post({module:"CoreAdminHome",action:"setMailSettings"},t,{withTokenInUrl:!0}).then((function(){var e=y["NotificationsStore"].show({message:Object(y["translate"])("CoreAdminHome_SettingsSaveSuccess"),type:"transient",id:"generalSettings",context:"success"});y["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.isLoading=!1}))}}});ee.render=Z;var te=ee,ne={id:"js-code-options"},oe=Object(a["createElementVNode"])("br",null,null,-1),re=Object(a["createElementVNode"])("br",null,null,-1),ae=["innerHTML"],ie=["innerHTML"],le=Object(a["createElementVNode"])("br",null,null,-1),ce=Object(a["createElementVNode"])("br",null,null,-1),se=["innerHTML"],de=Object(a["createElementVNode"])("br",null,null,-1),ue=Object(a["createElementVNode"])("br",null,null,-1),me=["innerHTML"],ge=Object(a["createElementVNode"])("br",null,null,-1),pe=Object(a["createElementVNode"])("br",null,null,-1),be=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-tracking-code-on-wordpress/",target:"_blank",rel:"noopener"},"WordPress",-1),he=Object(a["createTextVNode"])(" | "),je=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/new-to-piwik/how-do-i-integrate-matomo-with-squarespace-website/",target:"_blank",rel:"noopener"},"Squarespace",-1),fe=Object(a["createTextVNode"])(" | "),ve=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-analytics-tracking-code-on-wix/",target:"_blank",rel:"noopener"},"Wix",-1),Oe=Object(a["createTextVNode"])(" | "),Ce=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/how-to-install/faq_19424/",target:"_blank",rel:"noopener"},"SharePoint",-1),ke=Object(a["createTextVNode"])(" | "),Ve=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-analytics-tracking-code-on-joomla/",target:"_blank",rel:"noopener"},"Joomla",-1),Se=Object(a["createTextVNode"])(" | "),Ne=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/new-to-piwik/how-do-i-install-the-matomo-tracking-code-on-my-shopify-store/",target:"_blank",rel:"noopener"},"Shopify",-1),ye=Object(a["createTextVNode"])(" | "),Te=Object(a["createElementVNode"])("a",{href:"https://matomo.org/faq/new-to-piwik/how-do-i-use-matomo-analytics-within-gtm-google-tag-manager/",target:"_blank",rel:"noopener"},"Google Tag Manager",-1),Ae={id:"javascript-output-section"},Ee={class:"valign-wrapper trackingHelpHeader matchWidth"},we={id:"javascript-text"},_e=["textContent"],He={id:"optional-js-tracking-options"},De={id:"jsTrackAllSubdomainsInlineHelp",class:"inline-help-node"},Le=["innerHTML"],xe=["innerHTML"],Be={id:"jsTrackGroupByDomainInlineHelp",class:"inline-help-node"},Ue={id:"jsTrackAllAliasesInlineHelp",class:"inline-help-node"},Fe={id:"javascript-advanced-options"},Ie={id:"javascript-tracking-visitor-cv"},Ge={class:"row"},Pe={class:"col s12 m3"},Me={class:"col s12 m3"},qe={class:"col s12 m6 l3"},Je=["onKeydown"],Re={class:"col s12 m6 l3"},We=["onKeydown"],$e={class:"row"},Ke={class:"col s12"},ze=Object(a["createElementVNode"])("span",{class:"icon-add"},null,-1),Qe={id:"jsCrossDomain",class:"inline-help-node"},Ye=Object(a["createElementVNode"])("br",null,null,-1),Xe={id:"jsDoNotTrackInlineHelp",class:"inline-help-node"},Ze={key:0},et=Object(a["createElementVNode"])("br",null,null,-1),tt=["innerHTML"],nt={id:"js-campaign-query-param-extra"},ot={class:"row"},rt={class:"col s12"},at={class:"row"},it={class:"col s12"};function lt(e,t,n,o,r,i){var l=Object(a["resolveComponent"])("Field"),c=Object(a["resolveComponent"])("ContentBlock"),s=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createBlock"])(c,{anchor:"javaScriptTracking","content-title":e.translate("CoreAdminHome_JavaScriptTracking")},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("div",ne,[Object(a["createElementVNode"])("p",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTrackingIntro1"))+" ",1),oe,re,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTrackingIntro2"))+" ",1),Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro3a)},null,8,ae),Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(" "+e.jsTrackingIntro3b)},null,8,ie),le,ce,Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro4a)},null,8,se),de,ue,Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.jsTrackingIntro5)},null,8,me),ge,pe,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("SitesManager_InstallationGuides"))+" : ",1),be,he,je,fe,ve,Oe,Ce,ke,Ve,Se,Ne,ye,Te]),Object(a["createVNode"])(l,{uicontrol:"site",name:"js-tracker-website",class:"jsTrackingCodeWebsite",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),introduction:e.translate("General_Website")},null,8,["modelValue","introduction"]),Object(a["createElementVNode"])("div",Ae,[Object(a["createElementVNode"])("div",Ee,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("h3",null,Object(a["toDisplayString"])(e.translate("General_JsTrackingTag")),1),Object(a["createElementVNode"])("p",null,Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CodeNoteBeforeClosingHead","</head>")),1)]),Object(a["createElementVNode"])("button",{class:"btn",id:"emailJsBtn",onClick:t[1]||(t[1]=function(t){return e.sendEmail()})},Object(a["toDisplayString"])(e.translate("SitesManager_EmailInstructionsButton")),1)]),Object(a["createElementVNode"])("div",we,[Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",{class:"codeblock",textContent:Object(a["toDisplayString"])(e.trackingCode),ref:"trackingCode"},null,8,_e),[[s,{}]])])]),Object(a["createElementVNode"])("div",He,[Object(a["createElementVNode"])("div",De,[Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.mergeSubdomainsDesc)},null,8,Le),Object(a["createElementVNode"])("span",{innerHTML:e.$sanitize(e.learnMoreText)},null,8,xe)]),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-all-subdomains","model-value":e.trackAllSubdomains,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.trackAllSubdomains=t,e.updateTrackingCode()}),disabled:e.isLoading,introduction:e.translate("General_Options"),title:"".concat(e.translate("CoreAdminHome_JSTracking_MergeSubdomains")," ").concat(e.currentSiteName),"inline-help":"#jsTrackAllSubdomainsInlineHelp"},null,8,["model-value","disabled","introduction","title"])]),Object(a["createElementVNode"])("div",Be,Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_GroupPageTitlesByDomainDesc1",e.currentSiteHost)),1),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-group-by-domain","model-value":e.groupByDomain,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.groupByDomain=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_GroupPageTitlesByDomain"),"inline-help":"#jsTrackGroupByDomainInlineHelp"},null,8,["model-value","disabled","title"]),Object(a["createElementVNode"])("div",Ue,Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_MergeAliasesDesc",e.currentSiteAlias)),1),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-all-aliases","model-value":e.trackAllAliases,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.trackAllAliases=t,e.updateTrackingCode()}),disabled:e.isLoading,title:"".concat(e.translate("CoreAdminHome_JSTracking_MergeAliases")," ").concat(e.currentSiteName),"inline-help":"#jsTrackAllAliasesInlineHelp"},null,8,["model-value","disabled","title"])]),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-noscript","model-value":e.trackNoScript,"onUpdate:modelValue":t[5]||(t[5]=function(t){e.trackNoScript=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_TrackNoScript")},null,8,["model-value","disabled","title"]),Object(a["createElementVNode"])("h3",null,Object(a["toDisplayString"])(e.translate("Mobile_Advanced")),1),Object(a["createElementVNode"])("p",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("a",{href:"javascript:;",onClick:t[6]||(t[6]=Object(a["withModifiers"])((function(t){return e.showAdvanced=!0}),["prevent"]))},Object(a["toDisplayString"])(e.translate("General_Show")),513),[[a["vShow"],!e.showAdvanced]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("a",{href:"javascript:;",onClick:t[7]||(t[7]=Object(a["withModifiers"])((function(t){return e.showAdvanced=!1}),["prevent"]))},Object(a["toDisplayString"])(e.translate("General_Hide")),513),[[a["vShow"],e.showAdvanced]])]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Fe,[Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-visitor-cv-check","model-value":e.trackCustomVars,"onUpdate:modelValue":t[8]||(t[8]=function(t){e.trackCustomVars=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_VisitorCustomVars"),"inline-help":e.translate("CoreAdminHome_JSTracking_VisitorCustomVarsDesc")},null,8,["model-value","disabled","title","inline-help"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Ie,[Object(a["createElementVNode"])("div",Ge,[Object(a["createElementVNode"])("div",Pe,Object(a["toDisplayString"])(e.translate("General_Name")),1),Object(a["createElementVNode"])("div",Me,Object(a["toDisplayString"])(e.translate("General_Value")),1)]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.customVars,(function(t,n){return Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{class:"row",key:n},[Object(a["createElementVNode"])("div",qe,[Object(a["createElementVNode"])("input",{type:"text",class:"custom-variable-name",onKeydown:function(t){return e.onCustomVarNameKeydown(t,n)},placeholder:"e.g. Type"},null,40,Je)]),Object(a["createElementVNode"])("div",Re,[Object(a["createElementVNode"])("input",{type:"text",class:"custom-variable-value",onKeydown:function(t){return e.onCustomVarValueKeydown(t,n)},placeholder:"e.g. Customer"},null,40,We)])])})),128)),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",$e,[Object(a["createElementVNode"])("div",Ke,[Object(a["createElementVNode"])("a",{href:"javascript:;",onClick:t[9]||(t[9]=function(t){return e.addCustomVar()}),class:"add-custom-variable"},[ze,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("General_Add")),1)])])],512),[[a["vShow"],e.canAddMoreCustomVariables]])],512),[[a["vShow"],e.trackCustomVars]]),Object(a["createElementVNode"])("div",Qe,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CrossDomain"))+" ",1),Ye,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_CrossDomain_NeedsMultipleDomains")),1)]),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-cross-domain","model-value":e.crossDomain,"onUpdate:modelValue":t[10]||(t[10]=function(t){e.crossDomain=t,e.updateTrackingCode(),e.onCrossDomainToggle()}),disabled:e.isLoading||!e.hasManySiteUrls,title:e.translate("CoreAdminHome_JSTracking_EnableCrossDomainLinking"),"inline-help":"#jsCrossDomain"},null,8,["model-value","disabled","title"]),Object(a["createElementVNode"])("div",Xe,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_EnableDoNotTrackDesc"))+" ",1),e.serverSideDoNotTrackEnabled?(Object(a["openBlock"])(),Object(a["createElementBlock"])("span",Ze,[et,Object(a["createTextVNode"])(" "+Object(a["toDisplayString"])(e.translate("CoreAdminHome_JSTracking_EnableDoNotTrack_AlreadyEnabled")),1)])):Object(a["createCommentVNode"])("",!0)]),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-do-not-track","model-value":e.doNotTrack,"onUpdate:modelValue":t[11]||(t[11]=function(t){e.doNotTrack=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_EnableDoNotTrack"),"inline-help":"#jsDoNotTrackInlineHelp"},null,8,["model-value","disabled","title"]),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"javascript-tracking-disable-cookies","model-value":e.disableCookies,"onUpdate:modelValue":t[12]||(t[12]=function(t){e.disableCookies=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_DisableCookies"),"inline-help":e.translate("CoreAdminHome_JSTracking_DisableCookiesDesc")},null,8,["model-value","disabled","title","inline-help"]),Object(a["createElementVNode"])("div",{id:"jsTrackCampaignParamsInlineHelp",class:"inline-help-node",innerHTML:e.$sanitize(e.jsTrackCampaignParamsInlineHelp)},null,8,tt),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"custom-campaign-query-params-check","model-value":e.useCustomCampaignParams,"onUpdate:modelValue":t[13]||(t[13]=function(t){e.useCustomCampaignParams=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CustomCampaignQueryParam"),"inline-help":"#jsTrackCampaignParamsInlineHelp"},null,8,["model-value","disabled","title"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",nt,[Object(a["createElementVNode"])("div",ot,[Object(a["createElementVNode"])("div",rt,[Object(a["createVNode"])(l,{uicontrol:"text",name:"custom-campaign-name-query-param","model-value":e.customCampaignName,"onUpdate:modelValue":t[14]||(t[14]=function(t){e.customCampaignName=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CampaignNameParam")},null,8,["model-value","disabled","title"])])]),Object(a["createElementVNode"])("div",at,[Object(a["createElementVNode"])("div",it,[Object(a["createVNode"])(l,{uicontrol:"text",name:"custom-campaign-keyword-query-param","model-value":e.customCampaignKeyword,"onUpdate:modelValue":t[15]||(t[15]=function(t){e.customCampaignKeyword=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_JSTracking_CampaignKwdParam")},null,8,["model-value","disabled","title"])])])],512),[[a["vShow"],e.useCustomCampaignParams]])],512),[[a["vShow"],e.showAdvanced]])]})),_:1},8,["content-title"])}function ct(e){var t=new URL(e);return t.hostname}function st(e){return e.map((function(e){return[e.name,e.value]}))}var dt=window,ut=dt.$,mt=window.location.host,gt=window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/")),pt=Object(a["defineComponent"])({props:{defaultSite:{type:Object,required:!0},maxCustomVariables:Number,serverSideDoNotTrackEnabled:Boolean},data:function(){return{showAdvanced:!1,site:this.defaultSite,trackingCode:"",trackAllSubdomains:!1,isLoading:!1,siteUrls:{},siteExcludedQueryParams:{},siteExcludedReferrers:{},crossDomain:!1,groupByDomain:!1,trackAllAliases:!1,trackNoScript:!1,trackCustomVars:!1,customVars:[],canAddMoreCustomVariables:!!this.maxCustomVariables&&this.maxCustomVariables>0,doNotTrack:!1,disableCookies:!1,useCustomCampaignParams:!1,customCampaignName:"",customCampaignKeyword:"",trackingCodeAbortController:null,isHighlighting:!1}},components:{ContentBlock:y["ContentBlock"],Field:T["Field"]},directives:{SelectOnFocus:y["SelectOnFocus"]},created:function(){this.onCustomVarNameKeydown=Object(y["debounce"])(this.onCustomVarNameKeydown,100),this.onCustomVarValueKeydown=Object(y["debounce"])(this.onCustomVarValueKeydown,100),this.addCustomVar(),this.site&&this.site.id&&this.onSiteChanged(this.site)},watch:{site:function(e){this.onSiteChanged(e)}},methods:{onSiteChanged:function(e){var t=this,n=e.id,o=[];this.siteUrls[n]||(this.isLoading=!0,o.push(y["AjaxHelper"].fetch({module:"API",method:"SitesManager.getSiteUrlsFromId",idSite:n,filter_limit:"-1"}).then((function(e){t.siteUrls[n]=e||[]})))),this.siteExcludedQueryParams[n]||(this.isLoading=!0,o.push(y["AjaxHelper"].fetch({module:"API",method:"Overlay.getExcludedQueryParameters",idSite:n,filter_limit:"-1"}).then((function(e){t.siteExcludedQueryParams[n]=e||[]})))),this.siteExcludedReferrers[n]||(this.isLoading=!0,o.push(y["AjaxHelper"].fetch({module:"API",method:"SitesManager.getExcludedReferrers",idSite:n,filter_limit:"-1"}).then((function(e){t.siteExcludedReferrers[n]=[],Object.values(e||[]).forEach((function(e){t.siteExcludedReferrers[n].push(e.replace(/^https?:\/\//,""))}))})))),Promise.all(o).then((function(){t.isLoading=!1,t.updateCurrentSiteInfo(),t.updateTrackingCode()}))},sendEmail:function(){var e=Object(y["translate"])("SitesManager_EmailInstructionsSubject");e=encodeURIComponent(e);var t=this.trackingCode;t=t.replace(/<[^>]+>/g,"");var n="".concat(Object(y["translate"])("SitesManager_JsTrackingTagHelp"),". ").concat(Object(y["translate"])("CoreAdminHome_JSTracking_CodeNoteBeforeClosingHeadEmail","'head"),"\n").concat(t);n=encodeURIComponent(n);var o="mailto:?subject=".concat(e,"&body=").concat(n);window.location.href=o},onCrossDomainToggle:function(){this.crossDomain&&(this.trackAllAliases=!0)},updateTrackingCode:function(){var e=this,t=this.site,n={piwikUrl:"".concat(mt).concat(gt),groupPageTitlesByDomain:this.groupByDomain?1:0,mergeSubdomains:this.trackAllSubdomains?1:0,mergeAliasUrls:this.trackAllAliases?1:0,visitorCustomVariables:this.trackCustomVars?st(this.customVars):0,customCampaignNameQueryParam:null,customCampaignKeywordParam:null,doNotTrack:this.doNotTrack?1:0,disableCookies:this.disableCookies?1:0,crossDomain:this.crossDomain?1:0,trackNoScript:this.trackNoScript?1:0,forceMatomoEndpoint:1};this.siteExcludedQueryParams[t.id]&&(n.excludedQueryParams=this.siteExcludedQueryParams[t.id]),this.siteExcludedReferrers[t.id]&&(n.excludedReferrers=this.siteExcludedReferrers[t.id]),this.useCustomCampaignParams&&(n.customCampaignNameQueryParam=this.customCampaignName,n.customCampaignKeywordParam=this.customCampaignKeyword),this.trackingCodeAbortController&&(this.trackingCodeAbortController.abort(),this.trackingCodeAbortController=null),this.trackingCodeAbortController=new AbortController,y["AjaxHelper"].post({module:"API",format:"json",method:"SitesManager.getJavascriptTag",idSite:t.id},n,{abortController:this.trackingCodeAbortController}).then((function(t){e.trackingCodeAbortController=null,e.trackingCode=t.value;var n=ut(e.$refs.trackingCode);n&&!e.isHighlighting&&(e.isHighlighting=!0,n.effect("highlight",{complete:function(){e.isHighlighting=!1}},1500))}))},updateCurrentSiteInfo:function(){this.hasManySiteUrls||(this.crossDomain=!1)},addCustomVar:function(){this.canAddMoreCustomVariables&&this.customVars.push({name:"",value:""}),this.canAddMoreCustomVariables=!!this.maxCustomVariables&&this.maxCustomVariables>this.customVars.length},onCustomVarNameKeydown:function(e,t){var n=this;setTimeout((function(){n.customVars[t].name=e.target.value,n.updateTrackingCode()}))},onCustomVarValueKeydown:function(e,t){var n=this;setTimeout((function(){n.customVars[t].value=e.target.value,n.updateTrackingCode()}))}},computed:{hasManySiteUrls:function(){var e=this.site;return this.siteUrls[e.id]&&this.siteUrls[e.id].length>1},currentSiteHost:function(){var e,t=null===(e=this.siteUrls[this.site.id])||void 0===e?void 0:e[0];return t?ct(t):""},currentSiteAlias:function(){var e,t="x.".concat(this.currentSiteHost),n=null===(e=this.siteUrls[this.site.id])||void 0===e?void 0:e[1];return n||t},currentSiteName:function(){return y["Matomo"].helper.htmlEntities(this.site.name)},jsTrackingIntro3a:function(){return Object(y["translate"])("CoreAdminHome_JSTrackingIntro3a",'<a href="https://matomo.org/integrate/" rel="noreferrer noopener" target="_blank">',"</a>")},jsTrackingIntro3b:function(){return Object(y["translate"])("CoreAdminHome_JSTrackingIntro3b")},jsTrackingIntro4a:function(){return Object(y["translate"])("CoreAdminHome_JSTrackingIntro4",'<a href="#image-tracking-link">',"</a>")},jsTrackingIntro5:function(){return Object(y["translate"])("CoreAdminHome_JSTrackingIntro5",'<a rel="noreferrer noopener" target="_blank" href="https://developer.matomo.org/guides/tracking-javascript-guide">',"</a>")},mergeSubdomainsDesc:function(){return Object(y["translate"])("CoreAdminHome_JSTracking_MergeSubdomainsDesc","x.".concat(this.currentSiteHost),"y.".concat(this.currentSiteHost))},learnMoreText:function(){var e="https://developer.matomo.org/guides/tracking-javascript-guide#measuring-domains-andor-sub-domains";return Object(y["translate"])("General_LearnMore",' (<a href="'.concat(e,'" rel="noreferrer noopener" target="_blank">'),"</a>)")},jsTrackCampaignParamsInlineHelp:function(){return Object(y["translate"])("CoreAdminHome_JSTracking_CustomCampaignQueryParamDesc",'<a href="https://matomo.org/faq/general/faq_119" rel="noreferrer noopener" target="_blank">',"</a>")}}});pt.render=lt;var bt=pt,ht=Object(a["createElementVNode"])("a",{name:"image-tracking-link"},null,-1),jt={id:"image-tracking-code-options"},ft=["innerHTML"],vt=["innerHTML"],Ot={id:"image-tracking-goal-sub"},Ct={class:"row"},kt={class:"col s12 m6"},Vt={class:"col s12 m6"},St={id:"image-link-output-section"},Nt={id:"image-tracking-text"},yt=["textContent"];function Tt(e,t,n,o,r,i){var l=Object(a["resolveComponent"])("Field"),c=Object(a["resolveComponent"])("ContentBlock"),s=Object(a["resolveDirective"])("select-on-focus");return Object(a["openBlock"])(),Object(a["createBlock"])(c,{"content-title":e.translate("CoreAdminHome_ImageTracking"),anchor:"imageTracking"},{default:Object(a["withCtx"])((function(){return[ht,Object(a["createElementVNode"])("div",jt,[Object(a["createElementVNode"])("p",{innerHTML:e.$sanitize(e.imageTrackingIntro)},null,8,ft),Object(a["createElementVNode"])("p",{innerHTML:e.$sanitize(e.imageTrackingIntro3)},null,8,vt),Object(a["createVNode"])(l,{uicontrol:"site",name:"image-tracker-website",modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t}),introduction:e.translate("General_Website")},null,8,["modelValue","introduction"]),Object(a["createVNode"])(l,{uicontrol:"text",name:"image-tracker-action-name","model-value":e.pageName,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.pageName=t,e.updateTrackingCode()}),disabled:e.isLoading,introduction:e.translate("General_Options"),title:e.translate("Actions_ColumnPageName")},null,8,["model-value","disabled","introduction","title"]),Object(a["createVNode"])(l,{uicontrol:"checkbox",name:"image-tracking-goal-check","model-value":e.trackGoal,"onUpdate:modelValue":t[2]||(t[2]=function(t){e.trackGoal=t,e.updateTrackingCode()}),disabled:e.isLoading,title:e.translate("CoreAdminHome_TrackAGoal")},null,8,["model-value","disabled","title"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("div",Ot,[Object(a["createElementVNode"])("div",Ct,[Object(a["createElementVNode"])("div",kt,[Object(a["createVNode"])(l,{uicontrol:"select",name:"image-tracker-goal",options:e.siteGoals,disabled:e.isLoading,"model-value":e.trackIdGoal,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.trackIdGoal=t,e.updateTrackingCode()})},null,8,["options","disabled","model-value"])]),Object(a["createElementVNode"])("div",Vt,[Object(a["createVNode"])(l,{uicontrol:"text",name:"image-revenue","model-value":e.revenue,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.revenue=t,e.updateTrackingCode()}),disabled:e.isLoading,"full-width":!0,title:"".concat(e.translate("CoreAdminHome_WithOptionalRevenue")," ").concat(e.currentSiteCurrency)},null,8,["model-value","disabled","title"])])])],512),[[a["vShow"],e.trackGoal]]),Object(a["createElementVNode"])("div",St,[Object(a["createElementVNode"])("h3",null,Object(a["toDisplayString"])(e.translate("CoreAdminHome_ImageTrackingLink")),1),Object(a["createElementVNode"])("div",Nt,[Object(a["withDirectives"])(Object(a["createElementVNode"])("pre",{textContent:Object(a["toDisplayString"])(e.trackingCode),ref:"trackingCode"},null,8,yt),[[s,{}]])])])])]})),_:1},8,["content-title"])}function At(e,t){return Dt(e)||Ht(e,t)||wt(e,t)||Et()}function Et(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function wt(e,t){if(e){if("string"===typeof e)return _t(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_t(e,t):void 0}}function _t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Ht(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(o=n.next()).done);i=!0)if(a.push(o.value),t&&a.length===t)break}catch(c){l=!0,r=c}finally{try{i||null==n["return"]||n["return"]()}finally{if(l)throw r}}return a}}function Dt(e){if(Array.isArray(e))return e}var Lt=null,xt=window,Bt=xt.$,Ut=window.location.host,Ft=window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/")),It=Object(a["defineComponent"])({props:{defaultSite:{type:Object,required:!0}},components:{ContentBlock:y["ContentBlock"],Field:T["Field"]},directives:{SelectOnFocus:y["SelectOnFocus"]},data:function(){return{isLoading:!1,site:this.defaultSite,pageName:"",trackGoal:!1,trackIdGoal:null,revenue:"",trackingCode:"",sites:{},goals:{},trackingCodeAbortController:null,isHighlighting:!1}},created:function(){this.updateTrackingCode=Object(y["debounce"])(this.updateTrackingCode),this.site&&this.site.id&&this.onSiteChanged(this.site)},watch:{site:function(e){this.onSiteChanged(e)}},methods:{onSiteChanged:function(e){var t,n,o,r=this;return this.trackIdGoal=null,Lt?t=Promise.resolve(Lt):(this.isLoading=!0,t=y["AjaxHelper"].fetch({method:"SitesManager.getCurrencySymbols",filter_limit:"-1"})),this.sites[e.id]?n=Promise.resolve(this.sites[e.id]):(this.isLoading=!0,n=y["AjaxHelper"].fetch({module:"API",method:"SitesManager.getSiteFromId",idSite:e.id})),this.goals[e.id]?o=Promise.resolve(this.goals[e.id]):(this.isLoading=!0,o=y["AjaxHelper"].fetch({module:"API",method:"Goals.getGoals",filter_limit:"-1",idSite:e.id})),Promise.all([t,n,o]).then((function(t){var n=At(t,3),o=n[0],a=n[1],i=n[2];r.isLoading=!1,Lt=o,r.sites[e.id]=a,r.goals[e.id]=i,r.updateTrackingCode()}))},updateTrackingCode:function(){var e=this,t={piwikUrl:"".concat(Ut).concat(Ft),actionName:this.pageName,forceMatomoEndpoint:1};this.trackGoal&&this.trackIdGoal&&(t.idGoal=this.trackIdGoal,t.revenue=this.revenue),this.trackingCodeAbortController&&(this.trackingCodeAbortController.abort(),this.trackingCodeAbortController=null),this.trackingCodeAbortController=new AbortController,y["AjaxHelper"].post({module:"API",format:"json",method:"SitesManager.getImageTrackingCode",idSite:this.site.id},t,{abortController:this.trackingCodeAbortController}).then((function(t){e.trackingCodeAbortController=null,e.trackingCode=t.value;var n=Bt(e.$refs.trackingCode);n&&!e.isHighlighting&&(e.isHighlighting=!0,n.effect("highlight",{complete:function(){e.isHighlighting=!1}},1500))}))}},computed:{currentSiteCurrency:function(){return Lt?Lt[(this.sites[this.site.id].currency||"").toUpperCase()]:""},siteGoals:function(){var e=this.goals[this.site.id];return[{key:"",value:Object(y["translate"])("UserCountryMap_None")}].concat(Object.values(e||[]).map((function(e){return{key:"".concat(e.idgoal),value:e.name}})))},imageTrackingIntro:function(){var e=Object(y["translate"])("CoreAdminHome_ImageTrackingIntro1"),t=Object(y["translate"])("CoreAdminHome_ImageTrackingIntro2","<code>&lt;noscript&gt;&lt;/noscript&gt;</code>");return"".concat(e," ").concat(t)},imageTrackingIntro3:function(){var e="https://matomo.org/docs/tracking-api/reference/";return Object(y["translate"])("CoreAdminHome_ImageTrackingIntro3",'<a href="'.concat(e,'" rel="noreferrer noopener" target="_blank">'),"</a>")}}});It.render=Tt;var Gt=It,Pt=Object(a["createElementVNode"])("br",null,null,-1),Mt=Object(a["createElementVNode"])("br",null,null,-1),qt=["value"],Jt={class:"action"},Rt={colspan:"7"},Wt=Object(a["createElementVNode"])("span",{class:"icon-ok"},null,-1),$t={class:"ui-confirm",id:"confirmDeleteAllTrackingFailures"},Kt=["value"],zt=["value"],Qt={class:"ui-confirm",id:"confirmDeleteThisTrackingFailure"},Yt=["value"],Xt=["value"];function Zt(e,t,n,o,r,i){var l=Object(a["resolveComponent"])("ActivityIndicator"),c=Object(a["resolveComponent"])("FailureRow"),s=Object(a["resolveComponent"])("ContentBlock"),d=Object(a["resolveDirective"])("content-table");return Object(a["openBlock"])(),Object(a["createBlock"])(s,{class:"matomoTrackingFailures","content-title":e.translate("CoreAdminHome_TrackingFailures")},{default:Object(a["withCtx"])((function(){return[Object(a["createElementVNode"])("p",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CoreAdminHome_TrackingFailuresIntroduction","2"))+" ",1),Pt,Mt,Object(a["withDirectives"])(Object(a["createElementVNode"])("input",{class:"btn deleteAllFailures",type:"button",onClick:t[0]||(t[0]=function(t){return e.deleteAll()}),value:e.translate("CoreAdminHome_DeleteAllFailures")},null,8,qt),[[a["vShow"],!e.isLoading&&e.failures.length>0]])]),Object(a["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),Object(a["withDirectives"])(Object(a["createElementVNode"])("table",null,[Object(a["createElementVNode"])("thead",null,[Object(a["createElementVNode"])("tr",null,[Object(a["createElementVNode"])("th",{onClick:t[1]||(t[1]=function(t){return e.changeSortOrder("idsite")})},Object(a["toDisplayString"])(e.translate("General_Measurable")),1),Object(a["createElementVNode"])("th",{onClick:t[2]||(t[2]=function(t){return e.changeSortOrder("problem")})},Object(a["toDisplayString"])(e.translate("CoreAdminHome_Problem")),1),Object(a["createElementVNode"])("th",{onClick:t[3]||(t[3]=function(t){return e.changeSortOrder("solution")})},Object(a["toDisplayString"])(e.translate("CoreAdminHome_Solution")),1),Object(a["createElementVNode"])("th",{onClick:t[4]||(t[4]=function(t){return e.changeSortOrder("date_first_occurred")})},Object(a["toDisplayString"])(e.translate("General_Date")),1),Object(a["createElementVNode"])("th",{onClick:t[5]||(t[5]=function(t){return e.changeSortOrder("url")})},Object(a["toDisplayString"])(e.translate("Actions_ColumnPageURL")),1),Object(a["createElementVNode"])("th",{onClick:t[6]||(t[6]=function(t){return e.changeSortOrder("request_url")})},Object(a["toDisplayString"])(e.translate("CoreAdminHome_TrackingURL")),1),Object(a["createElementVNode"])("th",Jt,Object(a["toDisplayString"])(e.translate("General_Action")),1)])]),Object(a["createElementVNode"])("tbody",null,[Object(a["createElementVNode"])("tr",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("td",Rt,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.translate("CoreAdminHome_NoKnownFailures"))+" ",1),Wt],512),[[a["vShow"],!e.isLoading&&0===e.failures.length]])]),(Object(a["openBlock"])(!0),Object(a["createElementBlock"])(a["Fragment"],null,Object(a["renderList"])(e.sortedFailures,(function(n,o){return Object(a["openBlock"])(),Object(a["createElementBlock"])("tr",{key:o},[Object(a["createVNode"])(c,{failure:n,onDelete:t[7]||(t[7]=function(t){return e.deleteFailure(t.idSite,t.idFailure)})},null,8,["failure"])])})),128))])],512),[[d]]),Object(a["createElementVNode"])("div",$t,[Object(a["createElementVNode"])("h2",null,Object(a["toDisplayString"])(e.translate("CoreAdminHome_ConfirmDeleteAllTrackingFailures")),1),Object(a["createElementVNode"])("input",{type:"button",role:"yes",value:e.translate("General_Yes")},null,8,Kt),Object(a["createElementVNode"])("input",{type:"button",role:"no",value:e.translate("General_No")},null,8,zt)]),Object(a["createElementVNode"])("div",Qt,[Object(a["createElementVNode"])("h2",null,Object(a["toDisplayString"])(e.translate("CoreAdminHome_ConfirmDeleteThisTrackingFailure")),1),Object(a["createElementVNode"])("input",{type:"button",role:"yes",value:e.translate("General_Yes")},null,8,Yt),Object(a["createElementVNode"])("input",{type:"button",role:"no",value:e.translate("General_No")},null,8,Xt)])]})),_:1},8,["content-title"])}var en=["href"],tn={class:"datetime"},nn=["title"],on=["title"];function rn(e,t,n,o,r,i){return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[Object(a["createElementVNode"])("td",null,Object(a["toDisplayString"])(e.failure.site_name)+" ("+Object(a["toDisplayString"])(e.translate("General_Id"))+" "+Object(a["toDisplayString"])(e.failure.idsite)+")",1),Object(a["createElementVNode"])("td",null,Object(a["toDisplayString"])(e.failure.problem),1),Object(a["createElementVNode"])("td",null,[Object(a["createTextVNode"])(Object(a["toDisplayString"])(e.failure.solution)+" ",1),Object(a["withDirectives"])(Object(a["createElementVNode"])("a",{rel:"noopener noreferrer",href:e.failure.solution_url},Object(a["toDisplayString"])(e.translate("CoreAdminHome_LearnMore")),9,en),[[a["vShow"],e.failure.solution_url]])]),Object(a["createElementVNode"])("td",tn,Object(a["toDisplayString"])(e.failure.pretty_date_first_occurred),1),Object(a["createElementVNode"])("td",null,Object(a["toDisplayString"])(e.failure.url),1),Object(a["createElementVNode"])("td",null,[Object(a["withDirectives"])(Object(a["createElementVNode"])("span",{onClick:t[0]||(t[0]=function(t){return e.showFullRequestUrl=!0}),title:e.translate("CoreHome_ClickToSeeFullInformation")},Object(a["toDisplayString"])(e.limtedRequestUrl)+"...",9,nn),[[a["vShow"],!e.showFullRequestUrl]]),Object(a["withDirectives"])(Object(a["createElementVNode"])("span",null,Object(a["toDisplayString"])(e.failure.request_url),513),[[a["vShow"],e.failure.showFullRequestUrl]])]),Object(a["createElementVNode"])("td",null,[Object(a["createElementVNode"])("span",{class:"table-action icon-delete",onClick:t[1]||(t[1]=function(t){return e.deleteFailure(e.failure.idsite,e.failure.idfailure)}),title:e.translate("General_Delete")},null,8,on)])],64)}var an=Object(a["defineComponent"])({props:{failure:{type:Object,required:!0}},emits:["delete"],data:function(){return{showFullRequestUrl:!1}},computed:{limtedRequestUrl:function(){return this.failure.request_url.substring(0,100)}},methods:{deleteFailure:function(e,t){this.$emit("delete",{idSite:e,idFailure:t})}}});an.render=rn;var ln=an;function cn(e){return mn(e)||un(e)||dn(e)||sn()}function sn(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function dn(e,t){if(e){if("string"===typeof e)return gn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gn(e,t):void 0}}function un(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function mn(e){if(Array.isArray(e))return gn(e)}function gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var pn=Object(a["defineComponent"])({components:{ContentBlock:y["ContentBlock"],ActivityIndicator:y["ActivityIndicator"],FailureRow:ln},directives:{ContentTable:y["ContentTable"]},data:function(){return{failures:[],sortColumn:"idsite",sortReverse:!1,isLoading:!1}},created:function(){this.fetchAll()},methods:{changeSortOrder:function(e){this.sortColumn===e?this.sortReverse=!this.sortReverse:this.sortColumn=e},fetchAll:function(){var e=this;this.failures=[],this.isLoading=!0,y["AjaxHelper"].fetch({method:"CoreAdminHome.getTrackingFailures",filter_limit:"-1"}).then((function(t){e.failures=t,e.isLoading=!1})).finally((function(){e.isLoading=!1}))},deleteAll:function(){var e=this;y["Matomo"].helper.modalConfirm("#confirmDeleteAllTrackingFailures",{yes:function(){e.failures=[],y["AjaxHelper"].fetch({method:"CoreAdminHome.deleteAllTrackingFailures"}).then((function(){e.fetchAll()}))}})},deleteFailure:function(e,t){var n=this;y["Matomo"].helper.modalConfirm("#confirmDeleteThisTrackingFailure",{yes:function(){n.failures=[],y["AjaxHelper"].fetch({method:"CoreAdminHome.deleteTrackingFailure",idSite:e,idFailure:t}).then((function(){n.fetchAll()}))}})}},computed:{sortedFailures:function(){var e=this.sortColumn,t=cn(this.failures);return this.sortReverse?t.sort((function(t,n){return t[e]>n[e]?-1:t[e]<n[e]?1:0})):t.sort((function(t,n){return t[e]<n[e]?-1:t[e]>n[e]?1:0})),t}}});pn.render=Zt;var bn=pn;
/*!
* Matomo - free/libre analytics platform
*
diff --git a/plugins/CoreAdminHome/vue/src/SmtpSettings/SmtpSettings.vue b/plugins/CoreAdminHome/vue/src/SmtpSettings/SmtpSettings.vue
index 64214e0764..6d6e859ccc 100644
--- a/plugins/CoreAdminHome/vue/src/SmtpSettings/SmtpSettings.vue
+++ b/plugins/CoreAdminHome/vue/src/SmtpSettings/SmtpSettings.vue
@@ -51,7 +51,7 @@
v-model="mailUsername"
:title="translate('General_SmtpUsername')"
:inline-help="translate('General_OnlyEnterIfRequired')"
- :autocomplete="false"
+ :autocomplete="'off'"
/>
<Field
@@ -62,7 +62,7 @@
@click="!passwordChanged && $event.target.select();"
:title="translate('General_SmtpPassword')"
:inline-help="passwordHelp"
- :autocomplete="false"
+ :autocomplete="'off'"
/>
<Field
@@ -71,7 +71,7 @@
v-model="mailFromAddress"
:title="translate('General_SmtpFromAddress')"
:inline-help="translate('General_SmtpFromEmailHelp', mailHost)"
- :autocomplete="false"
+ :autocomplete="'off'"
/>
<Field
@@ -80,7 +80,7 @@
v-model="mailFromName"
:title="translate('General_SmtpFromName')"
:inline-help="translate('General_NameShownInTheSenderColumn')"
- :autocomplete="false"
+ :autocomplete="'off'"
/>
<Field
diff --git a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js
index 8d6aac6cd2..be22abaf18 100644
--- a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js
+++ b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js
@@ -1608,7 +1608,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__8bbf__;
/***/ (function(module, exports) {
function _extends() {
- module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {
+ module.exports = _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
@@ -1620,11 +1620,14 @@ function _extends() {
}
return target;
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
+ };
+
+ module.exports["default"] = module.exports, module.exports.__esModule = true;
return _extends.apply(this, arguments);
}
-module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
+module.exports = _extends;
+module.exports["default"] = module.exports, module.exports.__esModule = true;
/***/ }),
@@ -17126,9 +17129,9 @@ var CONTROL_TO_AVAILABLE_OPTION_PROCESSOR = {
FormFieldvue_type_script_lang_ts.render = render
/* harmony default export */ var FormField = (FormFieldvue_type_script_lang_ts);
-// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/Field/Field.vue?vue&type=template&id=85ce424c
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/Field/Field.vue?vue&type=template&id=4b1ab6ed
-function Fieldvue_type_template_id_85ce424c_render(_ctx, _cache, $props, $setup, $data, $options) {
+function Fieldvue_type_template_id_4b1ab6ed_render(_ctx, _cache, $props, $setup, $data, $options) {
var _component_FormField = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("FormField");
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_FormField, {
@@ -17145,7 +17148,7 @@ function Fieldvue_type_template_id_85ce424c_render(_ctx, _cache, $props, $setup,
_: 3
}, 8, ["form-field", "model-value", "model-modifiers"]);
}
-// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/Field/Field.vue?vue&type=template&id=85ce424c
+// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/Field/Field.vue?vue&type=template&id=4b1ab6ed
// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/Field/Field.vue?vue&type=script&lang=ts
@@ -17182,7 +17185,7 @@ var UI_CONTROLS_TO_TYPE = {
return {};
}
},
- autocomplete: Boolean,
+ autocomplete: String,
condition: Function,
varType: String,
autofocus: Boolean,
@@ -17258,7 +17261,7 @@ var UI_CONTROLS_TO_TYPE = {
-Fieldvue_type_script_lang_ts.render = Fieldvue_type_template_id_85ce424c_render
+Fieldvue_type_script_lang_ts.render = Fieldvue_type_template_id_4b1ab6ed_render
/* harmony default export */ var Field = (Fieldvue_type_script_lang_ts);
// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue?vue&type=template&id=a041fcc8
@@ -17493,26 +17496,26 @@ function GroupedSettingsvue_type_script_lang_ts_arrayWithHoles(arr) { if (Array.
GroupedSettingsvue_type_script_lang_ts.render = GroupedSettingsvue_type_template_id_566a93cc_render
/* harmony default export */ var GroupedSettings = (GroupedSettingsvue_type_script_lang_ts);
-// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/PasswordConfirmation/PasswordConfirmation.vue?vue&type=template&id=a62ed314
+// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/PasswordConfirmation/PasswordConfirmation.vue?vue&type=template&id=0ff066dc
-var PasswordConfirmationvue_type_template_id_a62ed314_hoisted_1 = {
+var PasswordConfirmationvue_type_template_id_0ff066dc_hoisted_1 = {
class: "confirm-password-modal modal",
ref: "root"
};
-var PasswordConfirmationvue_type_template_id_a62ed314_hoisted_2 = {
+var PasswordConfirmationvue_type_template_id_0ff066dc_hoisted_2 = {
class: "modal-content"
};
-var PasswordConfirmationvue_type_template_id_a62ed314_hoisted_3 = {
+var PasswordConfirmationvue_type_template_id_0ff066dc_hoisted_3 = {
class: "modal-text"
};
-var PasswordConfirmationvue_type_template_id_a62ed314_hoisted_4 = {
+var PasswordConfirmationvue_type_template_id_0ff066dc_hoisted_4 = {
class: "modal-footer"
};
-var PasswordConfirmationvue_type_template_id_a62ed314_hoisted_5 = ["disabled"];
-function PasswordConfirmationvue_type_template_id_a62ed314_render(_ctx, _cache, $props, $setup, $data, $options) {
+var PasswordConfirmationvue_type_template_id_0ff066dc_hoisted_5 = ["disabled"];
+function PasswordConfirmationvue_type_template_id_0ff066dc_render(_ctx, _cache, $props, $setup, $data, $options) {
var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field");
- return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PasswordConfirmationvue_type_template_id_a62ed314_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PasswordConfirmationvue_type_template_id_a62ed314_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PasswordConfirmationvue_type_template_id_a62ed314_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
+ return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PasswordConfirmationvue_type_template_id_0ff066dc_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PasswordConfirmationvue_type_template_id_0ff066dc_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PasswordConfirmationvue_type_template_id_0ff066dc_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, {
modelValue: _ctx.passwordConfirmation,
"onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
return _ctx.passwordConfirmation = $event;
@@ -17520,10 +17523,10 @@ function PasswordConfirmationvue_type_template_id_a62ed314_render(_ctx, _cache,
uicontrol: 'password',
disabled: !_ctx.requiresPasswordConfirmation ? 'disabled' : undefined,
name: 'currentUserPassword',
- autocomplete: false,
+ autocomplete: 'off',
"full-width": true,
title: _ctx.translate('UsersManager_YourCurrentPassword')
- }, null, 8, ["modelValue", "disabled", "title"])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PasswordConfirmationvue_type_template_id_a62ed314_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
+ }, null, 8, ["modelValue", "disabled", "title"])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PasswordConfirmationvue_type_template_id_0ff066dc_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
href: "",
class: "modal-action modal-close btn",
disabled: _ctx.requiresPasswordConfirmation && !_ctx.passwordConfirmation ? 'disabled' : undefined,
@@ -17534,7 +17537,7 @@ function PasswordConfirmationvue_type_template_id_a62ed314_render(_ctx, _cache,
_ctx.passwordConfirmation = '';
})
- }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Yes')), 9, PasswordConfirmationvue_type_template_id_a62ed314_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
+ }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Yes')), 9, PasswordConfirmationvue_type_template_id_0ff066dc_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", {
href: "",
class: "modal-action modal-close modal-no btn-flat",
onClick: _cache[2] || (_cache[2] = function ($event) {
@@ -17544,7 +17547,7 @@ function PasswordConfirmationvue_type_template_id_a62ed314_render(_ctx, _cache,
})
}, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_No')), 1)])], 512);
}
-// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/PasswordConfirmation/PasswordConfirmation.vue?vue&type=template&id=a62ed314
+// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/PasswordConfirmation/PasswordConfirmation.vue?vue&type=template&id=0ff066dc
// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/PasswordConfirmation/PasswordConfirmation.vue?vue&type=script&lang=ts
@@ -17625,7 +17628,7 @@ var _window = window,
-PasswordConfirmationvue_type_script_lang_ts.render = PasswordConfirmationvue_type_template_id_a62ed314_render
+PasswordConfirmationvue_type_script_lang_ts.render = PasswordConfirmationvue_type_template_id_0ff066dc_render
/* harmony default export */ var PasswordConfirmation = (PasswordConfirmationvue_type_script_lang_ts);
// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue?vue&type=script&lang=ts
diff --git a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js
index be93fb6b3e..9c9a7cfe86 100644
--- a/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js
+++ b/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js
@@ -1,10 +1,10 @@
-(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["CorePluginsAdmin"]=t(require("CoreHome"),require("vue")):e["CorePluginsAdmin"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CorePluginsAdmin/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},4788:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},i={"–":"\\--","—":"\\---"," ":"~","\t":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},a=function(e,t){return r({},e,t)};e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.preserveFormatting,s=void 0!==n&&n,l=t.escapeMapFn,c=void 0===l?a:l,u=String(e),p="",d=c(r({},o),s?r({},i):{}),f=Object.keys(d),m=function(){var e=!1;f.forEach((function(t,n){e||u.length>=t.length&&u.slice(0,t.length)===t&&(p+=d[f[n]],u=u.slice(t.length,u.length),e=!0)})),e||(p+=u.slice(0,1),u=u.slice(1,u.length))};while(u)m();return p}},7634:function(e,t,n){"use strict";var r,o,i;(function(n,a){o=[],r=a,i="function"===typeof r?r.apply(t,o):r,void 0===i||(e.exports=i)})(0,(function(){function e(){return!0}function t(){return!1}function n(){}function r(){var o=[{name:"number",test:function(e){return"number"===typeof e}},{name:"string",test:function(e){return"string"===typeof e}},{name:"boolean",test:function(e){return"boolean"===typeof e}},{name:"Function",test:function(e){return"function"===typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"===typeof e&&null!==e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],i={name:"any",test:e},a=[],s=[],l={types:o,conversions:s,ignore:a};function c(e){var t=K(l.types,(function(t){return t.name===e}));if(t)return t;if("any"===e)return i;var n=K(l.types,(function(t){return t.name.toLowerCase()===e.toLowerCase()}));throw new TypeError('Unknown type "'+e+'"'+(n?'. Did you mean "'+n.name+'"?':""))}function u(e){return e===i?999:l.types.indexOf(e)}function p(e){var t=K(l.types,(function(t){return t.test(e)}));if(t)return t.name;throw new TypeError("Value has unknown type. Value: "+e)}function d(e,t){if(!e.signatures)throw new TypeError("Function is no typed-function");var n;if("string"===typeof t){n=t.split(",");for(var r=0;r<n.length;r++)n[r]=n[r].trim()}else{if(!Array.isArray(t))throw new TypeError("String array or a comma separated string expected");n=t}var o=n.join(","),i=e.signatures[o];if(i)return i;throw new TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+n.join(", ")+"))")}function f(e,t){var n=p(e);if(t===n)return e;for(var r=0;r<l.conversions.length;r++){var o=l.conversions[r];if(o.from===n&&o.to===t)return o.convert(e)}throw new Error("Cannot convert from "+n+" to "+t)}function m(e){return e.map((function(e){var t=e.types.map(N);return(e.restParam?"...":"")+t.join("|")})).join(",")}function h(e,t){var n=0===e.indexOf("..."),r=n?e.length>3?e.slice(3):"any":e,o=r.split("|").map(I).filter(U).filter(L),i=T(t,o),a=o.map((function(e){var t=c(e);return{name:e,typeIndex:u(t),test:t.test,conversion:null,conversionIndex:-1}})),s=i.map((function(e){var n=c(e.from);return{name:e.from,typeIndex:u(n),test:n.test,conversion:e,conversionIndex:t.indexOf(e)}}));return{types:a.concat(s),restParam:n}}function g(e,t,n){var r=[];return""!==e.trim()&&(r=e.split(",").map(I).map((function(e,t,r){var o=h(e,n);if(o.restParam&&t!==r.length-1)throw new SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return o}))),r.some(R)?null:{params:r,fn:t}}function b(e){var t=z(e);return!!t&&t.restParam}function y(e){return e.types.some((function(e){return null!=e.conversion}))}function v(t){if(t&&0!==t.types.length){if(1===t.types.length)return c(t.types[0].name).test;if(2===t.types.length){var n=c(t.types[0].name).test,r=c(t.types[1].name).test;return function(e){return n(e)||r(e)}}var o=t.types.map((function(e){return c(e.name).test}));return function(e){for(var t=0;t<o.length;t++)if(o[t](e))return!0;return!1}}return e}function O(e){var t,n,r;if(b(e)){t=q(e).map(v);var o=t.length,i=v(z(e)),a=function(e){for(var t=o;t<e.length;t++)if(!i(e[t]))return!1;return!0};return function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return a(e)&&e.length>=o+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=v(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=v(e[0]),r=v(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(v),function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return e.length===t.length})}function w(e,t){return t<e.params.length?e.params[t]:b(e.params)?z(e.params):null}function j(e,t,n){var r=w(e,t),o=r?n?r.types.filter(x):r.types:[];return o.map(N)}function N(e){return e.name}function x(e){return null===e.conversion||void 0===e.conversion}function k(e,t){var n=Y(Z(e,(function(e){return j(e,t,!1)})));return-1!==n.indexOf("any")?["any"]:n}function E(e,t,n){var r,o,i,a=e||"unnamed",s=n;for(i=0;i<t.length;i++){var l=s.filter((function(e){var n=v(w(e,i));return(i<e.params.length||b(e.params))&&n(t[i])}));if(0===l.length){if(o=k(s,i),o.length>0){var c=p(t[i]);return r=new TypeError("Unexpected type of argument in function "+a+" (expected: "+o.join(" or ")+", actual: "+c+", index: "+i+")"),r.data={category:"wrongType",fn:a,index:i,actual:c,expected:o},r}}else s=l}var u=s.map((function(e){return b(e.params)?1/0:e.params.length}));if(t.length<Math.min.apply(null,u))return o=k(s,i),r=new TypeError("Too few arguments in function "+a+" (expected: "+o.join(" or ")+", index: "+t.length+")"),r.data={category:"tooFewArgs",fn:a,index:t.length,expected:o},r;var d=Math.max.apply(null,u);return t.length>d?(r=new TypeError("Too many arguments in function "+a+" (expected: "+d+", actual: "+t.length+")"),r.data={category:"tooManyArgs",fn:a,index:t.length,expectedLength:d},r):(r=new TypeError('Arguments of type "'+t.join(", ")+'" do not match any of the defined signatures of function '+a+"."),r.data={category:"mismatch",actual:t.map(p)},r)}function C(e){for(var t=999,n=0;n<e.types.length;n++)x(e.types[n])&&(t=Math.min(t,e.types[n].typeIndex));return t}function S(e){for(var t=999,n=0;n<e.types.length;n++)x(e.types[n])||(t=Math.min(t,e.types[n].conversionIndex));return t}function V(e,t){var n;return n=e.restParam-t.restParam,0!==n?n:(n=y(e)-y(t),0!==n?n:(n=C(e)-C(t),0!==n?n:S(e)-S(t)))}function A(e,t){var n,r,o=Math.min(e.params.length,t.params.length);if(r=e.params.some(y)-t.params.some(y),0!==r)return r;for(n=0;n<o;n++)if(r=y(e.params[n])-y(t.params[n]),0!==r)return r;for(n=0;n<o;n++)if(r=V(e.params[n],t.params[n]),0!==r)return r;return e.params.length-t.params.length}function T(e,t){var n={};return e.forEach((function(e){-1!==t.indexOf(e.from)||-1===t.indexOf(e.to)||n[e.from]||(n[e.from]=e)})),Object.keys(n).map((function(e){return n[e]}))}function M(e,t){var n=t;if(e.some(y)){var r=b(e),o=e.map(P);n=function(){for(var e=[],n=r?arguments.length-1:arguments.length,i=0;i<n;i++)e[i]=o[i](arguments[i]);return r&&(e[n]=arguments[n].map(o[n])),t.apply(this,e)}}var i=n;if(b(e)){var a=e.length-1;i=function(){return n.apply(this,W(arguments,0,a).concat([W(arguments,a)]))}}return i}function P(e){var t,n,r,o,i=[],a=[];switch(e.types.forEach((function(e){e.conversion&&(i.push(c(e.conversion.from).test),a.push(e.conversion.convert))})),a.length){case 0:return function(e){return e};case 1:return t=i[0],r=a[0],function(e){return t(e)?r(e):e};case 2:return t=i[0],n=i[1],r=a[0],o=a[1],function(e){return t(e)?r(e):n(e)?o(e):e};default:return function(e){for(var t=0;t<a.length;t++)if(i[t](e))return a[t](e);return e}}}function D(e){var t={};return e.forEach((function(e){e.params.some(y)||B(e.params,!0).forEach((function(n){t[m(n)]=e.fn}))})),t}function B(e,t){function n(e,r,o){if(r<e.length){var i,a=e[r],s=t?a.types.filter(x):a.types;if(a.restParam){var l=s.filter(x);i=l.length<s.length?[l,s]:[s]}else i=s.map((function(e){return[e]}));return Z(i,(function(t){return n(e,r+1,o.concat([t]))}))}var c=o.map((function(t,n){return{types:t,restParam:n===e.length-1&&b(e)}}));return[c]}return n(e,0,[])}function $(e,t){for(var n=Math.max(e.params.length,t.params.length),r=0;r<n;r++){var o=j(e,r,!0),i=j(t,r,!0);if(!G(o,i))return!1}var a=e.params.length,s=t.params.length,l=b(e.params),c=b(t.params);return l?c?a===s:s>=a:c?a>=s:a===s}function F(e,r){if(0===Object.keys(r).length)throw new SyntaxError("No signatures provided");var o=[];Object.keys(r).map((function(e){return g(e,r[e],l.conversions)})).filter(H).forEach((function(e){var t=K(o,(function(t){return $(t,e)}));if(t)throw new TypeError('Conflicting signatures "'+m(t.params)+'" and "'+m(e.params)+'".');o.push(e)}));var i=Z(o,(function(e){var t=e?B(e.params,!1):[];return t.map((function(t){return{params:t,fn:e.fn}}))})).filter(H);i.sort(A);var a=i[0]&&i[0].params.length<=2&&!b(i[0].params),s=i[1]&&i[1].params.length<=2&&!b(i[1].params),c=i[2]&&i[2].params.length<=2&&!b(i[2].params),u=i[3]&&i[3].params.length<=2&&!b(i[3].params),p=i[4]&&i[4].params.length<=2&&!b(i[4].params),d=i[5]&&i[5].params.length<=2&&!b(i[5].params),f=a&&s&&c&&u&&p&&d,h=i.map((function(e){return O(e.params)})),y=a?v(i[0].params[0]):t,w=s?v(i[1].params[0]):t,j=c?v(i[2].params[0]):t,N=u?v(i[3].params[0]):t,x=p?v(i[4].params[0]):t,k=d?v(i[5].params[0]):t,E=a?v(i[0].params[1]):t,C=s?v(i[1].params[1]):t,S=c?v(i[2].params[1]):t,V=u?v(i[3].params[1]):t,T=p?v(i[4].params[1]):t,P=d?v(i[5].params[1]):t,F=i.map((function(e){return M(e.params,e.fn)})),_=a?F[0]:n,L=s?F[1]:n,I=c?F[2]:n,U=u?F[3]:n,R=p?F[4]:n,q=d?F[5]:n,z=a?i[0].params.length:-1,W=s?i[1].params.length:-1,J=c?i[2].params.length:-1,G=u?i[3].params.length:-1,Y=p?i[4].params.length:-1,X=d?i[5].params.length:-1,Q=f?6:0,ee=i.length,te=function(){for(var t=Q;t<ee;t++)if(h[t](arguments))return F[t].apply(this,arguments);return l.onMismatch(e,arguments,i)},ne=function e(t,n){return arguments.length===z&&y(t)&&E(n)?_.apply(e,arguments):arguments.length===W&&w(t)&&C(n)?L.apply(e,arguments):arguments.length===J&&j(t)&&S(n)?I.apply(e,arguments):arguments.length===G&&N(t)&&V(n)?U.apply(e,arguments):arguments.length===Y&&x(t)&&T(n)?R.apply(e,arguments):arguments.length===X&&k(t)&&P(n)?q.apply(e,arguments):te.apply(e,arguments)};try{Object.defineProperty(ne,"name",{value:e})}catch(re){}return ne.signatures=D(i),ne}function _(e,t,n){throw E(e,t,n)}function L(e){return-1===l.ignore.indexOf(e)}function I(e){return e.trim()}function U(e){return!!e}function H(e){return null!==e}function R(e){return 0===e.types.length}function q(e){return e.slice(0,e.length-1)}function z(e){return e[e.length-1]}function W(e,t,n){return Array.prototype.slice.call(e,t,n)}function J(e,t){return-1!==e.indexOf(t)}function G(e,t){for(var n=0;n<e.length;n++)if(J(t,e[n]))return!0;return!1}function K(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function Y(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return Object.keys(t)}function Z(e,t){return Array.prototype.concat.apply([],e.map(t))}function X(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(("object"===typeof r.signatures||"string"===typeof r.signature)&&""!==r.name)if(""===t)t=r.name;else if(t!==r.name){var o=new Error("Function names do not match (expected: "+t+", actual: "+r.name+")");throw o.data={actual:r.name,expected:t},o}}return t}function Q(e){var t,n={};function r(e,r){if(n.hasOwnProperty(e)&&r!==n[e])throw t=new Error('Signature "'+e+'" is defined twice'),t.data={signature:e},t}for(var o=0;o<e.length;o++){var i=e[o];if("object"===typeof i.signatures)for(var a in i.signatures)i.signatures.hasOwnProperty(a)&&(r(a,i.signatures[a]),n[a]=i.signatures[a]);else{if("string"!==typeof i.signature)throw t=new TypeError("Function is no typed-function (index: "+o+")"),t.data={index:o},t;r(i.signature,i),n[i.signature]=i}}return n}return l=F("typed",{"string, Object":F,Object:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);var r=X(t);return F(r,e)},"...Function":function(e){return F(X(e),Q(e))},"string, ...Function":function(e,t){return F(e,Q(t))}}),l.create=r,l.types=o,l.conversions=s,l.ignore=a,l.onMismatch=_,l.throwMismatchError=_,l.createError=E,l.convert=f,l.find=d,l.addType=function(e,t){if(!e||"string"!==typeof e.name||"function"!==typeof e.test)throw new TypeError("Object with properties {name: string, test: function} expected");if(!1!==t)for(var n=0;n<l.types.length;n++)if("Object"===l.types[n].name)return void l.types.splice(n,0,e);l.types.push(e)},l.addConversion=function(e){if(!e||"string"!==typeof e.from||"string"!==typeof e.to||"function"!==typeof e.convert)throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");l.conversions.push(e)},l}return r()}))},"8bbf":function(e,n){e.exports=t},a559:function(e,t){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports["default"]=e.exports,n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports["default"]=e.exports},c0e2:function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;for(r;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,a=r.length;i<a;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"expressions",(function(){return vi})),n.d(t,"FormField",(function(){return ol})),n.d(t,"Field",(function(){return ll})),n.d(t,"PluginSettings",(function(){return Wl})),n.d(t,"PluginFilter",(function(){return rc})),n.d(t,"PluginManagement",(function(){return lc})),n.d(t,"PluginUpload",(function(){return fc})),n.d(t,"SaveButton",(function(){return yc})),n.d(t,"Form",(function(){return wc})),n.d(t,"GroupedSettings",(function(){return El})),n.d(t,"PluginsIntro",(function(){return Sc})),n.d(t,"ThemesIntro",(function(){return $c})),n.d(t,"PasswordConfirmation",(function(){return $l})),n.d(t,"PluginName",(function(){return Ic})),n.d(t,"PluginsTable",(function(){return Mp})),n.d(t,"PluginsTableWithUpdates",(function(){return cd})),n.d(t,"UploadPluginDialog",(function(){return Nd})),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var i=n("a559"),a=n.n(i);function s(e){return"number"===typeof e}function l(e){return!(!e||"object"!==typeof e||"function"!==typeof e.constructor)&&(!0===e.isBigNumber&&"object"===typeof e.constructor.prototype&&!0===e.constructor.prototype.isBigNumber||"function"===typeof e.constructor.isDecimal&&!0===e.constructor.isDecimal(e))}function c(e){return e&&"object"===typeof e&&!0===Object.getPrototypeOf(e).isComplex||!1}function u(e){return e&&"object"===typeof e&&!0===Object.getPrototypeOf(e).isFraction||!1}function p(e){return e&&!0===e.constructor.prototype.isUnit||!1}function d(e){return"string"===typeof e}var f=Array.isArray;function m(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function h(e){return Array.isArray(e)||m(e)}function g(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function b(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function y(e){return e&&!0===e.constructor.prototype.isRange||!1}function v(e){return e&&!0===e.constructor.prototype.isIndex||!1}function O(e){return"boolean"===typeof e}function w(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function j(e){return e&&!0===e.constructor.prototype.isHelp||!1}function N(e){return"function"===typeof e}function x(e){return e instanceof Date}function k(e){return e instanceof RegExp}function E(e){return!(!e||"object"!==typeof e||e.constructor!==Object||c(e)||u(e))}function C(e){return null===e}function S(e){return void 0===e}function V(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function A(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function T(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function M(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function P(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function D(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function B(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function $(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function F(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function _(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function L(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function I(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function U(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function H(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function R(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function q(e){return e&&!0===e.constructor.prototype.isChain||!1}function z(e){var t=typeof e;return"object"===t?null===e?"null":Array.isArray(e)?"Array":e instanceof Date?"Date":e instanceof RegExp?"RegExp":l(e)?"BigNumber":c(e)?"Complex":u(e)?"Fraction":m(e)?"Matrix":p(e)?"Unit":v(e)?"Index":y(e)?"Range":w(e)?"ResultSet":_(e)?e.type:q(e)?"Chain":j(e)?"Help":"Object":"function"===t?"Function":t}function W(e){var t=typeof e;if("number"===t||"string"===t||"boolean"===t||null===e||void 0===e)return e;if("function"===typeof e.clone)return e.clone();if(Array.isArray(e))return e.map((function(e){return W(e)}));if(e instanceof Date)return new Date(e.valueOf());if(l(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return J(e,W)}function J(e,t){var n={};for(var r in e)Q(e,r)&&(n[r]=t(e[r]));return n}function G(e,t){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(var n in t)if(Q(t,n)&&!(n in Object.prototype)&&!(n in Function.prototype))if(t[n]&&t[n].constructor===Object)void 0===e[n]&&(e[n]={}),e[n]&&e[n].constructor===Object?G(e[n],t[n]):e[n]=t[n];else{if(Array.isArray(t[n]))throw new TypeError("Arrays are not supported by deepExtend");e[n]=t[n]}return e}function K(e,t){var n,r,o;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(r=0,o=e.length;r<o;r++)if(!K(e[r],t[r]))return!1;return!0}if("function"===typeof e)return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!K(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}return e===t}function Y(e){var t={};return Z(e,t),t}function Z(e,t){for(var n in e)if(Q(e,n)){var r=e[n];"object"===typeof r&&null!==r?Z(r,t):t[n]=r}}function X(e,t,n){var r,o=!0;Object.defineProperty(e,t,{get:function(){return o&&(r=n(),o=!1),r},set:function(e){r=e,o=!1},configurable:!0,enumerable:!0})}function Q(e,t){return e&&Object.hasOwnProperty.call(e,t)}function ee(e){return e&&"function"===typeof e.factory}function te(e,t){for(var n={},r=0;r<t.length;r++){var o=t[r],i=e[o];void 0!==i&&(n[o]=i)}return n}function ne(e){return Object.keys(e).map(t=>e[t])}var re=n("c0e2"),oe=n.n(re);function ie(e){var t=new oe.a;return e.on=t.on.bind(t),e.off=t.off.bind(t),e.once=t.once.bind(t),e.emit=t.emit.bind(t),e}function ae(e){return"boolean"===typeof e||!!isFinite(e)&&e===Math.round(e)}var se=Math.sign||function(e){return e>0?1:e<0?-1:0},le=Math.log2||function(e){return Math.log(e)/Math.LN2},ce=Math.log10||function(e){return Math.log(e)/Math.LN10},ue=Math.log1p||function(e){return Math.log(e+1)},pe=Math.cbrt||function(e){if(0===e)return e;var t,n=e<0;return n&&(e=-e),isFinite(e)?(t=Math.exp(Math.log(e)/3),t=(e/(t*t)+2*t)/3):t=e,n?-t:t},de=Math.expm1||function(e){return e>=2e-4||e<=-2e-4?Math.exp(e)-1:e+e*e/2+e*e*e/6};function fe(e,t,n){var r={2:"0b",8:"0o",16:"0x"},o=r[t],i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!ae(n))throw new Error("size must be an integer");if(e>2**(n-1)-1||e<-(2**(n-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!ae(e))throw new Error("Value must be an integer");e<0&&(e+=2**n),i="i".concat(n)}var a="";return e<0&&(e=-e,a="-"),"".concat(a).concat(o).concat(e.toString(t)).concat(i)}function me(e,t){if("function"===typeof t)return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var n,r,o="auto";if(t&&(t.notation&&(o=t.notation),s(t)?n=t:s(t.precision)&&(n=t.precision),t.wordSize&&(r=t.wordSize,"number"!==typeof r)))throw new Error('Option "wordSize" must be a number');switch(o){case"fixed":return be(e,n);case"exponential":return ye(e,n);case"engineering":return ge(e,n);case"bin":return fe(e,2,r);case"oct":return fe(e,8,r);case"hex":return fe(e,16,r);case"auto":return ve(e,n,t&&t).replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t}));default:throw new Error('Unknown notation "'+o+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function he(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var n=t[1],r=t[2],o=parseFloat(t[4]||"0"),i=r.indexOf(".");o+=-1!==i?i-1:r.length-1;var a=r.replace(".","").replace(/^0*/,(function(e){return o-=e.length,""})).replace(/0*$/,"").split("").map((function(e){return parseInt(e)}));return 0===a.length&&(a.push(0),o++),{sign:n,coefficients:a,exponent:o}}function ge(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=he(e),r=Oe(n,t),o=r.exponent,i=r.coefficients,a=o%3===0?o:o<0?o-3-o%3:o-o%3;if(s(t))while(t>i.length||o-a+1>i.length)i.push(0);else for(var l=Math.abs(o-a)-(i.length-1),c=0;c<l;c++)i.push(0);var u=Math.abs(o-a),p=1;while(u>0)p++,u--;var d=i.slice(p).join(""),f=s(t)&&d.length||d.match(/[1-9]/)?"."+d:"",m=i.slice(0,p).join("")+f+"e"+(o>=0?"+":"")+a.toString();return r.sign+m}function be(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=he(e),r="number"===typeof t?Oe(n,n.exponent+1+t):n,o=r.coefficients,i=r.exponent+1,a=i+(t||0);return o.length<a&&(o=o.concat(we(a-o.length))),i<0&&(o=we(1-i).concat(o),i=1),i<o.length&&o.splice(i,0,0===i?"0.":"."),r.sign+o.join("")}function ye(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=he(e),r=t?Oe(n,t):n,o=r.coefficients,i=r.exponent;o.length<t&&(o=o.concat(we(t-o.length)));var a=o.shift();return r.sign+a+(o.length>0?"."+o.join(""):"")+"e"+(i>=0?"+":"")+i}function ve(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&void 0!==n.lowerExp?n.lowerExp:-3,o=n&&void 0!==n.upperExp?n.upperExp:5,i=he(e),a=t?Oe(i,t):i;if(a.exponent<r||a.exponent>=o)return ye(e,t);var s=a.coefficients,l=a.exponent;s.length<t&&(s=s.concat(we(t-s.length))),s=s.concat(we(l-s.length+1+(s.length<t?t-s.length:0))),s=we(-l).concat(s);var c=l>0?l:0;return c<s.length-1&&s.splice(c+1,0,"."),a.sign+s.join("")}function Oe(e,t){var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;while(t<=0)r.unshift(0),n.exponent++,t++;if(r.length>t){var o=r.splice(t,r.length-t);if(o[0]>=5){var i=t-1;r[i]++;while(10===r[i])r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}}return n}function we(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function je(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}Number.EPSILON;var Ne=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},xe=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},ke=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},Ee=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},Ce=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},Se=Math.tanh||function(e){var t=Math.exp(2*e);return(t-1)/(t+1)};function Ve(e,t,n){var r=e.constructor,o=new r(2),i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!ae(n))throw new Error("size must be an integer");if(e.greaterThan(o.pow(n-1).sub(1))||e.lessThan(o.pow(n-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(o.pow(n))),i="i".concat(n)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(t," not supported "))}}function Ae(e,t){if("function"===typeof t)return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n,r,o="auto";if(void 0!==t&&(t.notation&&(o=t.notation),"number"===typeof t?n=t:t.precision&&(n=t.precision),t.wordSize&&(r=t.wordSize,"number"!==typeof r)))throw new Error('Option "wordSize" must be a number');switch(o){case"fixed":return Pe(e,n);case"exponential":return Me(e,n);case"engineering":return Te(e,n);case"bin":return Ve(e,2,r);case"oct":return Ve(e,8,r);case"hex":return Ve(e,16,r);case"auto":var i,a=t&&void 0!==t.lowerExp?t.lowerExp:-3,s=t&&void 0!==t.upperExp?t.upperExp:5;if(e.isZero())return"0";var l=e.toSignificantDigits(n),c=l.e;return i=c>=a&&c<s?l.toFixed():Me(e,n),i.replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t}));default:throw new Error('Unknown notation "'+o+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Te(e,t){var n=e.e,r=n%3===0?n:n<0?n-3-n%3:n-n%3,o=e.mul(Math.pow(10,-r)),i=o.toPrecision(t);return-1!==i.indexOf("e")&&(i=o.toString()),i+"e"+(n>=0?"+":"")+r.toString()}function Me(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()}function Pe(e,t){return e.toFixed(t)}function De(e,t){var n=Be(e,t);return t&&"object"===typeof t&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function Be(e,t){if("number"===typeof e)return me(e,t);if(l(e))return Ae(e,t);if(Le(e))return t&&"decimal"===t.fraction?e.toString():e.s*e.n+"/"+e.d;if(Array.isArray(e))return _e(e,t);if(d(e))return'"'+e+'"';if("function"===typeof e)return e.syntax?String(e.syntax):"function";if(e&&"object"===typeof e){if("function"===typeof e.format)return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var n=Object.keys(e).map(n=>'"'+n+'": '+De(e[n],t));return"{"+n.join(", ")+"}"}return String(e)}function $e(e){var t=String(e),n="",r=0;while(r<t.length){var o=t.charAt(r);"\\"===o?(n+=o,r++,o=t.charAt(r),""!==o&&-1!=='"\\/bfnrtu'.indexOf(o)||(n+="\\"),n+=o):n+='"'===o?'\\"':o,r++}return'"'+n+'"'}function Fe(e){var t=String(e);return t=t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),t}function _e(e,t){if(Array.isArray(e)){for(var n="[",r=e.length,o=0;o<r;o++)0!==o&&(n+=", "),n+=_e(e[o],t);return n+="]",n}return De(e,t)}function Le(e){return e&&"object"===typeof e&&"number"===typeof e.s&&"number"===typeof e.n&&"number"===typeof e.d||!1}function Ie(e,t,n){if(!(this instanceof Ie))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=(new Error).stack}function Ue(e,t,n){if(!(this instanceof Ue))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}function He(e){var t=[];while(Array.isArray(e))t.push(e.length),e=e[0];return t}function Re(e,t){return Array.prototype.map.call(e,t)}function qe(e,t){Array.prototype.forEach.call(e,t)}function ze(e,t){return Array.prototype.join.call(e,t)}function We(e,t){return-1!==e.indexOf(t)}function Je(e,t,n,r){function o(r){var o=te(r,t.map(Ze));return Ke(e,t,r),n(o)}return o.isFactory=!0,o.fn=e,o.dependencies=t.slice().sort(),r&&(o.meta=r),o}function Ge(e){return"function"===typeof e&&"string"===typeof e.fn&&Array.isArray(e.dependencies)}function Ke(e,t,n){var r=t.filter(e=>!Ye(e)).every(e=>void 0!==n[e]);if(!r){var o=t.filter(e=>void 0===n[e]);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(o.map(e=>'"'.concat(e,'"')).join(", "),"."))}}function Ye(e){return e&&"?"===e[0]}function Ze(e){return e&&"?"===e[0]?e.slice(1):e}function Xe(e,t,n,r){if(!(this instanceof Xe))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=r,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(void 0!==r&&null!==r?"-"+r:"")+" expected)",this.stack=(new Error).stack}function Qe(e,t,n,r){function o(e,t){var n=arguments.length;if(1!==n&&2!==n)throw new Xe("import",n,1,2);function r(e,n,o){if(Array.isArray(n))n.forEach(t=>r(e,t));else if("object"===typeof n)for(var i in n)Q(n,i)&&r(e,n[i],i);else if(Ge(n)||void 0!==o){var a=Ge(n)?O(n)?n.fn+".transform":n.fn:o;if(Q(e,a)&&e[a]!==n&&!t.silent)throw new Error('Cannot import "'+a+'" twice');e[a]=n}else if(!t.silent)throw new TypeError("Factory, Object, or Array expected")}t||(t={});var o={};for(var a in r(o,e),o)if(Q(o,a)){var s=o[a];if(Ge(s))f(s,t);else if(h(s))i(a,s,t);else if(!t.silent)throw new TypeError("Factory, Object, or Array expected")}}function i(t,o,i){if(i.wrap&&"function"===typeof o&&(o=d(o)),b(o)&&(o=e(t,{[o.signature]:o})),g(n[t])&&g(o))return o=i.override?e(t,o.signatures):e(n[t],o),n[t]=o,delete r[t],a(t,o),void n.emit("import",t,(function(){return o}));if(void 0===n[t]||i.override)return n[t]=o,delete r[t],a(t,o),void n.emit("import",t,(function(){return o}));if(!i.silent)throw new Error('Cannot import "'+t+'": already exists')}function a(e,t){t&&"function"===typeof t.transform?(n.expression.transform[e]=t.transform,y(e)&&(n.expression.mathWithTransform[e]=t.transform)):(delete n.expression.transform[e],y(e)&&(n.expression.mathWithTransform[e]=t))}function s(e){delete n.expression.transform[e],y(e)?n.expression.mathWithTransform[e]=n[e]:delete n.expression.mathWithTransform[e]}function d(e){var t=function(){for(var t=[],r=0,o=arguments.length;r<o;r++){var i=arguments[r];t[r]=i&&i.valueOf()}return e.apply(n,t)};return e.transform&&(t.transform=e.transform),t}function f(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.fn;if(We(i,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(i));var a=O(t)?n.expression.transform:n,l=i in n.expression.transform,c=Q(a,i)?a[i]:void 0,u=function(){var r={};t.dependencies.map(Ze).forEach(e=>{if(We(e,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(e));"math"===e?r.math=n:"mathWithTransform"===e?r.mathWithTransform=n.expression.mathWithTransform:"classes"===e?r.classes=n:r[e]=n[e]});var a=t(r);if(a&&"function"===typeof a.transform)throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(void 0===c||o.override)return a;if(g(c)&&g(a))return e(c,a);if(o.silent)return c;throw new Error('Cannot import "'+i+'": already exists')};t.meta&&!1===t.meta.lazy?(a[i]=u(),c&&l?s(i):(O(t)||v(t))&&X(n.expression.mathWithTransform,i,()=>a[i])):(X(a,i,u),c&&l?s(i):(O(t)||v(t))&&X(n.expression.mathWithTransform,i,()=>a[i])),r[i]=t,n.emit("import",i,u)}function h(e){return"function"===typeof e||"number"===typeof e||"string"===typeof e||"boolean"===typeof e||null===e||p(e)||c(e)||l(e)||u(e)||m(e)||Array.isArray(e)}function g(e){return"function"===typeof e&&"object"===typeof e.signatures}function b(e){return"function"===typeof e&&"string"===typeof e.signature}function y(e){return!Q(w,e)}function v(e){return-1===e.fn.indexOf(".")&&!Q(w,e.fn)&&(!e.meta||!e.meta.isClass)}function O(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction||!1}var w={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return o}Ie.prototype=new RangeError,Ie.prototype.constructor=RangeError,Ie.prototype.name="DimensionError",Ie.prototype.isDimensionError=!0,Ue.prototype=new RangeError,Ue.prototype.constructor=RangeError,Ue.prototype.name="IndexError",Ue.prototype.isIndexError=!0,Xe.prototype=new Error,Xe.prototype.constructor=Error,Xe.prototype.name="ArgumentsError",Xe.prototype.isArgumentsError=!0;var et={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null},tt=["Matrix","Array"],nt=["number","BigNumber","Fraction"];function rt(e,t){function n(n){if(n){var r=J(e,W);it(n,"matrix",tt),it(n,"number",nt),G(e,n);var o=J(e,W),i=J(n,W);return t("config",o,r,i),o}return J(e,W)}return n.MATRIX_OPTIONS=tt,n.NUMBER_OPTIONS=nt,Object.keys(et).forEach(t=>{Object.defineProperty(n,t,{get:()=>e[t],enumerable:!0,configurable:!0})}),n}function ot(e,t){return-1!==e.indexOf(t)}function it(e,t,n){void 0===e[t]||ot(n,e[t])||console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+n.map(e=>JSON.stringify(e)).join(", ")+".")}function at(e,t){var n=a()({},et,t);if("function"!==typeof Object.create)throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var r=ie({isNumber:s,isComplex:c,isBigNumber:l,isFraction:u,isUnit:p,isString:d,isArray:f,isMatrix:m,isCollection:h,isDenseMatrix:g,isSparseMatrix:b,isRange:y,isIndex:v,isBoolean:O,isResultSet:w,isHelp:j,isFunction:N,isDate:x,isRegExp:k,isObject:E,isNull:C,isUndefined:S,isAccessorNode:V,isArrayNode:A,isAssignmentNode:T,isBlockNode:M,isConditionalNode:P,isConstantNode:D,isFunctionAssignmentNode:B,isFunctionNode:$,isIndexNode:F,isNode:_,isObjectNode:L,isOperatorNode:I,isParenthesisNode:U,isRangeNode:H,isSymbolNode:R,isChain:q});r.config=rt(n,r.emit),r.expression={transform:{},mathWithTransform:{config:r.config}};var o=[],i=[];function z(e){if(Ge(e))return e(r);var t=e[Object.keys(e)[0]];if(Ge(t))return t(r);if(!ee(e))throw console.warn("Factory object with properties `type`, `name`, and `factory` expected",e),new Error("Factory object with properties `type`, `name`, and `factory` expected");var a,s=o.indexOf(e);return-1===s?(a=!0===e.math?e.factory(r.type,n,z,r.typed,r):e.factory(r.type,n,z,r.typed),o.push(e),i.push(a)):a=i[s],a}var W={};function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.typed.apply(r.typed,t)}var G=Qe(J,z,r,W);return r.import=G,r.on("config",()=>{ne(W).forEach(e=>{e&&e.meta&&e.meta.recreateOnConfigChange&&G(e,{override:!0})})}),r.create=at.bind(null,e),r.factory=Je,r.import(ne(Y(e))),r.ArgumentsError=Xe,r.DimensionError=Ie,r.IndexError=Ue,r}var st=new Set(["end"]);function lt(e,t){if(mt(e)&&pt(e,t))return e[t];if("function"===typeof e[t]&&ft(e,t))throw new Error('Cannot access method "'+t+'" as a property');throw new Error('No access to property "'+t+'"')}function ct(e,t,n){if(mt(e)&&pt(e,t))return e[t]=n,n;throw new Error('No access to property "'+t+'"')}function ut(e,t){return t in e}function pt(e,t){return!(!e||"object"!==typeof e)&&(!!Q(ht,t)||!(t in Object.prototype)&&!(t in Function.prototype))}function dt(e,t){if(!ft(e,t))throw new Error('No access to method "'+t+'"')}function ft(e,t){return null!==e&&void 0!==e&&"function"===typeof e[t]&&(!(Q(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e))&&(!!Q(gt,t)||!(t in Object.prototype)&&!(t in Function.prototype)))}function mt(e){return"object"===typeof e&&e&&e.constructor===Object}var ht={length:!0,name:!0},gt={toString:!0,valueOf:!0,toLocaleString:!0};class bt{constructor(e){this.wrappedObject=e}keys(){return Object.keys(this.wrappedObject)}get(e){return lt(this.wrappedObject,e)}set(e,t){return ct(this.wrappedObject,e,t),this}has(e){return ut(this.wrappedObject,e)}}function yt(){return new Map}function vt(e){if(!e)return yt();if(Ot(e))return e;if(E(e))return new bt(e);throw new Error("createMap can create maps from objects or Maps")}function Ot(e){return!!e&&(e instanceof Map||e instanceof bt||"function"===typeof e.set&&"function"===typeof e.get&&"function"===typeof e.keys&&"function"===typeof e.has)}function wt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o of n)if(o)if(Ot(o))for(var i of o.keys())e.set(i,o.get(i));else if(E(o))for(var a of Object.keys(o))e.set(a,o[a]);return e}var jt="Node",Nt=["mathWithTransform"],xt=Je(jt,Nt,e=>{var{mathWithTransform:t}=e;function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator")}function r(e){for(var t of[...st])if(e.has(t))throw new Error('Scope contains an illegal symbol, "'+t+'" is a reserved keyword')}return n.prototype.evaluate=function(e){return this.compile().evaluate(e)},n.prototype.type="Node",n.prototype.isNode=!0,n.prototype.comment="",n.prototype.compile=function(){var e=this._compile(t,{}),n={},o=null;function i(t){var i=vt(t);return r(i),e(i,n,o)}return{evaluate:i}},n.prototype._compile=function(e,t){throw new Error("Method _compile should be implemented by type "+this.type)},n.prototype.forEach=function(e){throw new Error("Cannot run forEach on a Node interface")},n.prototype.map=function(e){throw new Error("Cannot run map on a Node interface")},n.prototype._ifNode=function(e){if(!_(e))throw new TypeError("Callback function must return a Node");return e},n.prototype.traverse=function(e){function t(e,n){e.forEach((function(e,r,o){n(e,r,o),t(e,n)}))}e(this,null,null),t(this,e)},n.prototype.transform=function(e){function t(n,r,o){var i=e(n,r,o);return i!==n?i:n.map(t)}return t(this,null,null)},n.prototype.filter=function(e){var t=[];return this.traverse((function(n,r,o){e(n,r,o)&&t.push(n)})),t},n.prototype.clone=function(){throw new Error("Cannot clone a Node interface")},n.prototype.cloneDeep=function(){return this.map((function(e){return e.cloneDeep()}))},n.prototype.equals=function(e){return!!e&&K(this,e)},n.prototype.toString=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this._toString(e)},n.prototype.toJSON=function(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)},n.prototype.toHTML=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this.toHTML(e)},n.prototype._toString=function(){throw new Error("_toString not implemented for "+this.type)},n.prototype.toTex=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this._toTex(e)},n.prototype._toTex=function(e){throw new Error("_toTex not implemented for "+this.type)},n.prototype._getCustomString=function(e){if(e&&"object"===typeof e)switch(typeof e.handler){case"object":case"undefined":return;case"function":return e.handler(this,e);default:throw new TypeError("Object or function expected as callback")}},n.prototype.getIdentifier=function(){return this.type},n.prototype.getContent=function(){return this},n},{isClass:!0,isNode:!0}),kt={createNode:xt},Et="number",Ct="number, number";function St(e){return Math.abs(e)}function Vt(e,t){return e+t}function At(e,t){return e-t}function Tt(e,t){return e*t}function Mt(e,t){return e/t}function Pt(e){return-e}function Dt(e){return e}function Bt(e){return pe(e)}function $t(e){return e*e*e}function Ft(e){return Math.exp(e)}function _t(e){return de(e)}function Lt(e,t){if(!ae(e)||!ae(t))throw new Error("Parameters in function gcd must be integer numbers");var n;while(0!==t)n=e%t,e=t,t=n;return e<0?-e:e}function It(e,t){if(!ae(e)||!ae(t))throw new Error("Parameters in function lcm must be integer numbers");if(0===e||0===t)return 0;var n,r=e*t;while(0!==t)n=t,t=e%n,e=n;return Math.abs(r/e)}function Ut(e){return ce(e)}function Ht(e){return le(e)}function Rt(e){return ue(e)}function qt(e,t){if(t>0)return e-t*Math.floor(e/t);if(0===t)return e;throw new Error("Cannot calculate mod for a negative divisor")}function zt(e){return se(e)}function Wt(e){return Math.sqrt(e)}function Jt(e){return e*e}function Gt(e,t){var n,r,o,i,a=0,s=1,l=1,c=0;if(!ae(e)||!ae(t))throw new Error("Parameters in function xgcd must be integer numbers");while(t)r=Math.floor(e/t),o=e-r*t,n=a,a=s-r*a,s=n,n=l,l=c-r*l,c=n,e=t,t=o;return i=e<0?[-e,-s,-c]:[e,e?s:0,c],i}function Kt(e,t){return e*e<1&&t===1/0||e*e>1&&t===-1/0?0:Math.pow(e,t)}function Yt(e){return Math.abs(e)}St.signature=Et,Vt.signature=Ct,At.signature=Ct,Tt.signature=Ct,Mt.signature=Ct,Pt.signature=Et,Dt.signature=Et,Bt.signature=Et,$t.signature=Et,Ft.signature=Et,_t.signature=Et,Lt.signature=Ct,It.signature=Ct,Ut.signature=Et,Ht.signature=Et,Rt.signature=Et,qt.signature=Ct,zt.signature=Et,Wt.signature=Et,Jt.signature=Et,Gt.signature=Ct,Kt.signature=Ct,Yt.signature=Et;var Zt="number",Xt="number, number";function Qt(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function bitAnd");return e&t}function en(e){if(!ae(e))throw new Error("Integer expected in function bitNot");return~e}function tn(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function bitOr");return e|t}function nn(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function bitXor");return e^t}function rn(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function leftShift");return e<<t}function on(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function rightArithShift");return e>>t}function an(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function rightLogShift");return e>>>t}Qt.signature=Xt,en.signature=Zt,tn.signature=Xt,nn.signature=Xt,rn.signature=Xt,on.signature=Xt,an.signature=Xt;var sn="number",ln="number, number";function cn(e){return!e}function un(e,t){return!(!e&&!t)}function pn(e,t){return!!e!==!!t}function dn(e,t){return!(!e||!t)}function fn(e,t){if(t<e)return 1;if(t===e)return t;var n=t+e>>1;return fn(e,n)*fn(n+1,t)}function mn(e,t){if(!ae(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!ae(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(t>e)throw new TypeError("k must be less than or equal to n");for(var n=e-t,r=1,o=t<n?n+1:t+1,i=2,a=t<n?t:n,s=o;s<=e;++s){r*=s;while(i<=a&&r%i===0)r/=i,++i}return i<=a&&(r/=fn(i,a)),r}function hn(e){var t;if(ae(e))return e<=0?isFinite(e)?1/0:NaN:e>171?1/0:fn(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*hn(1-e));if(e>=171.35)return 1/0;if(e>85){var n=e*e,r=n*e,o=r*e,i=o*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*n)-139/(51840*r)-571/(2488320*o)+163879/(209018880*i)+5246819/(75246796800*i*e))}--e,t=bn[0];for(var a=1;a<bn.length;++a)t+=bn[a]/(e+a);var s=e+gn+.5;return Math.sqrt(2*Math.PI)*Math.pow(s,e+.5)*Math.exp(-s)*t}cn.signature=sn,un.signature=ln,pn.signature=ln,dn.signature=ln,mn.signature="number, number",hn.signature="number";var gn=4.7421875,bn=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],yn=.9189385332046728,vn=5,On=7,wn=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];function jn(e){if(e<0)return NaN;if(0===e)return 1/0;if(!isFinite(e))return e;if(e<.5)return Math.log(Math.PI/Math.sin(Math.PI*e))-jn(1-e);e-=1;for(var t=e+vn+.5,n=wn[0],r=On-1;r>=1;r--)n+=wn[r]/(e+r);return yn+(e+.5)*Math.log(t)-t+Math.log(n)}jn.signature="number";var Nn="number",xn="number, number";function kn(e){return Math.acos(e)}function En(e){return Ne(e)}function Cn(e){return Math.atan(1/e)}function Sn(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}function Vn(e){return Math.asin(1/e)}function An(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}function Tn(e){return Math.acos(1/e)}function Mn(e){var t=1/e,n=Math.sqrt(t*t-1);return Math.log(n+t)}function Pn(e){return Math.asin(e)}function Dn(e){return xe(e)}function Bn(e){return Math.atan(e)}function $n(e,t){return Math.atan2(e,t)}function Fn(e){return ke(e)}function _n(e){return Math.cos(e)}function Ln(e){return Ee(e)}function In(e){return 1/Math.tan(e)}function Un(e){var t=Math.exp(2*e);return(t+1)/(t-1)}function Hn(e){return 1/Math.sin(e)}function Rn(e){return 0===e?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*se(e)}function qn(e){return 1/Math.cos(e)}function zn(e){return 2/(Math.exp(e)+Math.exp(-e))}function Wn(e){return Math.sin(e)}function Jn(e){return Ce(e)}function Gn(e){return Math.tan(e)}function Kn(e){return Se(e)}kn.signature=Nn,En.signature=Nn,Cn.signature=Nn,Sn.signature=Nn,Vn.signature=Nn,An.signature=Nn,Tn.signature=Nn,Mn.signature=Nn,Pn.signature=Nn,Dn.signature=Nn,Bn.signature=Nn,$n.signature=xn,Fn.signature=Nn,_n.signature=Nn,Ln.signature=Nn,In.signature=Nn,Un.signature=Nn,Hn.signature=Nn,Rn.signature=Nn,qn.signature=Nn,zn.signature=Nn,Wn.signature=Nn,Jn.signature=Nn,Gn.signature=Nn,Kn.signature=Nn;var Yn="number";function Zn(e){return ae(e)}function Xn(e){return e<0}function Qn(e){return e>0}function er(e){return 0===e}function tr(e){return Number.isNaN(e)}function nr(){throw new Error('No "bignumber" implementation available')}function rr(){throw new Error('No "fraction" implementation available')}function or(){throw new Error('No "matrix" implementation available')}function ir(){throw new Error('No "matrix" implementation available')}Zn.signature=Yn,Xn.signature=Yn,Qn.signature=Yn,er.signature=Yn,tr.signature=Yn;var ar=Je("matrix",[],()=>or),sr=Je("subset",[],()=>ir);lr("combinations",mn),lr("gamma",hn),lr("lgamma",jn);function lr(e,t){return Je(e,["typed"],e=>{var{typed:n}=e;return n(t)})}var cr={createSubset:sr};function ur(e){return e&&e.isIndexError?new Ue(e.index+1,e.min+1,void 0!==e.max?e.max+1:void 0):e}function pr(e){var{subset:t}=e;return function(e,n){try{if(Array.isArray(e))return t(e,n);if(e&&"function"===typeof e.subset)return e.subset(n);if("string"===typeof e)return t(e,n);if("object"===typeof e){if(!n.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return lt(e,n.getObjectProperty())}throw new TypeError("Cannot apply index: unsupported type of object")}catch(r){throw ur(r)}}}var dr="AccessorNode",fr=["subset","Node"],mr=Je(dr,fr,e=>{var{subset:t,Node:n}=e,r=pr({subset:t});function o(e,t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!_(e))throw new TypeError('Node expected for parameter "object"');if(!F(t))throw new TypeError('IndexNode expected for parameter "index"');this.object=e||null,this.index=t,Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function i(e){return!(V(e)||A(e)||D(e)||$(e)||L(e)||U(e)||R(e))}return o.prototype=new n,o.prototype.type="AccessorNode",o.prototype.isAccessorNode=!0,o.prototype._compile=function(e,t){var n=this.object._compile(e,t),o=this.index._compile(e,t);if(this.index.isObjectProperty()){var i=this.index.getObjectProperty();return function(e,t,r){return lt(n(e,t,r),i)}}return function(e,t,i){var a=n(e,t,i),s=o(e,t,a);return r(a,s)}},o.prototype.forEach=function(e){e(this.object,"object",this),e(this.index,"index",this)},o.prototype.map=function(e){return new o(this._ifNode(e(this.object,"object",this)),this._ifNode(e(this.index,"index",this)))},o.prototype.clone=function(){return new o(this.object,this.index)},o.prototype._toString=function(e){var t=this.object.toString(e);return i(this.object)&&(t="("+t+")"),t+this.index.toString(e)},o.prototype.toHTML=function(e){var t=this.object.toHTML(e);return i(this.object)&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+this.index.toHTML(e)},o.prototype._toTex=function(e){var t=this.object.toTex(e);return i(this.object)&&(t="\\left(' + object + '\\right)"),t+this.index.toTex(e)},o.prototype.toJSON=function(){return{mathjs:"AccessorNode",object:this.object,index:this.index}},o.fromJSON=function(e){return new o(e.object,e.index)},o},{isClass:!0,isNode:!0}),hr={NodeDependencies:kt,subsetDependencies:cr,createAccessorNode:mr},gr="ArrayNode",br=["Node"],yr=Je(gr,br,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(this.items=e||[],!Array.isArray(this.items)||!this.items.every(_))throw new TypeError("Array containing Nodes expected")}return n.prototype=new t,n.prototype.type="ArrayNode",n.prototype.isArrayNode=!0,n.prototype._compile=function(e,t){var n=Re(this.items,(function(n){return n._compile(e,t)})),r="Array"!==e.config.matrix;if(r){var o=e.matrix;return function(e,t,r){return o(Re(n,(function(n){return n(e,t,r)})))}}return function(e,t,r){return Re(n,(function(n){return n(e,t,r)}))}},n.prototype.forEach=function(e){for(var t=0;t<this.items.length;t++){var n=this.items[t];e(n,"items["+t+"]",this)}},n.prototype.map=function(e){for(var t=[],r=0;r<this.items.length;r++)t[r]=this._ifNode(e(this.items[r],"items["+r+"]",this));return new n(t)},n.prototype.clone=function(){return new n(this.items.slice(0))},n.prototype._toString=function(e){var t=this.items.map((function(t){return t.toString(e)}));return"["+t.join(", ")+"]"},n.prototype.toJSON=function(){return{mathjs:"ArrayNode",items:this.items}},n.fromJSON=function(e){return new n(e.items)},n.prototype.toHTML=function(e){var t=this.items.map((function(t){return t.toHTML(e)}));return'<span class="math-parenthesis math-square-parenthesis">[</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},n.prototype._toTex=function(e){function t(n,r){var o=n.some(A)&&!n.every(A),i=r||o,a=i?"&":"\\\\",s=n.map((function(n){return n.items?t(n.items,!r):n.toTex(e)})).join(a);return o||!i||i&&!r?"\\begin{bmatrix}"+s+"\\end{bmatrix}":s}return t(this.items,!1)},n},{isClass:!0,isNode:!0}),vr={NodeDependencies:kt,createArrayNode:yr},Or={createMatrix:ar};function wr(e){var{subset:t,matrix:n}=e;return function(e,r,o){try{if(Array.isArray(e))return n(e).subset(r,o).valueOf();if(e&&"function"===typeof e.subset)return e.subset(r,o);if("string"===typeof e)return t(e,r,o);if("object"===typeof e){if(!r.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return ct(e,r.getObjectProperty(),o),e}throw new TypeError("Cannot apply index: unsupported type of object")}catch(i){throw ur(i)}}}var jr=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{associativity:"left",associativeWith:[]}},{"OperatorNode:and":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{associativity:"left",associativeWith:[]},"OperatorNode:unequal":{associativity:"left",associativeWith:[]},"OperatorNode:smaller":{associativity:"left",associativeWith:[]},"OperatorNode:larger":{associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{associativity:"left",associativeWith:[]}},{"OperatorNode:to":{associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{associativity:"left",associativeWith:[]},"OperatorNode:mod":{associativity:"left",associativeWith:[]}},{"OperatorNode:unaryPlus":{associativity:"right"},"OperatorNode:unaryMinus":{associativity:"right"},"OperatorNode:bitNot":{associativity:"right"},"OperatorNode:not":{associativity:"right"}},{"OperatorNode:pow":{associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{associativity:"left"}},{"OperatorNode:transpose":{associativity:"left"}}];function Nr(e,t){var n=e;"keep"!==t&&(n=e.getContent());for(var r=n.getIdentifier(),o=0;o<jr.length;o++)if(r in jr[o])return o;return null}function xr(e,t){var n=e;"keep"!==t&&(n=e.getContent());var r=n.getIdentifier(),o=Nr(n,t);if(null===o)return null;var i=jr[o][r];if(Q(i,"associativity")){if("left"===i.associativity)return"left";if("right"===i.associativity)return"right";throw Error("'"+r+"' has the invalid associativity '"+i.associativity+"'.")}return null}function kr(e,t,n){var r="keep"!==n?e.getContent():e,o="keep"!==n?e.getContent():t,i=r.getIdentifier(),a=o.getIdentifier(),s=Nr(r,n);if(null===s)return null;var l=jr[s][i];if(Q(l,"associativeWith")&&l.associativeWith instanceof Array){for(var c=0;c<l.associativeWith.length;c++)if(l.associativeWith[c]===a)return!0;return!1}return null}var Er="AssignmentNode",Cr=["subset","?matrix","Node"],Sr=Je(Er,Cr,e=>{var{subset:t,matrix:n,Node:r}=e,o=pr({subset:t}),i=wr({subset:t,matrix:n});function a(e,t,n){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=e,this.index=n?t:null,this.value=n||t,!R(e)&&!V(e))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(R(e)&&"end"===e.name)throw new Error('Cannot assign to symbol "end"');if(this.index&&!F(this.index))throw new TypeError('IndexNode expected as "index"');if(!_(this.value))throw new TypeError('Node expected as "value"');Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function s(e,t){t||(t="keep");var n=Nr(e,t),r=Nr(e.value,t);return"all"===t||null!==r&&r<=n}return a.prototype=new r,a.prototype.type="AssignmentNode",a.prototype.isAssignmentNode=!0,a.prototype._compile=function(e,t){var n=this.object._compile(e,t),r=this.index?this.index._compile(e,t):null,a=this.value._compile(e,t),s=this.object.name;if(this.index){if(this.index.isObjectProperty()){var l=this.index.getObjectProperty();return function(e,t,r){var o=n(e,t,r),i=a(e,t,r);return ct(o,l,i),i}}if(R(this.object))return function(e,t,o){var l=n(e,t,o),c=a(e,t,o),u=r(e,t,l);return e.set(s,i(l,u,c)),c};var c=this.object.object._compile(e,t);if(this.object.index.isObjectProperty()){var u=this.object.index.getObjectProperty();return function(e,t,n){var o=c(e,t,n),s=lt(o,u),l=r(e,t,s),p=a(e,t,n);return ct(o,u,i(s,l,p)),p}}var p=this.object.index._compile(e,t);return function(e,t,n){var s=c(e,t,n),l=p(e,t,s),u=o(s,l),d=r(e,t,u),f=a(e,t,n);return i(s,l,i(u,d,f)),f}}if(!R(this.object))throw new TypeError("SymbolNode expected as object");return function(e,t,n){var r=a(e,t,n);return e.set(s,r),r}},a.prototype.forEach=function(e){e(this.object,"object",this),this.index&&e(this.index,"index",this),e(this.value,"value",this)},a.prototype.map=function(e){var t=this._ifNode(e(this.object,"object",this)),n=this.index?this._ifNode(e(this.index,"index",this)):null,r=this._ifNode(e(this.value,"value",this));return new a(t,n,r)},a.prototype.clone=function(){return new a(this.object,this.index,this.value)},a.prototype._toString=function(e){var t=this.object.toString(e),n=this.index?this.index.toString(e):"",r=this.value.toString(e);return s(this,e&&e.parenthesis)&&(r="("+r+")"),t+n+" = "+r},a.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},a.fromJSON=function(e){return new a(e.object,e.index,e.value)},a.prototype.toHTML=function(e){var t=this.object.toHTML(e),n=this.index?this.index.toHTML(e):"",r=this.value.toHTML(e);return s(this,e&&e.parenthesis)&&(r='<span class="math-paranthesis math-round-parenthesis">(</span>'+r+'<span class="math-paranthesis math-round-parenthesis">)</span>'),t+n+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+r},a.prototype._toTex=function(e){var t=this.object.toTex(e),n=this.index?this.index.toTex(e):"",r=this.value.toTex(e);return s(this,e&&e.parenthesis)&&(r="\\left(".concat(r,"\\right)")),t+n+":="+r},a},{isClass:!0,isNode:!0}),Vr={matrixDependencies:Or,NodeDependencies:kt,subsetDependencies:cr,createAssignmentNode:Sr},Ar="ResultSet",Tr=[],Mr=Je(Ar,Tr,()=>{function e(t){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=t||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(t){return new e(t.entries)},e},{isClass:!0}),Pr={createResultSet:Mr},Dr="BlockNode",Br=["ResultSet","Node"],$r=Je(Dr,Br,e=>{var{ResultSet:t,Node:n}=e;function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new Error("Array expected");this.blocks=e.map((function(e){var t=e&&e.node,n=!e||void 0===e.visible||e.visible;if(!_(t))throw new TypeError('Property "node" must be a Node');if("boolean"!==typeof n)throw new TypeError('Property "visible" must be a boolean');return{node:t,visible:n}}))}return r.prototype=new n,r.prototype.type="BlockNode",r.prototype.isBlockNode=!0,r.prototype._compile=function(e,n){var r=Re(this.blocks,(function(t){return{evaluate:t.node._compile(e,n),visible:t.visible}}));return function(e,n,o){var i=[];return qe(r,(function(t){var r=t.evaluate(e,n,o);t.visible&&i.push(r)})),new t(i)}},r.prototype.forEach=function(e){for(var t=0;t<this.blocks.length;t++)e(this.blocks[t].node,"blocks["+t+"].node",this)},r.prototype.map=function(e){for(var t=[],n=0;n<this.blocks.length;n++){var o=this.blocks[n],i=this._ifNode(e(o.node,"blocks["+n+"].node",this));t[n]={node:i,visible:o.visible}}return new r(t)},r.prototype.clone=function(){var e=this.blocks.map((function(e){return{node:e.node,visible:e.visible}}));return new r(e)},r.prototype._toString=function(e){return this.blocks.map((function(t){return t.node.toString(e)+(t.visible?"":";")})).join("\n")},r.prototype.toJSON=function(){return{mathjs:"BlockNode",blocks:this.blocks}},r.fromJSON=function(e){return new r(e.blocks)},r.prototype.toHTML=function(e){return this.blocks.map((function(t){return t.node.toHTML(e)+(t.visible?"":'<span class="math-separator">;</span>')})).join('<span class="math-separator"><br /></span>')},r.prototype._toTex=function(e){return this.blocks.map((function(t){return t.node.toTex(e)+(t.visible?"":";")})).join("\\;\\;\n")},r},{isClass:!0,isNode:!0}),Fr={NodeDependencies:kt,ResultSetDependencies:Pr,createBlockNode:$r},_r="ConditionalNode",Lr=["Node"],Ir=Je(_r,Lr,e=>{var{Node:t}=e;function n(e,t,r){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!_(e))throw new TypeError("Parameter condition must be a Node");if(!_(t))throw new TypeError("Parameter trueExpr must be a Node");if(!_(r))throw new TypeError("Parameter falseExpr must be a Node");this.condition=e,this.trueExpr=t,this.falseExpr=r}function r(e){if("number"===typeof e||"boolean"===typeof e||"string"===typeof e)return!!e;if(e){if(l(e))return!e.isZero();if(c(e))return!(!e.re&&!e.im);if(p(e))return!!e.value}if(null===e||void 0===e)return!1;throw new TypeError('Unsupported type of condition "'+z(e)+'"')}return n.prototype=new t,n.prototype.type="ConditionalNode",n.prototype.isConditionalNode=!0,n.prototype._compile=function(e,t){var n=this.condition._compile(e,t),o=this.trueExpr._compile(e,t),i=this.falseExpr._compile(e,t);return function(e,t,a){return r(n(e,t,a))?o(e,t,a):i(e,t,a)}},n.prototype.forEach=function(e){e(this.condition,"condition",this),e(this.trueExpr,"trueExpr",this),e(this.falseExpr,"falseExpr",this)},n.prototype.map=function(e){return new n(this._ifNode(e(this.condition,"condition",this)),this._ifNode(e(this.trueExpr,"trueExpr",this)),this._ifNode(e(this.falseExpr,"falseExpr",this)))},n.prototype.clone=function(){return new n(this.condition,this.trueExpr,this.falseExpr)},n.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.condition.toString(e),o=Nr(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==o&&o<=n)&&(r="("+r+")");var i=this.trueExpr.toString(e),a=Nr(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==a&&a<=n)&&(i="("+i+")");var s=this.falseExpr.toString(e),l=Nr(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==l&&l<=n)&&(s="("+s+")"),r+" ? "+i+" : "+s},n.prototype.toJSON=function(){return{mathjs:"ConditionalNode",condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}},n.fromJSON=function(e){return new n(e.condition,e.trueExpr,e.falseExpr)},n.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.condition.toHTML(e),o=Nr(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==o&&o<=n)&&(r='<span class="math-parenthesis math-round-parenthesis">(</span>'+r+'<span class="math-parenthesis math-round-parenthesis">)</span>');var i=this.trueExpr.toHTML(e),a=Nr(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==a&&a<=n)&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>');var s=this.falseExpr.toHTML(e),l=Nr(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==l&&l<=n)&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),r+'<span class="math-operator math-conditional-operator">?</span>'+i+'<span class="math-operator math-conditional-operator">:</span>'+s},n.prototype._toTex=function(e){return"\\begin{cases} {"+this.trueExpr.toTex(e)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(e)+"}\\\\{"+this.falseExpr.toTex(e)+"}, &\\quad{\\text{otherwise}}\\end{cases}"},n},{isClass:!0,isNode:!0}),Ur={NodeDependencies:kt,createConditionalNode:Ir},Hr=n("4788"),Rr=n.n(Hr),qr={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},zr={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},Wr={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(zr.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(zr.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(zr.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(zr.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(zr.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(zr.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(zr.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(zr.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(zr.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(zr.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(zr.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(zr.bitAnd,"${args[1]}\\right)")},bitNot:{1:zr.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(zr.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(zr.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(zr.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(zr.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(zr.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(zr.and,"${args[1]}\\right)")},not:{1:zr.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(zr.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(zr.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(zr.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(zr.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(zr.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(zr.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(zr.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(zr.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(zr.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(zr.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(zr.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(zr.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(zr.to,"${args[1]}\\right)")},numeric:function(e,t){return e.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(qr.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},Jr="\\mathrm{${name}}\\left(${args}\\right)",Gr={deg:"^\\circ"};function Kr(e){return Rr()(e,{preserveFormatting:!0})}function Yr(e,t){return t="undefined"!==typeof t&&t,t?Q(Gr,e)?Gr[e]:"\\mathrm{"+Kr(e)+"}":Q(qr,e)?qr[e]:Kr(e)}var Zr="ConstantNode",Xr=["Node"],Qr=Je(Zr,Xr,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this.value=e}return n.prototype=new t,n.prototype.type="ConstantNode",n.prototype.isConstantNode=!0,n.prototype._compile=function(e,t){var n=this.value;return function(){return n}},n.prototype.forEach=function(e){},n.prototype.map=function(e){return this.clone()},n.prototype.clone=function(){return new n(this.value)},n.prototype._toString=function(e){return De(this.value,e)},n.prototype.toHTML=function(e){var t=this._toString(e);switch(z(this.value)){case"number":case"BigNumber":case"Fraction":return'<span class="math-number">'+t+"</span>";case"string":return'<span class="math-string">'+t+"</span>";case"boolean":return'<span class="math-boolean">'+t+"</span>";case"null":return'<span class="math-null-symbol">'+t+"</span>";case"undefined":return'<span class="math-undefined">'+t+"</span>";default:return'<span class="math-symbol">'+t+"</span>"}},n.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},n.fromJSON=function(e){return new n(e.value)},n.prototype._toTex=function(e){var t=this._toString(e);switch(z(this.value)){case"string":return"\\mathtt{"+Kr(t)+"}";case"number":case"BigNumber":if(!isFinite(this.value))return this.value.valueOf()<0?"-\\infty":"\\infty";var n=t.toLowerCase().indexOf("e");return-1!==n?t.substring(0,n)+"\\cdot10^{"+t.substring(n+1)+"}":t;case"Fraction":return this.value.toLatex();default:return t}},n},{isClass:!0,isNode:!0}),eo={NodeDependencies:kt,createConstantNode:Qr},to=n("7634"),no=n.n(to),ro=function(){return ro=no.a.create,no.a},oo=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],io=Je("typed",oo,(function(e){var{BigNumber:t,Complex:n,DenseMatrix:r,Fraction:o}=e,i=ro();return i.types=[{name:"number",test:s},{name:"Complex",test:c},{name:"BigNumber",test:l},{name:"Fraction",test:u},{name:"Unit",test:p},{name:"string",test:d},{name:"Chain",test:q},{name:"Array",test:f},{name:"Matrix",test:m},{name:"DenseMatrix",test:g},{name:"SparseMatrix",test:b},{name:"Range",test:y},{name:"Index",test:v},{name:"boolean",test:O},{name:"ResultSet",test:w},{name:"Help",test:j},{name:"function",test:N},{name:"Date",test:x},{name:"RegExp",test:k},{name:"null",test:C},{name:"undefined",test:S},{name:"AccessorNode",test:V},{name:"ArrayNode",test:A},{name:"AssignmentNode",test:T},{name:"BlockNode",test:M},{name:"ConditionalNode",test:P},{name:"ConstantNode",test:D},{name:"FunctionNode",test:$},{name:"FunctionAssignmentNode",test:B},{name:"IndexNode",test:F},{name:"Node",test:_},{name:"ObjectNode",test:L},{name:"OperatorNode",test:I},{name:"ParenthesisNode",test:U},{name:"RangeNode",test:H},{name:"SymbolNode",test:R},{name:"Map",test:Ot},{name:"Object",test:E}],i.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(t||ao(e),je(e)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return n||so(e),new n(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return n||so(e),new n(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return n||so(e),new n(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){o||co(e);var t=new o(e);if(t.valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw new Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(e){t||ao(e);try{return new t(e)}catch(n){throw new Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){o||co(e);try{return new o(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){n||so(e);try{return new n(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||ao(e),new t(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return o||co(e),new o(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return r||lo(),new r(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],i}));function ao(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function so(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function lo(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function co(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var uo={createTyped:io},po="FunctionAssignmentNode",fo=["typed","Node"],mo=Je(po,fo,e=>{var{typed:t,Node:n}=e;function r(e,t,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof e)throw new TypeError('String expected for parameter "name"');if(!Array.isArray(t))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!_(n))throw new TypeError('Node expected for parameter "expr"');if(st.has(e))throw new Error('Illegal function name, "'+e+'" is a reserved keyword');this.name=e,this.params=t.map((function(e){return e&&e.name||e})),this.types=t.map((function(e){return e&&e.type||"any"})),this.expr=n}function o(e,t){var n=Nr(e,t),r=Nr(e.expr,t);return"all"===t||null!==r&&r<=n}return r.prototype=new n,r.prototype.type="FunctionAssignmentNode",r.prototype.isFunctionAssignmentNode=!0,r.prototype._compile=function(e,n){var r=Object.create(n);qe(this.params,(function(e){r[e]=!0}));var o=this.expr._compile(e,r),i=this.name,a=this.params,s=ze(this.types,","),l=i+"("+ze(this.params,", ")+")";return function(e,n,r){var c={};c[s]=function(){for(var t=Object.create(n),i=0;i<a.length;i++)t[a[i]]=arguments[i];return o(e,t,r)};var u=t(i,c);return u.syntax=l,e.set(i,u),u}},r.prototype.forEach=function(e){e(this.expr,"expr",this)},r.prototype.map=function(e){var t=this._ifNode(e(this.expr,"expr",this));return new r(this.name,this.params.slice(0),t)},r.prototype.clone=function(){return new r(this.name,this.params.slice(0),this.expr)},r.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=this.expr.toString(e);return o(this,t)&&(n="("+n+")"),this.name+"("+this.params.join(", ")+") = "+n},r.prototype.toJSON=function(){var e=this.types;return{mathjs:"FunctionAssignmentNode",name:this.name,params:this.params.map((function(t,n){return{name:t,type:e[n]}})),expr:this.expr}},r.fromJSON=function(e){return new r(e.name,e.params,e.expr)},r.prototype.toHTML=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=[],r=0;r<this.params.length;r++)n.push('<span class="math-symbol math-parameter">'+Fe(this.params[r])+"</span>");var i=this.expr.toHTML(e);return o(this,t)&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+Fe(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+n.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+i},r.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=this.expr.toTex(e);return o(this,t)&&(n="\\left(".concat(n,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(Yr).join(",")+"\\right):="+n},r},{isClass:!0,isNode:!0}),ho={NodeDependencies:kt,typedDependencies:uo,createFunctionAssignmentNode:mo},go="SymbolNode",bo=["math","?Unit","Node"],yo=Je(go,bo,e=>{var{math:t,Unit:n,Node:r}=e;function o(e){return!!n&&n.isValuelessUnit(e)}function i(e){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof e)throw new TypeError('String expected for parameter "name"');this.name=e}return i.prototype=new r,i.prototype.type="SymbolNode",i.prototype.isSymbolNode=!0,i.prototype._compile=function(e,t){var r=this.name;if(!0===t[r])return function(e,t,n){return t[r]};if(r in e)return function(t,n,o){return t.has(r)?t.get(r):lt(e,r)};var a=o(r);return function(e,t,o){return e.has(r)?e.get(r):a?new n(null,r):i.onUndefinedSymbol(r)}},i.prototype.forEach=function(e){},i.prototype.map=function(e){return this.clone()},i.onUndefinedSymbol=function(e){throw new Error("Undefined symbol "+e)},i.prototype.clone=function(){return new i(this.name)},i.prototype._toString=function(e){return this.name},i.prototype.toHTML=function(e){var t=Fe(this.name);return"true"===t||"false"===t?'<span class="math-symbol math-boolean">'+t+"</span>":"i"===t?'<span class="math-symbol math-imaginary-symbol">'+t+"</span>":"Infinity"===t?'<span class="math-symbol math-infinity-symbol">'+t+"</span>":"NaN"===t?'<span class="math-symbol math-nan-symbol">'+t+"</span>":"null"===t?'<span class="math-symbol math-null-symbol">'+t+"</span>":"undefined"===t?'<span class="math-symbol math-undefined-symbol">'+t+"</span>":'<span class="math-symbol">'+t+"</span>"},i.prototype.toJSON=function(){return{mathjs:"SymbolNode",name:this.name}},i.fromJSON=function(e){return new i(e.name)},i.prototype._toTex=function(e){var n=!1;"undefined"===typeof t[this.name]&&o(this.name)&&(n=!0);var r=Yr(this.name,n);return"\\"===r[0]?r:" "+r},i},{isClass:!0,isNode:!0}),vo={NodeDependencies:kt,createSymbolNode:yo};function Oo(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"===typeof e.createSubScope?wt(e.createSubScope(),...n):wt(yt(),e,...n)}var wo="FunctionNode",jo=["math","Node","SymbolNode"],No=Je(wo,jo,e=>{var{math:t,Node:n,SymbolNode:r}=e;function o(e,t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if("string"===typeof e&&(e=new r(e)),!_(e))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(t)||!t.every(_))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=e,this.args=t||[],Object.defineProperty(this,"name",{get:function(){return this.fn.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}o.prototype=new n,o.prototype.type="FunctionNode",o.prototype.isFunctionNode=!0;var i=e=>De(e,{truncate:78});o.prototype._compile=function(e,t){if(!(this instanceof o))throw new TypeError("No valid FunctionNode");var n=this.args.map(n=>n._compile(e,t));if(!R(this.fn)){if(V(this.fn)&&F(this.fn.index)&&this.fn.index.isObjectProperty()){var r=this.fn.object._compile(e,t),a=this.fn.index.getObjectProperty(),s=this.args;return function(t,o,i){var l=r(t,o,i);dt(l,a);var c=l[a]&&l[a].rawArgs;if(c)return l[a](s,e,Oo(t,o),t);var u=n.map(e=>e(t,o,i));return l[a].apply(l,u)}}var l=this.fn.toString(),c=this.fn._compile(e,t),u=this.args;return function(t,r,o){var a=c(t,r,o);if("function"!==typeof a)throw new TypeError("Expression '".concat(l,"' did not evaluate to a function; value is:")+"\n ".concat(i(a)));if(a.rawArgs)return a(u,e,Oo(t,r),t);var s=n.map(e=>e(t,r,o));return a.apply(a,s)}}var p=this.fn.name;if(t[p]){var d=this.args;return function(t,r,o){var a=r[p];if("function"!==typeof a)throw new TypeError("Argument '".concat(p,"' was not a function; received: ").concat(i(a)));if(a.rawArgs)return a(d,e,Oo(t,r),t);var s=n.map(e=>e(t,r,o));return a.apply(a,s)}}var f=p in e?lt(e,p):void 0,m="function"===typeof f&&!0===f.rawArgs,h=t=>{var n;if(t.has(p))n=t.get(p);else{if(!(p in e))return o.onUndefinedFunction(p);n=lt(e,p)}if("function"===typeof n)return n;throw new TypeError("'".concat(p,"' is not a function; its value is:\n ").concat(i(n)))};if(m){var g=this.args;return function(t,n,r){var o=h(t);return o(g,e,Oo(t,n),t)}}switch(n.length){case 0:return function(e,t,n){var r=h(e);return r()};case 1:return function(e,t,r){var o=h(e),i=n[0];return o(i(e,t,r))};case 2:return function(e,t,r){var o=h(e),i=n[0],a=n[1];return o(i(e,t,r),a(e,t,r))};default:return function(e,t,r){var o=h(e),i=n.map(n=>n(e,t,r));return o(...i)}}},o.prototype.forEach=function(e){e(this.fn,"fn",this);for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)},o.prototype.map=function(e){for(var t=this._ifNode(e(this.fn,"fn",this)),n=[],r=0;r<this.args.length;r++)n[r]=this._ifNode(e(this.args[r],"args["+r+"]",this));return new o(t,n)},o.prototype.clone=function(){return new o(this.fn,this.args.slice(0))},o.onUndefinedFunction=function(e){throw new Error("Undefined function "+e)};var a=o.prototype.toString;function s(e,t,n){var r,o="",i=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,a=0;while(null!==(r=i.exec(e)))if(o+=e.substring(a,r.index),a=r.index,"$$"===r[0])o+="$",a++;else{a+=r[0].length;var s=t[r[1]];if(!s)throw new ReferenceError("Template: Property "+r[1]+" does not exist.");if(void 0===r[2])switch(typeof s){case"string":o+=s;break;case"object":if(_(s))o+=s.toTex(n);else{if(!Array.isArray(s))throw new TypeError("Template: "+r[1]+" has to be a Node, String or array of Nodes");o+=s.map((function(e,t){if(_(e))return e.toTex(n);throw new TypeError("Template: "+r[1]+"["+t+"] is not a Node.")})).join(",")}break;default:throw new TypeError("Template: "+r[1]+" has to be a Node, String or array of Nodes")}else{if(!_(s[r[2]]&&s[r[2]]))throw new TypeError("Template: "+r[1]+"["+r[2]+"] is not a Node.");o+=s[r[2]].toTex(n)}}return o+=e.slice(a),o}o.prototype.toString=function(e){var t,n=this.fn.toString(e);return e&&"object"===typeof e.handler&&Q(e.handler,n)&&(t=e.handler[n](this,e)),"undefined"!==typeof t?t:a.call(this,e)},o.prototype._toString=function(e){var t=this.args.map((function(t){return t.toString(e)})),n=B(this.fn)?"("+this.fn.toString(e)+")":this.fn.toString(e);return n+"("+t.join(", ")+")"},o.prototype.toJSON=function(){return{mathjs:"FunctionNode",fn:this.fn,args:this.args}},o.fromJSON=function(e){return new o(e.fn,e.args)},o.prototype.toHTML=function(e){var t=this.args.map((function(t){return t.toHTML(e)}));return'<span class="math-function">'+Fe(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'};var l=o.prototype.toTex;return o.prototype.toTex=function(e){var t;return e&&"object"===typeof e.handler&&Q(e.handler,this.name)&&(t=e.handler[this.name](this,e)),"undefined"!==typeof t?t:l.call(this,e)},o.prototype._toTex=function(e){var n,r,o=this.args.map((function(t){return t.toTex(e)}));switch(Wr[this.name]&&(n=Wr[this.name]),!t[this.name]||"function"!==typeof t[this.name].toTex&&"object"!==typeof t[this.name].toTex&&"string"!==typeof t[this.name].toTex||(n=t[this.name].toTex),typeof n){case"function":r=n(this,e);break;case"string":r=s(n,this,e);break;case"object":switch(typeof n[o.length]){case"function":r=n[o.length](this,e);break;case"string":r=s(n[o.length],this,e);break}}return"undefined"!==typeof r?r:s(Jr,this,e)},o.prototype.getIdentifier=function(){return this.type+":"+this.name},o},{isClass:!0,isNode:!0}),xo={NodeDependencies:kt,SymbolNodeDependencies:vo,createFunctionNode:No},ko="size",Eo=["typed","config","?matrix"],Co=Je(ko,Eo,e=>{var{typed:t,config:n,matrix:r}=e;return t(ko,{Matrix:function(e){return e.create(e.size())},Array:He,string:function(e){return"Array"===n.matrix?[e.length]:r([e.length])},"number | Complex | BigNumber | Unit | boolean | null":function(e){return"Array"===n.matrix?[]:r?r([]):or()}})}),So={matrixDependencies:Or,typedDependencies:uo,createSize:Co},Vo="IndexNode",Ao=["Node","size"],To=Je(Vo,Ao,e=>{var{Node:t,size:n}=e;function r(e,t){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(this.dimensions=e,this.dotNotation=t||!1,!Array.isArray(e)||!e.every(_))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}return r.prototype=new t,r.prototype.type="IndexNode",r.prototype.isIndexNode=!0,r.prototype._compile=function(e,t){var r=Re(this.dimensions,(function(r,o){var i=r.filter(e=>e.isSymbolNode&&"end"===e.name).length>0;if(i){var a=Object.create(t);a.end=!0;var s=r._compile(e,a);return function(e,t,r){if(!m(r)&&!f(r)&&!d(r))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+z(r));var i=n(r).valueOf(),a=Object.create(t);return a.end=i[o],s(e,a,r)}}return r._compile(e,t)})),o=lt(e,"index");return function(e,t,n){var i=Re(r,(function(r){return r(e,t,n)}));return o(...i)}},r.prototype.forEach=function(e){for(var t=0;t<this.dimensions.length;t++)e(this.dimensions[t],"dimensions["+t+"]",this)},r.prototype.map=function(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this._ifNode(e(this.dimensions[n],"dimensions["+n+"]",this));return new r(t,this.dotNotation)},r.prototype.clone=function(){return new r(this.dimensions.slice(0),this.dotNotation)},r.prototype.isObjectProperty=function(){return 1===this.dimensions.length&&D(this.dimensions[0])&&"string"===typeof this.dimensions[0].value},r.prototype.getObjectProperty=function(){return this.isObjectProperty()?this.dimensions[0].value:null},r.prototype._toString=function(e){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"},r.prototype.toJSON=function(){return{mathjs:"IndexNode",dimensions:this.dimensions,dotNotation:this.dotNotation}},r.fromJSON=function(e){return new r(e.dimensions,e.dotNotation)},r.prototype.toHTML=function(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this.dimensions[n].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+Fe(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},r.prototype._toTex=function(e){var t=this.dimensions.map((function(t){return t.toTex(e)}));return this.dotNotation?"."+this.getObjectProperty():"_{"+t.join(",")+"}"},r},{isClass:!0,isNode:!0}),Mo={NodeDependencies:kt,sizeDependencies:So,createIndexNode:To},Po="ObjectNode",Do=["Node"],Bo=Je(Po,Do,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=e||{},e&&("object"!==typeof e||!Object.keys(e).every((function(t){return _(e[t])}))))throw new TypeError("Object containing Nodes expected")}return n.prototype=new t,n.prototype.type="ObjectNode",n.prototype.isObjectNode=!0,n.prototype._compile=function(e,t){var n={};for(var r in this.properties)if(Q(this.properties,r)){var o=$e(r),i=JSON.parse(o);if(!pt(this.properties,i))throw new Error('No access to property "'+i+'"');n[i]=this.properties[r]._compile(e,t)}return function(e,t,r){var o={};for(var i in n)Q(n,i)&&(o[i]=n[i](e,t,r));return o}},n.prototype.forEach=function(e){for(var t in this.properties)Q(this.properties,t)&&e(this.properties[t],"properties["+$e(t)+"]",this)},n.prototype.map=function(e){var t={};for(var r in this.properties)Q(this.properties,r)&&(t[r]=this._ifNode(e(this.properties[r],"properties["+$e(r)+"]",this)));return new n(t)},n.prototype.clone=function(){var e={};for(var t in this.properties)Q(this.properties,t)&&(e[t]=this.properties[t]);return new n(e)},n.prototype._toString=function(e){var t=[];for(var n in this.properties)Q(this.properties,n)&&t.push($e(n)+": "+this.properties[n].toString(e));return"{"+t.join(", ")+"}"},n.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},n.fromJSON=function(e){return new n(e.properties)},n.prototype.toHTML=function(e){var t=[];for(var n in this.properties)Q(this.properties,n)&&t.push('<span class="math-symbol math-property">'+Fe(n)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[n].toHTML(e));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'},n.prototype._toTex=function(e){var t=[];for(var n in this.properties)Q(this.properties,n)&&t.push("\\mathbf{"+n+":} & "+this.properties[n].toTex(e)+"\\\\");return"\\left\\{\\begin{array}{ll}".concat(t.join("\n"),"\\end{array}\\right\\}")},n},{isClass:!0,isNode:!0}),$o={NodeDependencies:kt,createObjectNode:Bo},Fo="OperatorNode",_o=["Node"],Lo=Je(Fo,_o,e=>{var{Node:t}=e;function n(e,t,r,o,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof e)throw new TypeError('string expected for parameter "op"');if("string"!==typeof t)throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(r)||!r.every(_))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=!0===o,this.isPercentage=!0===i,this.op=e,this.fn=t,this.args=r||[]}function r(e,t,n,r,o){var i,a=Nr(e,t),s=xr(e,t);if("all"===t||r.length>2&&"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier())return r.map((function(e){switch(e.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}}));switch(r.length){case 0:i=[];break;case 1:var l=Nr(r[0],t);if(o&&null!==l){var c,u;if("keep"===t?(c=r[0].getIdentifier(),u=e.getIdentifier()):(c=r[0].getContent().getIdentifier(),u=e.getContent().getIdentifier()),!1===jr[a][u].latexLeftParens){i=[!1];break}if(!1===jr[l][c].latexParens){i=[!1];break}}if(null===l){i=[!1];break}if(l<=a){i=[!0];break}i=[!1];break;case 2:var p,d,f=Nr(r[0],t),m=kr(e,r[0],t);p=null!==f&&(f===a&&"right"===s&&!m||f<a);var h,g,b,y=Nr(r[1],t),v=kr(e,r[1],t);if(d=null!==y&&(y===a&&"left"===s&&!v||y<a),o)"keep"===t?(h=e.getIdentifier(),g=e.args[0].getIdentifier(),b=e.args[1].getIdentifier()):(h=e.getContent().getIdentifier(),g=e.args[0].getContent().getIdentifier(),b=e.args[1].getContent().getIdentifier()),null!==f&&(!1===jr[a][h].latexLeftParens&&(p=!1),!1===jr[f][g].latexParens&&(p=!1)),null!==y&&(!1===jr[a][h].latexRightParens&&(d=!1),!1===jr[y][b].latexParens&&(d=!1));i=[p,d];break;default:"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier()||(i=r.map((function(n){var r=Nr(n,t),o=kr(e,n,t),i=xr(n,t);return null!==r&&(a===r&&s===i&&!o||r<a)})));break}return r.length>=2&&"OperatorNode:multiply"===e.getIdentifier()&&e.implicit&&"auto"===t&&"hide"===n&&(i=r.map((function(e,t){var n="ParenthesisNode"===e.getIdentifier();return!(!i[t]&&!n)}))),i}return n.prototype=new t,n.prototype.type="OperatorNode",n.prototype.isOperatorNode=!0,n.prototype._compile=function(e,t){if("string"!==typeof this.fn||!ft(e,this.fn))throw e[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var n=lt(e,this.fn),r=Re(this.args,(function(n){return n._compile(e,t)}));if(1===r.length){var o=r[0];return function(e,t,r){return n(o(e,t,r))}}if(2===r.length){var i=r[0],a=r[1];return function(e,t,r){return n(i(e,t,r),a(e,t,r))}}return function(e,t,o){return n.apply(null,Re(r,(function(n){return n(e,t,o)})))}},n.prototype.forEach=function(e){for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)},n.prototype.map=function(e){for(var t=[],r=0;r<this.args.length;r++)t[r]=this._ifNode(e(this.args[r],"args["+r+"]",this));return new n(this.op,this.fn,t,this.implicit,this.isPercentage)},n.prototype.clone=function(){return new n(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)},n.prototype.isUnary=function(){return 1===this.args.length},n.prototype.isBinary=function(){return 2===this.args.length},n.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",o=this.args,i=r(this,t,n,o,!1);if(1===o.length){var a=xr(this,t),s=o[0].toString(e);i[0]&&(s="("+s+")");var l=/[a-zA-Z]+/.test(this.op);return"right"===a?this.op+(l?" ":"")+s:"left"===a?s+(l?" ":"")+this.op:s+this.op}if(2===o.length){var c=o[0].toString(e),u=o[1].toString(e);return i[0]&&(c="("+c+")"),i[1]&&(u="("+u+")"),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?c+" "+u:c+" "+this.op+" "+u}if(o.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var p=o.map((function(t,n){return t=t.toString(e),i[n]&&(t="("+t+")"),t}));return this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?p.join(" "):p.join(" "+this.op+" ")}return this.fn+"("+this.args.join(", ")+")"},n.prototype.toJSON=function(){return{mathjs:"OperatorNode",op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}},n.fromJSON=function(e){return new n(e.op,e.fn,e.args,e.implicit,e.isPercentage)},n.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",o=this.args,i=r(this,t,n,o,!1);if(1===o.length){var a=xr(this,t),s=o[0].toHTML(e);return i[0]&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),"right"===a?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+Fe(this.op)+"</span>"+s:s+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+Fe(this.op)+"</span>"}if(2===o.length){var l=o[0].toHTML(e),c=o[1].toHTML(e);return i[0]&&(l='<span class="math-parenthesis math-round-parenthesis">(</span>'+l+'<span class="math-parenthesis math-round-parenthesis">)</span>'),i[1]&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?l+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+c:l+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Fe(this.op)+"</span>"+c}var u=o.map((function(t,n){return t=t.toHTML(e),i[n]&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t}));return o.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())?this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?u.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):u.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Fe(this.op)+"</span>"):'<span class="math-function">'+Fe(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+u.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'},n.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",o=this.args,i=r(this,t,n,o,!0),a=zr[this.fn];if(a="undefined"===typeof a?this.op:a,1===o.length){var s=xr(this,t),l=o[0].toTex(e);return i[0]&&(l="\\left(".concat(l,"\\right)")),"right"===s?a+l:l+a}if(2===o.length){var c=o[0],u=c.toTex(e);i[0]&&(u="\\left(".concat(u,"\\right)"));var p,d=o[1],f=d.toTex(e);switch(i[1]&&(f="\\left(".concat(f,"\\right)")),p="keep"===t?c.getIdentifier():c.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return a+"{"+u+"}{"+f+"}";case"OperatorNode:pow":switch(u="{"+u+"}",f="{"+f+"}",p){case"ConditionalNode":case"OperatorNode:divide":u="\\left(".concat(u,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&"hide"===n)return u+"~"+f}return u+a+f}if(o.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var m=o.map((function(t,n){return t=t.toTex(e),i[n]&&(t="\\left(".concat(t,"\\right)")),t}));return"OperatorNode:multiply"===this.getIdentifier()&&this.implicit?m.join("~"):m.join(a)}return"\\mathrm{"+this.fn+"}\\left("+o.map((function(t){return t.toTex(e)})).join(",")+"\\right)"},n.prototype.getIdentifier=function(){return this.type+":"+this.fn},n},{isClass:!0,isNode:!0}),Io={NodeDependencies:kt,createOperatorNode:Lo},Uo="ParenthesisNode",Ho=["Node"],Ro=Je(Uo,Ho,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!_(e))throw new TypeError('Node expected for parameter "content"');this.content=e}return n.prototype=new t,n.prototype.type="ParenthesisNode",n.prototype.isParenthesisNode=!0,n.prototype._compile=function(e,t){return this.content._compile(e,t)},n.prototype.getContent=function(){return this.content.getContent()},n.prototype.forEach=function(e){e(this.content,"content",this)},n.prototype.map=function(e){var t=e(this.content,"content",this);return new n(t)},n.prototype.clone=function(){return new n(this.content)},n.prototype._toString=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"("+this.content.toString(e)+")":this.content.toString(e)},n.prototype.toJSON=function(){return{mathjs:"ParenthesisNode",content:this.content}},n.fromJSON=function(e){return new n(e.content)},n.prototype.toHTML=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(e)},n.prototype._toTex=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"\\left(".concat(this.content.toTex(e),"\\right)"):this.content.toTex(e)},n},{isClass:!0,isNode:!0}),qo={NodeDependencies:kt,createParenthesisNode:Ro},zo="RangeNode",Wo=["Node"],Jo=Je(zo,Wo,e=>{var{Node:t}=e;function n(e,t,r){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!_(e))throw new TypeError("Node expected");if(!_(t))throw new TypeError("Node expected");if(r&&!_(r))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=e,this.end=t,this.step=r||null}function r(e,t){var n=Nr(e,t),r={},o=Nr(e.start,t);if(r.start=null!==o&&o<=n||"all"===t,e.step){var i=Nr(e.step,t);r.step=null!==i&&i<=n||"all"===t}var a=Nr(e.end,t);return r.end=null!==a&&a<=n||"all"===t,r}return n.prototype=new t,n.prototype.type="RangeNode",n.prototype.isRangeNode=!0,n.prototype.needsEnd=function(){var e=this.filter((function(e){return R(e)&&"end"===e.name}));return e.length>0},n.prototype._compile=function(e,t){var n=e.range,r=this.start._compile(e,t),o=this.end._compile(e,t);if(this.step){var i=this.step._compile(e,t);return function(e,t,a){return n(r(e,t,a),o(e,t,a),i(e,t,a))}}return function(e,t,i){return n(r(e,t,i),o(e,t,i))}},n.prototype.forEach=function(e){e(this.start,"start",this),e(this.end,"end",this),this.step&&e(this.step,"step",this)},n.prototype.map=function(e){return new n(this._ifNode(e(this.start,"start",this)),this._ifNode(e(this.end,"end",this)),this.step&&this._ifNode(e(this.step,"step",this)))},n.prototype.clone=function(){return new n(this.start,this.end,this.step&&this.step)},n.prototype._toString=function(e){var t,n=e&&e.parenthesis?e.parenthesis:"keep",o=r(this,n),i=this.start.toString(e);if(o.start&&(i="("+i+")"),t=i,this.step){var a=this.step.toString(e);o.step&&(a="("+a+")"),t+=":"+a}var s=this.end.toString(e);return o.end&&(s="("+s+")"),t+=":"+s,t},n.prototype.toJSON=function(){return{mathjs:"RangeNode",start:this.start,end:this.end,step:this.step}},n.fromJSON=function(e){return new n(e.start,e.end,e.step)},n.prototype.toHTML=function(e){var t,n=e&&e.parenthesis?e.parenthesis:"keep",o=r(this,n),i=this.start.toHTML(e);if(o.start&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t=i,this.step){var a=this.step.toHTML(e);o.step&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+='<span class="math-operator math-range-operator">:</span>'+a}var s=this.end.toHTML(e);return o.end&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+='<span class="math-operator math-range-operator">:</span>'+s,t},n.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=r(this,t),o=this.start.toTex(e);if(n.start&&(o="\\left(".concat(o,"\\right)")),this.step){var i=this.step.toTex(e);n.step&&(i="\\left(".concat(i,"\\right)")),o+=":"+i}var a=this.end.toTex(e);return n.end&&(a="\\left(".concat(a,"\\right)")),o+=":"+a,o},n},{isClass:!0,isNode:!0}),Go={NodeDependencies:kt,createRangeNode:Jo},Ko="RelationalNode",Yo=["Node"],Zo=Je(Ko,Yo,e=>{var{Node:t}=e;function n(e,t){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(t))throw new TypeError("Parameter params must be an array");if(e.length!==t.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=e,this.params=t}return n.prototype=new t,n.prototype.type="RelationalNode",n.prototype.isRelationalNode=!0,n.prototype._compile=function(e,t){var n=this,r=this.params.map(n=>n._compile(e,t));return function(t,o,i){for(var a,s=r[0](t,o,i),l=0;l<n.conditionals.length;l++){a=s,s=r[l+1](t,o,i);var c=lt(e,n.conditionals[l]);if(!c(a,s))return!1}return!0}},n.prototype.forEach=function(e){this.params.forEach((t,n)=>e(t,"params["+n+"]",this),this)},n.prototype.map=function(e){return new n(this.conditionals.slice(),this.params.map((t,n)=>this._ifNode(e(t,"params["+n+"]",this)),this))},n.prototype.clone=function(){return new n(this.conditionals,this.params)},n.prototype._toString=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.params.map((function(r,o){var i=Nr(r,t);return"all"===t||null!==i&&i<=n?"("+r.toString(e)+")":r.toString(e)})),o={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},i=r[0],a=0;a<this.conditionals.length;a++)i+=" "+o[this.conditionals[a]]+" "+r[a+1];return i},n.prototype.toJSON=function(){return{mathjs:"RelationalNode",conditionals:this.conditionals,params:this.params}},n.fromJSON=function(e){return new n(e.conditionals,e.params)},n.prototype.toHTML=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.params.map((function(r,o){var i=Nr(r,t);return"all"===t||null!==i&&i<=n?'<span class="math-parenthesis math-round-parenthesis">(</span>'+r.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':r.toHTML(e)})),o={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},i=r[0],a=0;a<this.conditionals.length;a++)i+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Fe(o[this.conditionals[a]])+"</span>"+r[a+1];return i},n.prototype._toTex=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.params.map((function(r,o){var i=Nr(r,t);return"all"===t||null!==i&&i<=n?"\\left("+r.toTex(e)+"\right)":r.toTex(e)})),o=r[0],i=0;i<this.conditionals.length;i++)o+=zr[this.conditionals[i]]+r[i+1];return o},n},{isClass:!0,isNode:!0}),Xo={NodeDependencies:kt,createRelationalNode:Zo};function Qo(e,t,n){return e&&"function"===typeof e.map?e.map((function(e){return Qo(e,t,n)})):t(e)}var ei="number",ti=["typed"];function ni(e){var t=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(t){var n={"0b":2,"0o":8,"0x":16}[t[1]],r=t[2],o=t[3];return{input:e,radix:n,integerPart:r,fractionalPart:o}}return null}function ri(e){for(var t=parseInt(e.integerPart,e.radix),n=0,r=0;r<e.fractionalPart.length;r++){var o=parseInt(e.fractionalPart[r],e.radix);n+=o/Math.pow(e.radix,r+1)}var i=t+n;if(isNaN(i))throw new SyntaxError('String "'+e.input+'" is no valid number');return i}var oi=Je(ei,ti,e=>{var{typed:t}=e,n=t("number",{"":function(){return 0},number:function(e){return e},string:function(e){if("NaN"===e)return NaN;var t=ni(e);if(t)return ri(t);var n=0,r=e.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);r&&(n=Number(r[2]),e=r[1]);var o=Number(e);if(isNaN(o))throw new SyntaxError('String "'+e+'" is no valid number');if(r){if(o>2**n-1)throw new SyntaxError('String "'.concat(e,'" is out of range'));o>=2**(n-1)&&(o-=2**n)}return o},BigNumber:function(e){return e.toNumber()},Fraction:function(e){return e.valueOf()},Unit:function(e){throw new Error("Second argument with valueless unit expected")},null:function(e){return 0},"Unit, string | Unit":function(e,t){return e.toNumber(t)},"Array | Matrix":function(e){return Qo(e,this)}});return n.fromJSON=function(e){return parseFloat(e.value)},n}),ii={typedDependencies:uo,createNumber:oi},ai="numeric",si=["number","?bignumber","?fraction"],li=Je(ai,si,e=>{var{number:t,bignumber:n,fraction:r}=e,o={string:!0,number:!0,BigNumber:!0,Fraction:!0},i={number:e=>t(e),BigNumber:n?e=>n(e):nr,Fraction:r?e=>r(e):rr};return function(e,t){var n=z(e);if(!(n in o))throw new TypeError("Cannot convert "+e+' of type "'+n+'"; valid input types are '+Object.keys(o).join(", "));if(!(t in i))throw new TypeError("Cannot convert "+e+' to type "'+t+'"; valid output types are '+Object.keys(i).join(", "));return t===n?e:i[t](e)}}),ci={numberDependencies:ii,createNumeric:li},ui="parse",pi=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],di=Je(ui,pi,e=>{var{typed:t,numeric:n,config:r,AccessorNode:o,ArrayNode:i,AssignmentNode:s,BlockNode:l,ConditionalNode:c,ConstantNode:u,FunctionAssignmentNode:p,FunctionNode:d,IndexNode:f,ObjectNode:m,OperatorNode:h,ParenthesisNode:g,RangeNode:b,RelationalNode:y,SymbolNode:v}=e,O=t(ui,{string:function(e){return U(e,{})},"Array | Matrix":function(e){return w(e,{})},"string, Object":function(e,t){var n=void 0!==t.nodes?t.nodes:{};return U(e,n)},"Array | Matrix, Object":w});function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0!==t.nodes?t.nodes:{};return Qo(e,(function(e){if("string"!==typeof e)throw new TypeError("String expected");return U(e,n)}))}var j={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},N={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},x={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},k={true:!0,false:!1,null:null,undefined:void 0},E=["NaN","Infinity"];function C(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:j.NULL,nestingLevel:0,conditionalLevel:null}}function S(e,t){return e.expression.substr(e.index,t)}function A(e){return S(e,1)}function T(e){e.index++}function M(e){return e.expression.charAt(e.index-1)}function P(e){return e.expression.charAt(e.index+1)}function B(e){e.tokenType=j.NULL,e.token="",e.comment="";while(1){if("#"===A(e))while("\n"!==A(e)&&""!==A(e))e.comment+=A(e),T(e);if(!O.isWhitespace(A(e),e.nestingLevel))break;T(e)}if(""!==A(e)){if("\n"===A(e)&&!e.nestingLevel)return e.tokenType=j.DELIMITER,e.token=A(e),void T(e);var t=A(e),n=S(e,2),r=S(e,3);if(3===r.length&&N[r])return e.tokenType=j.DELIMITER,e.token=r,T(e),T(e),void T(e);if(2===n.length&&N[n])return e.tokenType=j.DELIMITER,e.token=n,T(e),void T(e);if(N[t])return e.tokenType=j.DELIMITER,e.token=t,void T(e);if(O.isDigitDot(t)){e.tokenType=j.NUMBER;var o=S(e,2);if("0b"===o||"0o"===o||"0x"===o){e.token+=A(e),T(e),e.token+=A(e),T(e);while(O.isHexDigit(A(e)))e.token+=A(e),T(e);if("."===A(e)){e.token+=".",T(e);while(O.isHexDigit(A(e)))e.token+=A(e),T(e)}else if("i"===A(e)){e.token+="i",T(e);while(O.isDigit(A(e)))e.token+=A(e),T(e)}return}if("."===A(e)){if(e.token+=A(e),T(e),!O.isDigit(A(e)))return void(e.tokenType=j.DELIMITER)}else{while(O.isDigit(A(e)))e.token+=A(e),T(e);O.isDecimalMark(A(e),P(e))&&(e.token+=A(e),T(e))}while(O.isDigit(A(e)))e.token+=A(e),T(e);if("E"===A(e)||"e"===A(e))if(O.isDigit(P(e))||"-"===P(e)||"+"===P(e)){if(e.token+=A(e),T(e),"+"!==A(e)&&"-"!==A(e)||(e.token+=A(e),T(e)),!O.isDigit(A(e)))throw ke(e,'Digit expected, got "'+A(e)+'"');while(O.isDigit(A(e)))e.token+=A(e),T(e);if(O.isDecimalMark(A(e),P(e)))throw ke(e,'Digit expected, got "'+A(e)+'"')}else if("."===P(e))throw T(e),ke(e,'Digit expected, got "'+A(e)+'"')}else{if(!O.isAlpha(A(e),M(e),P(e))){e.tokenType=j.UNKNOWN;while(""!==A(e))e.token+=A(e),T(e);throw ke(e,'Syntax error in part "'+e.token+'"')}while(O.isAlpha(A(e),M(e),P(e))||O.isDigit(A(e)))e.token+=A(e),T(e);Q(x,e.token)?e.tokenType=j.DELIMITER:e.tokenType=j.SYMBOL}}else e.tokenType=j.DELIMITER}function F(e){do{B(e)}while("\n"===e.token)}function _(e){e.nestingLevel++}function L(e){e.nestingLevel--}function U(e,t){var n=C();a()(n,{expression:e,extraNodes:t}),B(n);var r=H(n);if(""!==n.token)throw n.tokenType===j.DELIMITER?Ee(n,"Unexpected operator "+n.token):ke(n,'Unexpected part "'+n.token+'"');return r}function H(e){var t,n,r=[];""!==e.token&&"\n"!==e.token&&";"!==e.token&&(t=q(e),t.comment=e.comment);while("\n"===e.token||";"===e.token)0===r.length&&t&&(n=";"!==e.token,r.push({node:t,visible:n})),B(e),"\n"!==e.token&&";"!==e.token&&""!==e.token&&(t=q(e),t.comment=e.comment,n=";"!==e.token,r.push({node:t,visible:n}));return r.length>0?new l(r):(t||(t=new u(void 0),t.comment=e.comment),t)}function q(e){var t,n,r,o,i=z(e);if("="===e.token){if(R(i))return t=i.name,F(e),r=q(e),new s(new v(t),r);if(V(i))return F(e),r=q(e),new s(i.object,i.index,r);if($(i)&&R(i.fn)&&(o=!0,n=[],t=i.name,i.args.forEach((function(e,t){R(e)?n[t]=e.name:o=!1})),o))return F(e),r=q(e),new p(t,n,r);throw ke(e,"Invalid left hand side of assignment operator =")}return i}function z(e){var t=W(e);while("?"===e.token){var n=e.conditionalLevel;e.conditionalLevel=e.nestingLevel,F(e);var r=t,o=q(e);if(":"!==e.token)throw ke(e,"False part of conditional expression expected");e.conditionalLevel=null,F(e);var i=q(e);t=new c(r,o,i),e.conditionalLevel=n}return t}function W(e){var t=J(e);while("or"===e.token)F(e),t=new h("or","or",[t,J(e)]);return t}function J(e){var t=G(e);while("xor"===e.token)F(e),t=new h("xor","xor",[t,G(e)]);return t}function G(e){var t=K(e);while("and"===e.token)F(e),t=new h("and","and",[t,K(e)]);return t}function K(e){var t=Y(e);while("|"===e.token)F(e),t=new h("|","bitOr",[t,Y(e)]);return t}function Y(e){var t=Z(e);while("^|"===e.token)F(e),t=new h("^|","bitXor",[t,Z(e)]);return t}function Z(e){var t=X(e);while("&"===e.token)F(e),t=new h("&","bitAnd",[t,X(e)]);return t}function X(e){var t=[ee(e)],n=[],r={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};while(Q(r,e.token)){var o={name:e.token,fn:r[e.token]};n.push(o),F(e),t.push(ee(e))}return 1===t.length?t[0]:2===t.length?new h(n[0].name,n[0].fn,t):new y(n.map(e=>e.fn),t)}function ee(e){var t,n,r,o;t=te(e);var i={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};while(Q(i,e.token))n=e.token,r=i[n],F(e),o=[t,te(e)],t=new h(n,r,o);return t}function te(e){var t,n,r,o;t=ne(e);var i={to:"to",in:"to"};while(Q(i,e.token))n=e.token,r=i[n],F(e),"in"===n&&""===e.token?t=new h("*","multiply",[t,new v("in")],!0):(o=[t,ne(e)],t=new h(n,r,o));return t}function ne(e){var t,n=[];if(t=":"===e.token?new u(1):re(e),":"===e.token&&e.conditionalLevel!==e.nestingLevel){n.push(t);while(":"===e.token&&n.length<3)F(e),")"===e.token||"]"===e.token||","===e.token||""===e.token?n.push(new v("end")):n.push(re(e));t=3===n.length?new b(n[0],n[2],n[1]):new b(n[0],n[1])}return t}function re(e){var t,n,r,o;t=oe(e);var i={"+":"add","-":"subtract"};while(Q(i,e.token)){n=e.token,r=i[n],F(e);var a=oe(e);o=a.isPercentage?[t,new h("*","multiply",[t,a])]:[t,a],t=new h(n,r,o)}return t}function oe(e){var t,n,r,o;t=ie(e),n=t;var i={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};while(1){if(!Q(i,e.token))break;r=e.token,o=i[r],F(e),n=ie(e),t=new h(r,o,[t,n])}return t}function ie(e){var t,n;t=ae(e),n=t;while(1){if(!(e.tokenType===j.SYMBOL||"in"===e.token&&D(t))&&(e.tokenType!==j.NUMBER||D(n)||I(n)&&"!"!==n.op)&&"("!==e.token)break;n=ae(e),t=new h("*","multiply",[t,n],!0)}return t}function ae(e){var t=se(e),n=t,r=[];while(1){if("/"!==e.token||!D(n))break;if(r.push(a()({},e)),F(e),e.tokenType!==j.NUMBER){a()(e,r.pop());break}if(r.push(a()({},e)),F(e),e.tokenType!==j.SYMBOL&&"("!==e.token){r.pop(),a()(e,r.pop());break}a()(e,r.pop()),r.pop(),n=se(e),t=new h("/","divide",[t,n])}return t}function se(e){var t,n,r,o;t=le(e);var i={"%":"mod",mod:"mod"};while(Q(i,e.token))n=e.token,r=i[n],F(e),"%"===n&&e.tokenType===j.DELIMITER&&"("!==e.token?t=new h("/","divide",[t,new u(100)],!1,!0):(o=[t,le(e)],t=new h(n,r,o));return t}function le(e){var t,n,r,o={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Q(o,e.token)?(r=o[e.token],t=e.token,F(e),n=[le(e)],new h(t,r,n)):ce(e)}function ce(e){var t,n,r,o;return t=ue(e),"^"!==e.token&&".^"!==e.token||(n=e.token,r="^"===n?"pow":"dotPow",F(e),o=[t,le(e)],t=new h(n,r,o)),t}function ue(e){var t,n,r,o;t=pe(e);var i={"!":"factorial","'":"ctranspose"};while(Q(i,e.token))n=e.token,r=i[n],B(e),o=[t],t=new h(n,r,o),t=fe(e,t);return t}function pe(e){var t=[];if(e.tokenType===j.SYMBOL&&Q(e.extraNodes,e.token)){var n=e.extraNodes[e.token];if(B(e),"("===e.token){if(t=[],_(e),B(e),")"!==e.token){t.push(q(e));while(","===e.token)B(e),t.push(q(e))}if(")"!==e.token)throw ke(e,"Parenthesis ) expected");L(e),B(e)}return new n(t)}return de(e)}function de(e){var t,r;return e.tokenType===j.SYMBOL||e.tokenType===j.DELIMITER&&e.token in x?(r=e.token,B(e),t=Q(k,r)?new u(k[r]):-1!==E.indexOf(r)?new u(n(r,"number")):new v(r),t=fe(e,t),t):me(e)}function fe(e,t,n){var r;while(("("===e.token||"["===e.token||"."===e.token)&&(!n||-1!==n.indexOf(e.token)))if(r=[],"("===e.token){if(!R(t)&&!V(t))return t;if(_(e),B(e),")"!==e.token){r.push(q(e));while(","===e.token)B(e),r.push(q(e))}if(")"!==e.token)throw ke(e,"Parenthesis ) expected");L(e),B(e),t=new d(t,r)}else if("["===e.token){if(_(e),B(e),"]"!==e.token){r.push(q(e));while(","===e.token)B(e),r.push(q(e))}if("]"!==e.token)throw ke(e,"Parenthesis ] expected");L(e),B(e),t=new o(t,new f(r))}else{if(B(e),e.tokenType!==j.SYMBOL)throw ke(e,"Property name expected after dot");r.push(new u(e.token)),B(e);var i=!0;t=new o(t,new f(r,i))}return t}function me(e){var t,n;return'"'===e.token?(n=he(e),t=new u(n),t=fe(e,t),t):ge(e)}function he(e){var t="";while(""!==A(e)&&'"'!==A(e))"\\"===A(e)&&(t+=A(e),T(e)),t+=A(e),T(e);if(B(e),'"'!==e.token)throw ke(e,'End of string " expected');return B(e),JSON.parse('"'+t+'"')}function ge(e){var t,n;return"'"===e.token?(n=be(e),t=new u(n),t=fe(e,t),t):ye(e)}function be(e){var t="";while(""!==A(e)&&"'"!==A(e))"\\"===A(e)&&(t+=A(e),T(e)),t+=A(e),T(e);if(B(e),"'"!==e.token)throw ke(e,"End of string ' expected");return B(e),JSON.parse('"'+t+'"')}function ye(e){var t,n,r,o;if("["===e.token){if(_(e),B(e),"]"!==e.token){var a=ve(e);if(";"===e.token){r=1,n=[a];while(";"===e.token)B(e),n[r]=ve(e),r++;if("]"!==e.token)throw ke(e,"End of matrix ] expected");L(e),B(e),o=n[0].items.length;for(var s=1;s<r;s++)if(n[s].items.length!==o)throw Ee(e,"Column dimensions mismatch ("+n[s].items.length+" !== "+o+")");t=new i(n)}else{if("]"!==e.token)throw ke(e,"End of matrix ] expected");L(e),B(e),t=a}}else L(e),B(e),t=new i([]);return fe(e,t)}return Oe(e)}function ve(e){var t=[q(e)],n=1;while(","===e.token)B(e),t[n]=q(e),n++;return new i(t)}function Oe(e){if("{"===e.token){var t;_(e);var n={};do{if(B(e),"}"!==e.token){if('"'===e.token)t=he(e);else if("'"===e.token)t=be(e);else{if(!(e.tokenType===j.SYMBOL||e.tokenType===j.DELIMITER&&e.token in x))throw ke(e,"Symbol or string expected as object key");t=e.token,B(e)}if(":"!==e.token)throw ke(e,"Colon : expected after object key");B(e),n[t]=q(e)}}while(","===e.token);if("}"!==e.token)throw ke(e,"Comma , or bracket } expected after object value");L(e),B(e);var r=new m(n);return r=fe(e,r),r}return we(e)}function we(e){var t;return e.tokenType===j.NUMBER?(t=e.token,B(e),new u(n(t,r.number))):je(e)}function je(e){var t;if("("===e.token){if(_(e),B(e),t=q(e),")"!==e.token)throw ke(e,"Parenthesis ) expected");return L(e),B(e),t=new g(t),t=fe(e,t),t}return Ne(e)}function Ne(e){throw""===e.token?ke(e,"Unexpected end of expression"):ke(e,"Value expected")}function xe(e){return e.index-e.token.length+1}function ke(e,t){var n=xe(e),r=new SyntaxError(t+" (char "+n+")");return r.char=n,r}function Ee(e,t){var n=xe(e),r=new SyntaxError(t+" (char "+n+")");return r.char=n,r}return O.isAlpha=function(e,t,n){return O.isValidLatinOrGreek(e)||O.isValidMathSymbol(e,n)||O.isValidMathSymbol(t,e)},O.isValidLatinOrGreek=function(e){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(e)},O.isValidMathSymbol=function(e,t){return/^[\uD835]$/.test(e)&&/^[\uDC00-\uDFFF]$/.test(t)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(t)},O.isWhitespace=function(e,t){return" "===e||"\t"===e||"\n"===e&&t>0},O.isDecimalMark=function(e,t){return"."===e&&"/"!==t&&"*"!==t&&"^"!==t},O.isDigitDot=function(e){return e>="0"&&e<="9"||"."===e},O.isDigit=function(e){return e>="0"&&e<="9"},O.isHexDigit=function(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"},O}),fi={AccessorNodeDependencies:hr,ArrayNodeDependencies:vr,AssignmentNodeDependencies:Vr,BlockNodeDependencies:Fr,ConditionalNodeDependencies:Ur,ConstantNodeDependencies:eo,FunctionAssignmentNodeDependencies:ho,FunctionNodeDependencies:xo,IndexNodeDependencies:Mo,ObjectNodeDependencies:$o,OperatorNodeDependencies:Io,ParenthesisNodeDependencies:qo,RangeNodeDependencies:Go,RelationalNodeDependencies:Xo,SymbolNodeDependencies:vo,numericDependencies:ci,typedDependencies:uo,createParse:di},mi="evaluate",hi=["typed","parse"],gi=Je(mi,hi,e=>{var{typed:t,parse:n}=e;return t(mi,{string:function(e){var t=yt();return n(e).compile().evaluate(t)},"string, Map | Object":function(e,t){return n(e).compile().evaluate(t)},"Array | Matrix":function(e){var t=yt();return Qo(e,(function(e){return n(e).compile().evaluate(t)}))},"Array | Matrix, Map | Object":function(e,t){return Qo(e,(function(e){return n(e).compile().evaluate(t)}))}})}),bi={parseDependencies:fi,typedDependencies:uo,createEvaluate:gi},yi=at({evaluateDependencies:bi});yi.import({add:function(e,t){return e+t},subtract:function(e,t){return e-t},multiply:function(e,t){return e*t},divide:function(e,t){return e/t},equal:function(e,t){return e==t},unequal:function(e,t){return e!=t},not:function(e){return!e},and:function(e,t){return e&&t},or:function(e,t){return e||t},largerEq:function(e,t){return e>=t},larger:function(e,t){return e>t},smallerEq:function(e,t){return e<=t},smaller:function(e,t){return e<t}},{override:!0});var vi=yi,Oi=n("8bbf"),wi={class:"form-group row matomo-form-field"},ji={key:0,class:"col s12"},Ni={key:0,class:"form-help"},xi={key:0,class:"inline-help",ref:"inlineHelp"},ki=Object(Oi["createElementVNode"])("br",null,null,-1);function Ei(e,t,n,r,o,i){return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",wi,[e.formField.introduction?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("h3",ji,Object(Oi["toDisplayString"])(e.formField.introduction),1)):Object(Oi["createCommentVNode"])("",!0),Object(Oi["createElementVNode"])("div",{class:Object(Oi["normalizeClass"])(["col s12",{"input-field":"checkbox"!==e.formField.uiControl&&"radio"!==e.formField.uiControl,"file-field":"file"===e.formField.uiControl,m6:!e.formField.fullWidth}])},[(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(Object(Oi["resolveDynamicComponent"])(e.childComponent),Object(Oi["mergeProps"])(Object.assign(Object.assign({formField:e.formField},e.formField),{},{modelValue:e.processedModelValue,modelModifiers:e.modelModifiers,availableOptions:e.availableOptions},e.extraChildComponentParams),{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)})}),null,16))],2),Object(Oi["createElementVNode"])("div",{class:Object(Oi["normalizeClass"])(["col s12",{m6:!e.formField.fullWidth}])},[e.showFormHelp?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Ni,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("div",{class:"form-description"},Object(Oi["toDisplayString"])(e.formField.description),513),[[Oi["vShow"],e.formField.description]]),e.formField.inlineHelp||e.hasInlineHelpSlot?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",xi,[e.inlineHelpComponent?(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(Object(Oi["resolveDynamicComponent"])(e.inlineHelpComponent),Object(Oi["normalizeProps"])(Object(Oi["mergeProps"])({key:0},e.inlineHelpBind)),null,16)):Object(Oi["createCommentVNode"])("",!0),Object(Oi["renderSlot"])(e.$slots,"inline-help")],512)):Object(Oi["createCommentVNode"])("",!0),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("span",null,[ki,Object(Oi["createTextVNode"])(" "+Object(Oi["toDisplayString"])(e.translate("General_Default"))+": ",1),Object(Oi["createElementVNode"])("span",null,Object(Oi["toDisplayString"])(e.defaultValuePrettyTruncated),1)],512),[[Oi["vShow"],e.showDefaultValue]])])):Object(Oi["createCommentVNode"])("",!0)],2)],512)),[[Oi["vShow"],e.showField]])}var Ci=n("19dc"),Si={class:"checkbox"},Vi=["checked","id","name"],Ai=["innerHTML"];function Ti(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Si,[Object(Oi["createElementVNode"])("label",null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},e.uiControlAttributes,{value:1,checked:e.isChecked,type:"checkbox",id:e.name,name:e.name}),null,16,Vi),Object(Oi["createElementVNode"])("span",{innerHTML:e.$sanitize(e.title)},null,8,Ai)])])}var Mi=Object(Oi["defineComponent"])({props:{modelValue:[Boolean,Number,String],modelModifiers:Object,uiControlAttributes:Object,name:String,title:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){var t=e.target.checked;if(this.modelValue!==t){var n;if(null===(n=this.modelModifiers)||void 0===n||!n.abortable)return void this.$emit("update:modelValue",t);var r={value:t,abort:function(){e.target.checked=!t}};this.$emit("update:modelValue",r)}}},computed:{isChecked:function(){return!!this.modelValue&&"0"!==this.modelValue}}});Mi.render=Ti;var Pi=Mi,Di={ref:"root"},Bi=["value","checked","onChange","id","name"];function $i(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Di,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(Oi["toDisplayString"])(e.title),513),[[Oi["vShow"],e.title]]),(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.availableOptions,(function(t,n){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("p",{key:n,class:"checkbox"},[Object(Oi["createElementVNode"])("label",null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({value:t.key,checked:!!e.checkboxStates[n],onChange:function(t){return e.onChange(n)}},e.uiControlAttributes,{type:"checkbox",id:"".concat(e.name).concat(t.key),name:t.name}),null,16,Bi),Object(Oi["createElementVNode"])("span",null,Object(Oi["toDisplayString"])(t.value),1),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("span",{class:"form-description"},Object(Oi["toDisplayString"])(t.description),513),[[Oi["vShow"],t.description]])])])})),128))],512)}function Fi(e){return Ui(e)||Ii(e)||Li(e)||_i()}function _i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Li(e,t){if(e){if("string"===typeof e)return Hi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hi(e,t):void 0}}function Ii(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ui(e){if(Array.isArray(e))return Hi(e)}function Hi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ri(e,t){return(e||[]).map((function(e){return t&&-1!==t.indexOf(e.key)}))}var qi=Object(Oi["defineComponent"])({props:{modelValue:Array,modelModifiers:Object,name:String,title:String,availableOptions:Array,uiControlAttributes:Object,type:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{checkboxStates:function(){return Ri(this.availableOptions,this.modelValue)}},mounted:function(){window.Materialize.updateTextFields()},methods:{onChange:function(e){var t,n=this,r=Fi(this.checkboxStates);r[e]=!r[e];var o=this.availableOptions||{},i=[];if(Object.values(o).forEach((function(e,t){r[t]&&i.push(e.key)})),null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var a={value:i,abort:function(){var t=n.$refs.root.querySelectorAll("input").item(e);t.checked=!t.checked}};this.$emit("update:modelValue",a)}else this.$emit("update:modelValue",i)}}});qi.render=$i;var zi=qi,Wi={class:"expandableSelector"},Ji=Object(Oi["createElementVNode"])("svg",{class:"caret",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},[Object(Oi["createElementVNode"])("path",{d:"M7 10l5 5 5-5z"}),Object(Oi["createElementVNode"])("path",{d:"M0 0h24v24H0z",fill:"none"})],-1),Gi=["value"],Ki={class:"expandableList z-depth-2"},Yi={class:"searchContainer"},Zi={class:"collection firstLevel"},Xi=["onClick"],Qi={class:"collection secondLevel"},ea=["onClick"],ta={class:"primary-content"},na=["title"];function ra(e,t,n,r,o,i){var a=Object(Oi["resolveDirective"])("focus-if"),s=Object(Oi["resolveDirective"])("focus-anywhere-but-here");return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Wi,[Object(Oi["createElementVNode"])("div",{onClick:t[0]||(t[0]=function(t){return e.showSelect=!e.showSelect}),class:"select-wrapper"},[Ji,Object(Oi["createElementVNode"])("input",{type:"text",class:"select-dropdown",readonly:"readonly",value:e.modelValueText},null,8,Gi)]),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("div",Ki,[Object(Oi["createElementVNode"])("div",Yi,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("input",{type:"text",placeholder:"Search","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),class:"expandableSearch browser-default"},null,512),[[Oi["vModelText"],e.searchTerm],[a,e.showSelect]])]),Object(Oi["createElementVNode"])("ul",Zi,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.availableOptions,(function(t,n){return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("li",{class:"collection-item",key:n},[Object(Oi["createElementVNode"])("h4",{class:"expandableListCategory",onClick:function(n){return e.onCategoryClicked(t)}},[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(t.group)+" ",1),Object(Oi["createElementVNode"])("span",{class:Object(Oi["normalizeClass"])(["secondary-content",{"icon-arrow-right":e.showCategory!==t.group,"icon-arrow-bottom":e.showCategory===t.group}])},null,2)],8,Xi),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("ul",Qi,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(t.values.filter((function(t){return-1!==t.value.toLowerCase().indexOf(e.searchTerm.toLowerCase())})),(function(t){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("li",{class:"expandableListItem collection-item valign-wrapper",key:t.key,onClick:function(n){return e.onValueClicked(t)}},[Object(Oi["createElementVNode"])("span",ta,Object(Oi["toDisplayString"])(t.value),1),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("span",{title:t.tooltip,class:"secondary-content icon-help"},null,8,na),[[Oi["vShow"],t.tooltip]])],8,ea)})),128))],512),[[Oi["vShow"],e.showCategory===t.group||e.searchTerm]])],512)),[[Oi["vShow"],t.values.filter((function(t){return-1!==t.value.toLowerCase().indexOf(e.searchTerm.toLowerCase())})).length]])})),128))])],512),[[Oi["vShow"],e.showSelect]])],512)),[[s,{blur:e.onBlur}]])}function oa(e){var t=[];if(!e)return t;var n={};return Object.values(e).forEach((function(e){var t=e,r=t.group||"";r in n&&n[r]||(n[r]={values:[],group:r});var o={key:t.key,value:t.value};"tooltip"in t&&t.tooltip&&(o.tooltip=t.tooltip),n[r].values.push(o)})),Object.values(n).forEach((function(e){e.values.length&&t.push(e)})),t}var ia=Object(Oi["defineComponent"])({props:{modelValue:[Number,String],modelModifiers:Object,availableOptions:Array,title:String},directives:{FocusAnywhereButHere:Ci["FocusAnywhereButHere"],FocusIf:Ci["FocusIf"]},inheritAttrs:!1,emits:["update:modelValue"],data:function(){return{showSelect:!1,searchTerm:"",showCategory:""}},computed:{modelValueText:function(){if(this.title)return this.title;var e,t=this.modelValue,n=this.availableOptions||[];return n.some((function(n){return e=n.values.find((function(e){return e.key===t})),e})),e?e.value?"".concat(e.value):"":t?"".concat(t):""}},methods:{onBlur:function(){this.showSelect=!1},onCategoryClicked:function(e){this.showCategory===e.group?this.showCategory="":this.showCategory=e.group},onValueClicked:function(e){var t;if(this.showSelect=!1,null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var n={value:e.key,abort:function(){}};this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",e.key)}}});ia.render=ra;var aa=ia,sa=["for","innerHTML"];function la(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("FieldArray");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,sa),Object(Oi["createVNode"])(a,{name:e.name,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onValueUpdate(t)}),"model-modifiers":e.modelModifiers,field:e.uiControlAttributes.field},null,8,["name","model-value","model-modifiers","field"])])}var ca=Object(Oi["defineComponent"])({components:{FieldArray:Ci["FieldArray"]},props:{name:String,title:String,modelValue:null,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],methods:{onValueUpdate:function(e){this.$emit("update:modelValue",e)}}});ca.render=la;var ua=ca,pa={class:"btn"},da=["for","innerHTML"],fa=["name","id"],ma={class:"file-path-wrapper"},ha=["value"];function ga(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("div",pa,[Object(Oi["createElementVNode"])("span",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,da),Object(Oi["createElementVNode"])("input",{ref:"fileInput",name:e.name,type:"file",id:e.name,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},null,40,fa)]),Object(Oi["createElementVNode"])("div",ma,[Object(Oi["createElementVNode"])("input",{class:"file-path validate",value:e.filePath,type:"text"},null,8,ha)])])}var ba=Object(Oi["defineComponent"])({props:{name:String,title:String,modelValue:[String,File],modelModifiers:Object},inheritAttrs:!1,emits:["update:modelValue"],watch:{modelValue:function(e){if(!e||""===e){var t=this.$refs.fileInput;t.value=""}}},methods:{onChange:function(e){var t,n=e.target.files;if(n){var r=n.item(0);if(null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var o={value:r,abort:function(){}};this.$emit("update:modelValue",o)}else this.$emit("update:modelValue",r)}}},computed:{filePath:function(){if(this.modelValue instanceof File)return this.$refs.fileInput.value}}});ba.render=ga;var ya=ba,va=["type","name","value"];function Oa(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("input",{type:e.uiControl,name:e.name,value:e.modelValue,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},null,40,va)])}var wa=Object(Oi["defineComponent"])({props:{modelValue:null,modelModifiers:Object,uiControl:String,name:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e.target.value)}}});wa.render=Oa;var ja=wa,Na={class:"fieldMultiTuple"},xa=["for","innerHTML"];function ka(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("MultiPairField");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Na,[Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,xa),Object(Oi["createVNode"])(a,{name:e.name,"model-value":e.modelValue,"onUpdate:modelValue":e.onUpdateValue,"model-modifiers":e.modelModifiers,field1:e.uiControlAttributes.field1,field2:e.uiControlAttributes.field2,field3:e.uiControlAttributes.field3,field4:e.uiControlAttributes.field4},null,8,["name","model-value","onUpdate:modelValue","model-modifiers","field1","field2","field3","field4"])])}var Ea=Object(Oi["defineComponent"])({props:{name:String,title:String,modelValue:null,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{MultiPairField:Ci["MultiPairField"]},emits:["update:modelValue"],methods:{onUpdateValue:function(e){this.$emit("update:modelValue",e)}}});Ea.render=ka;var Ca=Ea,Sa=["type","id","name","value"],Va=["for","innerHTML"];function Aa(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,id:e.name,name:e.name,value:e.modelValueFormatted,onKeydown:t[0]||(t[0]=function(t){return e.onChange(t)}),onChange:t[1]||(t[1]=function(t){return e.onChange(t)})},e.uiControlAttributes),null,16,Sa),Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Va)],64)}var Ta=Object(Oi["defineComponent"])({props:{uiControl:String,name:String,title:String,modelValue:[Number,String],modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onChange=Object(Ci["debounce"])(this.onChange.bind(this),50)},methods:{onChange:function(e){var t=this,n=parseFloat(e.target.value);if(n!==this.modelValue){var r;if(null===(r=this.modelModifiers)||void 0===r||!r.abortable)return void this.$emit("update:modelValue",n);var o={value:n,abort:function(){e.target.value!==t.modelValueFormatted&&(e.target.value=t.modelValueFormatted)}};this.$emit("update:modelValue",o)}}},mounted:function(){window.Materialize.updateTextFields()},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}},computed:{modelValueFormatted:function(){return(this.modelValue||"").toString()}}});Ta.render=Aa;var Ma=Ta,Pa={ref:"root"},Da=["value","id","name","disabled","checked"];function Ba(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Pa,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(Oi["toDisplayString"])(e.title),513),[[Oi["vShow"],e.title]]),(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.availableOptions||[],(function(n){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("p",{key:n.key,class:"radio"},[Object(Oi["createElementVNode"])("label",null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({value:n.key,onChange:t[0]||(t[0]=function(t){return e.onChange(t)}),type:"radio",id:"".concat(e.name).concat(n.key),name:e.name,disabled:n.disabled||e.disabled},e.uiControlAttributes,{checked:e.modelValue===n.key||"".concat(e.modelValue)===n.key}),null,16,Da),Object(Oi["createElementVNode"])("span",null,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(n.value)+" ",1),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("span",{class:"form-description"},Object(Oi["toDisplayString"])(n.description),513),[[Oi["vShow"],n.description]])])])])})),128))],512)}var $a=Object(Oi["defineComponent"])({props:{title:String,availableOptions:Array,name:String,disabled:Boolean,uiControlAttributes:Object,modelValue:[String,Number],modelModifiers:Object},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){var t,n=this;if(null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var r=function(){n.$refs.root.querySelectorAll("input").forEach((function(e,t){var r;if(null!==(r=n.availableOptions)&&void 0!==r&&r[t]){var o=n.availableOptions[t].key;e.checked=n.modelValue===o||"".concat(n.modelValue)===o}}))},o={value:e.target.value,abort:function(){r()}};this.$emit("update:modelValue",o)}else this.$emit("update:modelValue",e.target.value)}}});$a.render=Ba;var Fa=$a;function _a(e,t){return Ra(e)||Ha(e,t)||Ia(e,t)||La()}function La(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ia(e,t){if(e){if("string"===typeof e)return Ua(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ua(e,t):void 0}}function Ua(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ha(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){s=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(s)throw o}}return i}}function Ra(e){if(Array.isArray(e))return e}var qa={key:0,class:"matomo-field-select"},za=["multiple","name"],Wa=["label"],Ja=["value","selected","disabled"],Ga=["for","innerHTML"],Ka={key:1,class:"matomo-field-select"},Ya=["multiple","name"],Za=["value","selected","disabled"],Xa=["for","innerHTML"];function Qa(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[e.groupedOptions?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",qa,[Object(Oi["createElementVNode"])("select",Object(Oi["mergeProps"])({ref:"select",class:"grouped",multiple:e.multiple,name:e.name,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},e.uiControlAttributes),[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.groupedOptions,(function(t){var n=_a(t,2),r=n[0],o=n[1];return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("optgroup",{key:r,label:r},[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(o,(function(t){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("option",{key:t.key,value:"string:".concat(t.key),selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(Oi["toDisplayString"])(t.value),9,Ja)})),128))],8,Wa)})),128))],16,za),Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Ga)])):Object(Oi["createCommentVNode"])("",!0),!e.groupedOptions&&e.options?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Ka,[Object(Oi["createElementVNode"])("select",Object(Oi["mergeProps"])({class:"ungrouped",ref:"select",multiple:e.multiple,name:e.name,onChange:t[1]||(t[1]=function(t){return e.onChange(t)})},e.uiControlAttributes),[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.options,(function(t){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("option",{key:t.key,value:"string:".concat(t.key),selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(Oi["toDisplayString"])(t.value),9,Za)})),128))],16,Ya),Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Xa)])):Object(Oi["createCommentVNode"])("",!0)],64)}function es(e){return rs(e)||ns(e)||as(e)||ts()}function ts(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ns(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function rs(e){if(Array.isArray(e))return ss(e)}function os(e,t){return cs(e)||ls(e,t)||as(e,t)||is()}function is(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function as(e,t){if(e){if("string"===typeof e)return ss(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ss(e,t):void 0}}function ss(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ls(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){s=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(s)throw o}}return i}}function cs(e){if(Array.isArray(e))return e}function us(e){return us="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},us(e)}function ps(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0;if(e){var i=window.$(e);if(Array.from(e.options).forEach((function(e){e.selected=o?!!t&&-1!==t.indexOf(e.value.replace(/^string:/,"")):"string:".concat(t)===e.value})),i.formSelect(r),n){var a=i.closest(".select-wrapper").find("input");a.attr("placeholder",n)}}}function ds(e){return!Array.isArray(e)&&"object"===us(e)&&Object.values(e).some((function(e){return"object"===us(e)}))}function fs(e,t){return e.some((function(e){return e.key===t}))}function ms(e,t,n){if(!e)return[];var r=!0,o=e;ds(o)||(o={"":e},r=!1);var i=[];return Object.entries(o).forEach((function(e){var n=os(e,2),o=n[0],a=n[1];Object.entries(a).forEach((function(e){var n=os(e,2),a=n[0],s=n[1];if(s&&"object"===us(s)&&"undefined"!==typeof s.key)i.push(s);else{var l=a;"integer"===t&&"string"===typeof a&&(l=parseInt(a,10)),i.push({group:r?o:void 0,key:l,value:s})}}))})),null!==n&&void 0!==n&&n.placeholder&&!fs(i,"")?[{key:"",value:""}].concat(i):i}function hs(e){return"string"===typeof e?e.replace(/^string:/,""):e}var gs=Object(Oi["defineComponent"])({props:{modelValue:null,modelModifiers:Object,multiple:Boolean,name:String,title:String,availableOptions:Array,uiControlAttributes:Object,uiControlOptions:Object},inheritAttrs:!1,emits:["update:modelValue"],computed:{options:function(){var e=this.availableOptions;return!e||fs(e,"")||"undefined"!==typeof this.modelValue&&null!==this.modelValue&&""!==this.modelValue?e:[{key:"",value:this.modelValue,group:this.hasGroups?"":void 0}].concat(es(e))},hasGroups:function(){var e=this.availableOptions;return e&&e[0]&&"undefined"!==typeof e[0].group},groupedOptions:function(){var e=this.options;if(!this.hasGroups||!e)return null;var t={};e.forEach((function(e){var n=e.group;t[n]=t[n]||[],t[n].push(e)}));var n=Object.entries(t);return n.sort((function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0})),n}},methods:{onChange:function(e){var t,n,r=this,o=e.target;if(this.multiple?(n=Array.from(o.options).filter((function(e){return e.selected})).map((function(e){return e.value})),n=n.map((function(e){return hs(e)}))):(n=o.value,n=hs(n)),null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var i={value:n,abort:function(){r.onModelValueChange(r.modelValue)}};this.$emit("update:modelValue",i)}else this.$emit("update:modelValue",n)},onModelValueChange:function(e){var t=this;window.$(this.$refs.select).val(e),setTimeout((function(){var n;ps(t.$refs.select,e,null===(n=t.uiControlAttributes)||void 0===n?void 0:n.placeholder,t.uiControlOptions,t.multiple)}))}},watch:{modelValue:function(e){this.onModelValueChange(e)},"uiControlAttributes.disabled":{handler:function(e,t){var n=this;setTimeout((function(){var r;e!==t&&ps(n.$refs.select,n.modelValue,null===(r=n.uiControlAttributes)||void 0===r?void 0:r.placeholder,n.uiControlOptions,n.multiple)}))}},availableOptions:function(e,t){var n=this;e!==t&&setTimeout((function(){var e;ps(n.$refs.select,n.modelValue,null===(e=n.uiControlAttributes)||void 0===e?void 0:e.placeholder,n.uiControlOptions,n.multiple)}))}},mounted:function(){var e=this;setTimeout((function(){var t;ps(e.$refs.select,e.modelValue,null===(t=e.uiControlAttributes)||void 0===t?void 0:t.placeholder,e.uiControlOptions,e.multiple)}))}});gs.render=Qa;var bs=gs,ys=["for","innerHTML"],vs={class:"sites_autocomplete"};function Os(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("SiteSelector");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("label",{for:e.name,class:"siteSelectorLabel",innerHTML:e.$sanitize(e.title)},null,8,ys),Object(Oi["createElementVNode"])("div",vs,[Object(Oi["createVNode"])(a,Object(Oi["mergeProps"])({"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)}),id:e.name,"show-all-sites-item":e.uiControlAttributes.showAllSitesItem||!1,"switch-site-on-select":!1,"show-selected-site":!0,"only-sites-with-admin-access":e.uiControlAttributes.onlySitesWithAdminAccess||!1},e.uiControlAttributes),null,16,["model-value","id","show-all-sites-item","only-sites-with-admin-access"])])])}var ws=Object(Oi["defineComponent"])({props:{name:String,title:String,modelValue:Object,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{SiteSelector:Ci["SiteSelector"]},emits:["update:modelValue"],methods:{onChange:function(e){var t;if(null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var n={value:e,abort:function(){}};this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",e)}}});ws.render=Os;var js=ws,Ns=["type","id","name","value","spellcheck"],xs=["for","innerHTML"];function ks(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,id:e.name,name:e.name,value:e.modelValueText,spellcheck:"password"!==e.uiControl&&null,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)})},e.uiControlAttributes),null,16,Ns),Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,xs)],64)}var Es=Object(Oi["defineComponent"])({props:{title:String,name:String,uiControlAttributes:Object,modelValue:[String,Number],modelModifiers:Object,uiControl:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{modelValueText:function(){return"undefined"===typeof this.modelValue||null===this.modelValue?"":this.modelValue.toString()}},created:function(){this.onKeydown=Object(Ci["debounce"])(this.onKeydown.bind(this),50)},mounted:function(){setTimeout((function(){window.Materialize.updateTextFields()}))},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}},methods:{onKeydown:function(e){var t=this,n=e.target.value;if(this.modelValue!==n){var r;if(null===(r=this.modelModifiers)||void 0===r||!r.abortable)return void this.$emit("update:modelValue",n);var o={value:n,abort:function(){e.target.value!==t.modelValueText&&(e.target.value=t.modelValueText)}};this.$emit("update:modelValue",o)}}}});Es.render=ks;var Cs=Es,Ss=["for","innerHTML"],Vs=["type","name","value"];function As(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Ss),Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,name:e.name,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),value:e.concattedValues},e.uiControlAttributes),null,16,Vs)])}var Ts=Object(Oi["defineComponent"])({props:{name:String,title:String,uiControl:String,modelValue:Array,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,computed:{concattedValues:function(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(", ")}},emits:["update:modelValue"],created:function(){this.onKeydown=Object(Ci["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=this,n=e.target.value.split(",").map((function(e){return e.trim()}));if(n.join(", ")!==this.concattedValues){var r;if(null===(r=this.modelModifiers)||void 0===r||!r.abortable)return void this.$emit("update:modelValue",n);var o={value:n,abort:function(){e.target.value!==t.concattedValues&&(e.target.value=t.concattedValues)}};this.$emit("update:modelValue",o)}}}});Ts.render=As;var Ms=Ts,Ps=["name","id","value"],Ds=["for","innerHTML"];function Bs(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[Object(Oi["createElementVNode"])("textarea",Object(Oi["mergeProps"])({name:e.name},e.uiControlAttributes,{id:e.name,value:e.modelValueText,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),class:"materialize-textarea",ref:"textarea"}),null,16,Ps),Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Ds)],64)}var $s=Object(Oi["defineComponent"])({props:{name:String,uiControlAttributes:Object,modelValue:String,modelModifiers:Object,title:String},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onKeydown=Object(Ci["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=this,n=e.target.value;if(n!==this.modelValue){var r;if(null===(r=this.modelModifiers)||void 0===r||!r.abortable)return void this.$emit("update:modelValue",n);var o={value:n,abort:function(){e.target.value!==t.modelValue&&(e.target.value=t.modelValueText)}};this.$emit("update:modelValue",o)}}},computed:{modelValueText:function(){return this.modelValue||""}},watch:{modelValue:function(){var e=this;setTimeout((function(){window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}},mounted:function(){var e=this;setTimeout((function(){window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}});$s.render=Bs;var Fs=$s,_s=["for","innerHTML"],Ls=["name","value"];function Is(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,_s),Object(Oi["createElementVNode"])("textarea",Object(Oi["mergeProps"])({ref:"textarea",name:e.name},e.uiControlAttributes,{value:e.concattedValue,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),class:"materialize-textarea"}),null,16,Ls)])}var Us="\n",Hs=Object(Oi["defineComponent"])({props:{name:String,title:String,uiControlAttributes:Object,modelValue:[Array,String],modelModifiers:Object},inheritAttrs:!1,emits:["update:modelValue"],computed:{concattedValue:function(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(Us)}},created:function(){this.onKeydown=Object(Ci["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=this,n=e.target.value.split(Us);if(n.join(Us)!==this.concattedValue){var r;if(null===(r=this.modelModifiers)||void 0===r||!r.abortable)return void this.$emit("update:modelValue",n);var o={value:n,abort:function(){e.target.value!==t.concattedValue&&(e.target.value=t.concattedValue)}};this.$emit("update:modelValue",o)}}},watch:{modelValue:function(e,t){var n=this;e!==t&&setTimeout((function(){n.$refs.textarea&&window.Materialize.textareaAutoResize(n.$refs.textarea),window.Materialize.updateTextFields()}))}},mounted:function(){var e=this;setTimeout((function(){e.$refs.textarea&&window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}});Hs.render=Is;var Rs=Hs;function qs(e){return qs="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qs(e)}function zs(e,t){return Ys(e)||Ks(e,t)||Js(e,t)||Ws()}function Ws(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Js(e,t){if(e){if("string"===typeof e)return Gs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gs(e,t):void 0}}function Gs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ks(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){s=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(s)throw o}}return i}}function Ys(e){if(Array.isArray(e))return e}
+(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue")):"function"===typeof define&&define.amd?define(["CoreHome"],t):"object"===typeof exports?exports["CorePluginsAdmin"]=t(require("CoreHome"),require("vue")):e["CorePluginsAdmin"]=t(e["CoreHome"],e["Vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/CorePluginsAdmin/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},4788:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},i={"–":"\\--","—":"\\---"," ":"~","\t":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},a=function(e,t){return r({},e,t)};e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.preserveFormatting,s=void 0!==n&&n,l=t.escapeMapFn,c=void 0===l?a:l,u=String(e),p="",d=c(r({},o),s?r({},i):{}),f=Object.keys(d),m=function(){var e=!1;f.forEach((function(t,n){e||u.length>=t.length&&u.slice(0,t.length)===t&&(p+=d[f[n]],u=u.slice(t.length,u.length),e=!0)})),e||(p+=u.slice(0,1),u=u.slice(1,u.length))};while(u)m();return p}},7634:function(e,t,n){"use strict";var r,o,i;(function(n,a){o=[],r=a,i="function"===typeof r?r.apply(t,o):r,void 0===i||(e.exports=i)})(0,(function(){function e(){return!0}function t(){return!1}function n(){}function r(){var o=[{name:"number",test:function(e){return"number"===typeof e}},{name:"string",test:function(e){return"string"===typeof e}},{name:"boolean",test:function(e){return"boolean"===typeof e}},{name:"Function",test:function(e){return"function"===typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"===typeof e&&null!==e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],i={name:"any",test:e},a=[],s=[],l={types:o,conversions:s,ignore:a};function c(e){var t=K(l.types,(function(t){return t.name===e}));if(t)return t;if("any"===e)return i;var n=K(l.types,(function(t){return t.name.toLowerCase()===e.toLowerCase()}));throw new TypeError('Unknown type "'+e+'"'+(n?'. Did you mean "'+n.name+'"?':""))}function u(e){return e===i?999:l.types.indexOf(e)}function p(e){var t=K(l.types,(function(t){return t.test(e)}));if(t)return t.name;throw new TypeError("Value has unknown type. Value: "+e)}function d(e,t){if(!e.signatures)throw new TypeError("Function is no typed-function");var n;if("string"===typeof t){n=t.split(",");for(var r=0;r<n.length;r++)n[r]=n[r].trim()}else{if(!Array.isArray(t))throw new TypeError("String array or a comma separated string expected");n=t}var o=n.join(","),i=e.signatures[o];if(i)return i;throw new TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+n.join(", ")+"))")}function f(e,t){var n=p(e);if(t===n)return e;for(var r=0;r<l.conversions.length;r++){var o=l.conversions[r];if(o.from===n&&o.to===t)return o.convert(e)}throw new Error("Cannot convert from "+n+" to "+t)}function m(e){return e.map((function(e){var t=e.types.map(N);return(e.restParam?"...":"")+t.join("|")})).join(",")}function h(e,t){var n=0===e.indexOf("..."),r=n?e.length>3?e.slice(3):"any":e,o=r.split("|").map(I).filter(U).filter(L),i=T(t,o),a=o.map((function(e){var t=c(e);return{name:e,typeIndex:u(t),test:t.test,conversion:null,conversionIndex:-1}})),s=i.map((function(e){var n=c(e.from);return{name:e.from,typeIndex:u(n),test:n.test,conversion:e,conversionIndex:t.indexOf(e)}}));return{types:a.concat(s),restParam:n}}function g(e,t,n){var r=[];return""!==e.trim()&&(r=e.split(",").map(I).map((function(e,t,r){var o=h(e,n);if(o.restParam&&t!==r.length-1)throw new SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return o}))),r.some(R)?null:{params:r,fn:t}}function b(e){var t=z(e);return!!t&&t.restParam}function y(e){return e.types.some((function(e){return null!=e.conversion}))}function v(t){if(t&&0!==t.types.length){if(1===t.types.length)return c(t.types[0].name).test;if(2===t.types.length){var n=c(t.types[0].name).test,r=c(t.types[1].name).test;return function(e){return n(e)||r(e)}}var o=t.types.map((function(e){return c(e.name).test}));return function(e){for(var t=0;t<o.length;t++)if(o[t](e))return!0;return!1}}return e}function O(e){var t,n,r;if(b(e)){t=q(e).map(v);var o=t.length,i=v(z(e)),a=function(e){for(var t=o;t<e.length;t++)if(!i(e[t]))return!1;return!0};return function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return a(e)&&e.length>=o+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=v(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=v(e[0]),r=v(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(v),function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return e.length===t.length})}function w(e,t){return t<e.params.length?e.params[t]:b(e.params)?z(e.params):null}function j(e,t,n){var r=w(e,t),o=r?n?r.types.filter(x):r.types:[];return o.map(N)}function N(e){return e.name}function x(e){return null===e.conversion||void 0===e.conversion}function k(e,t){var n=Y(Z(e,(function(e){return j(e,t,!1)})));return-1!==n.indexOf("any")?["any"]:n}function E(e,t,n){var r,o,i,a=e||"unnamed",s=n;for(i=0;i<t.length;i++){var l=s.filter((function(e){var n=v(w(e,i));return(i<e.params.length||b(e.params))&&n(t[i])}));if(0===l.length){if(o=k(s,i),o.length>0){var c=p(t[i]);return r=new TypeError("Unexpected type of argument in function "+a+" (expected: "+o.join(" or ")+", actual: "+c+", index: "+i+")"),r.data={category:"wrongType",fn:a,index:i,actual:c,expected:o},r}}else s=l}var u=s.map((function(e){return b(e.params)?1/0:e.params.length}));if(t.length<Math.min.apply(null,u))return o=k(s,i),r=new TypeError("Too few arguments in function "+a+" (expected: "+o.join(" or ")+", index: "+t.length+")"),r.data={category:"tooFewArgs",fn:a,index:t.length,expected:o},r;var d=Math.max.apply(null,u);return t.length>d?(r=new TypeError("Too many arguments in function "+a+" (expected: "+d+", actual: "+t.length+")"),r.data={category:"tooManyArgs",fn:a,index:t.length,expectedLength:d},r):(r=new TypeError('Arguments of type "'+t.join(", ")+'" do not match any of the defined signatures of function '+a+"."),r.data={category:"mismatch",actual:t.map(p)},r)}function C(e){for(var t=999,n=0;n<e.types.length;n++)x(e.types[n])&&(t=Math.min(t,e.types[n].typeIndex));return t}function S(e){for(var t=999,n=0;n<e.types.length;n++)x(e.types[n])||(t=Math.min(t,e.types[n].conversionIndex));return t}function V(e,t){var n;return n=e.restParam-t.restParam,0!==n?n:(n=y(e)-y(t),0!==n?n:(n=C(e)-C(t),0!==n?n:S(e)-S(t)))}function A(e,t){var n,r,o=Math.min(e.params.length,t.params.length);if(r=e.params.some(y)-t.params.some(y),0!==r)return r;for(n=0;n<o;n++)if(r=y(e.params[n])-y(t.params[n]),0!==r)return r;for(n=0;n<o;n++)if(r=V(e.params[n],t.params[n]),0!==r)return r;return e.params.length-t.params.length}function T(e,t){var n={};return e.forEach((function(e){-1!==t.indexOf(e.from)||-1===t.indexOf(e.to)||n[e.from]||(n[e.from]=e)})),Object.keys(n).map((function(e){return n[e]}))}function M(e,t){var n=t;if(e.some(y)){var r=b(e),o=e.map(P);n=function(){for(var e=[],n=r?arguments.length-1:arguments.length,i=0;i<n;i++)e[i]=o[i](arguments[i]);return r&&(e[n]=arguments[n].map(o[n])),t.apply(this,e)}}var i=n;if(b(e)){var a=e.length-1;i=function(){return n.apply(this,W(arguments,0,a).concat([W(arguments,a)]))}}return i}function P(e){var t,n,r,o,i=[],a=[];switch(e.types.forEach((function(e){e.conversion&&(i.push(c(e.conversion.from).test),a.push(e.conversion.convert))})),a.length){case 0:return function(e){return e};case 1:return t=i[0],r=a[0],function(e){return t(e)?r(e):e};case 2:return t=i[0],n=i[1],r=a[0],o=a[1],function(e){return t(e)?r(e):n(e)?o(e):e};default:return function(e){for(var t=0;t<a.length;t++)if(i[t](e))return a[t](e);return e}}}function D(e){var t={};return e.forEach((function(e){e.params.some(y)||B(e.params,!0).forEach((function(n){t[m(n)]=e.fn}))})),t}function B(e,t){function n(e,r,o){if(r<e.length){var i,a=e[r],s=t?a.types.filter(x):a.types;if(a.restParam){var l=s.filter(x);i=l.length<s.length?[l,s]:[s]}else i=s.map((function(e){return[e]}));return Z(i,(function(t){return n(e,r+1,o.concat([t]))}))}var c=o.map((function(t,n){return{types:t,restParam:n===e.length-1&&b(e)}}));return[c]}return n(e,0,[])}function $(e,t){for(var n=Math.max(e.params.length,t.params.length),r=0;r<n;r++){var o=j(e,r,!0),i=j(t,r,!0);if(!G(o,i))return!1}var a=e.params.length,s=t.params.length,l=b(e.params),c=b(t.params);return l?c?a===s:s>=a:c?a>=s:a===s}function F(e,r){if(0===Object.keys(r).length)throw new SyntaxError("No signatures provided");var o=[];Object.keys(r).map((function(e){return g(e,r[e],l.conversions)})).filter(H).forEach((function(e){var t=K(o,(function(t){return $(t,e)}));if(t)throw new TypeError('Conflicting signatures "'+m(t.params)+'" and "'+m(e.params)+'".');o.push(e)}));var i=Z(o,(function(e){var t=e?B(e.params,!1):[];return t.map((function(t){return{params:t,fn:e.fn}}))})).filter(H);i.sort(A);var a=i[0]&&i[0].params.length<=2&&!b(i[0].params),s=i[1]&&i[1].params.length<=2&&!b(i[1].params),c=i[2]&&i[2].params.length<=2&&!b(i[2].params),u=i[3]&&i[3].params.length<=2&&!b(i[3].params),p=i[4]&&i[4].params.length<=2&&!b(i[4].params),d=i[5]&&i[5].params.length<=2&&!b(i[5].params),f=a&&s&&c&&u&&p&&d,h=i.map((function(e){return O(e.params)})),y=a?v(i[0].params[0]):t,w=s?v(i[1].params[0]):t,j=c?v(i[2].params[0]):t,N=u?v(i[3].params[0]):t,x=p?v(i[4].params[0]):t,k=d?v(i[5].params[0]):t,E=a?v(i[0].params[1]):t,C=s?v(i[1].params[1]):t,S=c?v(i[2].params[1]):t,V=u?v(i[3].params[1]):t,T=p?v(i[4].params[1]):t,P=d?v(i[5].params[1]):t,F=i.map((function(e){return M(e.params,e.fn)})),_=a?F[0]:n,L=s?F[1]:n,I=c?F[2]:n,U=u?F[3]:n,R=p?F[4]:n,q=d?F[5]:n,z=a?i[0].params.length:-1,W=s?i[1].params.length:-1,J=c?i[2].params.length:-1,G=u?i[3].params.length:-1,Y=p?i[4].params.length:-1,X=d?i[5].params.length:-1,Q=f?6:0,ee=i.length,te=function(){for(var t=Q;t<ee;t++)if(h[t](arguments))return F[t].apply(this,arguments);return l.onMismatch(e,arguments,i)},ne=function e(t,n){return arguments.length===z&&y(t)&&E(n)?_.apply(e,arguments):arguments.length===W&&w(t)&&C(n)?L.apply(e,arguments):arguments.length===J&&j(t)&&S(n)?I.apply(e,arguments):arguments.length===G&&N(t)&&V(n)?U.apply(e,arguments):arguments.length===Y&&x(t)&&T(n)?R.apply(e,arguments):arguments.length===X&&k(t)&&P(n)?q.apply(e,arguments):te.apply(e,arguments)};try{Object.defineProperty(ne,"name",{value:e})}catch(re){}return ne.signatures=D(i),ne}function _(e,t,n){throw E(e,t,n)}function L(e){return-1===l.ignore.indexOf(e)}function I(e){return e.trim()}function U(e){return!!e}function H(e){return null!==e}function R(e){return 0===e.types.length}function q(e){return e.slice(0,e.length-1)}function z(e){return e[e.length-1]}function W(e,t,n){return Array.prototype.slice.call(e,t,n)}function J(e,t){return-1!==e.indexOf(t)}function G(e,t){for(var n=0;n<e.length;n++)if(J(t,e[n]))return!0;return!1}function K(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function Y(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return Object.keys(t)}function Z(e,t){return Array.prototype.concat.apply([],e.map(t))}function X(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(("object"===typeof r.signatures||"string"===typeof r.signature)&&""!==r.name)if(""===t)t=r.name;else if(t!==r.name){var o=new Error("Function names do not match (expected: "+t+", actual: "+r.name+")");throw o.data={actual:r.name,expected:t},o}}return t}function Q(e){var t,n={};function r(e,r){if(n.hasOwnProperty(e)&&r!==n[e])throw t=new Error('Signature "'+e+'" is defined twice'),t.data={signature:e},t}for(var o=0;o<e.length;o++){var i=e[o];if("object"===typeof i.signatures)for(var a in i.signatures)i.signatures.hasOwnProperty(a)&&(r(a,i.signatures[a]),n[a]=i.signatures[a]);else{if("string"!==typeof i.signature)throw t=new TypeError("Function is no typed-function (index: "+o+")"),t.data={index:o},t;r(i.signature,i),n[i.signature]=i}}return n}return l=F("typed",{"string, Object":F,Object:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);var r=X(t);return F(r,e)},"...Function":function(e){return F(X(e),Q(e))},"string, ...Function":function(e,t){return F(e,Q(t))}}),l.create=r,l.types=o,l.conversions=s,l.ignore=a,l.onMismatch=_,l.throwMismatchError=_,l.createError=E,l.convert=f,l.find=d,l.addType=function(e,t){if(!e||"string"!==typeof e.name||"function"!==typeof e.test)throw new TypeError("Object with properties {name: string, test: function} expected");if(!1!==t)for(var n=0;n<l.types.length;n++)if("Object"===l.types[n].name)return void l.types.splice(n,0,e);l.types.push(e)},l.addConversion=function(e){if(!e||"string"!==typeof e.from||"string"!==typeof e.to||"function"!==typeof e.convert)throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");l.conversions.push(e)},l}return r()}))},"8bbf":function(e,n){e.exports=t},a559:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports["default"]=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports["default"]=e.exports,e.exports.__esModule=!0},c0e2:function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;for(r;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,a=r.length;i<a;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"expressions",(function(){return vi})),n.d(t,"FormField",(function(){return ol})),n.d(t,"Field",(function(){return ll})),n.d(t,"PluginSettings",(function(){return Wl})),n.d(t,"PluginFilter",(function(){return rc})),n.d(t,"PluginManagement",(function(){return lc})),n.d(t,"PluginUpload",(function(){return fc})),n.d(t,"SaveButton",(function(){return yc})),n.d(t,"Form",(function(){return wc})),n.d(t,"GroupedSettings",(function(){return El})),n.d(t,"PluginsIntro",(function(){return Sc})),n.d(t,"ThemesIntro",(function(){return $c})),n.d(t,"PasswordConfirmation",(function(){return $l})),n.d(t,"PluginName",(function(){return Ic})),n.d(t,"PluginsTable",(function(){return Mp})),n.d(t,"PluginsTableWithUpdates",(function(){return cd})),n.d(t,"UploadPluginDialog",(function(){return Nd})),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var i=n("a559"),a=n.n(i);function s(e){return"number"===typeof e}function l(e){return!(!e||"object"!==typeof e||"function"!==typeof e.constructor)&&(!0===e.isBigNumber&&"object"===typeof e.constructor.prototype&&!0===e.constructor.prototype.isBigNumber||"function"===typeof e.constructor.isDecimal&&!0===e.constructor.isDecimal(e))}function c(e){return e&&"object"===typeof e&&!0===Object.getPrototypeOf(e).isComplex||!1}function u(e){return e&&"object"===typeof e&&!0===Object.getPrototypeOf(e).isFraction||!1}function p(e){return e&&!0===e.constructor.prototype.isUnit||!1}function d(e){return"string"===typeof e}var f=Array.isArray;function m(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function h(e){return Array.isArray(e)||m(e)}function g(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function b(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function y(e){return e&&!0===e.constructor.prototype.isRange||!1}function v(e){return e&&!0===e.constructor.prototype.isIndex||!1}function O(e){return"boolean"===typeof e}function w(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function j(e){return e&&!0===e.constructor.prototype.isHelp||!1}function N(e){return"function"===typeof e}function x(e){return e instanceof Date}function k(e){return e instanceof RegExp}function E(e){return!(!e||"object"!==typeof e||e.constructor!==Object||c(e)||u(e))}function C(e){return null===e}function S(e){return void 0===e}function V(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function A(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function T(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function M(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function P(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function D(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function B(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function $(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function F(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function _(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function L(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function I(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function U(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function H(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function R(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function q(e){return e&&!0===e.constructor.prototype.isChain||!1}function z(e){var t=typeof e;return"object"===t?null===e?"null":Array.isArray(e)?"Array":e instanceof Date?"Date":e instanceof RegExp?"RegExp":l(e)?"BigNumber":c(e)?"Complex":u(e)?"Fraction":m(e)?"Matrix":p(e)?"Unit":v(e)?"Index":y(e)?"Range":w(e)?"ResultSet":_(e)?e.type:q(e)?"Chain":j(e)?"Help":"Object":"function"===t?"Function":t}function W(e){var t=typeof e;if("number"===t||"string"===t||"boolean"===t||null===e||void 0===e)return e;if("function"===typeof e.clone)return e.clone();if(Array.isArray(e))return e.map((function(e){return W(e)}));if(e instanceof Date)return new Date(e.valueOf());if(l(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return J(e,W)}function J(e,t){var n={};for(var r in e)Q(e,r)&&(n[r]=t(e[r]));return n}function G(e,t){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(var n in t)if(Q(t,n)&&!(n in Object.prototype)&&!(n in Function.prototype))if(t[n]&&t[n].constructor===Object)void 0===e[n]&&(e[n]={}),e[n]&&e[n].constructor===Object?G(e[n],t[n]):e[n]=t[n];else{if(Array.isArray(t[n]))throw new TypeError("Arrays are not supported by deepExtend");e[n]=t[n]}return e}function K(e,t){var n,r,o;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(r=0,o=e.length;r<o;r++)if(!K(e[r],t[r]))return!1;return!0}if("function"===typeof e)return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!K(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}return e===t}function Y(e){var t={};return Z(e,t),t}function Z(e,t){for(var n in e)if(Q(e,n)){var r=e[n];"object"===typeof r&&null!==r?Z(r,t):t[n]=r}}function X(e,t,n){var r,o=!0;Object.defineProperty(e,t,{get:function(){return o&&(r=n(),o=!1),r},set:function(e){r=e,o=!1},configurable:!0,enumerable:!0})}function Q(e,t){return e&&Object.hasOwnProperty.call(e,t)}function ee(e){return e&&"function"===typeof e.factory}function te(e,t){for(var n={},r=0;r<t.length;r++){var o=t[r],i=e[o];void 0!==i&&(n[o]=i)}return n}function ne(e){return Object.keys(e).map(t=>e[t])}var re=n("c0e2"),oe=n.n(re);function ie(e){var t=new oe.a;return e.on=t.on.bind(t),e.off=t.off.bind(t),e.once=t.once.bind(t),e.emit=t.emit.bind(t),e}function ae(e){return"boolean"===typeof e||!!isFinite(e)&&e===Math.round(e)}var se=Math.sign||function(e){return e>0?1:e<0?-1:0},le=Math.log2||function(e){return Math.log(e)/Math.LN2},ce=Math.log10||function(e){return Math.log(e)/Math.LN10},ue=Math.log1p||function(e){return Math.log(e+1)},pe=Math.cbrt||function(e){if(0===e)return e;var t,n=e<0;return n&&(e=-e),isFinite(e)?(t=Math.exp(Math.log(e)/3),t=(e/(t*t)+2*t)/3):t=e,n?-t:t},de=Math.expm1||function(e){return e>=2e-4||e<=-2e-4?Math.exp(e)-1:e+e*e/2+e*e*e/6};function fe(e,t,n){var r={2:"0b",8:"0o",16:"0x"},o=r[t],i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!ae(n))throw new Error("size must be an integer");if(e>2**(n-1)-1||e<-(2**(n-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!ae(e))throw new Error("Value must be an integer");e<0&&(e+=2**n),i="i".concat(n)}var a="";return e<0&&(e=-e,a="-"),"".concat(a).concat(o).concat(e.toString(t)).concat(i)}function me(e,t){if("function"===typeof t)return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var n,r,o="auto";if(t&&(t.notation&&(o=t.notation),s(t)?n=t:s(t.precision)&&(n=t.precision),t.wordSize&&(r=t.wordSize,"number"!==typeof r)))throw new Error('Option "wordSize" must be a number');switch(o){case"fixed":return be(e,n);case"exponential":return ye(e,n);case"engineering":return ge(e,n);case"bin":return fe(e,2,r);case"oct":return fe(e,8,r);case"hex":return fe(e,16,r);case"auto":return ve(e,n,t&&t).replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t}));default:throw new Error('Unknown notation "'+o+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function he(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var n=t[1],r=t[2],o=parseFloat(t[4]||"0"),i=r.indexOf(".");o+=-1!==i?i-1:r.length-1;var a=r.replace(".","").replace(/^0*/,(function(e){return o-=e.length,""})).replace(/0*$/,"").split("").map((function(e){return parseInt(e)}));return 0===a.length&&(a.push(0),o++),{sign:n,coefficients:a,exponent:o}}function ge(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=he(e),r=Oe(n,t),o=r.exponent,i=r.coefficients,a=o%3===0?o:o<0?o-3-o%3:o-o%3;if(s(t))while(t>i.length||o-a+1>i.length)i.push(0);else for(var l=Math.abs(o-a)-(i.length-1),c=0;c<l;c++)i.push(0);var u=Math.abs(o-a),p=1;while(u>0)p++,u--;var d=i.slice(p).join(""),f=s(t)&&d.length||d.match(/[1-9]/)?"."+d:"",m=i.slice(0,p).join("")+f+"e"+(o>=0?"+":"")+a.toString();return r.sign+m}function be(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=he(e),r="number"===typeof t?Oe(n,n.exponent+1+t):n,o=r.coefficients,i=r.exponent+1,a=i+(t||0);return o.length<a&&(o=o.concat(we(a-o.length))),i<0&&(o=we(1-i).concat(o),i=1),i<o.length&&o.splice(i,0,0===i?"0.":"."),r.sign+o.join("")}function ye(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=he(e),r=t?Oe(n,t):n,o=r.coefficients,i=r.exponent;o.length<t&&(o=o.concat(we(t-o.length)));var a=o.shift();return r.sign+a+(o.length>0?"."+o.join(""):"")+"e"+(i>=0?"+":"")+i}function ve(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&void 0!==n.lowerExp?n.lowerExp:-3,o=n&&void 0!==n.upperExp?n.upperExp:5,i=he(e),a=t?Oe(i,t):i;if(a.exponent<r||a.exponent>=o)return ye(e,t);var s=a.coefficients,l=a.exponent;s.length<t&&(s=s.concat(we(t-s.length))),s=s.concat(we(l-s.length+1+(s.length<t?t-s.length:0))),s=we(-l).concat(s);var c=l>0?l:0;return c<s.length-1&&s.splice(c+1,0,"."),a.sign+s.join("")}function Oe(e,t){var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;while(t<=0)r.unshift(0),n.exponent++,t++;if(r.length>t){var o=r.splice(t,r.length-t);if(o[0]>=5){var i=t-1;r[i]++;while(10===r[i])r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}}return n}function we(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function je(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}Number.EPSILON;var Ne=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},xe=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},ke=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},Ee=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},Ce=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},Se=Math.tanh||function(e){var t=Math.exp(2*e);return(t-1)/(t+1)};function Ve(e,t,n){var r=e.constructor,o=new r(2),i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!ae(n))throw new Error("size must be an integer");if(e.greaterThan(o.pow(n-1).sub(1))||e.lessThan(o.pow(n-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(o.pow(n))),i="i".concat(n)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(t," not supported "))}}function Ae(e,t){if("function"===typeof t)return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n,r,o="auto";if(void 0!==t&&(t.notation&&(o=t.notation),"number"===typeof t?n=t:t.precision&&(n=t.precision),t.wordSize&&(r=t.wordSize,"number"!==typeof r)))throw new Error('Option "wordSize" must be a number');switch(o){case"fixed":return Pe(e,n);case"exponential":return Me(e,n);case"engineering":return Te(e,n);case"bin":return Ve(e,2,r);case"oct":return Ve(e,8,r);case"hex":return Ve(e,16,r);case"auto":var i,a=t&&void 0!==t.lowerExp?t.lowerExp:-3,s=t&&void 0!==t.upperExp?t.upperExp:5;if(e.isZero())return"0";var l=e.toSignificantDigits(n),c=l.e;return i=c>=a&&c<s?l.toFixed():Me(e,n),i.replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t}));default:throw new Error('Unknown notation "'+o+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Te(e,t){var n=e.e,r=n%3===0?n:n<0?n-3-n%3:n-n%3,o=e.mul(Math.pow(10,-r)),i=o.toPrecision(t);return-1!==i.indexOf("e")&&(i=o.toString()),i+"e"+(n>=0?"+":"")+r.toString()}function Me(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()}function Pe(e,t){return e.toFixed(t)}function De(e,t){var n=Be(e,t);return t&&"object"===typeof t&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function Be(e,t){if("number"===typeof e)return me(e,t);if(l(e))return Ae(e,t);if(Le(e))return t&&"decimal"===t.fraction?e.toString():e.s*e.n+"/"+e.d;if(Array.isArray(e))return _e(e,t);if(d(e))return'"'+e+'"';if("function"===typeof e)return e.syntax?String(e.syntax):"function";if(e&&"object"===typeof e){if("function"===typeof e.format)return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var n=Object.keys(e).map(n=>'"'+n+'": '+De(e[n],t));return"{"+n.join(", ")+"}"}return String(e)}function $e(e){var t=String(e),n="",r=0;while(r<t.length){var o=t.charAt(r);"\\"===o?(n+=o,r++,o=t.charAt(r),""!==o&&-1!=='"\\/bfnrtu'.indexOf(o)||(n+="\\"),n+=o):n+='"'===o?'\\"':o,r++}return'"'+n+'"'}function Fe(e){var t=String(e);return t=t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),t}function _e(e,t){if(Array.isArray(e)){for(var n="[",r=e.length,o=0;o<r;o++)0!==o&&(n+=", "),n+=_e(e[o],t);return n+="]",n}return De(e,t)}function Le(e){return e&&"object"===typeof e&&"number"===typeof e.s&&"number"===typeof e.n&&"number"===typeof e.d||!1}function Ie(e,t,n){if(!(this instanceof Ie))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=(new Error).stack}function Ue(e,t,n){if(!(this instanceof Ue))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}function He(e){var t=[];while(Array.isArray(e))t.push(e.length),e=e[0];return t}function Re(e,t){return Array.prototype.map.call(e,t)}function qe(e,t){Array.prototype.forEach.call(e,t)}function ze(e,t){return Array.prototype.join.call(e,t)}function We(e,t){return-1!==e.indexOf(t)}function Je(e,t,n,r){function o(r){var o=te(r,t.map(Ze));return Ke(e,t,r),n(o)}return o.isFactory=!0,o.fn=e,o.dependencies=t.slice().sort(),r&&(o.meta=r),o}function Ge(e){return"function"===typeof e&&"string"===typeof e.fn&&Array.isArray(e.dependencies)}function Ke(e,t,n){var r=t.filter(e=>!Ye(e)).every(e=>void 0!==n[e]);if(!r){var o=t.filter(e=>void 0===n[e]);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(o.map(e=>'"'.concat(e,'"')).join(", "),"."))}}function Ye(e){return e&&"?"===e[0]}function Ze(e){return e&&"?"===e[0]?e.slice(1):e}function Xe(e,t,n,r){if(!(this instanceof Xe))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=r,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(void 0!==r&&null!==r?"-"+r:"")+" expected)",this.stack=(new Error).stack}function Qe(e,t,n,r){function o(e,t){var n=arguments.length;if(1!==n&&2!==n)throw new Xe("import",n,1,2);function r(e,n,o){if(Array.isArray(n))n.forEach(t=>r(e,t));else if("object"===typeof n)for(var i in n)Q(n,i)&&r(e,n[i],i);else if(Ge(n)||void 0!==o){var a=Ge(n)?O(n)?n.fn+".transform":n.fn:o;if(Q(e,a)&&e[a]!==n&&!t.silent)throw new Error('Cannot import "'+a+'" twice');e[a]=n}else if(!t.silent)throw new TypeError("Factory, Object, or Array expected")}t||(t={});var o={};for(var a in r(o,e),o)if(Q(o,a)){var s=o[a];if(Ge(s))f(s,t);else if(h(s))i(a,s,t);else if(!t.silent)throw new TypeError("Factory, Object, or Array expected")}}function i(t,o,i){if(i.wrap&&"function"===typeof o&&(o=d(o)),b(o)&&(o=e(t,{[o.signature]:o})),g(n[t])&&g(o))return o=i.override?e(t,o.signatures):e(n[t],o),n[t]=o,delete r[t],a(t,o),void n.emit("import",t,(function(){return o}));if(void 0===n[t]||i.override)return n[t]=o,delete r[t],a(t,o),void n.emit("import",t,(function(){return o}));if(!i.silent)throw new Error('Cannot import "'+t+'": already exists')}function a(e,t){t&&"function"===typeof t.transform?(n.expression.transform[e]=t.transform,y(e)&&(n.expression.mathWithTransform[e]=t.transform)):(delete n.expression.transform[e],y(e)&&(n.expression.mathWithTransform[e]=t))}function s(e){delete n.expression.transform[e],y(e)?n.expression.mathWithTransform[e]=n[e]:delete n.expression.mathWithTransform[e]}function d(e){var t=function(){for(var t=[],r=0,o=arguments.length;r<o;r++){var i=arguments[r];t[r]=i&&i.valueOf()}return e.apply(n,t)};return e.transform&&(t.transform=e.transform),t}function f(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.fn;if(We(i,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(i));var a=O(t)?n.expression.transform:n,l=i in n.expression.transform,c=Q(a,i)?a[i]:void 0,u=function(){var r={};t.dependencies.map(Ze).forEach(e=>{if(We(e,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(e));"math"===e?r.math=n:"mathWithTransform"===e?r.mathWithTransform=n.expression.mathWithTransform:"classes"===e?r.classes=n:r[e]=n[e]});var a=t(r);if(a&&"function"===typeof a.transform)throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(void 0===c||o.override)return a;if(g(c)&&g(a))return e(c,a);if(o.silent)return c;throw new Error('Cannot import "'+i+'": already exists')};t.meta&&!1===t.meta.lazy?(a[i]=u(),c&&l?s(i):(O(t)||v(t))&&X(n.expression.mathWithTransform,i,()=>a[i])):(X(a,i,u),c&&l?s(i):(O(t)||v(t))&&X(n.expression.mathWithTransform,i,()=>a[i])),r[i]=t,n.emit("import",i,u)}function h(e){return"function"===typeof e||"number"===typeof e||"string"===typeof e||"boolean"===typeof e||null===e||p(e)||c(e)||l(e)||u(e)||m(e)||Array.isArray(e)}function g(e){return"function"===typeof e&&"object"===typeof e.signatures}function b(e){return"function"===typeof e&&"string"===typeof e.signature}function y(e){return!Q(w,e)}function v(e){return-1===e.fn.indexOf(".")&&!Q(w,e.fn)&&(!e.meta||!e.meta.isClass)}function O(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction||!1}var w={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return o}Ie.prototype=new RangeError,Ie.prototype.constructor=RangeError,Ie.prototype.name="DimensionError",Ie.prototype.isDimensionError=!0,Ue.prototype=new RangeError,Ue.prototype.constructor=RangeError,Ue.prototype.name="IndexError",Ue.prototype.isIndexError=!0,Xe.prototype=new Error,Xe.prototype.constructor=Error,Xe.prototype.name="ArgumentsError",Xe.prototype.isArgumentsError=!0;var et={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null},tt=["Matrix","Array"],nt=["number","BigNumber","Fraction"];function rt(e,t){function n(n){if(n){var r=J(e,W);it(n,"matrix",tt),it(n,"number",nt),G(e,n);var o=J(e,W),i=J(n,W);return t("config",o,r,i),o}return J(e,W)}return n.MATRIX_OPTIONS=tt,n.NUMBER_OPTIONS=nt,Object.keys(et).forEach(t=>{Object.defineProperty(n,t,{get:()=>e[t],enumerable:!0,configurable:!0})}),n}function ot(e,t){return-1!==e.indexOf(t)}function it(e,t,n){void 0===e[t]||ot(n,e[t])||console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+n.map(e=>JSON.stringify(e)).join(", ")+".")}function at(e,t){var n=a()({},et,t);if("function"!==typeof Object.create)throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var r=ie({isNumber:s,isComplex:c,isBigNumber:l,isFraction:u,isUnit:p,isString:d,isArray:f,isMatrix:m,isCollection:h,isDenseMatrix:g,isSparseMatrix:b,isRange:y,isIndex:v,isBoolean:O,isResultSet:w,isHelp:j,isFunction:N,isDate:x,isRegExp:k,isObject:E,isNull:C,isUndefined:S,isAccessorNode:V,isArrayNode:A,isAssignmentNode:T,isBlockNode:M,isConditionalNode:P,isConstantNode:D,isFunctionAssignmentNode:B,isFunctionNode:$,isIndexNode:F,isNode:_,isObjectNode:L,isOperatorNode:I,isParenthesisNode:U,isRangeNode:H,isSymbolNode:R,isChain:q});r.config=rt(n,r.emit),r.expression={transform:{},mathWithTransform:{config:r.config}};var o=[],i=[];function z(e){if(Ge(e))return e(r);var t=e[Object.keys(e)[0]];if(Ge(t))return t(r);if(!ee(e))throw console.warn("Factory object with properties `type`, `name`, and `factory` expected",e),new Error("Factory object with properties `type`, `name`, and `factory` expected");var a,s=o.indexOf(e);return-1===s?(a=!0===e.math?e.factory(r.type,n,z,r.typed,r):e.factory(r.type,n,z,r.typed),o.push(e),i.push(a)):a=i[s],a}var W={};function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.typed.apply(r.typed,t)}var G=Qe(J,z,r,W);return r.import=G,r.on("config",()=>{ne(W).forEach(e=>{e&&e.meta&&e.meta.recreateOnConfigChange&&G(e,{override:!0})})}),r.create=at.bind(null,e),r.factory=Je,r.import(ne(Y(e))),r.ArgumentsError=Xe,r.DimensionError=Ie,r.IndexError=Ue,r}var st=new Set(["end"]);function lt(e,t){if(mt(e)&&pt(e,t))return e[t];if("function"===typeof e[t]&&ft(e,t))throw new Error('Cannot access method "'+t+'" as a property');throw new Error('No access to property "'+t+'"')}function ct(e,t,n){if(mt(e)&&pt(e,t))return e[t]=n,n;throw new Error('No access to property "'+t+'"')}function ut(e,t){return t in e}function pt(e,t){return!(!e||"object"!==typeof e)&&(!!Q(ht,t)||!(t in Object.prototype)&&!(t in Function.prototype))}function dt(e,t){if(!ft(e,t))throw new Error('No access to method "'+t+'"')}function ft(e,t){return null!==e&&void 0!==e&&"function"===typeof e[t]&&(!(Q(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e))&&(!!Q(gt,t)||!(t in Object.prototype)&&!(t in Function.prototype)))}function mt(e){return"object"===typeof e&&e&&e.constructor===Object}var ht={length:!0,name:!0},gt={toString:!0,valueOf:!0,toLocaleString:!0};class bt{constructor(e){this.wrappedObject=e}keys(){return Object.keys(this.wrappedObject)}get(e){return lt(this.wrappedObject,e)}set(e,t){return ct(this.wrappedObject,e,t),this}has(e){return ut(this.wrappedObject,e)}}function yt(){return new Map}function vt(e){if(!e)return yt();if(Ot(e))return e;if(E(e))return new bt(e);throw new Error("createMap can create maps from objects or Maps")}function Ot(e){return!!e&&(e instanceof Map||e instanceof bt||"function"===typeof e.set&&"function"===typeof e.get&&"function"===typeof e.keys&&"function"===typeof e.has)}function wt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o of n)if(o)if(Ot(o))for(var i of o.keys())e.set(i,o.get(i));else if(E(o))for(var a of Object.keys(o))e.set(a,o[a]);return e}var jt="Node",Nt=["mathWithTransform"],xt=Je(jt,Nt,e=>{var{mathWithTransform:t}=e;function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator")}function r(e){for(var t of[...st])if(e.has(t))throw new Error('Scope contains an illegal symbol, "'+t+'" is a reserved keyword')}return n.prototype.evaluate=function(e){return this.compile().evaluate(e)},n.prototype.type="Node",n.prototype.isNode=!0,n.prototype.comment="",n.prototype.compile=function(){var e=this._compile(t,{}),n={},o=null;function i(t){var i=vt(t);return r(i),e(i,n,o)}return{evaluate:i}},n.prototype._compile=function(e,t){throw new Error("Method _compile should be implemented by type "+this.type)},n.prototype.forEach=function(e){throw new Error("Cannot run forEach on a Node interface")},n.prototype.map=function(e){throw new Error("Cannot run map on a Node interface")},n.prototype._ifNode=function(e){if(!_(e))throw new TypeError("Callback function must return a Node");return e},n.prototype.traverse=function(e){function t(e,n){e.forEach((function(e,r,o){n(e,r,o),t(e,n)}))}e(this,null,null),t(this,e)},n.prototype.transform=function(e){function t(n,r,o){var i=e(n,r,o);return i!==n?i:n.map(t)}return t(this,null,null)},n.prototype.filter=function(e){var t=[];return this.traverse((function(n,r,o){e(n,r,o)&&t.push(n)})),t},n.prototype.clone=function(){throw new Error("Cannot clone a Node interface")},n.prototype.cloneDeep=function(){return this.map((function(e){return e.cloneDeep()}))},n.prototype.equals=function(e){return!!e&&K(this,e)},n.prototype.toString=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this._toString(e)},n.prototype.toJSON=function(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)},n.prototype.toHTML=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this.toHTML(e)},n.prototype._toString=function(){throw new Error("_toString not implemented for "+this.type)},n.prototype.toTex=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this._toTex(e)},n.prototype._toTex=function(e){throw new Error("_toTex not implemented for "+this.type)},n.prototype._getCustomString=function(e){if(e&&"object"===typeof e)switch(typeof e.handler){case"object":case"undefined":return;case"function":return e.handler(this,e);default:throw new TypeError("Object or function expected as callback")}},n.prototype.getIdentifier=function(){return this.type},n.prototype.getContent=function(){return this},n},{isClass:!0,isNode:!0}),kt={createNode:xt},Et="number",Ct="number, number";function St(e){return Math.abs(e)}function Vt(e,t){return e+t}function At(e,t){return e-t}function Tt(e,t){return e*t}function Mt(e,t){return e/t}function Pt(e){return-e}function Dt(e){return e}function Bt(e){return pe(e)}function $t(e){return e*e*e}function Ft(e){return Math.exp(e)}function _t(e){return de(e)}function Lt(e,t){if(!ae(e)||!ae(t))throw new Error("Parameters in function gcd must be integer numbers");var n;while(0!==t)n=e%t,e=t,t=n;return e<0?-e:e}function It(e,t){if(!ae(e)||!ae(t))throw new Error("Parameters in function lcm must be integer numbers");if(0===e||0===t)return 0;var n,r=e*t;while(0!==t)n=t,t=e%n,e=n;return Math.abs(r/e)}function Ut(e){return ce(e)}function Ht(e){return le(e)}function Rt(e){return ue(e)}function qt(e,t){if(t>0)return e-t*Math.floor(e/t);if(0===t)return e;throw new Error("Cannot calculate mod for a negative divisor")}function zt(e){return se(e)}function Wt(e){return Math.sqrt(e)}function Jt(e){return e*e}function Gt(e,t){var n,r,o,i,a=0,s=1,l=1,c=0;if(!ae(e)||!ae(t))throw new Error("Parameters in function xgcd must be integer numbers");while(t)r=Math.floor(e/t),o=e-r*t,n=a,a=s-r*a,s=n,n=l,l=c-r*l,c=n,e=t,t=o;return i=e<0?[-e,-s,-c]:[e,e?s:0,c],i}function Kt(e,t){return e*e<1&&t===1/0||e*e>1&&t===-1/0?0:Math.pow(e,t)}function Yt(e){return Math.abs(e)}St.signature=Et,Vt.signature=Ct,At.signature=Ct,Tt.signature=Ct,Mt.signature=Ct,Pt.signature=Et,Dt.signature=Et,Bt.signature=Et,$t.signature=Et,Ft.signature=Et,_t.signature=Et,Lt.signature=Ct,It.signature=Ct,Ut.signature=Et,Ht.signature=Et,Rt.signature=Et,qt.signature=Ct,zt.signature=Et,Wt.signature=Et,Jt.signature=Et,Gt.signature=Ct,Kt.signature=Ct,Yt.signature=Et;var Zt="number",Xt="number, number";function Qt(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function bitAnd");return e&t}function en(e){if(!ae(e))throw new Error("Integer expected in function bitNot");return~e}function tn(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function bitOr");return e|t}function nn(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function bitXor");return e^t}function rn(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function leftShift");return e<<t}function on(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function rightArithShift");return e>>t}function an(e,t){if(!ae(e)||!ae(t))throw new Error("Integers expected in function rightLogShift");return e>>>t}Qt.signature=Xt,en.signature=Zt,tn.signature=Xt,nn.signature=Xt,rn.signature=Xt,on.signature=Xt,an.signature=Xt;var sn="number",ln="number, number";function cn(e){return!e}function un(e,t){return!(!e&&!t)}function pn(e,t){return!!e!==!!t}function dn(e,t){return!(!e||!t)}function fn(e,t){if(t<e)return 1;if(t===e)return t;var n=t+e>>1;return fn(e,n)*fn(n+1,t)}function mn(e,t){if(!ae(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!ae(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(t>e)throw new TypeError("k must be less than or equal to n");for(var n=e-t,r=1,o=t<n?n+1:t+1,i=2,a=t<n?t:n,s=o;s<=e;++s){r*=s;while(i<=a&&r%i===0)r/=i,++i}return i<=a&&(r/=fn(i,a)),r}function hn(e){var t;if(ae(e))return e<=0?isFinite(e)?1/0:NaN:e>171?1/0:fn(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*hn(1-e));if(e>=171.35)return 1/0;if(e>85){var n=e*e,r=n*e,o=r*e,i=o*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*n)-139/(51840*r)-571/(2488320*o)+163879/(209018880*i)+5246819/(75246796800*i*e))}--e,t=bn[0];for(var a=1;a<bn.length;++a)t+=bn[a]/(e+a);var s=e+gn+.5;return Math.sqrt(2*Math.PI)*Math.pow(s,e+.5)*Math.exp(-s)*t}cn.signature=sn,un.signature=ln,pn.signature=ln,dn.signature=ln,mn.signature="number, number",hn.signature="number";var gn=4.7421875,bn=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],yn=.9189385332046728,vn=5,On=7,wn=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];function jn(e){if(e<0)return NaN;if(0===e)return 1/0;if(!isFinite(e))return e;if(e<.5)return Math.log(Math.PI/Math.sin(Math.PI*e))-jn(1-e);e-=1;for(var t=e+vn+.5,n=wn[0],r=On-1;r>=1;r--)n+=wn[r]/(e+r);return yn+(e+.5)*Math.log(t)-t+Math.log(n)}jn.signature="number";var Nn="number",xn="number, number";function kn(e){return Math.acos(e)}function En(e){return Ne(e)}function Cn(e){return Math.atan(1/e)}function Sn(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}function Vn(e){return Math.asin(1/e)}function An(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}function Tn(e){return Math.acos(1/e)}function Mn(e){var t=1/e,n=Math.sqrt(t*t-1);return Math.log(n+t)}function Pn(e){return Math.asin(e)}function Dn(e){return xe(e)}function Bn(e){return Math.atan(e)}function $n(e,t){return Math.atan2(e,t)}function Fn(e){return ke(e)}function _n(e){return Math.cos(e)}function Ln(e){return Ee(e)}function In(e){return 1/Math.tan(e)}function Un(e){var t=Math.exp(2*e);return(t+1)/(t-1)}function Hn(e){return 1/Math.sin(e)}function Rn(e){return 0===e?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*se(e)}function qn(e){return 1/Math.cos(e)}function zn(e){return 2/(Math.exp(e)+Math.exp(-e))}function Wn(e){return Math.sin(e)}function Jn(e){return Ce(e)}function Gn(e){return Math.tan(e)}function Kn(e){return Se(e)}kn.signature=Nn,En.signature=Nn,Cn.signature=Nn,Sn.signature=Nn,Vn.signature=Nn,An.signature=Nn,Tn.signature=Nn,Mn.signature=Nn,Pn.signature=Nn,Dn.signature=Nn,Bn.signature=Nn,$n.signature=xn,Fn.signature=Nn,_n.signature=Nn,Ln.signature=Nn,In.signature=Nn,Un.signature=Nn,Hn.signature=Nn,Rn.signature=Nn,qn.signature=Nn,zn.signature=Nn,Wn.signature=Nn,Jn.signature=Nn,Gn.signature=Nn,Kn.signature=Nn;var Yn="number";function Zn(e){return ae(e)}function Xn(e){return e<0}function Qn(e){return e>0}function er(e){return 0===e}function tr(e){return Number.isNaN(e)}function nr(){throw new Error('No "bignumber" implementation available')}function rr(){throw new Error('No "fraction" implementation available')}function or(){throw new Error('No "matrix" implementation available')}function ir(){throw new Error('No "matrix" implementation available')}Zn.signature=Yn,Xn.signature=Yn,Qn.signature=Yn,er.signature=Yn,tr.signature=Yn;var ar=Je("matrix",[],()=>or),sr=Je("subset",[],()=>ir);lr("combinations",mn),lr("gamma",hn),lr("lgamma",jn);function lr(e,t){return Je(e,["typed"],e=>{var{typed:n}=e;return n(t)})}var cr={createSubset:sr};function ur(e){return e&&e.isIndexError?new Ue(e.index+1,e.min+1,void 0!==e.max?e.max+1:void 0):e}function pr(e){var{subset:t}=e;return function(e,n){try{if(Array.isArray(e))return t(e,n);if(e&&"function"===typeof e.subset)return e.subset(n);if("string"===typeof e)return t(e,n);if("object"===typeof e){if(!n.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return lt(e,n.getObjectProperty())}throw new TypeError("Cannot apply index: unsupported type of object")}catch(r){throw ur(r)}}}var dr="AccessorNode",fr=["subset","Node"],mr=Je(dr,fr,e=>{var{subset:t,Node:n}=e,r=pr({subset:t});function o(e,t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(!_(e))throw new TypeError('Node expected for parameter "object"');if(!F(t))throw new TypeError('IndexNode expected for parameter "index"');this.object=e||null,this.index=t,Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function i(e){return!(V(e)||A(e)||D(e)||$(e)||L(e)||U(e)||R(e))}return o.prototype=new n,o.prototype.type="AccessorNode",o.prototype.isAccessorNode=!0,o.prototype._compile=function(e,t){var n=this.object._compile(e,t),o=this.index._compile(e,t);if(this.index.isObjectProperty()){var i=this.index.getObjectProperty();return function(e,t,r){return lt(n(e,t,r),i)}}return function(e,t,i){var a=n(e,t,i),s=o(e,t,a);return r(a,s)}},o.prototype.forEach=function(e){e(this.object,"object",this),e(this.index,"index",this)},o.prototype.map=function(e){return new o(this._ifNode(e(this.object,"object",this)),this._ifNode(e(this.index,"index",this)))},o.prototype.clone=function(){return new o(this.object,this.index)},o.prototype._toString=function(e){var t=this.object.toString(e);return i(this.object)&&(t="("+t+")"),t+this.index.toString(e)},o.prototype.toHTML=function(e){var t=this.object.toHTML(e);return i(this.object)&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+this.index.toHTML(e)},o.prototype._toTex=function(e){var t=this.object.toTex(e);return i(this.object)&&(t="\\left(' + object + '\\right)"),t+this.index.toTex(e)},o.prototype.toJSON=function(){return{mathjs:"AccessorNode",object:this.object,index:this.index}},o.fromJSON=function(e){return new o(e.object,e.index)},o},{isClass:!0,isNode:!0}),hr={NodeDependencies:kt,subsetDependencies:cr,createAccessorNode:mr},gr="ArrayNode",br=["Node"],yr=Je(gr,br,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(this.items=e||[],!Array.isArray(this.items)||!this.items.every(_))throw new TypeError("Array containing Nodes expected")}return n.prototype=new t,n.prototype.type="ArrayNode",n.prototype.isArrayNode=!0,n.prototype._compile=function(e,t){var n=Re(this.items,(function(n){return n._compile(e,t)})),r="Array"!==e.config.matrix;if(r){var o=e.matrix;return function(e,t,r){return o(Re(n,(function(n){return n(e,t,r)})))}}return function(e,t,r){return Re(n,(function(n){return n(e,t,r)}))}},n.prototype.forEach=function(e){for(var t=0;t<this.items.length;t++){var n=this.items[t];e(n,"items["+t+"]",this)}},n.prototype.map=function(e){for(var t=[],r=0;r<this.items.length;r++)t[r]=this._ifNode(e(this.items[r],"items["+r+"]",this));return new n(t)},n.prototype.clone=function(){return new n(this.items.slice(0))},n.prototype._toString=function(e){var t=this.items.map((function(t){return t.toString(e)}));return"["+t.join(", ")+"]"},n.prototype.toJSON=function(){return{mathjs:"ArrayNode",items:this.items}},n.fromJSON=function(e){return new n(e.items)},n.prototype.toHTML=function(e){var t=this.items.map((function(t){return t.toHTML(e)}));return'<span class="math-parenthesis math-square-parenthesis">[</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},n.prototype._toTex=function(e){function t(n,r){var o=n.some(A)&&!n.every(A),i=r||o,a=i?"&":"\\\\",s=n.map((function(n){return n.items?t(n.items,!r):n.toTex(e)})).join(a);return o||!i||i&&!r?"\\begin{bmatrix}"+s+"\\end{bmatrix}":s}return t(this.items,!1)},n},{isClass:!0,isNode:!0}),vr={NodeDependencies:kt,createArrayNode:yr},Or={createMatrix:ar};function wr(e){var{subset:t,matrix:n}=e;return function(e,r,o){try{if(Array.isArray(e))return n(e).subset(r,o).valueOf();if(e&&"function"===typeof e.subset)return e.subset(r,o);if("string"===typeof e)return t(e,r,o);if("object"===typeof e){if(!r.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return ct(e,r.getObjectProperty(),o),e}throw new TypeError("Cannot apply index: unsupported type of object")}catch(i){throw ur(i)}}}var jr=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{associativity:"left",associativeWith:[]}},{"OperatorNode:and":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{associativity:"left",associativeWith:[]},"OperatorNode:unequal":{associativity:"left",associativeWith:[]},"OperatorNode:smaller":{associativity:"left",associativeWith:[]},"OperatorNode:larger":{associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{associativity:"left",associativeWith:[]}},{"OperatorNode:to":{associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{associativity:"left",associativeWith:[]},"OperatorNode:mod":{associativity:"left",associativeWith:[]}},{"OperatorNode:unaryPlus":{associativity:"right"},"OperatorNode:unaryMinus":{associativity:"right"},"OperatorNode:bitNot":{associativity:"right"},"OperatorNode:not":{associativity:"right"}},{"OperatorNode:pow":{associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{associativity:"left"}},{"OperatorNode:transpose":{associativity:"left"}}];function Nr(e,t){var n=e;"keep"!==t&&(n=e.getContent());for(var r=n.getIdentifier(),o=0;o<jr.length;o++)if(r in jr[o])return o;return null}function xr(e,t){var n=e;"keep"!==t&&(n=e.getContent());var r=n.getIdentifier(),o=Nr(n,t);if(null===o)return null;var i=jr[o][r];if(Q(i,"associativity")){if("left"===i.associativity)return"left";if("right"===i.associativity)return"right";throw Error("'"+r+"' has the invalid associativity '"+i.associativity+"'.")}return null}function kr(e,t,n){var r="keep"!==n?e.getContent():e,o="keep"!==n?e.getContent():t,i=r.getIdentifier(),a=o.getIdentifier(),s=Nr(r,n);if(null===s)return null;var l=jr[s][i];if(Q(l,"associativeWith")&&l.associativeWith instanceof Array){for(var c=0;c<l.associativeWith.length;c++)if(l.associativeWith[c]===a)return!0;return!1}return null}var Er="AssignmentNode",Cr=["subset","?matrix","Node"],Sr=Je(Er,Cr,e=>{var{subset:t,matrix:n,Node:r}=e,o=pr({subset:t}),i=wr({subset:t,matrix:n});function a(e,t,n){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=e,this.index=n?t:null,this.value=n||t,!R(e)&&!V(e))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(R(e)&&"end"===e.name)throw new Error('Cannot assign to symbol "end"');if(this.index&&!F(this.index))throw new TypeError('IndexNode expected as "index"');if(!_(this.value))throw new TypeError('Node expected as "value"');Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function s(e,t){t||(t="keep");var n=Nr(e,t),r=Nr(e.value,t);return"all"===t||null!==r&&r<=n}return a.prototype=new r,a.prototype.type="AssignmentNode",a.prototype.isAssignmentNode=!0,a.prototype._compile=function(e,t){var n=this.object._compile(e,t),r=this.index?this.index._compile(e,t):null,a=this.value._compile(e,t),s=this.object.name;if(this.index){if(this.index.isObjectProperty()){var l=this.index.getObjectProperty();return function(e,t,r){var o=n(e,t,r),i=a(e,t,r);return ct(o,l,i),i}}if(R(this.object))return function(e,t,o){var l=n(e,t,o),c=a(e,t,o),u=r(e,t,l);return e.set(s,i(l,u,c)),c};var c=this.object.object._compile(e,t);if(this.object.index.isObjectProperty()){var u=this.object.index.getObjectProperty();return function(e,t,n){var o=c(e,t,n),s=lt(o,u),l=r(e,t,s),p=a(e,t,n);return ct(o,u,i(s,l,p)),p}}var p=this.object.index._compile(e,t);return function(e,t,n){var s=c(e,t,n),l=p(e,t,s),u=o(s,l),d=r(e,t,u),f=a(e,t,n);return i(s,l,i(u,d,f)),f}}if(!R(this.object))throw new TypeError("SymbolNode expected as object");return function(e,t,n){var r=a(e,t,n);return e.set(s,r),r}},a.prototype.forEach=function(e){e(this.object,"object",this),this.index&&e(this.index,"index",this),e(this.value,"value",this)},a.prototype.map=function(e){var t=this._ifNode(e(this.object,"object",this)),n=this.index?this._ifNode(e(this.index,"index",this)):null,r=this._ifNode(e(this.value,"value",this));return new a(t,n,r)},a.prototype.clone=function(){return new a(this.object,this.index,this.value)},a.prototype._toString=function(e){var t=this.object.toString(e),n=this.index?this.index.toString(e):"",r=this.value.toString(e);return s(this,e&&e.parenthesis)&&(r="("+r+")"),t+n+" = "+r},a.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},a.fromJSON=function(e){return new a(e.object,e.index,e.value)},a.prototype.toHTML=function(e){var t=this.object.toHTML(e),n=this.index?this.index.toHTML(e):"",r=this.value.toHTML(e);return s(this,e&&e.parenthesis)&&(r='<span class="math-paranthesis math-round-parenthesis">(</span>'+r+'<span class="math-paranthesis math-round-parenthesis">)</span>'),t+n+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+r},a.prototype._toTex=function(e){var t=this.object.toTex(e),n=this.index?this.index.toTex(e):"",r=this.value.toTex(e);return s(this,e&&e.parenthesis)&&(r="\\left(".concat(r,"\\right)")),t+n+":="+r},a},{isClass:!0,isNode:!0}),Vr={matrixDependencies:Or,NodeDependencies:kt,subsetDependencies:cr,createAssignmentNode:Sr},Ar="ResultSet",Tr=[],Mr=Je(Ar,Tr,()=>{function e(t){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=t||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(t){return new e(t.entries)},e},{isClass:!0}),Pr={createResultSet:Mr},Dr="BlockNode",Br=["ResultSet","Node"],$r=Je(Dr,Br,e=>{var{ResultSet:t,Node:n}=e;function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new Error("Array expected");this.blocks=e.map((function(e){var t=e&&e.node,n=!e||void 0===e.visible||e.visible;if(!_(t))throw new TypeError('Property "node" must be a Node');if("boolean"!==typeof n)throw new TypeError('Property "visible" must be a boolean');return{node:t,visible:n}}))}return r.prototype=new n,r.prototype.type="BlockNode",r.prototype.isBlockNode=!0,r.prototype._compile=function(e,n){var r=Re(this.blocks,(function(t){return{evaluate:t.node._compile(e,n),visible:t.visible}}));return function(e,n,o){var i=[];return qe(r,(function(t){var r=t.evaluate(e,n,o);t.visible&&i.push(r)})),new t(i)}},r.prototype.forEach=function(e){for(var t=0;t<this.blocks.length;t++)e(this.blocks[t].node,"blocks["+t+"].node",this)},r.prototype.map=function(e){for(var t=[],n=0;n<this.blocks.length;n++){var o=this.blocks[n],i=this._ifNode(e(o.node,"blocks["+n+"].node",this));t[n]={node:i,visible:o.visible}}return new r(t)},r.prototype.clone=function(){var e=this.blocks.map((function(e){return{node:e.node,visible:e.visible}}));return new r(e)},r.prototype._toString=function(e){return this.blocks.map((function(t){return t.node.toString(e)+(t.visible?"":";")})).join("\n")},r.prototype.toJSON=function(){return{mathjs:"BlockNode",blocks:this.blocks}},r.fromJSON=function(e){return new r(e.blocks)},r.prototype.toHTML=function(e){return this.blocks.map((function(t){return t.node.toHTML(e)+(t.visible?"":'<span class="math-separator">;</span>')})).join('<span class="math-separator"><br /></span>')},r.prototype._toTex=function(e){return this.blocks.map((function(t){return t.node.toTex(e)+(t.visible?"":";")})).join("\\;\\;\n")},r},{isClass:!0,isNode:!0}),Fr={NodeDependencies:kt,ResultSetDependencies:Pr,createBlockNode:$r},_r="ConditionalNode",Lr=["Node"],Ir=Je(_r,Lr,e=>{var{Node:t}=e;function n(e,t,r){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!_(e))throw new TypeError("Parameter condition must be a Node");if(!_(t))throw new TypeError("Parameter trueExpr must be a Node");if(!_(r))throw new TypeError("Parameter falseExpr must be a Node");this.condition=e,this.trueExpr=t,this.falseExpr=r}function r(e){if("number"===typeof e||"boolean"===typeof e||"string"===typeof e)return!!e;if(e){if(l(e))return!e.isZero();if(c(e))return!(!e.re&&!e.im);if(p(e))return!!e.value}if(null===e||void 0===e)return!1;throw new TypeError('Unsupported type of condition "'+z(e)+'"')}return n.prototype=new t,n.prototype.type="ConditionalNode",n.prototype.isConditionalNode=!0,n.prototype._compile=function(e,t){var n=this.condition._compile(e,t),o=this.trueExpr._compile(e,t),i=this.falseExpr._compile(e,t);return function(e,t,a){return r(n(e,t,a))?o(e,t,a):i(e,t,a)}},n.prototype.forEach=function(e){e(this.condition,"condition",this),e(this.trueExpr,"trueExpr",this),e(this.falseExpr,"falseExpr",this)},n.prototype.map=function(e){return new n(this._ifNode(e(this.condition,"condition",this)),this._ifNode(e(this.trueExpr,"trueExpr",this)),this._ifNode(e(this.falseExpr,"falseExpr",this)))},n.prototype.clone=function(){return new n(this.condition,this.trueExpr,this.falseExpr)},n.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.condition.toString(e),o=Nr(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==o&&o<=n)&&(r="("+r+")");var i=this.trueExpr.toString(e),a=Nr(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==a&&a<=n)&&(i="("+i+")");var s=this.falseExpr.toString(e),l=Nr(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==l&&l<=n)&&(s="("+s+")"),r+" ? "+i+" : "+s},n.prototype.toJSON=function(){return{mathjs:"ConditionalNode",condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}},n.fromJSON=function(e){return new n(e.condition,e.trueExpr,e.falseExpr)},n.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.condition.toHTML(e),o=Nr(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==o&&o<=n)&&(r='<span class="math-parenthesis math-round-parenthesis">(</span>'+r+'<span class="math-parenthesis math-round-parenthesis">)</span>');var i=this.trueExpr.toHTML(e),a=Nr(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==a&&a<=n)&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>');var s=this.falseExpr.toHTML(e),l=Nr(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==l&&l<=n)&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),r+'<span class="math-operator math-conditional-operator">?</span>'+i+'<span class="math-operator math-conditional-operator">:</span>'+s},n.prototype._toTex=function(e){return"\\begin{cases} {"+this.trueExpr.toTex(e)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(e)+"}\\\\{"+this.falseExpr.toTex(e)+"}, &\\quad{\\text{otherwise}}\\end{cases}"},n},{isClass:!0,isNode:!0}),Ur={NodeDependencies:kt,createConditionalNode:Ir},Hr=n("4788"),Rr=n.n(Hr),qr={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},zr={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},Wr={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(zr.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(zr.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(zr.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(zr.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(zr.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(zr.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(zr.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(zr.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(zr.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(zr.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(zr.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(zr.bitAnd,"${args[1]}\\right)")},bitNot:{1:zr.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(zr.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(zr.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(zr.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(zr.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(zr.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(zr.and,"${args[1]}\\right)")},not:{1:zr.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(zr.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(zr.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(zr.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(zr.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(zr.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(zr.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(zr.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(zr.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(zr.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(zr.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(zr.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(zr.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(zr.to,"${args[1]}\\right)")},numeric:function(e,t){return e.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(qr.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},Jr="\\mathrm{${name}}\\left(${args}\\right)",Gr={deg:"^\\circ"};function Kr(e){return Rr()(e,{preserveFormatting:!0})}function Yr(e,t){return t="undefined"!==typeof t&&t,t?Q(Gr,e)?Gr[e]:"\\mathrm{"+Kr(e)+"}":Q(qr,e)?qr[e]:Kr(e)}var Zr="ConstantNode",Xr=["Node"],Qr=Je(Zr,Xr,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this.value=e}return n.prototype=new t,n.prototype.type="ConstantNode",n.prototype.isConstantNode=!0,n.prototype._compile=function(e,t){var n=this.value;return function(){return n}},n.prototype.forEach=function(e){},n.prototype.map=function(e){return this.clone()},n.prototype.clone=function(){return new n(this.value)},n.prototype._toString=function(e){return De(this.value,e)},n.prototype.toHTML=function(e){var t=this._toString(e);switch(z(this.value)){case"number":case"BigNumber":case"Fraction":return'<span class="math-number">'+t+"</span>";case"string":return'<span class="math-string">'+t+"</span>";case"boolean":return'<span class="math-boolean">'+t+"</span>";case"null":return'<span class="math-null-symbol">'+t+"</span>";case"undefined":return'<span class="math-undefined">'+t+"</span>";default:return'<span class="math-symbol">'+t+"</span>"}},n.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},n.fromJSON=function(e){return new n(e.value)},n.prototype._toTex=function(e){var t=this._toString(e);switch(z(this.value)){case"string":return"\\mathtt{"+Kr(t)+"}";case"number":case"BigNumber":if(!isFinite(this.value))return this.value.valueOf()<0?"-\\infty":"\\infty";var n=t.toLowerCase().indexOf("e");return-1!==n?t.substring(0,n)+"\\cdot10^{"+t.substring(n+1)+"}":t;case"Fraction":return this.value.toLatex();default:return t}},n},{isClass:!0,isNode:!0}),eo={NodeDependencies:kt,createConstantNode:Qr},to=n("7634"),no=n.n(to),ro=function(){return ro=no.a.create,no.a},oo=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],io=Je("typed",oo,(function(e){var{BigNumber:t,Complex:n,DenseMatrix:r,Fraction:o}=e,i=ro();return i.types=[{name:"number",test:s},{name:"Complex",test:c},{name:"BigNumber",test:l},{name:"Fraction",test:u},{name:"Unit",test:p},{name:"string",test:d},{name:"Chain",test:q},{name:"Array",test:f},{name:"Matrix",test:m},{name:"DenseMatrix",test:g},{name:"SparseMatrix",test:b},{name:"Range",test:y},{name:"Index",test:v},{name:"boolean",test:O},{name:"ResultSet",test:w},{name:"Help",test:j},{name:"function",test:N},{name:"Date",test:x},{name:"RegExp",test:k},{name:"null",test:C},{name:"undefined",test:S},{name:"AccessorNode",test:V},{name:"ArrayNode",test:A},{name:"AssignmentNode",test:T},{name:"BlockNode",test:M},{name:"ConditionalNode",test:P},{name:"ConstantNode",test:D},{name:"FunctionNode",test:$},{name:"FunctionAssignmentNode",test:B},{name:"IndexNode",test:F},{name:"Node",test:_},{name:"ObjectNode",test:L},{name:"OperatorNode",test:I},{name:"ParenthesisNode",test:U},{name:"RangeNode",test:H},{name:"SymbolNode",test:R},{name:"Map",test:Ot},{name:"Object",test:E}],i.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(t||ao(e),je(e)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return n||so(e),new n(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return n||so(e),new n(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return n||so(e),new n(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){o||co(e);var t=new o(e);if(t.valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw new Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(e){t||ao(e);try{return new t(e)}catch(n){throw new Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){o||co(e);try{return new o(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){n||so(e);try{return new n(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||ao(e),new t(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return o||co(e),new o(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return r||lo(),new r(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],i}));function ao(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function so(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function lo(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function co(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var uo={createTyped:io},po="FunctionAssignmentNode",fo=["typed","Node"],mo=Je(po,fo,e=>{var{typed:t,Node:n}=e;function r(e,t,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof e)throw new TypeError('String expected for parameter "name"');if(!Array.isArray(t))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!_(n))throw new TypeError('Node expected for parameter "expr"');if(st.has(e))throw new Error('Illegal function name, "'+e+'" is a reserved keyword');this.name=e,this.params=t.map((function(e){return e&&e.name||e})),this.types=t.map((function(e){return e&&e.type||"any"})),this.expr=n}function o(e,t){var n=Nr(e,t),r=Nr(e.expr,t);return"all"===t||null!==r&&r<=n}return r.prototype=new n,r.prototype.type="FunctionAssignmentNode",r.prototype.isFunctionAssignmentNode=!0,r.prototype._compile=function(e,n){var r=Object.create(n);qe(this.params,(function(e){r[e]=!0}));var o=this.expr._compile(e,r),i=this.name,a=this.params,s=ze(this.types,","),l=i+"("+ze(this.params,", ")+")";return function(e,n,r){var c={};c[s]=function(){for(var t=Object.create(n),i=0;i<a.length;i++)t[a[i]]=arguments[i];return o(e,t,r)};var u=t(i,c);return u.syntax=l,e.set(i,u),u}},r.prototype.forEach=function(e){e(this.expr,"expr",this)},r.prototype.map=function(e){var t=this._ifNode(e(this.expr,"expr",this));return new r(this.name,this.params.slice(0),t)},r.prototype.clone=function(){return new r(this.name,this.params.slice(0),this.expr)},r.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=this.expr.toString(e);return o(this,t)&&(n="("+n+")"),this.name+"("+this.params.join(", ")+") = "+n},r.prototype.toJSON=function(){var e=this.types;return{mathjs:"FunctionAssignmentNode",name:this.name,params:this.params.map((function(t,n){return{name:t,type:e[n]}})),expr:this.expr}},r.fromJSON=function(e){return new r(e.name,e.params,e.expr)},r.prototype.toHTML=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=[],r=0;r<this.params.length;r++)n.push('<span class="math-symbol math-parameter">'+Fe(this.params[r])+"</span>");var i=this.expr.toHTML(e);return o(this,t)&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+Fe(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+n.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+i},r.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=this.expr.toTex(e);return o(this,t)&&(n="\\left(".concat(n,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(Yr).join(",")+"\\right):="+n},r},{isClass:!0,isNode:!0}),ho={NodeDependencies:kt,typedDependencies:uo,createFunctionAssignmentNode:mo},go="SymbolNode",bo=["math","?Unit","Node"],yo=Je(go,bo,e=>{var{math:t,Unit:n,Node:r}=e;function o(e){return!!n&&n.isValuelessUnit(e)}function i(e){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof e)throw new TypeError('String expected for parameter "name"');this.name=e}return i.prototype=new r,i.prototype.type="SymbolNode",i.prototype.isSymbolNode=!0,i.prototype._compile=function(e,t){var r=this.name;if(!0===t[r])return function(e,t,n){return t[r]};if(r in e)return function(t,n,o){return t.has(r)?t.get(r):lt(e,r)};var a=o(r);return function(e,t,o){return e.has(r)?e.get(r):a?new n(null,r):i.onUndefinedSymbol(r)}},i.prototype.forEach=function(e){},i.prototype.map=function(e){return this.clone()},i.onUndefinedSymbol=function(e){throw new Error("Undefined symbol "+e)},i.prototype.clone=function(){return new i(this.name)},i.prototype._toString=function(e){return this.name},i.prototype.toHTML=function(e){var t=Fe(this.name);return"true"===t||"false"===t?'<span class="math-symbol math-boolean">'+t+"</span>":"i"===t?'<span class="math-symbol math-imaginary-symbol">'+t+"</span>":"Infinity"===t?'<span class="math-symbol math-infinity-symbol">'+t+"</span>":"NaN"===t?'<span class="math-symbol math-nan-symbol">'+t+"</span>":"null"===t?'<span class="math-symbol math-null-symbol">'+t+"</span>":"undefined"===t?'<span class="math-symbol math-undefined-symbol">'+t+"</span>":'<span class="math-symbol">'+t+"</span>"},i.prototype.toJSON=function(){return{mathjs:"SymbolNode",name:this.name}},i.fromJSON=function(e){return new i(e.name)},i.prototype._toTex=function(e){var n=!1;"undefined"===typeof t[this.name]&&o(this.name)&&(n=!0);var r=Yr(this.name,n);return"\\"===r[0]?r:" "+r},i},{isClass:!0,isNode:!0}),vo={NodeDependencies:kt,createSymbolNode:yo};function Oo(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"===typeof e.createSubScope?wt(e.createSubScope(),...n):wt(yt(),e,...n)}var wo="FunctionNode",jo=["math","Node","SymbolNode"],No=Je(wo,jo,e=>{var{math:t,Node:n,SymbolNode:r}=e;function o(e,t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if("string"===typeof e&&(e=new r(e)),!_(e))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(t)||!t.every(_))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=e,this.args=t||[],Object.defineProperty(this,"name",{get:function(){return this.fn.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}o.prototype=new n,o.prototype.type="FunctionNode",o.prototype.isFunctionNode=!0;var i=e=>De(e,{truncate:78});o.prototype._compile=function(e,t){if(!(this instanceof o))throw new TypeError("No valid FunctionNode");var n=this.args.map(n=>n._compile(e,t));if(!R(this.fn)){if(V(this.fn)&&F(this.fn.index)&&this.fn.index.isObjectProperty()){var r=this.fn.object._compile(e,t),a=this.fn.index.getObjectProperty(),s=this.args;return function(t,o,i){var l=r(t,o,i);dt(l,a);var c=l[a]&&l[a].rawArgs;if(c)return l[a](s,e,Oo(t,o),t);var u=n.map(e=>e(t,o,i));return l[a].apply(l,u)}}var l=this.fn.toString(),c=this.fn._compile(e,t),u=this.args;return function(t,r,o){var a=c(t,r,o);if("function"!==typeof a)throw new TypeError("Expression '".concat(l,"' did not evaluate to a function; value is:")+"\n ".concat(i(a)));if(a.rawArgs)return a(u,e,Oo(t,r),t);var s=n.map(e=>e(t,r,o));return a.apply(a,s)}}var p=this.fn.name;if(t[p]){var d=this.args;return function(t,r,o){var a=r[p];if("function"!==typeof a)throw new TypeError("Argument '".concat(p,"' was not a function; received: ").concat(i(a)));if(a.rawArgs)return a(d,e,Oo(t,r),t);var s=n.map(e=>e(t,r,o));return a.apply(a,s)}}var f=p in e?lt(e,p):void 0,m="function"===typeof f&&!0===f.rawArgs,h=t=>{var n;if(t.has(p))n=t.get(p);else{if(!(p in e))return o.onUndefinedFunction(p);n=lt(e,p)}if("function"===typeof n)return n;throw new TypeError("'".concat(p,"' is not a function; its value is:\n ").concat(i(n)))};if(m){var g=this.args;return function(t,n,r){var o=h(t);return o(g,e,Oo(t,n),t)}}switch(n.length){case 0:return function(e,t,n){var r=h(e);return r()};case 1:return function(e,t,r){var o=h(e),i=n[0];return o(i(e,t,r))};case 2:return function(e,t,r){var o=h(e),i=n[0],a=n[1];return o(i(e,t,r),a(e,t,r))};default:return function(e,t,r){var o=h(e),i=n.map(n=>n(e,t,r));return o(...i)}}},o.prototype.forEach=function(e){e(this.fn,"fn",this);for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)},o.prototype.map=function(e){for(var t=this._ifNode(e(this.fn,"fn",this)),n=[],r=0;r<this.args.length;r++)n[r]=this._ifNode(e(this.args[r],"args["+r+"]",this));return new o(t,n)},o.prototype.clone=function(){return new o(this.fn,this.args.slice(0))},o.onUndefinedFunction=function(e){throw new Error("Undefined function "+e)};var a=o.prototype.toString;function s(e,t,n){var r,o="",i=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,a=0;while(null!==(r=i.exec(e)))if(o+=e.substring(a,r.index),a=r.index,"$$"===r[0])o+="$",a++;else{a+=r[0].length;var s=t[r[1]];if(!s)throw new ReferenceError("Template: Property "+r[1]+" does not exist.");if(void 0===r[2])switch(typeof s){case"string":o+=s;break;case"object":if(_(s))o+=s.toTex(n);else{if(!Array.isArray(s))throw new TypeError("Template: "+r[1]+" has to be a Node, String or array of Nodes");o+=s.map((function(e,t){if(_(e))return e.toTex(n);throw new TypeError("Template: "+r[1]+"["+t+"] is not a Node.")})).join(",")}break;default:throw new TypeError("Template: "+r[1]+" has to be a Node, String or array of Nodes")}else{if(!_(s[r[2]]&&s[r[2]]))throw new TypeError("Template: "+r[1]+"["+r[2]+"] is not a Node.");o+=s[r[2]].toTex(n)}}return o+=e.slice(a),o}o.prototype.toString=function(e){var t,n=this.fn.toString(e);return e&&"object"===typeof e.handler&&Q(e.handler,n)&&(t=e.handler[n](this,e)),"undefined"!==typeof t?t:a.call(this,e)},o.prototype._toString=function(e){var t=this.args.map((function(t){return t.toString(e)})),n=B(this.fn)?"("+this.fn.toString(e)+")":this.fn.toString(e);return n+"("+t.join(", ")+")"},o.prototype.toJSON=function(){return{mathjs:"FunctionNode",fn:this.fn,args:this.args}},o.fromJSON=function(e){return new o(e.fn,e.args)},o.prototype.toHTML=function(e){var t=this.args.map((function(t){return t.toHTML(e)}));return'<span class="math-function">'+Fe(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'};var l=o.prototype.toTex;return o.prototype.toTex=function(e){var t;return e&&"object"===typeof e.handler&&Q(e.handler,this.name)&&(t=e.handler[this.name](this,e)),"undefined"!==typeof t?t:l.call(this,e)},o.prototype._toTex=function(e){var n,r,o=this.args.map((function(t){return t.toTex(e)}));switch(Wr[this.name]&&(n=Wr[this.name]),!t[this.name]||"function"!==typeof t[this.name].toTex&&"object"!==typeof t[this.name].toTex&&"string"!==typeof t[this.name].toTex||(n=t[this.name].toTex),typeof n){case"function":r=n(this,e);break;case"string":r=s(n,this,e);break;case"object":switch(typeof n[o.length]){case"function":r=n[o.length](this,e);break;case"string":r=s(n[o.length],this,e);break}}return"undefined"!==typeof r?r:s(Jr,this,e)},o.prototype.getIdentifier=function(){return this.type+":"+this.name},o},{isClass:!0,isNode:!0}),xo={NodeDependencies:kt,SymbolNodeDependencies:vo,createFunctionNode:No},ko="size",Eo=["typed","config","?matrix"],Co=Je(ko,Eo,e=>{var{typed:t,config:n,matrix:r}=e;return t(ko,{Matrix:function(e){return e.create(e.size())},Array:He,string:function(e){return"Array"===n.matrix?[e.length]:r([e.length])},"number | Complex | BigNumber | Unit | boolean | null":function(e){return"Array"===n.matrix?[]:r?r([]):or()}})}),So={matrixDependencies:Or,typedDependencies:uo,createSize:Co},Vo="IndexNode",Ao=["Node","size"],To=Je(Vo,Ao,e=>{var{Node:t,size:n}=e;function r(e,t){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(this.dimensions=e,this.dotNotation=t||!1,!Array.isArray(e)||!e.every(_))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}return r.prototype=new t,r.prototype.type="IndexNode",r.prototype.isIndexNode=!0,r.prototype._compile=function(e,t){var r=Re(this.dimensions,(function(r,o){var i=r.filter(e=>e.isSymbolNode&&"end"===e.name).length>0;if(i){var a=Object.create(t);a.end=!0;var s=r._compile(e,a);return function(e,t,r){if(!m(r)&&!f(r)&&!d(r))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+z(r));var i=n(r).valueOf(),a=Object.create(t);return a.end=i[o],s(e,a,r)}}return r._compile(e,t)})),o=lt(e,"index");return function(e,t,n){var i=Re(r,(function(r){return r(e,t,n)}));return o(...i)}},r.prototype.forEach=function(e){for(var t=0;t<this.dimensions.length;t++)e(this.dimensions[t],"dimensions["+t+"]",this)},r.prototype.map=function(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this._ifNode(e(this.dimensions[n],"dimensions["+n+"]",this));return new r(t,this.dotNotation)},r.prototype.clone=function(){return new r(this.dimensions.slice(0),this.dotNotation)},r.prototype.isObjectProperty=function(){return 1===this.dimensions.length&&D(this.dimensions[0])&&"string"===typeof this.dimensions[0].value},r.prototype.getObjectProperty=function(){return this.isObjectProperty()?this.dimensions[0].value:null},r.prototype._toString=function(e){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"},r.prototype.toJSON=function(){return{mathjs:"IndexNode",dimensions:this.dimensions,dotNotation:this.dotNotation}},r.fromJSON=function(e){return new r(e.dimensions,e.dotNotation)},r.prototype.toHTML=function(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this.dimensions[n].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+Fe(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},r.prototype._toTex=function(e){var t=this.dimensions.map((function(t){return t.toTex(e)}));return this.dotNotation?"."+this.getObjectProperty():"_{"+t.join(",")+"}"},r},{isClass:!0,isNode:!0}),Mo={NodeDependencies:kt,sizeDependencies:So,createIndexNode:To},Po="ObjectNode",Do=["Node"],Bo=Je(Po,Do,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=e||{},e&&("object"!==typeof e||!Object.keys(e).every((function(t){return _(e[t])}))))throw new TypeError("Object containing Nodes expected")}return n.prototype=new t,n.prototype.type="ObjectNode",n.prototype.isObjectNode=!0,n.prototype._compile=function(e,t){var n={};for(var r in this.properties)if(Q(this.properties,r)){var o=$e(r),i=JSON.parse(o);if(!pt(this.properties,i))throw new Error('No access to property "'+i+'"');n[i]=this.properties[r]._compile(e,t)}return function(e,t,r){var o={};for(var i in n)Q(n,i)&&(o[i]=n[i](e,t,r));return o}},n.prototype.forEach=function(e){for(var t in this.properties)Q(this.properties,t)&&e(this.properties[t],"properties["+$e(t)+"]",this)},n.prototype.map=function(e){var t={};for(var r in this.properties)Q(this.properties,r)&&(t[r]=this._ifNode(e(this.properties[r],"properties["+$e(r)+"]",this)));return new n(t)},n.prototype.clone=function(){var e={};for(var t in this.properties)Q(this.properties,t)&&(e[t]=this.properties[t]);return new n(e)},n.prototype._toString=function(e){var t=[];for(var n in this.properties)Q(this.properties,n)&&t.push($e(n)+": "+this.properties[n].toString(e));return"{"+t.join(", ")+"}"},n.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},n.fromJSON=function(e){return new n(e.properties)},n.prototype.toHTML=function(e){var t=[];for(var n in this.properties)Q(this.properties,n)&&t.push('<span class="math-symbol math-property">'+Fe(n)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[n].toHTML(e));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'},n.prototype._toTex=function(e){var t=[];for(var n in this.properties)Q(this.properties,n)&&t.push("\\mathbf{"+n+":} & "+this.properties[n].toTex(e)+"\\\\");return"\\left\\{\\begin{array}{ll}".concat(t.join("\n"),"\\end{array}\\right\\}")},n},{isClass:!0,isNode:!0}),$o={NodeDependencies:kt,createObjectNode:Bo},Fo="OperatorNode",_o=["Node"],Lo=Je(Fo,_o,e=>{var{Node:t}=e;function n(e,t,r,o,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof e)throw new TypeError('string expected for parameter "op"');if("string"!==typeof t)throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(r)||!r.every(_))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=!0===o,this.isPercentage=!0===i,this.op=e,this.fn=t,this.args=r||[]}function r(e,t,n,r,o){var i,a=Nr(e,t),s=xr(e,t);if("all"===t||r.length>2&&"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier())return r.map((function(e){switch(e.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}}));switch(r.length){case 0:i=[];break;case 1:var l=Nr(r[0],t);if(o&&null!==l){var c,u;if("keep"===t?(c=r[0].getIdentifier(),u=e.getIdentifier()):(c=r[0].getContent().getIdentifier(),u=e.getContent().getIdentifier()),!1===jr[a][u].latexLeftParens){i=[!1];break}if(!1===jr[l][c].latexParens){i=[!1];break}}if(null===l){i=[!1];break}if(l<=a){i=[!0];break}i=[!1];break;case 2:var p,d,f=Nr(r[0],t),m=kr(e,r[0],t);p=null!==f&&(f===a&&"right"===s&&!m||f<a);var h,g,b,y=Nr(r[1],t),v=kr(e,r[1],t);if(d=null!==y&&(y===a&&"left"===s&&!v||y<a),o)"keep"===t?(h=e.getIdentifier(),g=e.args[0].getIdentifier(),b=e.args[1].getIdentifier()):(h=e.getContent().getIdentifier(),g=e.args[0].getContent().getIdentifier(),b=e.args[1].getContent().getIdentifier()),null!==f&&(!1===jr[a][h].latexLeftParens&&(p=!1),!1===jr[f][g].latexParens&&(p=!1)),null!==y&&(!1===jr[a][h].latexRightParens&&(d=!1),!1===jr[y][b].latexParens&&(d=!1));i=[p,d];break;default:"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier()||(i=r.map((function(n){var r=Nr(n,t),o=kr(e,n,t),i=xr(n,t);return null!==r&&(a===r&&s===i&&!o||r<a)})));break}return r.length>=2&&"OperatorNode:multiply"===e.getIdentifier()&&e.implicit&&"auto"===t&&"hide"===n&&(i=r.map((function(e,t){var n="ParenthesisNode"===e.getIdentifier();return!(!i[t]&&!n)}))),i}return n.prototype=new t,n.prototype.type="OperatorNode",n.prototype.isOperatorNode=!0,n.prototype._compile=function(e,t){if("string"!==typeof this.fn||!ft(e,this.fn))throw e[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var n=lt(e,this.fn),r=Re(this.args,(function(n){return n._compile(e,t)}));if(1===r.length){var o=r[0];return function(e,t,r){return n(o(e,t,r))}}if(2===r.length){var i=r[0],a=r[1];return function(e,t,r){return n(i(e,t,r),a(e,t,r))}}return function(e,t,o){return n.apply(null,Re(r,(function(n){return n(e,t,o)})))}},n.prototype.forEach=function(e){for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)},n.prototype.map=function(e){for(var t=[],r=0;r<this.args.length;r++)t[r]=this._ifNode(e(this.args[r],"args["+r+"]",this));return new n(this.op,this.fn,t,this.implicit,this.isPercentage)},n.prototype.clone=function(){return new n(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)},n.prototype.isUnary=function(){return 1===this.args.length},n.prototype.isBinary=function(){return 2===this.args.length},n.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",o=this.args,i=r(this,t,n,o,!1);if(1===o.length){var a=xr(this,t),s=o[0].toString(e);i[0]&&(s="("+s+")");var l=/[a-zA-Z]+/.test(this.op);return"right"===a?this.op+(l?" ":"")+s:"left"===a?s+(l?" ":"")+this.op:s+this.op}if(2===o.length){var c=o[0].toString(e),u=o[1].toString(e);return i[0]&&(c="("+c+")"),i[1]&&(u="("+u+")"),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?c+" "+u:c+" "+this.op+" "+u}if(o.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var p=o.map((function(t,n){return t=t.toString(e),i[n]&&(t="("+t+")"),t}));return this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?p.join(" "):p.join(" "+this.op+" ")}return this.fn+"("+this.args.join(", ")+")"},n.prototype.toJSON=function(){return{mathjs:"OperatorNode",op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}},n.fromJSON=function(e){return new n(e.op,e.fn,e.args,e.implicit,e.isPercentage)},n.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",o=this.args,i=r(this,t,n,o,!1);if(1===o.length){var a=xr(this,t),s=o[0].toHTML(e);return i[0]&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),"right"===a?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+Fe(this.op)+"</span>"+s:s+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+Fe(this.op)+"</span>"}if(2===o.length){var l=o[0].toHTML(e),c=o[1].toHTML(e);return i[0]&&(l='<span class="math-parenthesis math-round-parenthesis">(</span>'+l+'<span class="math-parenthesis math-round-parenthesis">)</span>'),i[1]&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?l+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+c:l+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Fe(this.op)+"</span>"+c}var u=o.map((function(t,n){return t=t.toHTML(e),i[n]&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t}));return o.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())?this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?u.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):u.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Fe(this.op)+"</span>"):'<span class="math-function">'+Fe(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+u.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'},n.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=e&&e.implicit?e.implicit:"hide",o=this.args,i=r(this,t,n,o,!0),a=zr[this.fn];if(a="undefined"===typeof a?this.op:a,1===o.length){var s=xr(this,t),l=o[0].toTex(e);return i[0]&&(l="\\left(".concat(l,"\\right)")),"right"===s?a+l:l+a}if(2===o.length){var c=o[0],u=c.toTex(e);i[0]&&(u="\\left(".concat(u,"\\right)"));var p,d=o[1],f=d.toTex(e);switch(i[1]&&(f="\\left(".concat(f,"\\right)")),p="keep"===t?c.getIdentifier():c.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return a+"{"+u+"}{"+f+"}";case"OperatorNode:pow":switch(u="{"+u+"}",f="{"+f+"}",p){case"ConditionalNode":case"OperatorNode:divide":u="\\left(".concat(u,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&"hide"===n)return u+"~"+f}return u+a+f}if(o.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var m=o.map((function(t,n){return t=t.toTex(e),i[n]&&(t="\\left(".concat(t,"\\right)")),t}));return"OperatorNode:multiply"===this.getIdentifier()&&this.implicit?m.join("~"):m.join(a)}return"\\mathrm{"+this.fn+"}\\left("+o.map((function(t){return t.toTex(e)})).join(",")+"\\right)"},n.prototype.getIdentifier=function(){return this.type+":"+this.fn},n},{isClass:!0,isNode:!0}),Io={NodeDependencies:kt,createOperatorNode:Lo},Uo="ParenthesisNode",Ho=["Node"],Ro=Je(Uo,Ho,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!_(e))throw new TypeError('Node expected for parameter "content"');this.content=e}return n.prototype=new t,n.prototype.type="ParenthesisNode",n.prototype.isParenthesisNode=!0,n.prototype._compile=function(e,t){return this.content._compile(e,t)},n.prototype.getContent=function(){return this.content.getContent()},n.prototype.forEach=function(e){e(this.content,"content",this)},n.prototype.map=function(e){var t=e(this.content,"content",this);return new n(t)},n.prototype.clone=function(){return new n(this.content)},n.prototype._toString=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"("+this.content.toString(e)+")":this.content.toString(e)},n.prototype.toJSON=function(){return{mathjs:"ParenthesisNode",content:this.content}},n.fromJSON=function(e){return new n(e.content)},n.prototype.toHTML=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(e)},n.prototype._toTex=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"\\left(".concat(this.content.toTex(e),"\\right)"):this.content.toTex(e)},n},{isClass:!0,isNode:!0}),qo={NodeDependencies:kt,createParenthesisNode:Ro},zo="RangeNode",Wo=["Node"],Jo=Je(zo,Wo,e=>{var{Node:t}=e;function n(e,t,r){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!_(e))throw new TypeError("Node expected");if(!_(t))throw new TypeError("Node expected");if(r&&!_(r))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=e,this.end=t,this.step=r||null}function r(e,t){var n=Nr(e,t),r={},o=Nr(e.start,t);if(r.start=null!==o&&o<=n||"all"===t,e.step){var i=Nr(e.step,t);r.step=null!==i&&i<=n||"all"===t}var a=Nr(e.end,t);return r.end=null!==a&&a<=n||"all"===t,r}return n.prototype=new t,n.prototype.type="RangeNode",n.prototype.isRangeNode=!0,n.prototype.needsEnd=function(){var e=this.filter((function(e){return R(e)&&"end"===e.name}));return e.length>0},n.prototype._compile=function(e,t){var n=e.range,r=this.start._compile(e,t),o=this.end._compile(e,t);if(this.step){var i=this.step._compile(e,t);return function(e,t,a){return n(r(e,t,a),o(e,t,a),i(e,t,a))}}return function(e,t,i){return n(r(e,t,i),o(e,t,i))}},n.prototype.forEach=function(e){e(this.start,"start",this),e(this.end,"end",this),this.step&&e(this.step,"step",this)},n.prototype.map=function(e){return new n(this._ifNode(e(this.start,"start",this)),this._ifNode(e(this.end,"end",this)),this.step&&this._ifNode(e(this.step,"step",this)))},n.prototype.clone=function(){return new n(this.start,this.end,this.step&&this.step)},n.prototype._toString=function(e){var t,n=e&&e.parenthesis?e.parenthesis:"keep",o=r(this,n),i=this.start.toString(e);if(o.start&&(i="("+i+")"),t=i,this.step){var a=this.step.toString(e);o.step&&(a="("+a+")"),t+=":"+a}var s=this.end.toString(e);return o.end&&(s="("+s+")"),t+=":"+s,t},n.prototype.toJSON=function(){return{mathjs:"RangeNode",start:this.start,end:this.end,step:this.step}},n.fromJSON=function(e){return new n(e.start,e.end,e.step)},n.prototype.toHTML=function(e){var t,n=e&&e.parenthesis?e.parenthesis:"keep",o=r(this,n),i=this.start.toHTML(e);if(o.start&&(i='<span class="math-parenthesis math-round-parenthesis">(</span>'+i+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t=i,this.step){var a=this.step.toHTML(e);o.step&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+='<span class="math-operator math-range-operator">:</span>'+a}var s=this.end.toHTML(e);return o.end&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+='<span class="math-operator math-range-operator">:</span>'+s,t},n.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",n=r(this,t),o=this.start.toTex(e);if(n.start&&(o="\\left(".concat(o,"\\right)")),this.step){var i=this.step.toTex(e);n.step&&(i="\\left(".concat(i,"\\right)")),o+=":"+i}var a=this.end.toTex(e);return n.end&&(a="\\left(".concat(a,"\\right)")),o+=":"+a,o},n},{isClass:!0,isNode:!0}),Go={NodeDependencies:kt,createRangeNode:Jo},Ko="RelationalNode",Yo=["Node"],Zo=Je(Ko,Yo,e=>{var{Node:t}=e;function n(e,t){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(t))throw new TypeError("Parameter params must be an array");if(e.length!==t.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=e,this.params=t}return n.prototype=new t,n.prototype.type="RelationalNode",n.prototype.isRelationalNode=!0,n.prototype._compile=function(e,t){var n=this,r=this.params.map(n=>n._compile(e,t));return function(t,o,i){for(var a,s=r[0](t,o,i),l=0;l<n.conditionals.length;l++){a=s,s=r[l+1](t,o,i);var c=lt(e,n.conditionals[l]);if(!c(a,s))return!1}return!0}},n.prototype.forEach=function(e){this.params.forEach((t,n)=>e(t,"params["+n+"]",this),this)},n.prototype.map=function(e){return new n(this.conditionals.slice(),this.params.map((t,n)=>this._ifNode(e(t,"params["+n+"]",this)),this))},n.prototype.clone=function(){return new n(this.conditionals,this.params)},n.prototype._toString=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.params.map((function(r,o){var i=Nr(r,t);return"all"===t||null!==i&&i<=n?"("+r.toString(e)+")":r.toString(e)})),o={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},i=r[0],a=0;a<this.conditionals.length;a++)i+=" "+o[this.conditionals[a]]+" "+r[a+1];return i},n.prototype.toJSON=function(){return{mathjs:"RelationalNode",conditionals:this.conditionals,params:this.params}},n.fromJSON=function(e){return new n(e.conditionals,e.params)},n.prototype.toHTML=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.params.map((function(r,o){var i=Nr(r,t);return"all"===t||null!==i&&i<=n?'<span class="math-parenthesis math-round-parenthesis">(</span>'+r.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':r.toHTML(e)})),o={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},i=r[0],a=0;a<this.conditionals.length;a++)i+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+Fe(o[this.conditionals[a]])+"</span>"+r[a+1];return i},n.prototype._toTex=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",n=Nr(this,t),r=this.params.map((function(r,o){var i=Nr(r,t);return"all"===t||null!==i&&i<=n?"\\left("+r.toTex(e)+"\right)":r.toTex(e)})),o=r[0],i=0;i<this.conditionals.length;i++)o+=zr[this.conditionals[i]]+r[i+1];return o},n},{isClass:!0,isNode:!0}),Xo={NodeDependencies:kt,createRelationalNode:Zo};function Qo(e,t,n){return e&&"function"===typeof e.map?e.map((function(e){return Qo(e,t,n)})):t(e)}var ei="number",ti=["typed"];function ni(e){var t=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(t){var n={"0b":2,"0o":8,"0x":16}[t[1]],r=t[2],o=t[3];return{input:e,radix:n,integerPart:r,fractionalPart:o}}return null}function ri(e){for(var t=parseInt(e.integerPart,e.radix),n=0,r=0;r<e.fractionalPart.length;r++){var o=parseInt(e.fractionalPart[r],e.radix);n+=o/Math.pow(e.radix,r+1)}var i=t+n;if(isNaN(i))throw new SyntaxError('String "'+e.input+'" is no valid number');return i}var oi=Je(ei,ti,e=>{var{typed:t}=e,n=t("number",{"":function(){return 0},number:function(e){return e},string:function(e){if("NaN"===e)return NaN;var t=ni(e);if(t)return ri(t);var n=0,r=e.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);r&&(n=Number(r[2]),e=r[1]);var o=Number(e);if(isNaN(o))throw new SyntaxError('String "'+e+'" is no valid number');if(r){if(o>2**n-1)throw new SyntaxError('String "'.concat(e,'" is out of range'));o>=2**(n-1)&&(o-=2**n)}return o},BigNumber:function(e){return e.toNumber()},Fraction:function(e){return e.valueOf()},Unit:function(e){throw new Error("Second argument with valueless unit expected")},null:function(e){return 0},"Unit, string | Unit":function(e,t){return e.toNumber(t)},"Array | Matrix":function(e){return Qo(e,this)}});return n.fromJSON=function(e){return parseFloat(e.value)},n}),ii={typedDependencies:uo,createNumber:oi},ai="numeric",si=["number","?bignumber","?fraction"],li=Je(ai,si,e=>{var{number:t,bignumber:n,fraction:r}=e,o={string:!0,number:!0,BigNumber:!0,Fraction:!0},i={number:e=>t(e),BigNumber:n?e=>n(e):nr,Fraction:r?e=>r(e):rr};return function(e,t){var n=z(e);if(!(n in o))throw new TypeError("Cannot convert "+e+' of type "'+n+'"; valid input types are '+Object.keys(o).join(", "));if(!(t in i))throw new TypeError("Cannot convert "+e+' to type "'+t+'"; valid output types are '+Object.keys(i).join(", "));return t===n?e:i[t](e)}}),ci={numberDependencies:ii,createNumeric:li},ui="parse",pi=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],di=Je(ui,pi,e=>{var{typed:t,numeric:n,config:r,AccessorNode:o,ArrayNode:i,AssignmentNode:s,BlockNode:l,ConditionalNode:c,ConstantNode:u,FunctionAssignmentNode:p,FunctionNode:d,IndexNode:f,ObjectNode:m,OperatorNode:h,ParenthesisNode:g,RangeNode:b,RelationalNode:y,SymbolNode:v}=e,O=t(ui,{string:function(e){return U(e,{})},"Array | Matrix":function(e){return w(e,{})},"string, Object":function(e,t){var n=void 0!==t.nodes?t.nodes:{};return U(e,n)},"Array | Matrix, Object":w});function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0!==t.nodes?t.nodes:{};return Qo(e,(function(e){if("string"!==typeof e)throw new TypeError("String expected");return U(e,n)}))}var j={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},N={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},x={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},k={true:!0,false:!1,null:null,undefined:void 0},E=["NaN","Infinity"];function C(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:j.NULL,nestingLevel:0,conditionalLevel:null}}function S(e,t){return e.expression.substr(e.index,t)}function A(e){return S(e,1)}function T(e){e.index++}function M(e){return e.expression.charAt(e.index-1)}function P(e){return e.expression.charAt(e.index+1)}function B(e){e.tokenType=j.NULL,e.token="",e.comment="";while(1){if("#"===A(e))while("\n"!==A(e)&&""!==A(e))e.comment+=A(e),T(e);if(!O.isWhitespace(A(e),e.nestingLevel))break;T(e)}if(""!==A(e)){if("\n"===A(e)&&!e.nestingLevel)return e.tokenType=j.DELIMITER,e.token=A(e),void T(e);var t=A(e),n=S(e,2),r=S(e,3);if(3===r.length&&N[r])return e.tokenType=j.DELIMITER,e.token=r,T(e),T(e),void T(e);if(2===n.length&&N[n])return e.tokenType=j.DELIMITER,e.token=n,T(e),void T(e);if(N[t])return e.tokenType=j.DELIMITER,e.token=t,void T(e);if(O.isDigitDot(t)){e.tokenType=j.NUMBER;var o=S(e,2);if("0b"===o||"0o"===o||"0x"===o){e.token+=A(e),T(e),e.token+=A(e),T(e);while(O.isHexDigit(A(e)))e.token+=A(e),T(e);if("."===A(e)){e.token+=".",T(e);while(O.isHexDigit(A(e)))e.token+=A(e),T(e)}else if("i"===A(e)){e.token+="i",T(e);while(O.isDigit(A(e)))e.token+=A(e),T(e)}return}if("."===A(e)){if(e.token+=A(e),T(e),!O.isDigit(A(e)))return void(e.tokenType=j.DELIMITER)}else{while(O.isDigit(A(e)))e.token+=A(e),T(e);O.isDecimalMark(A(e),P(e))&&(e.token+=A(e),T(e))}while(O.isDigit(A(e)))e.token+=A(e),T(e);if("E"===A(e)||"e"===A(e))if(O.isDigit(P(e))||"-"===P(e)||"+"===P(e)){if(e.token+=A(e),T(e),"+"!==A(e)&&"-"!==A(e)||(e.token+=A(e),T(e)),!O.isDigit(A(e)))throw ke(e,'Digit expected, got "'+A(e)+'"');while(O.isDigit(A(e)))e.token+=A(e),T(e);if(O.isDecimalMark(A(e),P(e)))throw ke(e,'Digit expected, got "'+A(e)+'"')}else if("."===P(e))throw T(e),ke(e,'Digit expected, got "'+A(e)+'"')}else{if(!O.isAlpha(A(e),M(e),P(e))){e.tokenType=j.UNKNOWN;while(""!==A(e))e.token+=A(e),T(e);throw ke(e,'Syntax error in part "'+e.token+'"')}while(O.isAlpha(A(e),M(e),P(e))||O.isDigit(A(e)))e.token+=A(e),T(e);Q(x,e.token)?e.tokenType=j.DELIMITER:e.tokenType=j.SYMBOL}}else e.tokenType=j.DELIMITER}function F(e){do{B(e)}while("\n"===e.token)}function _(e){e.nestingLevel++}function L(e){e.nestingLevel--}function U(e,t){var n=C();a()(n,{expression:e,extraNodes:t}),B(n);var r=H(n);if(""!==n.token)throw n.tokenType===j.DELIMITER?Ee(n,"Unexpected operator "+n.token):ke(n,'Unexpected part "'+n.token+'"');return r}function H(e){var t,n,r=[];""!==e.token&&"\n"!==e.token&&";"!==e.token&&(t=q(e),t.comment=e.comment);while("\n"===e.token||";"===e.token)0===r.length&&t&&(n=";"!==e.token,r.push({node:t,visible:n})),B(e),"\n"!==e.token&&";"!==e.token&&""!==e.token&&(t=q(e),t.comment=e.comment,n=";"!==e.token,r.push({node:t,visible:n}));return r.length>0?new l(r):(t||(t=new u(void 0),t.comment=e.comment),t)}function q(e){var t,n,r,o,i=z(e);if("="===e.token){if(R(i))return t=i.name,F(e),r=q(e),new s(new v(t),r);if(V(i))return F(e),r=q(e),new s(i.object,i.index,r);if($(i)&&R(i.fn)&&(o=!0,n=[],t=i.name,i.args.forEach((function(e,t){R(e)?n[t]=e.name:o=!1})),o))return F(e),r=q(e),new p(t,n,r);throw ke(e,"Invalid left hand side of assignment operator =")}return i}function z(e){var t=W(e);while("?"===e.token){var n=e.conditionalLevel;e.conditionalLevel=e.nestingLevel,F(e);var r=t,o=q(e);if(":"!==e.token)throw ke(e,"False part of conditional expression expected");e.conditionalLevel=null,F(e);var i=q(e);t=new c(r,o,i),e.conditionalLevel=n}return t}function W(e){var t=J(e);while("or"===e.token)F(e),t=new h("or","or",[t,J(e)]);return t}function J(e){var t=G(e);while("xor"===e.token)F(e),t=new h("xor","xor",[t,G(e)]);return t}function G(e){var t=K(e);while("and"===e.token)F(e),t=new h("and","and",[t,K(e)]);return t}function K(e){var t=Y(e);while("|"===e.token)F(e),t=new h("|","bitOr",[t,Y(e)]);return t}function Y(e){var t=Z(e);while("^|"===e.token)F(e),t=new h("^|","bitXor",[t,Z(e)]);return t}function Z(e){var t=X(e);while("&"===e.token)F(e),t=new h("&","bitAnd",[t,X(e)]);return t}function X(e){var t=[ee(e)],n=[],r={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};while(Q(r,e.token)){var o={name:e.token,fn:r[e.token]};n.push(o),F(e),t.push(ee(e))}return 1===t.length?t[0]:2===t.length?new h(n[0].name,n[0].fn,t):new y(n.map(e=>e.fn),t)}function ee(e){var t,n,r,o;t=te(e);var i={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};while(Q(i,e.token))n=e.token,r=i[n],F(e),o=[t,te(e)],t=new h(n,r,o);return t}function te(e){var t,n,r,o;t=ne(e);var i={to:"to",in:"to"};while(Q(i,e.token))n=e.token,r=i[n],F(e),"in"===n&&""===e.token?t=new h("*","multiply",[t,new v("in")],!0):(o=[t,ne(e)],t=new h(n,r,o));return t}function ne(e){var t,n=[];if(t=":"===e.token?new u(1):re(e),":"===e.token&&e.conditionalLevel!==e.nestingLevel){n.push(t);while(":"===e.token&&n.length<3)F(e),")"===e.token||"]"===e.token||","===e.token||""===e.token?n.push(new v("end")):n.push(re(e));t=3===n.length?new b(n[0],n[2],n[1]):new b(n[0],n[1])}return t}function re(e){var t,n,r,o;t=oe(e);var i={"+":"add","-":"subtract"};while(Q(i,e.token)){n=e.token,r=i[n],F(e);var a=oe(e);o=a.isPercentage?[t,new h("*","multiply",[t,a])]:[t,a],t=new h(n,r,o)}return t}function oe(e){var t,n,r,o;t=ie(e),n=t;var i={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};while(1){if(!Q(i,e.token))break;r=e.token,o=i[r],F(e),n=ie(e),t=new h(r,o,[t,n])}return t}function ie(e){var t,n;t=ae(e),n=t;while(1){if(!(e.tokenType===j.SYMBOL||"in"===e.token&&D(t))&&(e.tokenType!==j.NUMBER||D(n)||I(n)&&"!"!==n.op)&&"("!==e.token)break;n=ae(e),t=new h("*","multiply",[t,n],!0)}return t}function ae(e){var t=se(e),n=t,r=[];while(1){if("/"!==e.token||!D(n))break;if(r.push(a()({},e)),F(e),e.tokenType!==j.NUMBER){a()(e,r.pop());break}if(r.push(a()({},e)),F(e),e.tokenType!==j.SYMBOL&&"("!==e.token){r.pop(),a()(e,r.pop());break}a()(e,r.pop()),r.pop(),n=se(e),t=new h("/","divide",[t,n])}return t}function se(e){var t,n,r,o;t=le(e);var i={"%":"mod",mod:"mod"};while(Q(i,e.token))n=e.token,r=i[n],F(e),"%"===n&&e.tokenType===j.DELIMITER&&"("!==e.token?t=new h("/","divide",[t,new u(100)],!1,!0):(o=[t,le(e)],t=new h(n,r,o));return t}function le(e){var t,n,r,o={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Q(o,e.token)?(r=o[e.token],t=e.token,F(e),n=[le(e)],new h(t,r,n)):ce(e)}function ce(e){var t,n,r,o;return t=ue(e),"^"!==e.token&&".^"!==e.token||(n=e.token,r="^"===n?"pow":"dotPow",F(e),o=[t,le(e)],t=new h(n,r,o)),t}function ue(e){var t,n,r,o;t=pe(e);var i={"!":"factorial","'":"ctranspose"};while(Q(i,e.token))n=e.token,r=i[n],B(e),o=[t],t=new h(n,r,o),t=fe(e,t);return t}function pe(e){var t=[];if(e.tokenType===j.SYMBOL&&Q(e.extraNodes,e.token)){var n=e.extraNodes[e.token];if(B(e),"("===e.token){if(t=[],_(e),B(e),")"!==e.token){t.push(q(e));while(","===e.token)B(e),t.push(q(e))}if(")"!==e.token)throw ke(e,"Parenthesis ) expected");L(e),B(e)}return new n(t)}return de(e)}function de(e){var t,r;return e.tokenType===j.SYMBOL||e.tokenType===j.DELIMITER&&e.token in x?(r=e.token,B(e),t=Q(k,r)?new u(k[r]):-1!==E.indexOf(r)?new u(n(r,"number")):new v(r),t=fe(e,t),t):me(e)}function fe(e,t,n){var r;while(("("===e.token||"["===e.token||"."===e.token)&&(!n||-1!==n.indexOf(e.token)))if(r=[],"("===e.token){if(!R(t)&&!V(t))return t;if(_(e),B(e),")"!==e.token){r.push(q(e));while(","===e.token)B(e),r.push(q(e))}if(")"!==e.token)throw ke(e,"Parenthesis ) expected");L(e),B(e),t=new d(t,r)}else if("["===e.token){if(_(e),B(e),"]"!==e.token){r.push(q(e));while(","===e.token)B(e),r.push(q(e))}if("]"!==e.token)throw ke(e,"Parenthesis ] expected");L(e),B(e),t=new o(t,new f(r))}else{if(B(e),e.tokenType!==j.SYMBOL)throw ke(e,"Property name expected after dot");r.push(new u(e.token)),B(e);var i=!0;t=new o(t,new f(r,i))}return t}function me(e){var t,n;return'"'===e.token?(n=he(e),t=new u(n),t=fe(e,t),t):ge(e)}function he(e){var t="";while(""!==A(e)&&'"'!==A(e))"\\"===A(e)&&(t+=A(e),T(e)),t+=A(e),T(e);if(B(e),'"'!==e.token)throw ke(e,'End of string " expected');return B(e),JSON.parse('"'+t+'"')}function ge(e){var t,n;return"'"===e.token?(n=be(e),t=new u(n),t=fe(e,t),t):ye(e)}function be(e){var t="";while(""!==A(e)&&"'"!==A(e))"\\"===A(e)&&(t+=A(e),T(e)),t+=A(e),T(e);if(B(e),"'"!==e.token)throw ke(e,"End of string ' expected");return B(e),JSON.parse('"'+t+'"')}function ye(e){var t,n,r,o;if("["===e.token){if(_(e),B(e),"]"!==e.token){var a=ve(e);if(";"===e.token){r=1,n=[a];while(";"===e.token)B(e),n[r]=ve(e),r++;if("]"!==e.token)throw ke(e,"End of matrix ] expected");L(e),B(e),o=n[0].items.length;for(var s=1;s<r;s++)if(n[s].items.length!==o)throw Ee(e,"Column dimensions mismatch ("+n[s].items.length+" !== "+o+")");t=new i(n)}else{if("]"!==e.token)throw ke(e,"End of matrix ] expected");L(e),B(e),t=a}}else L(e),B(e),t=new i([]);return fe(e,t)}return Oe(e)}function ve(e){var t=[q(e)],n=1;while(","===e.token)B(e),t[n]=q(e),n++;return new i(t)}function Oe(e){if("{"===e.token){var t;_(e);var n={};do{if(B(e),"}"!==e.token){if('"'===e.token)t=he(e);else if("'"===e.token)t=be(e);else{if(!(e.tokenType===j.SYMBOL||e.tokenType===j.DELIMITER&&e.token in x))throw ke(e,"Symbol or string expected as object key");t=e.token,B(e)}if(":"!==e.token)throw ke(e,"Colon : expected after object key");B(e),n[t]=q(e)}}while(","===e.token);if("}"!==e.token)throw ke(e,"Comma , or bracket } expected after object value");L(e),B(e);var r=new m(n);return r=fe(e,r),r}return we(e)}function we(e){var t;return e.tokenType===j.NUMBER?(t=e.token,B(e),new u(n(t,r.number))):je(e)}function je(e){var t;if("("===e.token){if(_(e),B(e),t=q(e),")"!==e.token)throw ke(e,"Parenthesis ) expected");return L(e),B(e),t=new g(t),t=fe(e,t),t}return Ne(e)}function Ne(e){throw""===e.token?ke(e,"Unexpected end of expression"):ke(e,"Value expected")}function xe(e){return e.index-e.token.length+1}function ke(e,t){var n=xe(e),r=new SyntaxError(t+" (char "+n+")");return r.char=n,r}function Ee(e,t){var n=xe(e),r=new SyntaxError(t+" (char "+n+")");return r.char=n,r}return O.isAlpha=function(e,t,n){return O.isValidLatinOrGreek(e)||O.isValidMathSymbol(e,n)||O.isValidMathSymbol(t,e)},O.isValidLatinOrGreek=function(e){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(e)},O.isValidMathSymbol=function(e,t){return/^[\uD835]$/.test(e)&&/^[\uDC00-\uDFFF]$/.test(t)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(t)},O.isWhitespace=function(e,t){return" "===e||"\t"===e||"\n"===e&&t>0},O.isDecimalMark=function(e,t){return"."===e&&"/"!==t&&"*"!==t&&"^"!==t},O.isDigitDot=function(e){return e>="0"&&e<="9"||"."===e},O.isDigit=function(e){return e>="0"&&e<="9"},O.isHexDigit=function(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"},O}),fi={AccessorNodeDependencies:hr,ArrayNodeDependencies:vr,AssignmentNodeDependencies:Vr,BlockNodeDependencies:Fr,ConditionalNodeDependencies:Ur,ConstantNodeDependencies:eo,FunctionAssignmentNodeDependencies:ho,FunctionNodeDependencies:xo,IndexNodeDependencies:Mo,ObjectNodeDependencies:$o,OperatorNodeDependencies:Io,ParenthesisNodeDependencies:qo,RangeNodeDependencies:Go,RelationalNodeDependencies:Xo,SymbolNodeDependencies:vo,numericDependencies:ci,typedDependencies:uo,createParse:di},mi="evaluate",hi=["typed","parse"],gi=Je(mi,hi,e=>{var{typed:t,parse:n}=e;return t(mi,{string:function(e){var t=yt();return n(e).compile().evaluate(t)},"string, Map | Object":function(e,t){return n(e).compile().evaluate(t)},"Array | Matrix":function(e){var t=yt();return Qo(e,(function(e){return n(e).compile().evaluate(t)}))},"Array | Matrix, Map | Object":function(e,t){return Qo(e,(function(e){return n(e).compile().evaluate(t)}))}})}),bi={parseDependencies:fi,typedDependencies:uo,createEvaluate:gi},yi=at({evaluateDependencies:bi});yi.import({add:function(e,t){return e+t},subtract:function(e,t){return e-t},multiply:function(e,t){return e*t},divide:function(e,t){return e/t},equal:function(e,t){return e==t},unequal:function(e,t){return e!=t},not:function(e){return!e},and:function(e,t){return e&&t},or:function(e,t){return e||t},largerEq:function(e,t){return e>=t},larger:function(e,t){return e>t},smallerEq:function(e,t){return e<=t},smaller:function(e,t){return e<t}},{override:!0});var vi=yi,Oi=n("8bbf"),wi={class:"form-group row matomo-form-field"},ji={key:0,class:"col s12"},Ni={key:0,class:"form-help"},xi={key:0,class:"inline-help",ref:"inlineHelp"},ki=Object(Oi["createElementVNode"])("br",null,null,-1);function Ei(e,t,n,r,o,i){return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",wi,[e.formField.introduction?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("h3",ji,Object(Oi["toDisplayString"])(e.formField.introduction),1)):Object(Oi["createCommentVNode"])("",!0),Object(Oi["createElementVNode"])("div",{class:Object(Oi["normalizeClass"])(["col s12",{"input-field":"checkbox"!==e.formField.uiControl&&"radio"!==e.formField.uiControl,"file-field":"file"===e.formField.uiControl,m6:!e.formField.fullWidth}])},[(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(Object(Oi["resolveDynamicComponent"])(e.childComponent),Object(Oi["mergeProps"])(Object.assign(Object.assign({formField:e.formField},e.formField),{},{modelValue:e.processedModelValue,modelModifiers:e.modelModifiers,availableOptions:e.availableOptions},e.extraChildComponentParams),{"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)})}),null,16))],2),Object(Oi["createElementVNode"])("div",{class:Object(Oi["normalizeClass"])(["col s12",{m6:!e.formField.fullWidth}])},[e.showFormHelp?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Ni,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("div",{class:"form-description"},Object(Oi["toDisplayString"])(e.formField.description),513),[[Oi["vShow"],e.formField.description]]),e.formField.inlineHelp||e.hasInlineHelpSlot?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",xi,[e.inlineHelpComponent?(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(Object(Oi["resolveDynamicComponent"])(e.inlineHelpComponent),Object(Oi["normalizeProps"])(Object(Oi["mergeProps"])({key:0},e.inlineHelpBind)),null,16)):Object(Oi["createCommentVNode"])("",!0),Object(Oi["renderSlot"])(e.$slots,"inline-help")],512)):Object(Oi["createCommentVNode"])("",!0),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("span",null,[ki,Object(Oi["createTextVNode"])(" "+Object(Oi["toDisplayString"])(e.translate("General_Default"))+": ",1),Object(Oi["createElementVNode"])("span",null,Object(Oi["toDisplayString"])(e.defaultValuePrettyTruncated),1)],512),[[Oi["vShow"],e.showDefaultValue]])])):Object(Oi["createCommentVNode"])("",!0)],2)],512)),[[Oi["vShow"],e.showField]])}var Ci=n("19dc"),Si={class:"checkbox"},Vi=["checked","id","name"],Ai=["innerHTML"];function Ti(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Si,[Object(Oi["createElementVNode"])("label",null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},e.uiControlAttributes,{value:1,checked:e.isChecked,type:"checkbox",id:e.name,name:e.name}),null,16,Vi),Object(Oi["createElementVNode"])("span",{innerHTML:e.$sanitize(e.title)},null,8,Ai)])])}var Mi=Object(Oi["defineComponent"])({props:{modelValue:[Boolean,Number,String],modelModifiers:Object,uiControlAttributes:Object,name:String,title:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){var t=e.target.checked;if(this.modelValue!==t){var n;if(null===(n=this.modelModifiers)||void 0===n||!n.abortable)return void this.$emit("update:modelValue",t);var r={value:t,abort:function(){e.target.checked=!t}};this.$emit("update:modelValue",r)}}},computed:{isChecked:function(){return!!this.modelValue&&"0"!==this.modelValue}}});Mi.render=Ti;var Pi=Mi,Di={ref:"root"},Bi=["value","checked","onChange","id","name"];function $i(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Di,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(Oi["toDisplayString"])(e.title),513),[[Oi["vShow"],e.title]]),(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.availableOptions,(function(t,n){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("p",{key:n,class:"checkbox"},[Object(Oi["createElementVNode"])("label",null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({value:t.key,checked:!!e.checkboxStates[n],onChange:function(t){return e.onChange(n)}},e.uiControlAttributes,{type:"checkbox",id:"".concat(e.name).concat(t.key),name:t.name}),null,16,Bi),Object(Oi["createElementVNode"])("span",null,Object(Oi["toDisplayString"])(t.value),1),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("span",{class:"form-description"},Object(Oi["toDisplayString"])(t.description),513),[[Oi["vShow"],t.description]])])])})),128))],512)}function Fi(e){return Ui(e)||Ii(e)||Li(e)||_i()}function _i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Li(e,t){if(e){if("string"===typeof e)return Hi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hi(e,t):void 0}}function Ii(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ui(e){if(Array.isArray(e))return Hi(e)}function Hi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ri(e,t){return(e||[]).map((function(e){return t&&-1!==t.indexOf(e.key)}))}var qi=Object(Oi["defineComponent"])({props:{modelValue:Array,modelModifiers:Object,name:String,title:String,availableOptions:Array,uiControlAttributes:Object,type:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{checkboxStates:function(){return Ri(this.availableOptions,this.modelValue)}},mounted:function(){window.Materialize.updateTextFields()},methods:{onChange:function(e){var t,n=this,r=Fi(this.checkboxStates);r[e]=!r[e];var o=this.availableOptions||{},i=[];if(Object.values(o).forEach((function(e,t){r[t]&&i.push(e.key)})),null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var a={value:i,abort:function(){var t=n.$refs.root.querySelectorAll("input").item(e);t.checked=!t.checked}};this.$emit("update:modelValue",a)}else this.$emit("update:modelValue",i)}}});qi.render=$i;var zi=qi,Wi={class:"expandableSelector"},Ji=Object(Oi["createElementVNode"])("svg",{class:"caret",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},[Object(Oi["createElementVNode"])("path",{d:"M7 10l5 5 5-5z"}),Object(Oi["createElementVNode"])("path",{d:"M0 0h24v24H0z",fill:"none"})],-1),Gi=["value"],Ki={class:"expandableList z-depth-2"},Yi={class:"searchContainer"},Zi={class:"collection firstLevel"},Xi=["onClick"],Qi={class:"collection secondLevel"},ea=["onClick"],ta={class:"primary-content"},na=["title"];function ra(e,t,n,r,o,i){var a=Object(Oi["resolveDirective"])("focus-if"),s=Object(Oi["resolveDirective"])("focus-anywhere-but-here");return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Wi,[Object(Oi["createElementVNode"])("div",{onClick:t[0]||(t[0]=function(t){return e.showSelect=!e.showSelect}),class:"select-wrapper"},[Ji,Object(Oi["createElementVNode"])("input",{type:"text",class:"select-dropdown",readonly:"readonly",value:e.modelValueText},null,8,Gi)]),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("div",Ki,[Object(Oi["createElementVNode"])("div",Yi,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("input",{type:"text",placeholder:"Search","onUpdate:modelValue":t[1]||(t[1]=function(t){return e.searchTerm=t}),class:"expandableSearch browser-default"},null,512),[[Oi["vModelText"],e.searchTerm],[a,e.showSelect]])]),Object(Oi["createElementVNode"])("ul",Zi,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.availableOptions,(function(t,n){return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("li",{class:"collection-item",key:n},[Object(Oi["createElementVNode"])("h4",{class:"expandableListCategory",onClick:function(n){return e.onCategoryClicked(t)}},[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(t.group)+" ",1),Object(Oi["createElementVNode"])("span",{class:Object(Oi["normalizeClass"])(["secondary-content",{"icon-arrow-right":e.showCategory!==t.group,"icon-arrow-bottom":e.showCategory===t.group}])},null,2)],8,Xi),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("ul",Qi,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(t.values.filter((function(t){return-1!==t.value.toLowerCase().indexOf(e.searchTerm.toLowerCase())})),(function(t){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("li",{class:"expandableListItem collection-item valign-wrapper",key:t.key,onClick:function(n){return e.onValueClicked(t)}},[Object(Oi["createElementVNode"])("span",ta,Object(Oi["toDisplayString"])(t.value),1),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("span",{title:t.tooltip,class:"secondary-content icon-help"},null,8,na),[[Oi["vShow"],t.tooltip]])],8,ea)})),128))],512),[[Oi["vShow"],e.showCategory===t.group||e.searchTerm]])],512)),[[Oi["vShow"],t.values.filter((function(t){return-1!==t.value.toLowerCase().indexOf(e.searchTerm.toLowerCase())})).length]])})),128))])],512),[[Oi["vShow"],e.showSelect]])],512)),[[s,{blur:e.onBlur}]])}function oa(e){var t=[];if(!e)return t;var n={};return Object.values(e).forEach((function(e){var t=e,r=t.group||"";r in n&&n[r]||(n[r]={values:[],group:r});var o={key:t.key,value:t.value};"tooltip"in t&&t.tooltip&&(o.tooltip=t.tooltip),n[r].values.push(o)})),Object.values(n).forEach((function(e){e.values.length&&t.push(e)})),t}var ia=Object(Oi["defineComponent"])({props:{modelValue:[Number,String],modelModifiers:Object,availableOptions:Array,title:String},directives:{FocusAnywhereButHere:Ci["FocusAnywhereButHere"],FocusIf:Ci["FocusIf"]},inheritAttrs:!1,emits:["update:modelValue"],data:function(){return{showSelect:!1,searchTerm:"",showCategory:""}},computed:{modelValueText:function(){if(this.title)return this.title;var e,t=this.modelValue,n=this.availableOptions||[];return n.some((function(n){return e=n.values.find((function(e){return e.key===t})),e})),e?e.value?"".concat(e.value):"":t?"".concat(t):""}},methods:{onBlur:function(){this.showSelect=!1},onCategoryClicked:function(e){this.showCategory===e.group?this.showCategory="":this.showCategory=e.group},onValueClicked:function(e){var t;if(this.showSelect=!1,null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var n={value:e.key,abort:function(){}};this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",e.key)}}});ia.render=ra;var aa=ia,sa=["for","innerHTML"];function la(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("FieldArray");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,sa),Object(Oi["createVNode"])(a,{name:e.name,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onValueUpdate(t)}),"model-modifiers":e.modelModifiers,field:e.uiControlAttributes.field},null,8,["name","model-value","model-modifiers","field"])])}var ca=Object(Oi["defineComponent"])({components:{FieldArray:Ci["FieldArray"]},props:{name:String,title:String,modelValue:null,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],methods:{onValueUpdate:function(e){this.$emit("update:modelValue",e)}}});ca.render=la;var ua=ca,pa={class:"btn"},da=["for","innerHTML"],fa=["name","id"],ma={class:"file-path-wrapper"},ha=["value"];function ga(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("div",pa,[Object(Oi["createElementVNode"])("span",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,da),Object(Oi["createElementVNode"])("input",{ref:"fileInput",name:e.name,type:"file",id:e.name,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},null,40,fa)]),Object(Oi["createElementVNode"])("div",ma,[Object(Oi["createElementVNode"])("input",{class:"file-path validate",value:e.filePath,type:"text"},null,8,ha)])])}var ba=Object(Oi["defineComponent"])({props:{name:String,title:String,modelValue:[String,File],modelModifiers:Object},inheritAttrs:!1,emits:["update:modelValue"],watch:{modelValue:function(e){if(!e||""===e){var t=this.$refs.fileInput;t.value=""}}},methods:{onChange:function(e){var t,n=e.target.files;if(n){var r=n.item(0);if(null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var o={value:r,abort:function(){}};this.$emit("update:modelValue",o)}else this.$emit("update:modelValue",r)}}},computed:{filePath:function(){if(this.modelValue instanceof File)return this.$refs.fileInput.value}}});ba.render=ga;var ya=ba,va=["type","name","value"];function Oa(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("input",{type:e.uiControl,name:e.name,value:e.modelValue,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},null,40,va)])}var wa=Object(Oi["defineComponent"])({props:{modelValue:null,modelModifiers:Object,uiControl:String,name:String},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){this.$emit("update:modelValue",e.target.value)}}});wa.render=Oa;var ja=wa,Na={class:"fieldMultiTuple"},xa=["for","innerHTML"];function ka(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("MultiPairField");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Na,[Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,xa),Object(Oi["createVNode"])(a,{name:e.name,"model-value":e.modelValue,"onUpdate:modelValue":e.onUpdateValue,"model-modifiers":e.modelModifiers,field1:e.uiControlAttributes.field1,field2:e.uiControlAttributes.field2,field3:e.uiControlAttributes.field3,field4:e.uiControlAttributes.field4},null,8,["name","model-value","onUpdate:modelValue","model-modifiers","field1","field2","field3","field4"])])}var Ea=Object(Oi["defineComponent"])({props:{name:String,title:String,modelValue:null,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{MultiPairField:Ci["MultiPairField"]},emits:["update:modelValue"],methods:{onUpdateValue:function(e){this.$emit("update:modelValue",e)}}});Ea.render=ka;var Ca=Ea,Sa=["type","id","name","value"],Va=["for","innerHTML"];function Aa(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,id:e.name,name:e.name,value:e.modelValueFormatted,onKeydown:t[0]||(t[0]=function(t){return e.onChange(t)}),onChange:t[1]||(t[1]=function(t){return e.onChange(t)})},e.uiControlAttributes),null,16,Sa),Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Va)],64)}var Ta=Object(Oi["defineComponent"])({props:{uiControl:String,name:String,title:String,modelValue:[Number,String],modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onChange=Object(Ci["debounce"])(this.onChange.bind(this),50)},methods:{onChange:function(e){var t=this,n=parseFloat(e.target.value);if(n!==this.modelValue){var r;if(null===(r=this.modelModifiers)||void 0===r||!r.abortable)return void this.$emit("update:modelValue",n);var o={value:n,abort:function(){e.target.value!==t.modelValueFormatted&&(e.target.value=t.modelValueFormatted)}};this.$emit("update:modelValue",o)}}},mounted:function(){window.Materialize.updateTextFields()},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}},computed:{modelValueFormatted:function(){return(this.modelValue||"").toString()}}});Ta.render=Aa;var Ma=Ta,Pa={ref:"root"},Da=["value","id","name","disabled","checked"];function Ba(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Pa,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("label",{class:"fieldRadioTitle"},Object(Oi["toDisplayString"])(e.title),513),[[Oi["vShow"],e.title]]),(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.availableOptions||[],(function(n){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("p",{key:n.key,class:"radio"},[Object(Oi["createElementVNode"])("label",null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({value:n.key,onChange:t[0]||(t[0]=function(t){return e.onChange(t)}),type:"radio",id:"".concat(e.name).concat(n.key),name:e.name,disabled:n.disabled||e.disabled},e.uiControlAttributes,{checked:e.modelValue===n.key||"".concat(e.modelValue)===n.key}),null,16,Da),Object(Oi["createElementVNode"])("span",null,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(n.value)+" ",1),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("span",{class:"form-description"},Object(Oi["toDisplayString"])(n.description),513),[[Oi["vShow"],n.description]])])])])})),128))],512)}var $a=Object(Oi["defineComponent"])({props:{title:String,availableOptions:Array,name:String,disabled:Boolean,uiControlAttributes:Object,modelValue:[String,Number],modelModifiers:Object},inheritAttrs:!1,emits:["update:modelValue"],methods:{onChange:function(e){var t,n=this;if(null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var r=function(){n.$refs.root.querySelectorAll("input").forEach((function(e,t){var r;if(null!==(r=n.availableOptions)&&void 0!==r&&r[t]){var o=n.availableOptions[t].key;e.checked=n.modelValue===o||"".concat(n.modelValue)===o}}))},o={value:e.target.value,abort:function(){r()}};this.$emit("update:modelValue",o)}else this.$emit("update:modelValue",e.target.value)}}});$a.render=Ba;var Fa=$a;function _a(e,t){return Ra(e)||Ha(e,t)||Ia(e,t)||La()}function La(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ia(e,t){if(e){if("string"===typeof e)return Ua(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ua(e,t):void 0}}function Ua(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ha(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){s=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(s)throw o}}return i}}function Ra(e){if(Array.isArray(e))return e}var qa={key:0,class:"matomo-field-select"},za=["multiple","name"],Wa=["label"],Ja=["value","selected","disabled"],Ga=["for","innerHTML"],Ka={key:1,class:"matomo-field-select"},Ya=["multiple","name"],Za=["value","selected","disabled"],Xa=["for","innerHTML"];function Qa(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[e.groupedOptions?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",qa,[Object(Oi["createElementVNode"])("select",Object(Oi["mergeProps"])({ref:"select",class:"grouped",multiple:e.multiple,name:e.name,onChange:t[0]||(t[0]=function(t){return e.onChange(t)})},e.uiControlAttributes),[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.groupedOptions,(function(t){var n=_a(t,2),r=n[0],o=n[1];return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("optgroup",{key:r,label:r},[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(o,(function(t){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("option",{key:t.key,value:"string:".concat(t.key),selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(Oi["toDisplayString"])(t.value),9,Ja)})),128))],8,Wa)})),128))],16,za),Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Ga)])):Object(Oi["createCommentVNode"])("",!0),!e.groupedOptions&&e.options?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Ka,[Object(Oi["createElementVNode"])("select",Object(Oi["mergeProps"])({class:"ungrouped",ref:"select",multiple:e.multiple,name:e.name,onChange:t[1]||(t[1]=function(t){return e.onChange(t)})},e.uiControlAttributes),[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.options,(function(t){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("option",{key:t.key,value:"string:".concat(t.key),selected:e.multiple?e.modelValue&&-1!==e.modelValue.indexOf(t.key):e.modelValue===t.key,disabled:t.disabled},Object(Oi["toDisplayString"])(t.value),9,Za)})),128))],16,Ya),Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Xa)])):Object(Oi["createCommentVNode"])("",!0)],64)}function es(e){return rs(e)||ns(e)||as(e)||ts()}function ts(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ns(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function rs(e){if(Array.isArray(e))return ss(e)}function os(e,t){return cs(e)||ls(e,t)||as(e,t)||is()}function is(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function as(e,t){if(e){if("string"===typeof e)return ss(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ss(e,t):void 0}}function ss(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ls(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){s=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(s)throw o}}return i}}function cs(e){if(Array.isArray(e))return e}function us(e){return us="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},us(e)}function ps(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0;if(e){var i=window.$(e);if(Array.from(e.options).forEach((function(e){e.selected=o?!!t&&-1!==t.indexOf(e.value.replace(/^string:/,"")):"string:".concat(t)===e.value})),i.formSelect(r),n){var a=i.closest(".select-wrapper").find("input");a.attr("placeholder",n)}}}function ds(e){return!Array.isArray(e)&&"object"===us(e)&&Object.values(e).some((function(e){return"object"===us(e)}))}function fs(e,t){return e.some((function(e){return e.key===t}))}function ms(e,t,n){if(!e)return[];var r=!0,o=e;ds(o)||(o={"":e},r=!1);var i=[];return Object.entries(o).forEach((function(e){var n=os(e,2),o=n[0],a=n[1];Object.entries(a).forEach((function(e){var n=os(e,2),a=n[0],s=n[1];if(s&&"object"===us(s)&&"undefined"!==typeof s.key)i.push(s);else{var l=a;"integer"===t&&"string"===typeof a&&(l=parseInt(a,10)),i.push({group:r?o:void 0,key:l,value:s})}}))})),null!==n&&void 0!==n&&n.placeholder&&!fs(i,"")?[{key:"",value:""}].concat(i):i}function hs(e){return"string"===typeof e?e.replace(/^string:/,""):e}var gs=Object(Oi["defineComponent"])({props:{modelValue:null,modelModifiers:Object,multiple:Boolean,name:String,title:String,availableOptions:Array,uiControlAttributes:Object,uiControlOptions:Object},inheritAttrs:!1,emits:["update:modelValue"],computed:{options:function(){var e=this.availableOptions;return!e||fs(e,"")||"undefined"!==typeof this.modelValue&&null!==this.modelValue&&""!==this.modelValue?e:[{key:"",value:this.modelValue,group:this.hasGroups?"":void 0}].concat(es(e))},hasGroups:function(){var e=this.availableOptions;return e&&e[0]&&"undefined"!==typeof e[0].group},groupedOptions:function(){var e=this.options;if(!this.hasGroups||!e)return null;var t={};e.forEach((function(e){var n=e.group;t[n]=t[n]||[],t[n].push(e)}));var n=Object.entries(t);return n.sort((function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0})),n}},methods:{onChange:function(e){var t,n,r=this,o=e.target;if(this.multiple?(n=Array.from(o.options).filter((function(e){return e.selected})).map((function(e){return e.value})),n=n.map((function(e){return hs(e)}))):(n=o.value,n=hs(n)),null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var i={value:n,abort:function(){r.onModelValueChange(r.modelValue)}};this.$emit("update:modelValue",i)}else this.$emit("update:modelValue",n)},onModelValueChange:function(e){var t=this;window.$(this.$refs.select).val(e),setTimeout((function(){var n;ps(t.$refs.select,e,null===(n=t.uiControlAttributes)||void 0===n?void 0:n.placeholder,t.uiControlOptions,t.multiple)}))}},watch:{modelValue:function(e){this.onModelValueChange(e)},"uiControlAttributes.disabled":{handler:function(e,t){var n=this;setTimeout((function(){var r;e!==t&&ps(n.$refs.select,n.modelValue,null===(r=n.uiControlAttributes)||void 0===r?void 0:r.placeholder,n.uiControlOptions,n.multiple)}))}},availableOptions:function(e,t){var n=this;e!==t&&setTimeout((function(){var e;ps(n.$refs.select,n.modelValue,null===(e=n.uiControlAttributes)||void 0===e?void 0:e.placeholder,n.uiControlOptions,n.multiple)}))}},mounted:function(){var e=this;setTimeout((function(){var t;ps(e.$refs.select,e.modelValue,null===(t=e.uiControlAttributes)||void 0===t?void 0:t.placeholder,e.uiControlOptions,e.multiple)}))}});gs.render=Qa;var bs=gs,ys=["for","innerHTML"],vs={class:"sites_autocomplete"};function Os(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("SiteSelector");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("label",{for:e.name,class:"siteSelectorLabel",innerHTML:e.$sanitize(e.title)},null,8,ys),Object(Oi["createElementVNode"])("div",vs,[Object(Oi["createVNode"])(a,Object(Oi["mergeProps"])({"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)}),id:e.name,"show-all-sites-item":e.uiControlAttributes.showAllSitesItem||!1,"switch-site-on-select":!1,"show-selected-site":!0,"only-sites-with-admin-access":e.uiControlAttributes.onlySitesWithAdminAccess||!1},e.uiControlAttributes),null,16,["model-value","id","show-all-sites-item","only-sites-with-admin-access"])])])}var ws=Object(Oi["defineComponent"])({props:{name:String,title:String,modelValue:Object,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,components:{SiteSelector:Ci["SiteSelector"]},emits:["update:modelValue"],methods:{onChange:function(e){var t;if(null!==(t=this.modelModifiers)&&void 0!==t&&t.abortable){var n={value:e,abort:function(){}};this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",e)}}});ws.render=Os;var js=ws,Ns=["type","id","name","value","spellcheck"],xs=["for","innerHTML"];function ks(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,id:e.name,name:e.name,value:e.modelValueText,spellcheck:"password"!==e.uiControl&&null,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)})},e.uiControlAttributes),null,16,Ns),Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,xs)],64)}var Es=Object(Oi["defineComponent"])({props:{title:String,name:String,uiControlAttributes:Object,modelValue:[String,Number],modelModifiers:Object,uiControl:String},inheritAttrs:!1,emits:["update:modelValue"],computed:{modelValueText:function(){return"undefined"===typeof this.modelValue||null===this.modelValue?"":this.modelValue.toString()}},created:function(){this.onKeydown=Object(Ci["debounce"])(this.onKeydown.bind(this),50)},mounted:function(){setTimeout((function(){window.Materialize.updateTextFields()}))},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}},methods:{onKeydown:function(e){var t=this,n=e.target.value;if(this.modelValue!==n){var r;if(null===(r=this.modelModifiers)||void 0===r||!r.abortable)return void this.$emit("update:modelValue",n);var o={value:n,abort:function(){e.target.value!==t.modelValueText&&(e.target.value=t.modelValueText)}};this.$emit("update:modelValue",o)}}}});Es.render=ks;var Cs=Es,Ss=["for","innerHTML"],Vs=["type","name","value"];function As(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Ss),Object(Oi["createElementVNode"])("input",Object(Oi["mergeProps"])({class:"control_".concat(e.uiControl),type:e.uiControl,name:e.name,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),value:e.concattedValues},e.uiControlAttributes),null,16,Vs)])}var Ts=Object(Oi["defineComponent"])({props:{name:String,title:String,uiControl:String,modelValue:Array,modelModifiers:Object,uiControlAttributes:Object},inheritAttrs:!1,computed:{concattedValues:function(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(", ")}},emits:["update:modelValue"],created:function(){this.onKeydown=Object(Ci["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=this,n=e.target.value.split(",").map((function(e){return e.trim()}));if(n.join(", ")!==this.concattedValues){var r;if(null===(r=this.modelModifiers)||void 0===r||!r.abortable)return void this.$emit("update:modelValue",n);var o={value:n,abort:function(){e.target.value!==t.concattedValues&&(e.target.value=t.concattedValues)}};this.$emit("update:modelValue",o)}}}});Ts.render=As;var Ms=Ts,Ps=["name","id","value"],Ds=["for","innerHTML"];function Bs(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[Object(Oi["createElementVNode"])("textarea",Object(Oi["mergeProps"])({name:e.name},e.uiControlAttributes,{id:e.name,value:e.modelValueText,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),class:"materialize-textarea",ref:"textarea"}),null,16,Ps),Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Ds)],64)}var $s=Object(Oi["defineComponent"])({props:{name:String,uiControlAttributes:Object,modelValue:String,modelModifiers:Object,title:String},inheritAttrs:!1,emits:["update:modelValue"],created:function(){this.onKeydown=Object(Ci["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=this,n=e.target.value;if(n!==this.modelValue){var r;if(null===(r=this.modelModifiers)||void 0===r||!r.abortable)return void this.$emit("update:modelValue",n);var o={value:n,abort:function(){e.target.value!==t.modelValue&&(e.target.value=t.modelValueText)}};this.$emit("update:modelValue",o)}}},computed:{modelValueText:function(){return this.modelValue||""}},watch:{modelValue:function(){var e=this;setTimeout((function(){window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}},mounted:function(){var e=this;setTimeout((function(){window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}});$s.render=Bs;var Fs=$s,_s=["for","innerHTML"],Ls=["name","value"];function Is(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,_s),Object(Oi["createElementVNode"])("textarea",Object(Oi["mergeProps"])({ref:"textarea",name:e.name},e.uiControlAttributes,{value:e.concattedValue,onKeydown:t[0]||(t[0]=function(t){return e.onKeydown(t)}),onChange:t[1]||(t[1]=function(t){return e.onKeydown(t)}),class:"materialize-textarea"}),null,16,Ls)])}var Us="\n",Hs=Object(Oi["defineComponent"])({props:{name:String,title:String,uiControlAttributes:Object,modelValue:[Array,String],modelModifiers:Object},inheritAttrs:!1,emits:["update:modelValue"],computed:{concattedValue:function(){return"string"===typeof this.modelValue?this.modelValue:(this.modelValue||[]).join(Us)}},created:function(){this.onKeydown=Object(Ci["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=this,n=e.target.value.split(Us);if(n.join(Us)!==this.concattedValue){var r;if(null===(r=this.modelModifiers)||void 0===r||!r.abortable)return void this.$emit("update:modelValue",n);var o={value:n,abort:function(){e.target.value!==t.concattedValue&&(e.target.value=t.concattedValue)}};this.$emit("update:modelValue",o)}}},watch:{modelValue:function(e,t){var n=this;e!==t&&setTimeout((function(){n.$refs.textarea&&window.Materialize.textareaAutoResize(n.$refs.textarea),window.Materialize.updateTextFields()}))}},mounted:function(){var e=this;setTimeout((function(){e.$refs.textarea&&window.Materialize.textareaAutoResize(e.$refs.textarea),window.Materialize.updateTextFields()}))}});Hs.render=Is;var Rs=Hs;function qs(e){return qs="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qs(e)}function zs(e,t){return Ys(e)||Ks(e,t)||Js(e,t)||Ws()}function Ws(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Js(e,t){if(e){if("string"===typeof e)return Gs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gs(e,t):void 0}}function Gs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ks(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){s=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(s)throw o}}return i}}function Ys(e){if(Array.isArray(e))return e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- */function Zs(e,t){if(!e)return[];var n=[];return Object.entries(e).forEach((function(e){var r=zs(e,2),o=r[0],i=r[1];if(i&&"object"===qs(i)&&"undefined"!==typeof i.key)n.push(i);else{var a=o;"integer"===t&&"string"===typeof o&&(a=parseInt(a,10)),n.push({key:a,value:i})}})),n}function Xs(e){return Xs="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xs(e)}var Qs=["password","url","search","email"],el=["textarea","checkbox","text"],tl={checkbox:"FieldCheckbox","expandable-select":"FieldExpandableSelect","field-array":"FieldFieldArray",file:"FieldFile",hidden:"FieldHidden",multiselect:"FieldSelect",multituple:"FieldMultituple",number:"FieldNumber",radio:"FieldRadio",select:"FieldSelect",site:"FieldSite",text:"FieldText",textarea:"FieldTextarea"},nl={FieldSelect:ms,FieldCheckboxArray:Zs,FieldRadio:Zs,FieldExpandableSelect:oa},rl=Object(Oi["defineComponent"])({props:{modelValue:null,modelModifiers:Object,formField:{type:Object,required:!0}},emits:["update:modelValue"],components:{FieldCheckbox:Pi,FieldCheckboxArray:zi,FieldExpandableSelect:aa,FieldFieldArray:ua,FieldFile:ya,FieldHidden:ja,FieldMultituple:Ca,FieldNumber:Ma,FieldRadio:Fa,FieldSelect:bs,FieldSite:js,FieldText:Cs,FieldTextArray:Ms,FieldTextarea:Fs,FieldTextareaArray:Rs},setup:function(e){var t=Object(Oi["ref"])(null),n=function(e){var n;e&&t.value&&"function"!==typeof e.render&&(n="string"===typeof e?0===e.indexOf("#")?window.$(e):window.vueSanitize(e):e,window.$(t.value).html("").append(n))};return Object(Oi["watch"])((function(){return e.formField.inlineHelp}),n),Object(Oi["onMounted"])((function(){n(e.formField.inlineHelp)})),{inlineHelp:t}},computed:{inlineHelpComponent:function(){var e=this.formField,t=e.inlineHelp;if(t&&"function"===typeof t.render)return e.inlineHelp},inlineHelpBind:function(){return this.inlineHelpComponent?this.formField.inlineHelpBind:void 0},childComponent:function(){var e=this.formField;if(e.component){var t=e.component;if(e.component.plugin){var n=e.component,r=n.plugin,o=n.name;if(!r||!o)throw new Error("Invalid component property given to FormField directive, must be {plugin: '...',name: '...'}");t=Object(Ci["useExternalPluginComponent"])(r,o)}return Object(Oi["markRaw"])(t)}var i=e.uiControl,a=tl[i];return-1!==Qs.indexOf(i)&&(a="FieldText"),"array"===this.formField.type&&-1!==el.indexOf(i)&&(a="".concat(a,"Array")),a},extraChildComponentParams:function(){return"multiselect"===this.formField.uiControl?{multiple:!0}:{}},showFormHelp:function(){return this.formField.description||this.formField.inlineHelp||this.showDefaultValue||this.hasInlineHelpSlot},showDefaultValue:function(){return this.defaultValuePretty&&"checkbox"!==this.formField.uiControl&&"radio"!==this.formField.uiControl},showField:function(){return!(this.formField&&this.formField.condition&&this.formField.condition instanceof Function)||this.formField.condition()},processedModelValue:function(){var e=this.formField;if("boolean"===e.type){var t=this.modelValue&&this.modelValue>0&&"0"!==this.modelValue;if("checkbox"===e.uiControl)return t;if("radio"===e.uiControl)return t?"1":"0"}return this.modelValue},defaultValue:function(){var e=this.formField.defaultValue;return Array.isArray(e)?e.join(","):e},availableOptions:function(){var e=this.childComponent;if("string"!==typeof e)return null;var t=this.formField;return t.availableValues&&nl[e]?nl[e](t.availableValues,t.type,t.uiControlAttributes):null},defaultValuePretty:function(){var e=this.formField,t=e.defaultValue,n=this.availableOptions;if("string"===typeof t&&t){var r=null;try{r=JSON.parse(t)}catch(i){}if(null!==r&&"object"===Xs(r))return""}if(!Array.isArray(n))return Array.isArray(t)?"":t?"".concat(t):"";var o=[];return Array.isArray(t)||(t=[t]),(n||[]).forEach((function(e){"undefined"!==typeof e.value&&-1!==t.indexOf(e.key)&&o.push(e.value)})),o.join(", ")},defaultValuePrettyTruncated:function(){return this.defaultValuePretty.substring(0,50)},hasInlineHelpSlot:function(){var e,t;if(!this.$slots["inline-help"])return!1;var n=this.$slots["inline-help"]();return!(null===n||void 0===n||null===(e=n[0])||void 0===e||null===(t=e.children)||void 0===t||!t.length)}},methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});rl.render=Ei;var ol=rl;function il(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("FormField");return Object(Oi["openBlock"])(),Object(Oi["createBlock"])(a,{"form-field":e.field,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)}),"model-modifiers":e.modelModifiers},{"inline-help":Object(Oi["withCtx"])((function(){return[Object(Oi["renderSlot"])(e.$slots,"inline-help")]})),_:3},8,["form-field","model-value","model-modifiers"])}var al={multiselect:"array",checkbox:"boolean",site:"object",number:"integer"},sl=Object(Oi["defineComponent"])({props:{modelValue:null,modelModifiers:Object,uicontrol:String,name:String,defaultValue:null,options:[Object,Array],description:String,introduction:String,title:String,inlineHelp:[String,Object],inlineHelpBind:Object,disabled:Boolean,uiControlAttributes:{type:Object,default:function(){return{}}},uiControlOptions:{type:Object,default:function(){return{}}},autocomplete:Boolean,condition:Function,varType:String,autofocus:Boolean,tabindex:Number,fullWidth:Boolean,maxlength:Number,required:Boolean,placeholder:String,rows:Number,min:Number,max:Number,component:null,templateFile:String},emits:["update:modelValue"],components:{FormField:ol},computed:{type:function(){if(this.varType)return this.varType;var e=this.uicontrol;return e&&al[e]?al[e]:"string"},field:function(){return{uiControl:this.uicontrol,type:this.type,name:this.name,defaultValue:this.defaultValue,availableValues:this.options,description:this.description,introduction:this.introduction,inlineHelp:this.inlineHelp,inlineHelpBind:this.inlineHelpBind,title:this.title,component:this.component,templateFile:this.templateFile,uiControlAttributes:Object.assign(Object.assign({},this.uiControlAttributes),{},{disabled:this.disabled,autocomplete:this.autocomplete,tabindex:this.tabindex,autofocus:this.autofocus,rows:this.rows,required:this.required,maxlength:this.maxlength,placeholder:this.placeholder,min:this.min,max:this.max}),fullWidth:this.fullWidth,uiControlOptions:this.uiControlOptions}}},methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});sl.render=il;var ll=sl,cl={class:"pluginSettings",ref:"root"},ul=["id"],pl={class:"card-content"},dl=["id"],fl=["onClick","disabled","value"];function ml(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("GroupedSettings"),s=Object(Oi["resolveComponent"])("ActivityIndicator"),l=Object(Oi["resolveComponent"])("PasswordConfirmation");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",cl,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.settingsPerPlugin,(function(t){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",{class:"card",id:"".concat(t.pluginName,"PluginSettings"),key:"".concat(t.pluginName,"PluginSettings")},[Object(Oi["createElementVNode"])("div",pl,[Object(Oi["createElementVNode"])("h2",{class:"card-title",id:t.pluginName},Object(Oi["toDisplayString"])(t.title),9,dl),Object(Oi["createVNode"])(a,{"group-name":t.pluginName,settings:t.settings,"all-setting-values":e.settingValues,onChange:function(n){return e.settingValues["".concat(t.pluginName,".").concat(n.name)]=n.value}},null,8,["group-name","settings","all-setting-values","onChange"]),Object(Oi["createElementVNode"])("input",{type:"button",onClick:function(n){return e.saveSetting(t.pluginName)},disabled:e.isLoading,class:"pluginsSettingsSubmit btn",value:e.translate("General_Save")},null,8,fl),Object(Oi["createVNode"])(s,{loading:e.isLoading||e.isSaving[t.pluginName]},null,8,["loading"])])],8,ul)})),128)),Object(Oi["createVNode"])(l,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.showPasswordConfirmModal=t}),onConfirmed:e.confirmPassword},{default:Object(Oi["withCtx"])((function(){return[Object(Oi["createElementVNode"])("h2",null,Object(Oi["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])],512)}function hl(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("GroupedSetting");return Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.settings,(function(t){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",{key:"".concat(e.groupPrefix).concat(t.name)},[Object(Oi["createVNode"])(a,{"model-value":e.allSettingValues["".concat(e.groupPrefix).concat(t.name)],"onUpdate:modelValue":function(n){return e.$emit("change",{name:t.name,value:n})},setting:t,"condition-values":e.settingValues},null,8,["model-value","onUpdate:modelValue","setting","condition-values"])])})),128)}function gl(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("FormField");return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createVNode"])(a,{"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.changeValue(t)}),"form-field":e.setting},null,8,["model-value","form-field"])],512)),[[Oi["vShow"],e.showField]])}var bl=Object(Oi["defineComponent"])({props:{setting:{type:Object,required:!0},modelValue:null,conditionValues:{type:Object,required:!0}},components:{FormField:ol},emits:["update:modelValue"],computed:{showField:function(){var e=this.setting.condition;if(!e)return!0;e=e.replace(/&&/g," and "),e=e.replace(/\|\|/g," or "),e=e.replace(/!/g," not ");try{return vi.evaluate(e,this.conditionValues)}catch(t){return console.log("failed to parse setting condition '".concat(e,"': ").concat(t.message)),console.log(this.conditionValues),!1}}},methods:{changeValue:function(e){this.$emit("update:modelValue",e)}}});bl.render=gl;var yl=bl;function vl(e,t){return xl(e)||Nl(e,t)||wl(e,t)||Ol()}function Ol(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function wl(e,t){if(e){if("string"===typeof e)return jl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jl(e,t):void 0}}function jl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nl(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){s=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(s)throw o}}return i}}function xl(e){if(Array.isArray(e))return e}var kl=Object(Oi["defineComponent"])({props:{groupName:String,settings:{type:Array,required:!0},allSettingValues:{type:Object,required:!0}},emits:["change"],components:{GroupedSetting:yl},computed:{settingValues:function(){var e=this,t=Object.entries(this.allSettingValues).filter((function(t){var n=vl(t,1),r=n[0];if(e.groupName){var o=r.split("."),i=vl(o,1),a=i[0];if(a!==e.groupName)return!1}return!0})).map((function(t){var n=vl(t,2),r=n[0],o=n[1];return e.groupName?[r.split(".")[1],o]:[r,o]}));return Object.fromEntries(t)},groupPrefix:function(){return this.groupName?"".concat(this.groupName,"."):""}}});kl.render=hl;var El=kl,Cl={class:"confirm-password-modal modal",ref:"root"},Sl={class:"modal-content"},Vl={class:"modal-text"},Al={class:"modal-footer"},Tl=["disabled"];function Ml(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("Field");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Cl,[Object(Oi["createElementVNode"])("div",Sl,[Object(Oi["createElementVNode"])("div",Vl,[Object(Oi["renderSlot"])(e.$slots,"default")]),Object(Oi["createElementVNode"])("div",null,[Object(Oi["createVNode"])(a,{modelValue:e.passwordConfirmation,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.passwordConfirmation=t}),uicontrol:"password",disabled:e.requiresPasswordConfirmation?void 0:"disabled",name:"currentUserPassword",autocomplete:!1,"full-width":!0,title:e.translate("UsersManager_YourCurrentPassword")},null,8,["modelValue","disabled","title"])])]),Object(Oi["createElementVNode"])("div",Al,[Object(Oi["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",disabled:e.requiresPasswordConfirmation&&!e.passwordConfirmation?"disabled":void 0,onClick:t[1]||(t[1]=function(t){t.preventDefault(),e.$emit("confirmed",e.passwordConfirmation),e.passwordConfirmation=""})},Object(Oi["toDisplayString"])(e.translate("General_Yes")),9,Tl),Object(Oi["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no btn-flat",onClick:t[2]||(t[2]=function(t){t.preventDefault(),e.$emit("aborted")})},Object(Oi["toDisplayString"])(e.translate("General_No")),1)])],512)}var Pl=window,Dl=Pl.$,Bl=Object(Oi["defineComponent"])({props:{modelValue:{type:Boolean,required:!0}},data:function(){return{passwordConfirmation:""}},emits:["confirmed","aborted","update:modelValue"],components:{Field:ll},activated:function(){this.$emit("update:modelValue",!1)},methods:{showPasswordConfirmModal:function(){var e=this,t=this.$refs.root,n=Dl(t),r=function(t){var r=t.keyCode?t.keyCode:t.which;13===r&&(n.modal("close"),e.$emit("confirmed",e.passwordConfirmation),e.passwordConfirmation="")};n.modal({dismissible:!1,onOpenEnd:function(){var e=".modal.open #currentUserPassword";Dl(e).focus(),Dl(e).off("keypress").keypress(r)},onCloseEnd:function(){e.$emit("update:modelValue",!1)}}).modal("open")}},computed:{requiresPasswordConfirmation:function(){return!!Ci["Matomo"].requiresPasswordConfirmation}},watch:{modelValue:function(e){e&&this.showPasswordConfirmModal()}}});Bl.render=Ml;var $l=Bl;function Fl(e,t){return Hl(e)||Ul(e,t)||Ll(e,t)||_l()}function _l(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ll(e,t){if(e){if("string"===typeof e)return Il(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Il(e,t):void 0}}function Il(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ul(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){s=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(s)throw o}}return i}}function Hl(e){if(Array.isArray(e))return e}var Rl=window,ql=Rl.$,zl=Object(Oi["defineComponent"])({props:{mode:String},components:{PasswordConfirmation:$l,ActivityIndicator:Ci["ActivityIndicator"],GroupedSettings:El},data:function(){return{isLoading:!0,isSaving:{},showPasswordConfirmModal:!1,settingsToSave:null,settingsPerPlugin:[],settingValues:{}}},created:function(){var e=this;Ci["AjaxHelper"].fetch({method:this.apiMethod}).then((function(t){e.isLoading=!1,e.settingsPerPlugin=t,t.forEach((function(t){t.settings.forEach((function(n){e.settingValues["".concat(t.pluginName,".").concat(n.name)]=n.value}))})),Object(Ci["scrollToAnchorInUrl"])(),e.addSectionsToTableOfContents()})).catch((function(){e.isLoading=!1}))},computed:{apiMethod:function(){return"admin"===this.mode?"CorePluginsAdmin.getSystemSettings":"CorePluginsAdmin.getUserSettings"},saveApiMethod:function(){return"admin"===this.mode?"CorePluginsAdmin.setSystemSettings":"CorePluginsAdmin.setUserSettings"}},methods:{addSectionsToTableOfContents:function(){var e=ql("#generalSettingsTOC");if(e.length){var t=this.settingsPerPlugin;t.forEach((function(t){var n=t.pluginName,r=t.settings;n&&("CoreAdminHome"===n&&r?r.filter((function(e){return e.introduction})).forEach((function(t){e.append('<a href="#/'.concat(n,'PluginSettings">').concat(t.introduction,"</a> "))})):e.append('<a href="#/'.concat(n,'">').concat(n.replace(/([A-Z])/g," $1").trim(),"</a> ")))}))}},confirmPassword:function(e){this.showPasswordConfirmModal=!1,this.save(this.settingsToSave,e)},saveSetting:function(e){"admin"===this.mode?(this.settingsToSave=e,this.showPasswordConfirmModal=!0):this.save(e)},save:function(e,t){var n=this,r=this.saveApiMethod;this.isSaving[e]=!0;var o=this.getValuesForPlugin(e);Ci["AjaxHelper"].post({method:r},{settingValues:o,passwordConfirmation:t}).then((function(){n.isSaving[e]=!1;var t=Ci["NotificationsStore"].show({message:Object(Ci["translate"])("CoreAdminHome_PluginSettingsSaveSuccess"),id:"generalSettings",context:"success",type:"transient"});Ci["NotificationsStore"].scrollToNotification(t)})).catch((function(){n.isSaving[e]=!1})),this.settingsToSave=null},getValuesForPlugin:function(e){var t={};return t[e]||(t[e]=[]),Object.entries(this.settingValues).forEach((function(n){var r=Fl(n,2),o=r[0],i=r[1],a=o.split("."),s=Fl(a,2),l=s[0],c=s[1];if(l===e){var u=i;!1===u?u="0":!0===u&&(u="1"),t[l].push({name:c,value:u})}})),t}}});zl.render=ml;var Wl=zl,Jl=window,Gl=Jl.$;
+ */function Zs(e,t){if(!e)return[];var n=[];return Object.entries(e).forEach((function(e){var r=zs(e,2),o=r[0],i=r[1];if(i&&"object"===qs(i)&&"undefined"!==typeof i.key)n.push(i);else{var a=o;"integer"===t&&"string"===typeof o&&(a=parseInt(a,10)),n.push({key:a,value:i})}})),n}function Xs(e){return Xs="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xs(e)}var Qs=["password","url","search","email"],el=["textarea","checkbox","text"],tl={checkbox:"FieldCheckbox","expandable-select":"FieldExpandableSelect","field-array":"FieldFieldArray",file:"FieldFile",hidden:"FieldHidden",multiselect:"FieldSelect",multituple:"FieldMultituple",number:"FieldNumber",radio:"FieldRadio",select:"FieldSelect",site:"FieldSite",text:"FieldText",textarea:"FieldTextarea"},nl={FieldSelect:ms,FieldCheckboxArray:Zs,FieldRadio:Zs,FieldExpandableSelect:oa},rl=Object(Oi["defineComponent"])({props:{modelValue:null,modelModifiers:Object,formField:{type:Object,required:!0}},emits:["update:modelValue"],components:{FieldCheckbox:Pi,FieldCheckboxArray:zi,FieldExpandableSelect:aa,FieldFieldArray:ua,FieldFile:ya,FieldHidden:ja,FieldMultituple:Ca,FieldNumber:Ma,FieldRadio:Fa,FieldSelect:bs,FieldSite:js,FieldText:Cs,FieldTextArray:Ms,FieldTextarea:Fs,FieldTextareaArray:Rs},setup:function(e){var t=Object(Oi["ref"])(null),n=function(e){var n;e&&t.value&&"function"!==typeof e.render&&(n="string"===typeof e?0===e.indexOf("#")?window.$(e):window.vueSanitize(e):e,window.$(t.value).html("").append(n))};return Object(Oi["watch"])((function(){return e.formField.inlineHelp}),n),Object(Oi["onMounted"])((function(){n(e.formField.inlineHelp)})),{inlineHelp:t}},computed:{inlineHelpComponent:function(){var e=this.formField,t=e.inlineHelp;if(t&&"function"===typeof t.render)return e.inlineHelp},inlineHelpBind:function(){return this.inlineHelpComponent?this.formField.inlineHelpBind:void 0},childComponent:function(){var e=this.formField;if(e.component){var t=e.component;if(e.component.plugin){var n=e.component,r=n.plugin,o=n.name;if(!r||!o)throw new Error("Invalid component property given to FormField directive, must be {plugin: '...',name: '...'}");t=Object(Ci["useExternalPluginComponent"])(r,o)}return Object(Oi["markRaw"])(t)}var i=e.uiControl,a=tl[i];return-1!==Qs.indexOf(i)&&(a="FieldText"),"array"===this.formField.type&&-1!==el.indexOf(i)&&(a="".concat(a,"Array")),a},extraChildComponentParams:function(){return"multiselect"===this.formField.uiControl?{multiple:!0}:{}},showFormHelp:function(){return this.formField.description||this.formField.inlineHelp||this.showDefaultValue||this.hasInlineHelpSlot},showDefaultValue:function(){return this.defaultValuePretty&&"checkbox"!==this.formField.uiControl&&"radio"!==this.formField.uiControl},showField:function(){return!(this.formField&&this.formField.condition&&this.formField.condition instanceof Function)||this.formField.condition()},processedModelValue:function(){var e=this.formField;if("boolean"===e.type){var t=this.modelValue&&this.modelValue>0&&"0"!==this.modelValue;if("checkbox"===e.uiControl)return t;if("radio"===e.uiControl)return t?"1":"0"}return this.modelValue},defaultValue:function(){var e=this.formField.defaultValue;return Array.isArray(e)?e.join(","):e},availableOptions:function(){var e=this.childComponent;if("string"!==typeof e)return null;var t=this.formField;return t.availableValues&&nl[e]?nl[e](t.availableValues,t.type,t.uiControlAttributes):null},defaultValuePretty:function(){var e=this.formField,t=e.defaultValue,n=this.availableOptions;if("string"===typeof t&&t){var r=null;try{r=JSON.parse(t)}catch(i){}if(null!==r&&"object"===Xs(r))return""}if(!Array.isArray(n))return Array.isArray(t)?"":t?"".concat(t):"";var o=[];return Array.isArray(t)||(t=[t]),(n||[]).forEach((function(e){"undefined"!==typeof e.value&&-1!==t.indexOf(e.key)&&o.push(e.value)})),o.join(", ")},defaultValuePrettyTruncated:function(){return this.defaultValuePretty.substring(0,50)},hasInlineHelpSlot:function(){var e,t;if(!this.$slots["inline-help"])return!1;var n=this.$slots["inline-help"]();return!(null===n||void 0===n||null===(e=n[0])||void 0===e||null===(t=e.children)||void 0===t||!t.length)}},methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});rl.render=Ei;var ol=rl;function il(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("FormField");return Object(Oi["openBlock"])(),Object(Oi["createBlock"])(a,{"form-field":e.field,"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.onChange(t)}),"model-modifiers":e.modelModifiers},{"inline-help":Object(Oi["withCtx"])((function(){return[Object(Oi["renderSlot"])(e.$slots,"inline-help")]})),_:3},8,["form-field","model-value","model-modifiers"])}var al={multiselect:"array",checkbox:"boolean",site:"object",number:"integer"},sl=Object(Oi["defineComponent"])({props:{modelValue:null,modelModifiers:Object,uicontrol:String,name:String,defaultValue:null,options:[Object,Array],description:String,introduction:String,title:String,inlineHelp:[String,Object],inlineHelpBind:Object,disabled:Boolean,uiControlAttributes:{type:Object,default:function(){return{}}},uiControlOptions:{type:Object,default:function(){return{}}},autocomplete:String,condition:Function,varType:String,autofocus:Boolean,tabindex:Number,fullWidth:Boolean,maxlength:Number,required:Boolean,placeholder:String,rows:Number,min:Number,max:Number,component:null,templateFile:String},emits:["update:modelValue"],components:{FormField:ol},computed:{type:function(){if(this.varType)return this.varType;var e=this.uicontrol;return e&&al[e]?al[e]:"string"},field:function(){return{uiControl:this.uicontrol,type:this.type,name:this.name,defaultValue:this.defaultValue,availableValues:this.options,description:this.description,introduction:this.introduction,inlineHelp:this.inlineHelp,inlineHelpBind:this.inlineHelpBind,title:this.title,component:this.component,templateFile:this.templateFile,uiControlAttributes:Object.assign(Object.assign({},this.uiControlAttributes),{},{disabled:this.disabled,autocomplete:this.autocomplete,tabindex:this.tabindex,autofocus:this.autofocus,rows:this.rows,required:this.required,maxlength:this.maxlength,placeholder:this.placeholder,min:this.min,max:this.max}),fullWidth:this.fullWidth,uiControlOptions:this.uiControlOptions}}},methods:{onChange:function(e){this.$emit("update:modelValue",e)}}});sl.render=il;var ll=sl,cl={class:"pluginSettings",ref:"root"},ul=["id"],pl={class:"card-content"},dl=["id"],fl=["onClick","disabled","value"];function ml(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("GroupedSettings"),s=Object(Oi["resolveComponent"])("ActivityIndicator"),l=Object(Oi["resolveComponent"])("PasswordConfirmation");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",cl,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.settingsPerPlugin,(function(t){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",{class:"card",id:"".concat(t.pluginName,"PluginSettings"),key:"".concat(t.pluginName,"PluginSettings")},[Object(Oi["createElementVNode"])("div",pl,[Object(Oi["createElementVNode"])("h2",{class:"card-title",id:t.pluginName},Object(Oi["toDisplayString"])(t.title),9,dl),Object(Oi["createVNode"])(a,{"group-name":t.pluginName,settings:t.settings,"all-setting-values":e.settingValues,onChange:function(n){return e.settingValues["".concat(t.pluginName,".").concat(n.name)]=n.value}},null,8,["group-name","settings","all-setting-values","onChange"]),Object(Oi["createElementVNode"])("input",{type:"button",onClick:function(n){return e.saveSetting(t.pluginName)},disabled:e.isLoading,class:"pluginsSettingsSubmit btn",value:e.translate("General_Save")},null,8,fl),Object(Oi["createVNode"])(s,{loading:e.isLoading||e.isSaving[t.pluginName]},null,8,["loading"])])],8,ul)})),128)),Object(Oi["createVNode"])(l,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.showPasswordConfirmModal=t}),onConfirmed:e.confirmPassword},{default:Object(Oi["withCtx"])((function(){return[Object(Oi["createElementVNode"])("h2",null,Object(Oi["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])],512)}function hl(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("GroupedSetting");return Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.settings,(function(t){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",{key:"".concat(e.groupPrefix).concat(t.name)},[Object(Oi["createVNode"])(a,{"model-value":e.allSettingValues["".concat(e.groupPrefix).concat(t.name)],"onUpdate:modelValue":function(n){return e.$emit("change",{name:t.name,value:n})},setting:t,"condition-values":e.settingValues},null,8,["model-value","onUpdate:modelValue","setting","condition-values"])])})),128)}function gl(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("FormField");return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createVNode"])(a,{"model-value":e.modelValue,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.changeValue(t)}),"form-field":e.setting},null,8,["model-value","form-field"])],512)),[[Oi["vShow"],e.showField]])}var bl=Object(Oi["defineComponent"])({props:{setting:{type:Object,required:!0},modelValue:null,conditionValues:{type:Object,required:!0}},components:{FormField:ol},emits:["update:modelValue"],computed:{showField:function(){var e=this.setting.condition;if(!e)return!0;e=e.replace(/&&/g," and "),e=e.replace(/\|\|/g," or "),e=e.replace(/!/g," not ");try{return vi.evaluate(e,this.conditionValues)}catch(t){return console.log("failed to parse setting condition '".concat(e,"': ").concat(t.message)),console.log(this.conditionValues),!1}}},methods:{changeValue:function(e){this.$emit("update:modelValue",e)}}});bl.render=gl;var yl=bl;function vl(e,t){return xl(e)||Nl(e,t)||wl(e,t)||Ol()}function Ol(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function wl(e,t){if(e){if("string"===typeof e)return jl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jl(e,t):void 0}}function jl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nl(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){s=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(s)throw o}}return i}}function xl(e){if(Array.isArray(e))return e}var kl=Object(Oi["defineComponent"])({props:{groupName:String,settings:{type:Array,required:!0},allSettingValues:{type:Object,required:!0}},emits:["change"],components:{GroupedSetting:yl},computed:{settingValues:function(){var e=this,t=Object.entries(this.allSettingValues).filter((function(t){var n=vl(t,1),r=n[0];if(e.groupName){var o=r.split("."),i=vl(o,1),a=i[0];if(a!==e.groupName)return!1}return!0})).map((function(t){var n=vl(t,2),r=n[0],o=n[1];return e.groupName?[r.split(".")[1],o]:[r,o]}));return Object.fromEntries(t)},groupPrefix:function(){return this.groupName?"".concat(this.groupName,"."):""}}});kl.render=hl;var El=kl,Cl={class:"confirm-password-modal modal",ref:"root"},Sl={class:"modal-content"},Vl={class:"modal-text"},Al={class:"modal-footer"},Tl=["disabled"];function Ml(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("Field");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Cl,[Object(Oi["createElementVNode"])("div",Sl,[Object(Oi["createElementVNode"])("div",Vl,[Object(Oi["renderSlot"])(e.$slots,"default")]),Object(Oi["createElementVNode"])("div",null,[Object(Oi["createVNode"])(a,{modelValue:e.passwordConfirmation,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.passwordConfirmation=t}),uicontrol:"password",disabled:e.requiresPasswordConfirmation?void 0:"disabled",name:"currentUserPassword",autocomplete:"off","full-width":!0,title:e.translate("UsersManager_YourCurrentPassword")},null,8,["modelValue","disabled","title"])])]),Object(Oi["createElementVNode"])("div",Al,[Object(Oi["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",disabled:e.requiresPasswordConfirmation&&!e.passwordConfirmation?"disabled":void 0,onClick:t[1]||(t[1]=function(t){t.preventDefault(),e.$emit("confirmed",e.passwordConfirmation),e.passwordConfirmation=""})},Object(Oi["toDisplayString"])(e.translate("General_Yes")),9,Tl),Object(Oi["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no btn-flat",onClick:t[2]||(t[2]=function(t){t.preventDefault(),e.$emit("aborted")})},Object(Oi["toDisplayString"])(e.translate("General_No")),1)])],512)}var Pl=window,Dl=Pl.$,Bl=Object(Oi["defineComponent"])({props:{modelValue:{type:Boolean,required:!0}},data:function(){return{passwordConfirmation:""}},emits:["confirmed","aborted","update:modelValue"],components:{Field:ll},activated:function(){this.$emit("update:modelValue",!1)},methods:{showPasswordConfirmModal:function(){var e=this,t=this.$refs.root,n=Dl(t),r=function(t){var r=t.keyCode?t.keyCode:t.which;13===r&&(n.modal("close"),e.$emit("confirmed",e.passwordConfirmation),e.passwordConfirmation="")};n.modal({dismissible:!1,onOpenEnd:function(){var e=".modal.open #currentUserPassword";Dl(e).focus(),Dl(e).off("keypress").keypress(r)},onCloseEnd:function(){e.$emit("update:modelValue",!1)}}).modal("open")}},computed:{requiresPasswordConfirmation:function(){return!!Ci["Matomo"].requiresPasswordConfirmation}},watch:{modelValue:function(e){e&&this.showPasswordConfirmModal()}}});Bl.render=Ml;var $l=Bl;function Fl(e,t){return Hl(e)||Ul(e,t)||Ll(e,t)||_l()}function _l(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ll(e,t){if(e){if("string"===typeof e)return Il(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Il(e,t):void 0}}function Il(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ul(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done);a=!0)if(i.push(r.value),t&&i.length===t)break}catch(l){s=!0,o=l}finally{try{a||null==n["return"]||n["return"]()}finally{if(s)throw o}}return i}}function Hl(e){if(Array.isArray(e))return e}var Rl=window,ql=Rl.$,zl=Object(Oi["defineComponent"])({props:{mode:String},components:{PasswordConfirmation:$l,ActivityIndicator:Ci["ActivityIndicator"],GroupedSettings:El},data:function(){return{isLoading:!0,isSaving:{},showPasswordConfirmModal:!1,settingsToSave:null,settingsPerPlugin:[],settingValues:{}}},created:function(){var e=this;Ci["AjaxHelper"].fetch({method:this.apiMethod}).then((function(t){e.isLoading=!1,e.settingsPerPlugin=t,t.forEach((function(t){t.settings.forEach((function(n){e.settingValues["".concat(t.pluginName,".").concat(n.name)]=n.value}))})),Object(Ci["scrollToAnchorInUrl"])(),e.addSectionsToTableOfContents()})).catch((function(){e.isLoading=!1}))},computed:{apiMethod:function(){return"admin"===this.mode?"CorePluginsAdmin.getSystemSettings":"CorePluginsAdmin.getUserSettings"},saveApiMethod:function(){return"admin"===this.mode?"CorePluginsAdmin.setSystemSettings":"CorePluginsAdmin.setUserSettings"}},methods:{addSectionsToTableOfContents:function(){var e=ql("#generalSettingsTOC");if(e.length){var t=this.settingsPerPlugin;t.forEach((function(t){var n=t.pluginName,r=t.settings;n&&("CoreAdminHome"===n&&r?r.filter((function(e){return e.introduction})).forEach((function(t){e.append('<a href="#/'.concat(n,'PluginSettings">').concat(t.introduction,"</a> "))})):e.append('<a href="#/'.concat(n,'">').concat(n.replace(/([A-Z])/g," $1").trim(),"</a> ")))}))}},confirmPassword:function(e){this.showPasswordConfirmModal=!1,this.save(this.settingsToSave,e)},saveSetting:function(e){"admin"===this.mode?(this.settingsToSave=e,this.showPasswordConfirmModal=!0):this.save(e)},save:function(e,t){var n=this,r=this.saveApiMethod;this.isSaving[e]=!0;var o=this.getValuesForPlugin(e);Ci["AjaxHelper"].post({method:r},{settingValues:o,passwordConfirmation:t}).then((function(){n.isSaving[e]=!1;var t=Ci["NotificationsStore"].show({message:Object(Ci["translate"])("CoreAdminHome_PluginSettingsSaveSuccess"),id:"generalSettings",context:"success",type:"transient"});Ci["NotificationsStore"].scrollToNotification(t)})).catch((function(){n.isSaving[e]=!1})),this.settingsToSave=null},getValuesForPlugin:function(e){var t={};return t[e]||(t[e]=[]),Object.entries(this.settingValues).forEach((function(n){var r=Fl(n,2),o=r[0],i=r[1],a=o.split("."),s=Fl(a,2),l=s[0],c=s[1];if(l===e){var u=i;!1===u?u="0":!0===u&&(u="1"),t[l].push({name:c,value:u})}})),t}}});zl.render=ml;var Wl=zl,Jl=window,Gl=Jl.$;
/*!
* Matomo - free/libre analytics platform
*
diff --git a/plugins/CorePluginsAdmin/vue/src/Field/Field.vue b/plugins/CorePluginsAdmin/vue/src/Field/Field.vue
index 18e549e1c8..619da2c88e 100644
--- a/plugins/CorePluginsAdmin/vue/src/Field/Field.vue
+++ b/plugins/CorePluginsAdmin/vue/src/Field/Field.vue
@@ -50,7 +50,7 @@ export default defineComponent({
type: Object,
default: () => ({}),
},
- autocomplete: Boolean,
+ autocomplete: String,
condition: Function,
varType: String,
autofocus: Boolean,
diff --git a/plugins/CorePluginsAdmin/vue/src/PasswordConfirmation/PasswordConfirmation.vue b/plugins/CorePluginsAdmin/vue/src/PasswordConfirmation/PasswordConfirmation.vue
index 88e5192c00..6ab5ddd216 100644
--- a/plugins/CorePluginsAdmin/vue/src/PasswordConfirmation/PasswordConfirmation.vue
+++ b/plugins/CorePluginsAdmin/vue/src/PasswordConfirmation/PasswordConfirmation.vue
@@ -16,7 +16,7 @@
:uicontrol="'password'"
:disabled="!requiresPasswordConfirmation ? 'disabled' : undefined"
:name="'currentUserPassword'"
- :autocomplete="false"
+ :autocomplete="'off'"
:full-width="true"
:title="translate('UsersManager_YourCurrentPassword')"
>
diff --git a/plugins/PrivacyManager/tests/Integration/PrivacyManagerTest.php b/plugins/PrivacyManager/tests/Integration/PrivacyManagerTest.php
index d8df4e19d9..ed12236d02 100644
--- a/plugins/PrivacyManager/tests/Integration/PrivacyManagerTest.php
+++ b/plugins/PrivacyManager/tests/Integration/PrivacyManagerTest.php
@@ -136,6 +136,50 @@ class PrivacyManagerTest extends IntegrationTestCase
$this->assertTrue(PrivacyManager::haveLogsBeenPurged($dataTable = null, $days = 500));
}
+ public function test_savePurgeDataSettings()
+ {
+ PrivacyManager::savePurgeDataSettings(
+ [
+ 'delete_logs_enable' => '',
+ 'delete_logs_schedule_lowest_interval' => '7',
+ 'delete_logs_older_than' => 180,
+ 'delete_logs_max_rows_per_query' => null, // should not be stored
+ 'delete_reports_enable' => '1',
+ 'delete_reports_older_than' => 7,
+ 'delete_reports_keep_basic_metrics' => '1',
+ 'delete_reports_keep_day_reports' => '',
+ 'delete_reports_keep_week_reports' => 1.0,
+ 'delete_reports_keep_month_reports' => false,
+ 'delete_reports_keep_year_reports' => true,
+ 'delete_reports_keep_range_reports' => '1 ',
+ 'delete_reports_keep_segment_reports' => '0',
+ ]
+ );
+
+ self::assertSame(
+ [
+ 'delete_logs_enable' => 0,
+ 'delete_logs_schedule_lowest_interval' => 7,
+ 'delete_logs_older_than' => 180,
+ 'delete_logs_max_rows_per_query' => 100000,
+ 'delete_logs_unused_actions_schedule_lowest_interval' => 30,
+ 'delete_logs_unused_actions_max_rows_per_query' => 100000,
+ 'enable_auto_database_size_estimate' => 1,
+ 'enable_database_size_estimate' => 1,
+ 'delete_reports_enable' => 1,
+ 'delete_reports_older_than' => 7,
+ 'delete_reports_keep_basic_metrics' => 1,
+ 'delete_reports_keep_day_reports' => 0,
+ 'delete_reports_keep_week_reports' => 1,
+ 'delete_reports_keep_month_reports' => 0,
+ 'delete_reports_keep_year_reports' => 1,
+ 'delete_reports_keep_range_reports' => 1,
+ 'delete_reports_keep_segment_reports' => 0,
+ ],
+ PrivacyManager::getPurgeDataSettings()
+ );
+ }
+
private function setUIEnabled($enabled)
{
\Piwik\Config::getInstance()->General['enable_delete_old_data_settings_admin'] = $enabled;
diff --git a/plugins/Transitions/API.php b/plugins/Transitions/API.php
index d082013af6..dc419858e7 100644
--- a/plugins/Transitions/API.php
+++ b/plugins/Transitions/API.php
@@ -36,12 +36,12 @@ use Piwik\Tracker\TableLogAction;
*/
class API extends \Piwik\Plugin\API
{
- public function getTransitionsForPageTitle($pageTitle, $idSite, $period, $date, $segment = false, $limitBeforeGrouping = false)
+ public function getTransitionsForPageTitle($pageTitle, $idSite, $period, $date, $segment = false, $limitBeforeGrouping = 0)
{
return $this->getTransitionsForAction($pageTitle, 'title', $idSite, $period, $date, $segment, $limitBeforeGrouping);
}
- public function getTransitionsForPageUrl($pageUrl, $idSite, $period, $date, $segment = false, $limitBeforeGrouping = false)
+ public function getTransitionsForPageUrl($pageUrl, $idSite, $period, $date, $segment = false, $limitBeforeGrouping = 0)
{
return $this->getTransitionsForAction($pageUrl, 'url', $idSite, $period, $date, $segment, $limitBeforeGrouping);
}
@@ -55,13 +55,13 @@ class API extends \Piwik\Plugin\API
* @param $period
* @param $date
* @param bool $segment
- * @param bool $limitBeforeGrouping
+ * @param int $limitBeforeGrouping
* @param string $parts
* @return array
* @throws Exception
*/
public function getTransitionsForAction($actionName, $actionType, $idSite, $period, $date,
- $segment = false, $limitBeforeGrouping = false, $parts = 'all')
+ $segment = false, $limitBeforeGrouping = 0, $parts = 'all')
{
Piwik::checkUserHasViewAccess($idSite);
@@ -69,6 +69,12 @@ class API extends \Piwik\Plugin\API
throw new Exception('PeriodNotAllowed');
}
+ if ($limitBeforeGrouping && !is_numeric($limitBeforeGrouping)) {
+ throw new Exception('limitBeforeGrouping has to be an integer.');
+ }
+ //convert string to int
+ $limitBeforeGrouping = (int)$limitBeforeGrouping;
+
// get idaction of the requested action
$idaction = $this->deriveIdAction($actionName, $actionType);
if ($idaction < 0) {
@@ -212,11 +218,12 @@ class API extends \Piwik\Plugin\API
* @param $report
* @param $idaction
* @param string $actionType
- * @param $limitBeforeGrouping
+ * @param int $limitBeforeGrouping
* @param boolean $includeLoops
*/
- private function addFollowingActions($logAggregator, &$report, $idaction, $actionType, $limitBeforeGrouping, $includeLoops = false)
+ private function addFollowingActions($logAggregator, &$report, $idaction, $actionType, $limitBeforeGrouping = 0, $includeLoops = false)
{
+
$data = $this->queryFollowingActions(
$idaction, $actionType, $logAggregator, $limitBeforeGrouping, $includeLoops);
@@ -231,12 +238,12 @@ class API extends \Piwik\Plugin\API
* @param $idaction
* @param $actionType
* @param LogAggregator $logAggregator
- * @param $limitBeforeGrouping
+ * @param $limitBeforeGrouping
* @param $includeLoops
* @return array(followingPages:DataTable, outlinks:DataTable, downloads:DataTable)
*/
protected function queryFollowingActions($idaction, $actionType, LogAggregator $logAggregator,
- $limitBeforeGrouping = false, $includeLoops = false)
+ $limitBeforeGrouping = 0, $includeLoops = false)
{
$types = array();
@@ -291,7 +298,7 @@ class API extends \Piwik\Plugin\API
$types[Action::TYPE_OUTLINK] = 'outlinks';
$types[Action::TYPE_DOWNLOAD] = 'downloads';
- $rankingQuery = new RankingQuery($limitBeforeGrouping ? $limitBeforeGrouping : $this->limitBeforeGrouping);
+ $rankingQuery = new RankingQuery($limitBeforeGrouping ? $limitBeforeGrouping: $this->limitBeforeGrouping);
$rankingQuery->setOthersLabel('Others');
$rankingQuery->addLabelColumn(array('name', 'url_prefix'));
$rankingQuery->partitionResultIntoMultipleGroups('type', array_keys($types));
@@ -326,12 +333,14 @@ class API extends \Piwik\Plugin\API
* @param $idaction
* @param $actionType
* @param LogAggregator $logAggregator
- * @param $limitBeforeGrouping
+ * @param int $limitBeforeGrouping
* @return DataTable
+ * @throws Exception
*/
- protected function queryExternalReferrers($idaction, $actionType, $logAggregator, $limitBeforeGrouping = false)
+ protected function queryExternalReferrers($idaction, $actionType, $logAggregator, $limitBeforeGrouping = 0)
{
- $rankingQuery = new RankingQuery($limitBeforeGrouping ? $limitBeforeGrouping : $this->limitBeforeGrouping);
+
+ $rankingQuery = new RankingQuery($limitBeforeGrouping ? $limitBeforeGrouping: $this->limitBeforeGrouping);
$rankingQuery->setOthersLabel('Others');
// we generate a single column that contains the interesting data for each referrer.
@@ -401,16 +410,16 @@ class API extends \Piwik\Plugin\API
* @param $idaction
* @param $actionType
* @param LogAggregator $logAggregator
- * @param $limitBeforeGrouping
+ * @param int $limitBeforeGrouping
* @return array(previousPages:DataTable, loops:integer)
*/
- protected function queryInternalReferrers($idaction, $actionType, $logAggregator, $limitBeforeGrouping = false)
+ protected function queryInternalReferrers($idaction, $actionType, $logAggregator, $limitBeforeGrouping = 0)
{
$keyIsOther = 0;
$keyIsPageUrlAction = 1;
$keyIsSiteSearchAction = 2;
- $rankingQuery = new RankingQuery($limitBeforeGrouping ? $limitBeforeGrouping : $this->limitBeforeGrouping);
+ $rankingQuery = new RankingQuery($limitBeforeGrouping ? $limitBeforeGrouping: $this->limitBeforeGrouping);
$rankingQuery->setOthersLabel('Others');
$rankingQuery->addLabelColumn(array('name', 'url_prefix'));
$rankingQuery->setColumnToMarkExcludedRows('is_self');
diff --git a/plugins/Transitions/tests/Integration/TransitionsMaxAllowedPeriodTest.php b/plugins/Transitions/tests/Integration/TransitionsMaxAllowedPeriodTest.php
index b074e7d3ab..be39a0629f 100644
--- a/plugins/Transitions/tests/Integration/TransitionsMaxAllowedPeriodTest.php
+++ b/plugins/Transitions/tests/Integration/TransitionsMaxAllowedPeriodTest.php
@@ -82,6 +82,21 @@ class TransitionsMaxAllowedPeriodTest extends IntegrationTestCase
}
}
+ public function test_ShouldThrowException_IfInvalidLimitBeforeGroup()
+ {
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('limitBeforeGrouping has to be an integer.');
+ $this->api->getTransitionsForAction('http://example.org/page/one.html', 'url', 1,
+ 'range', '2012-08-09,2012-08-10', false, 'all');
+ }
+
+ public function test_ShouldPass_IfLimitBeforeGroupPassingIntAsString()
+ {
+ $report = $this->api->getTransitionsForAction('http://example.org/page/one.html', 'url', 1,
+ 'range', '2012-08-09,2012-08-10', false, '100');
+ $this->assertIsArray($report);
+ }
+
public function test_ShouldThrowException_IfRangeDayCountIsLargerThanDayPeriod()
{
Config::setSetting('Transitions_1', 'max_period_allowed', 'day');
diff --git a/plugins/Transitions/tests/System/TransitionsTest.php b/plugins/Transitions/tests/System/TransitionsTest.php
index c5adc135c0..7329d917fb 100644
--- a/plugins/Transitions/tests/System/TransitionsTest.php
+++ b/plugins/Transitions/tests/System/TransitionsTest.php
@@ -17,7 +17,7 @@ use Piwik\Tests\Fixtures\SomeVisitsManyPageviewsWithTransitions;
* @group Plugins
*/
class TransitionsTest extends SystemTestCase
-{
+{
public static $fixture = null; // initialized below class definition
/**
@@ -114,4 +114,4 @@ class TransitionsTest extends SystemTestCase
}
}
-TransitionsTest::$fixture = new SomeVisitsManyPageviewsWithTransitions(); \ No newline at end of file
+TransitionsTest::$fixture = new SomeVisitsManyPageviewsWithTransitions();
diff --git a/tests/PHPUnit/Unit/RankingQueryTest.php b/tests/PHPUnit/Unit/RankingQueryTest.php
index f170bacd9f..4320055986 100644
--- a/tests/PHPUnit/Unit/RankingQueryTest.php
+++ b/tests/PHPUnit/Unit/RankingQueryTest.php
@@ -58,6 +58,7 @@ class RankingQueryTest extends \PHPUnit\Framework\TestCase
*/
public function testExcludeRows()
{
+
$query = new RankingQuery(20);
$query->setOthersLabel('Others');
$query->addLabelColumn('label');
@@ -89,6 +90,12 @@ class RankingQueryTest extends \PHPUnit\Framework\TestCase
";
$this->checkQuery($query, $innerQuery, $expected);
+
+ $query = new RankingQuery('20');
+ $query->setOthersLabel('Others');
+ $query->addLabelColumn('label');
+ $query->setColumnToMarkExcludedRows('exclude_marker');
+ $this->checkQuery($query, $innerQuery, $expected);
}
/**