File: D:/web/matomo.circ/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.min.js
(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(L).filter(U).filter(I),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(L).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(q)?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=R(e).map(v);var o=t.length,i=v(z(e)),a=function(e){for(var t=o;t<e.length;t++)if(!i(e[t]))return!1;return!0};return function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return a(e)&&e.length>=o+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=v(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=v(e[0]),r=v(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(v),function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return e.length===t.length})}function j(e,t){return t<e.params.length?e.params[t]:b(e.params)?z(e.params):null}function w(e,t,n){var r=j(e,t),o=r?n?r.types.filter(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 w(e,t,!1)})));return-1!==n.indexOf("any")?["any"]:n}function E(e,t,n){var r,o,i,a=e||"unnamed",s=n;for(i=0;i<t.length;i++){var l=s.filter((function(e){var n=v(j(e,i));return(i<e.params.length||b(e.params))&&n(t[i])}));if(0===l.length){if(o=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 A(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 V(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=A(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 P(e,t){var n=t;if(e.some(y)){var r=b(e),o=e.map(M);n=function(){for(var e=[],n=r?arguments.length-1:arguments.length,i=0;i<n;i++)e[i]=o[i](arguments[i]);return r&&(e[n]=arguments[n].map(o[n])),t.apply(this,e)}}var i=n;if(b(e)){var a=e.length-1;i=function(){return n.apply(this,W(arguments,0,a).concat([W(arguments,a)]))}}return i}function M(e){var t,n,r,o,i=[],a=[];switch(e.types.forEach((function(e){e.conversion&&(i.push(c(e.conversion.from).test),a.push(e.conversion.convert))})),a.length){case 0:return function(e){return e};case 1:return t=i[0],r=a[0],function(e){return t(e)?r(e):e};case 2:return t=i[0],n=i[1],r=a[0],o=a[1],function(e){return t(e)?r(e):n(e)?o(e):e};default:return function(e){for(var t=0;t<a.length;t++)if(i[t](e))return a[t](e);return e}}}function B(e){var t={};return e.forEach((function(e){e.params.some(y)||D(e.params,!0).forEach((function(n){t[m(n)]=e.fn}))})),t}function D(e,t){function n(e,r,o){if(r<e.length){var i,a=e[r],s=t?a.types.filter(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=w(e,r,!0),i=w(t,r,!0);if(!G(o,i))return!1}var a=e.params.length,s=t.params.length,l=b(e.params),c=b(t.params);return l?c?a===s:s>=a:c?a>=s:a===s}function F(e,r){if(0===Object.keys(r).length)throw new SyntaxError("No signatures provided");var o=[];Object.keys(r).map((function(e){return g(e,r[e],l.conversions)})).filter(H).forEach((function(e){var t=K(o,(function(t){return $(t,e)}));if(t)throw new TypeError('Conflicting signatures "'+m(t.params)+'" and "'+m(e.params)+'".');o.push(e)}));var i=Z(o,(function(e){var t=e?D(e.params,!1):[];return t.map((function(t){return{params:t,fn:e.fn}}))})).filter(H);i.sort(V);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,j=s?v(i[1].params[0]):t,w=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,A=u?v(i[3].params[1]):t,T=p?v(i[4].params[1]):t,M=d?v(i[5].params[1]):t,F=i.map((function(e){return P(e.params,e.fn)})),_=a?F[0]:n,I=s?F[1]:n,L=c?F[2]:n,U=u?F[3]:n,q=p?F[4]:n,R=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&&j(t)&&C(n)?I.apply(e,arguments):arguments.length===J&&w(t)&&S(n)?L.apply(e,arguments):arguments.length===G&&N(t)&&A(n)?U.apply(e,arguments):arguments.length===Y&&x(t)&&T(n)?q.apply(e,arguments):arguments.length===X&&k(t)&&M(n)?R.apply(e,arguments):te.apply(e,arguments)};try{Object.defineProperty(ne,"name",{value:e})}catch(re){}return ne.signatures=B(i),ne}function _(e,t,n){throw E(e,t,n)}function I(e){return-1===l.ignore.indexOf(e)}function L(e){return e.trim()}function U(e){return!!e}function H(e){return null!==e}function q(e){return 0===e.types.length}function R(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 il})),n.d(t,"Field",(function(){return cl})),n.d(t,"PluginSettings",(function(){return Zl})),n.d(t,"PluginFilter",(function(){return lc})),n.d(t,"PluginManagement",(function(){return fc})),n.d(t,"PluginUpload",(function(){return yc})),n.d(t,"SaveButton",(function(){return Nc})),n.d(t,"Form",(function(){return Ec})),n.d(t,"GroupedSettings",(function(){return Cl})),n.d(t,"PluginsIntro",(function(){return Uc})),n.d(t,"ThemesIntro",(function(){return Kc})),n.d(t,"PasswordConfirmation",(function(){return Ul})),n.d(t,"PluginName",(function(){return Qc})),n.d(t,"PluginsTable",(function(){return zp})),n.d(t,"PluginsTableWithUpdates",(function(){return xd})),n.d(t,"UploadPluginDialog",(function(){return _d})),n.d(t,"InstallAllPaidPluginsButton",(function(){return Ic})),"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 j(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function w(e){return e&&!0===e.constructor.prototype.isHelp||!1}function N(e){return"function"===typeof e}function 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 A(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function V(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 P(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function M(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function B(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function D(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function $(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function F(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function _(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function I(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function L(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 q(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function R(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":j(e)?"ResultSet":_(e)?e.type:R(e)?"Chain":w(e)?"Help":"Object":"function"===t?"Function":t}function W(e){var t=typeof e;if("number"===t||"string"===t||"boolean"===t||null===e||void 0===e)return e;if("function"===typeof e.clone)return e.clone();if(Array.isArray(e))return e.map((function(e){return W(e)}));if(e instanceof Date)return new Date(e.valueOf());if(l(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return J(e,W)}function J(e,t){var n={};for(var r in e)Q(e,r)&&(n[r]=t(e[r]));return n}function G(e,t){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(var n in t)if(Q(t,n)&&!(n in Object.prototype)&&!(n in Function.prototype))if(t[n]&&t[n].constructor===Object)void 0===e[n]&&(e[n]={}),e[n]&&e[n].constructor===Object?G(e[n],t[n]):e[n]=t[n];else{if(Array.isArray(t[n]))throw new TypeError("Arrays are not supported by deepExtend");e[n]=t[n]}return e}function K(e,t){var n,r,o;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(r=0,o=e.length;r<o;r++)if(!K(e[r],t[r]))return!1;return!0}if("function"===typeof e)return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!K(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}return e===t}function Y(e){var t={};return Z(e,t),t}function Z(e,t){for(var n in e)if(Q(e,n)){var r=e[n];"object"===typeof r&&null!==r?Z(r,t):t[n]=r}}function X(e,t,n){var r,o=!0;Object.defineProperty(e,t,{get:function(){return o&&(r=n(),o=!1),r},set:function(e){r=e,o=!1},configurable:!0,enumerable:!0})}function Q(e,t){return e&&Object.hasOwnProperty.call(e,t)}function ee(e){return e&&"function"===typeof e.factory}function te(e,t){for(var n={},r=0;r<t.length;r++){var o=t[r],i=e[o];void 0!==i&&(n[o]=i)}return n}function ne(e){return Object.keys(e).map(t=>e[t])}var re=n("c0e2"),oe=n.n(re);function ie(e){var t=new oe.a;return e.on=t.on.bind(t),e.off=t.off.bind(t),e.once=t.once.bind(t),e.emit=t.emit.bind(t),e}function ae(e){return"boolean"===typeof e||!!isFinite(e)&&e===Math.round(e)}var se=Math.sign||function(e){return e>0?1:e<0?-1:0},le=Math.log2||function(e){return Math.log(e)/Math.LN2},ce=Math.log10||function(e){return Math.log(e)/Math.LN10},ue=Math.log1p||function(e){return Math.log(e+1)},pe=Math.cbrt||function(e){if(0===e)return e;var t,n=e<0;return n&&(e=-e),isFinite(e)?(t=Math.exp(Math.log(e)/3),t=(e/(t*t)+2*t)/3):t=e,n?-t:t},de=Math.expm1||function(e){return e>=2e-4||e<=-2e-4?Math.exp(e)-1:e+e*e/2+e*e*e/6};function 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(je(a-o.length))),i<0&&(o=je(1-i).concat(o),i=1),i<o.length&&o.splice(i,0,0===i?"0.":"."),r.sign+o.join("")}function ye(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=he(e),r=t?Oe(n,t):n,o=r.coefficients,i=r.exponent;o.length<t&&(o=o.concat(je(t-o.length)));var a=o.shift();return r.sign+a+(o.length>0?"."+o.join(""):"")+"e"+(i>=0?"+":"")+i}function ve(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&void 0!==n.lowerExp?n.lowerExp:-3,o=n&&void 0!==n.upperExp?n.upperExp:5,i=he(e),a=t?Oe(i,t):i;if(a.exponent<r||a.exponent>=o)return ye(e,t);var s=a.coefficients,l=a.exponent;s.length<t&&(s=s.concat(je(t-s.length))),s=s.concat(je(l-s.length+1+(s.length<t?t-s.length:0))),s=je(-l).concat(s);var c=l>0?l:0;return c<s.length-1&&s.splice(c+1,0,"."),a.sign+s.join("")}function Oe(e,t){var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;while(t<=0)r.unshift(0),n.exponent++,t++;if(r.length>t){var o=r.splice(t,r.length-t);if(o[0]>=5){var i=t-1;r[i]++;while(10===r[i])r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}}return n}function je(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function we(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}Number.EPSILON;var Ne=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},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 Ae(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 Ve(e,t){if("function"===typeof t)return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n,r,o="auto";if(void 0!==t&&(t.notation&&(o=t.notation),"number"===typeof t?n=t:t.precision&&(n=t.precision),t.wordSize&&(r=t.wordSize,"number"!==typeof r)))throw new Error('Option "wordSize" must be a number');switch(o){case"fixed":return Me(e,n);case"exponential":return Pe(e,n);case"engineering":return Te(e,n);case"bin":return Ae(e,2,r);case"oct":return Ae(e,8,r);case"hex":return Ae(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():Pe(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 Pe(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()}function Me(e,t){return e.toFixed(t)}function Be(e,t){var n=De(e,t);return t&&"object"===typeof t&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function De(e,t){if("number"===typeof e)return me(e,t);if(l(e))return Ve(e,t);if(Ie(e))return t&&"decimal"===t.fraction?e.toString():e.s*e.n+"/"+e.d;if(Array.isArray(e))return _e(e,t);if(d(e))return'"'+e+'"';if("function"===typeof e)return e.syntax?String(e.syntax):"function";if(e&&"object"===typeof e){if("function"===typeof e.format)return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var n=Object.keys(e).map(n=>'"'+n+'": '+Be(e[n],t));return"{"+n.join(", ")+"}"}return String(e)}function $e(e){var t=String(e),n="",r=0;while(r<t.length){var o=t.charAt(r);"\\"===o?(n+=o,r++,o=t.charAt(r),""!==o&&-1!=='"\\/bfnrtu'.indexOf(o)||(n+="\\"),n+=o):n+='"'===o?'\\"':o,r++}return'"'+n+'"'}function Fe(e){var t=String(e);return t=t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"),t}function _e(e,t){if(Array.isArray(e)){for(var n="[",r=e.length,o=0;o<r;o++)0!==o&&(n+=", "),n+=_e(e[o],t);return n+="]",n}return Be(e,t)}function Ie(e){return e&&"object"===typeof e&&"number"===typeof e.s&&"number"===typeof e.n&&"number"===typeof e.d||!1}function Le(e,t,n){if(!(this instanceof Le))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 qe(e,t){return Array.prototype.map.call(e,t)}function Re(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(j,e)}function v(e){return-1===e.fn.indexOf(".")&&!Q(j,e.fn)&&(!e.meta||!e.meta.isClass)}function O(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction||!1}var j={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return o}Le.prototype=new RangeError,Le.prototype.constructor=RangeError,Le.prototype.name="DimensionError",Le.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:j,isHelp:w,isFunction:N,isDate:x,isRegExp:k,isObject:E,isNull:C,isUndefined:S,isAccessorNode:A,isArrayNode:V,isAssignmentNode:T,isBlockNode:P,isConditionalNode:M,isConstantNode:B,isFunctionAssignmentNode:D,isFunctionNode:$,isIndexNode:F,isNode:_,isObjectNode:I,isOperatorNode:L,isParenthesisNode:U,isRangeNode:H,isSymbolNode:q,isChain:R});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=Le,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 jt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o of n)if(o)if(Ot(o))for(var i of o.keys())e.set(i,o.get(i));else if(E(o))for(var a of Object.keys(o))e.set(a,o[a]);return e}var wt="Node",Nt=["mathWithTransform"],xt=Je(wt,Nt,e=>{var{mathWithTransform:t}=e;function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator")}function r(e){for(var t of[...st])if(e.has(t))throw new Error('Scope contains an illegal symbol, "'+t+'" is a reserved keyword')}return n.prototype.evaluate=function(e){return this.compile().evaluate(e)},n.prototype.type="Node",n.prototype.isNode=!0,n.prototype.comment="",n.prototype.compile=function(){var e=this._compile(t,{}),n={},o=null;function i(t){var i=vt(t);return r(i),e(i,n,o)}return{evaluate:i}},n.prototype._compile=function(e,t){throw new Error("Method _compile should be implemented by type "+this.type)},n.prototype.forEach=function(e){throw new Error("Cannot run forEach on a Node interface")},n.prototype.map=function(e){throw new Error("Cannot run map on a Node interface")},n.prototype._ifNode=function(e){if(!_(e))throw new TypeError("Callback function must return a Node");return e},n.prototype.traverse=function(e){function t(e,n){e.forEach((function(e,r,o){n(e,r,o),t(e,n)}))}e(this,null,null),t(this,e)},n.prototype.transform=function(e){function t(n,r,o){var i=e(n,r,o);return i!==n?i:n.map(t)}return t(this,null,null)},n.prototype.filter=function(e){var t=[];return this.traverse((function(n,r,o){e(n,r,o)&&t.push(n)})),t},n.prototype.clone=function(){throw new Error("Cannot clone a Node interface")},n.prototype.cloneDeep=function(){return this.map((function(e){return e.cloneDeep()}))},n.prototype.equals=function(e){return!!e&&K(this,e)},n.prototype.toString=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this._toString(e)},n.prototype.toJSON=function(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)},n.prototype.toHTML=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this.toHTML(e)},n.prototype._toString=function(){throw new Error("_toString not implemented for "+this.type)},n.prototype.toTex=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this._toTex(e)},n.prototype._toTex=function(e){throw new Error("_toTex not implemented for "+this.type)},n.prototype._getCustomString=function(e){if(e&&"object"===typeof e)switch(typeof e.handler){case"object":case"undefined":return;case"function":return e.handler(this,e);default:throw new TypeError("Object or function expected as callback")}},n.prototype.getIdentifier=function(){return this.type},n.prototype.getContent=function(){return this},n},{isClass:!0,isNode:!0}),kt={createNode:xt},Et="number",Ct="number, number";function St(e){return Math.abs(e)}function At(e,t){return e+t}function Vt(e,t){return e-t}function Tt(e,t){return e*t}function Pt(e,t){return e/t}function Mt(e){return-e}function Bt(e){return e}function Dt(e){return pe(e)}function $t(e){return e*e*e}function Ft(e){return Math.exp(e)}function _t(e){return de(e)}function It(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 Lt(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 qt(e){return ue(e)}function Rt(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,At.signature=Ct,Vt.signature=Ct,Tt.signature=Ct,Pt.signature=Ct,Mt.signature=Et,Bt.signature=Et,Dt.signature=Et,$t.signature=Et,Ft.signature=Et,_t.signature=Et,It.signature=Ct,Lt.signature=Ct,Ut.signature=Et,Ht.signature=Et,qt.signature=Et,Rt.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,jn=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];function wn(e){if(e<0)return NaN;if(0===e)return 1/0;if(!isFinite(e))return e;if(e<.5)return Math.log(Math.PI/Math.sin(Math.PI*e))-wn(1-e);e-=1;for(var t=e+vn+.5,n=jn[0],r=On-1;r>=1;r--)n+=jn[r]/(e+r);return yn+(e+.5)*Math.log(t)-t+Math.log(n)}wn.signature="number";var Nn="number",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 An(e){return Math.asin(1/e)}function Vn(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}function Tn(e){return Math.acos(1/e)}function Pn(e){var t=1/e,n=Math.sqrt(t*t-1);return Math.log(n+t)}function Mn(e){return Math.asin(e)}function Bn(e){return xe(e)}function Dn(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 In(e){return Ee(e)}function Ln(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 qn(e){return 0===e?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*se(e)}function Rn(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,An.signature=Nn,Vn.signature=Nn,Tn.signature=Nn,Pn.signature=Nn,Mn.signature=Nn,Bn.signature=Nn,Dn.signature=Nn,$n.signature=xn,Fn.signature=Nn,_n.signature=Nn,In.signature=Nn,Ln.signature=Nn,Un.signature=Nn,Hn.signature=Nn,qn.signature=Nn,Rn.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",wn);function lr(e,t){return Je(e,["typed"],e=>{var{typed:n}=e;return n(t)})}var cr={createSubset:sr};function ur(e){return e&&e.isIndexError?new Ue(e.index+1,e.min+1,void 0!==e.max?e.max+1:void 0):e}function pr(e){var{subset:t}=e;return function(e,n){try{if(Array.isArray(e))return t(e,n);if(e&&"function"===typeof e.subset)return e.subset(n);if("string"===typeof e)return t(e,n);if("object"===typeof e){if(!n.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return lt(e,n.getObjectProperty())}throw new TypeError("Cannot apply index: unsupported type of object")}catch(r){throw ur(r)}}}var dr="AccessorNode",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!(A(e)||V(e)||B(e)||$(e)||I(e)||U(e)||q(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=qe(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(qe(n,(function(n){return n(e,t,r)})))}}return function(e,t,r){return qe(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(V)&&!n.every(V),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 jr(e){var{subset:t,matrix:n}=e;return function(e,r,o){try{if(Array.isArray(e))return n(e).subset(r,o).valueOf();if(e&&"function"===typeof e.subset)return e.subset(r,o);if("string"===typeof e)return t(e,r,o);if("object"===typeof e){if(!r.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return ct(e,r.getObjectProperty(),o),e}throw new TypeError("Cannot apply index: unsupported type of object")}catch(i){throw ur(i)}}}var wr=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{associativity:"left",associativeWith:[]}},{"OperatorNode:and":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{associativity:"left",associativeWith:[]},"OperatorNode:unequal":{associativity:"left",associativeWith:[]},"OperatorNode:smaller":{associativity:"left",associativeWith:[]},"OperatorNode:larger":{associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{associativity:"left",associativeWith:[]}},{"OperatorNode:to":{associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{associativity:"left",associativeWith:[]},"OperatorNode:mod":{associativity:"left",associativeWith:[]}},{"OperatorNode:unaryPlus":{associativity:"right"},"OperatorNode:unaryMinus":{associativity:"right"},"OperatorNode:bitNot":{associativity:"right"},"OperatorNode:not":{associativity:"right"}},{"OperatorNode:pow":{associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{associativity:"left"}},{"OperatorNode:transpose":{associativity:"left"}}];function Nr(e,t){var n=e;"keep"!==t&&(n=e.getContent());for(var r=n.getIdentifier(),o=0;o<wr.length;o++)if(r in wr[o])return o;return null}function 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=wr[o][r];if(Q(i,"associativity")){if("left"===i.associativity)return"left";if("right"===i.associativity)return"right";throw Error("'"+r+"' has the invalid associativity '"+i.associativity+"'.")}return null}function 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=wr[s][i];if(Q(l,"associativeWith")&&l.associativeWith instanceof Array){for(var c=0;c<l.associativeWith.length;c++)if(l.associativeWith[c]===a)return!0;return!1}return null}var Er="AssignmentNode",Cr=["subset","?matrix","Node"],Sr=Je(Er,Cr,e=>{var{subset:t,matrix:n,Node:r}=e,o=pr({subset:t}),i=jr({subset:t,matrix:n});function a(e,t,n){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=e,this.index=n?t:null,this.value=n||t,!q(e)&&!A(e))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(q(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(q(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(!q(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}),Ar={matrixDependencies:Or,NodeDependencies:kt,subsetDependencies:cr,createAssignmentNode:Sr},Vr="ResultSet",Tr=[],Pr=Je(Vr,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}),Mr={createResultSet:Pr},Br="BlockNode",Dr=["ResultSet","Node"],$r=Je(Br,Dr,e=>{var{ResultSet:t,Node:n}=e;function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new Error("Array expected");this.blocks=e.map((function(e){var t=e&&e.node,n=!e||void 0===e.visible||e.visible;if(!_(t))throw new TypeError('Property "node" must be a Node');if("boolean"!==typeof n)throw new TypeError('Property "visible" must be a boolean');return{node:t,visible:n}}))}return r.prototype=new n,r.prototype.type="BlockNode",r.prototype.isBlockNode=!0,r.prototype._compile=function(e,n){var r=qe(this.blocks,(function(t){return{evaluate:t.node._compile(e,n),visible:t.visible}}));return function(e,n,o){var i=[];return Re(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:Mr,createBlockNode:$r},_r="ConditionalNode",Ir=["Node"],Lr=Je(_r,Ir,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:Lr},Hr=n("4788"),qr=n.n(Hr),Rr={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(Rr.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 qr()(e,{preserveFormatting:!0})}function Yr(e,t){return t="undefined"!==typeof t&&t,t?Q(Gr,e)?Gr[e]:"\\mathrm{"+Kr(e)+"}":Q(Rr,e)?Rr[e]:Kr(e)}var Zr="ConstantNode",Xr=["Node"],Qr=Je(Zr,Xr,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this.value=e}return n.prototype=new t,n.prototype.type="ConstantNode",n.prototype.isConstantNode=!0,n.prototype._compile=function(e,t){var n=this.value;return function(){return n}},n.prototype.forEach=function(e){},n.prototype.map=function(e){return this.clone()},n.prototype.clone=function(){return new n(this.value)},n.prototype._toString=function(e){return Be(this.value,e)},n.prototype.toHTML=function(e){var t=this._toString(e);switch(z(this.value)){case"number":case"BigNumber":case"Fraction":return'<span class="math-number">'+t+"</span>";case"string":return'<span class="math-string">'+t+"</span>";case"boolean":return'<span class="math-boolean">'+t+"</span>";case"null":return'<span class="math-null-symbol">'+t+"</span>";case"undefined":return'<span class="math-undefined">'+t+"</span>";default:return'<span class="math-symbol">'+t+"</span>"}},n.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},n.fromJSON=function(e){return new n(e.value)},n.prototype._toTex=function(e){var t=this._toString(e);switch(z(this.value)){case"string":return"\\mathtt{"+Kr(t)+"}";case"number":case"BigNumber":if(!isFinite(this.value))return this.value.valueOf()<0?"-\\infty":"\\infty";var n=t.toLowerCase().indexOf("e");return-1!==n?t.substring(0,n)+"\\cdot10^{"+t.substring(n+1)+"}":t;case"Fraction":return this.value.toLatex();default:return t}},n},{isClass:!0,isNode:!0}),eo={NodeDependencies: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:R},{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:j},{name:"Help",test:w},{name:"function",test:N},{name:"Date",test:x},{name:"RegExp",test:k},{name:"null",test:C},{name:"undefined",test:S},{name:"AccessorNode",test:A},{name:"ArrayNode",test:V},{name:"AssignmentNode",test:T},{name:"BlockNode",test:P},{name:"ConditionalNode",test:M},{name:"ConstantNode",test:B},{name:"FunctionNode",test:$},{name:"FunctionAssignmentNode",test:D},{name:"IndexNode",test:F},{name:"Node",test:_},{name:"ObjectNode",test:I},{name:"OperatorNode",test:L},{name:"ParenthesisNode",test:U},{name:"RangeNode",test:H},{name:"SymbolNode",test:q},{name:"Map",test:Ot},{name:"Object",test:E}],i.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(t||ao(e),we(e)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return n||so(e),new n(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return n||so(e),new n(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return n||so(e),new n(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){o||co(e);var t=new o(e);if(t.valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw new Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(e){t||ao(e);try{return new t(e)}catch(n){throw new Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){o||co(e);try{return new o(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){n||so(e);try{return new n(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||ao(e),new t(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return o||co(e),new o(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return r||lo(),new r(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],i}));function ao(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function so(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function lo(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function co(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var uo={createTyped:io},po="FunctionAssignmentNode",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);Re(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?jt(e.createSubScope(),...n):jt(yt(),e,...n)}var jo="FunctionNode",wo=["math","Node","SymbolNode"],No=Je(jo,wo,e=>{var{math:t,Node:n,SymbolNode:r}=e;function o(e,t){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if("string"===typeof e&&(e=new r(e)),!_(e))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(t)||!t.every(_))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=e,this.args=t||[],Object.defineProperty(this,"name",{get:function(){return this.fn.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}o.prototype=new n,o.prototype.type="FunctionNode",o.prototype.isFunctionNode=!0;var i=e=>Be(e,{truncate:78});o.prototype._compile=function(e,t){if(!(this instanceof o))throw new TypeError("No valid FunctionNode");var n=this.args.map(n=>n._compile(e,t));if(!q(this.fn)){if(A(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=D(this.fn)?"("+this.fn.toString(e)+")":this.fn.toString(e);return n+"("+t.join(", ")+")"},o.prototype.toJSON=function(){return{mathjs:"FunctionNode",fn:this.fn,args:this.args}},o.fromJSON=function(e){return new o(e.fn,e.args)},o.prototype.toHTML=function(e){var t=this.args.map((function(t){return t.toHTML(e)}));return'<span class="math-function">'+Fe(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'};var l=o.prototype.toTex;return o.prototype.toTex=function(e){var t;return e&&"object"===typeof e.handler&&Q(e.handler,this.name)&&(t=e.handler[this.name](this,e)),"undefined"!==typeof t?t:l.call(this,e)},o.prototype._toTex=function(e){var n,r,o=this.args.map((function(t){return t.toTex(e)}));switch(Wr[this.name]&&(n=Wr[this.name]),!t[this.name]||"function"!==typeof t[this.name].toTex&&"object"!==typeof t[this.name].toTex&&"string"!==typeof t[this.name].toTex||(n=t[this.name].toTex),typeof n){case"function":r=n(this,e);break;case"string":r=s(n,this,e);break;case"object":switch(typeof n[o.length]){case"function":r=n[o.length](this,e);break;case"string":r=s(n[o.length],this,e);break}}return"undefined"!==typeof r?r:s(Jr,this,e)},o.prototype.getIdentifier=function(){return this.type+":"+this.name},o},{isClass:!0,isNode:!0}),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},Ao="IndexNode",Vo=["Node","size"],To=Je(Ao,Vo,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=qe(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=qe(r,(function(r){return r(e,t,n)}));return o(...i)}},r.prototype.forEach=function(e){for(var t=0;t<this.dimensions.length;t++)e(this.dimensions[t],"dimensions["+t+"]",this)},r.prototype.map=function(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this._ifNode(e(this.dimensions[n],"dimensions["+n+"]",this));return new r(t,this.dotNotation)},r.prototype.clone=function(){return new r(this.dimensions.slice(0),this.dotNotation)},r.prototype.isObjectProperty=function(){return 1===this.dimensions.length&&B(this.dimensions[0])&&"string"===typeof this.dimensions[0].value},r.prototype.getObjectProperty=function(){return this.isObjectProperty()?this.dimensions[0].value:null},r.prototype._toString=function(e){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"},r.prototype.toJSON=function(){return{mathjs:"IndexNode",dimensions:this.dimensions,dotNotation:this.dotNotation}},r.fromJSON=function(e){return new r(e.dimensions,e.dotNotation)},r.prototype.toHTML=function(e){for(var t=[],n=0;n<this.dimensions.length;n++)t[n]=this.dimensions[n].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+Fe(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},r.prototype._toTex=function(e){var t=this.dimensions.map((function(t){return t.toTex(e)}));return this.dotNotation?"."+this.getObjectProperty():"_{"+t.join(",")+"}"},r},{isClass:!0,isNode:!0}),Po={NodeDependencies:kt,sizeDependencies:So,createIndexNode:To},Mo="ObjectNode",Bo=["Node"],Do=Je(Mo,Bo,e=>{var{Node:t}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=e||{},e&&("object"!==typeof e||!Object.keys(e).every((function(t){return _(e[t])}))))throw new TypeError("Object containing Nodes expected")}return n.prototype=new t,n.prototype.type="ObjectNode",n.prototype.isObjectNode=!0,n.prototype._compile=function(e,t){var n={};for(var r in this.properties)if(Q(this.properties,r)){var o=$e(r),i=JSON.parse(o);if(!pt(this.properties,i))throw new Error('No access to property "'+i+'"');n[i]=this.properties[r]._compile(e,t)}return function(e,t,r){var o={};for(var i in n)Q(n,i)&&(o[i]=n[i](e,t,r));return o}},n.prototype.forEach=function(e){for(var t in this.properties)Q(this.properties,t)&&e(this.properties[t],"properties["+$e(t)+"]",this)},n.prototype.map=function(e){var t={};for(var r in this.properties)Q(this.properties,r)&&(t[r]=this._ifNode(e(this.properties[r],"properties["+$e(r)+"]",this)));return new n(t)},n.prototype.clone=function(){var e={};for(var t in this.properties)Q(this.properties,t)&&(e[t]=this.properties[t]);return new n(e)},n.prototype._toString=function(e){var t=[];for(var n in this.properties)Q(this.properties,n)&&t.push($e(n)+": "+this.properties[n].toString(e));return"{"+t.join(", ")+"}"},n.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},n.fromJSON=function(e){return new n(e.properties)},n.prototype.toHTML=function(e){var t=[];for(var n in this.properties)Q(this.properties,n)&&t.push('<span class="math-symbol math-property">'+Fe(n)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[n].toHTML(e));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'},n.prototype._toTex=function(e){var t=[];for(var n in this.properties)Q(this.properties,n)&&t.push("\\mathbf{"+n+":} & "+this.properties[n].toTex(e)+"\\\\");return"\\left\\{\\begin{array}{ll}".concat(t.join("\n"),"\\end{array}\\right\\}")},n},{isClass:!0,isNode:!0}),$o={NodeDependencies:kt,createObjectNode:Do},Fo="OperatorNode",_o=["Node"],Io=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===wr[a][u].latexLeftParens){i=[!1];break}if(!1===wr[l][c].latexParens){i=[!1];break}}if(null===l){i=[!1];break}if(l<=a){i=[!0];break}i=[!1];break;case 2:var p,d,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===wr[a][h].latexLeftParens&&(p=!1),!1===wr[f][g].latexParens&&(p=!1)),null!==y&&(!1===wr[a][h].latexRightParens&&(d=!1),!1===wr[y][b].latexParens&&(d=!1));i=[p,d];break;default:"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier()||(i=r.map((function(n){var r=Nr(n,t),o=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=qe(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,qe(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}),Lo={NodeDependencies:kt,createOperatorNode:Io},Uo="ParenthesisNode",Ho=["Node"],qo=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}),Ro={NodeDependencies:kt,createParenthesisNode:qo},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 q(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 j(e,{})},"string, Object":function(e,t){var n=void 0!==t.nodes?t.nodes:{};return U(e,n)},"Array | Matrix, Object":j});function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=void 0!==t.nodes?t.nodes:{};return Qo(e,(function(e){if("string"!==typeof e)throw new TypeError("String expected");return U(e,n)}))}var w={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},N={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},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:w.NULL,nestingLevel:0,conditionalLevel:null}}function S(e,t){return e.expression.substr(e.index,t)}function V(e){return S(e,1)}function T(e){e.index++}function P(e){return e.expression.charAt(e.index-1)}function M(e){return e.expression.charAt(e.index+1)}function D(e){e.tokenType=w.NULL,e.token="",e.comment="";while(1){if("#"===V(e))while("\n"!==V(e)&&""!==V(e))e.comment+=V(e),T(e);if(!O.isWhitespace(V(e),e.nestingLevel))break;T(e)}if(""!==V(e)){if("\n"===V(e)&&!e.nestingLevel)return e.tokenType=w.DELIMITER,e.token=V(e),void T(e);var t=V(e),n=S(e,2),r=S(e,3);if(3===r.length&&N[r])return e.tokenType=w.DELIMITER,e.token=r,T(e),T(e),void T(e);if(2===n.length&&N[n])return e.tokenType=w.DELIMITER,e.token=n,T(e),void T(e);if(N[t])return e.tokenType=w.DELIMITER,e.token=t,void T(e);if(O.isDigitDot(t)){e.tokenType=w.NUMBER;var o=S(e,2);if("0b"===o||"0o"===o||"0x"===o){e.token+=V(e),T(e),e.token+=V(e),T(e);while(O.isHexDigit(V(e)))e.token+=V(e),T(e);if("."===V(e)){e.token+=".",T(e);while(O.isHexDigit(V(e)))e.token+=V(e),T(e)}else if("i"===V(e)){e.token+="i",T(e);while(O.isDigit(V(e)))e.token+=V(e),T(e)}return}if("."===V(e)){if(e.token+=V(e),T(e),!O.isDigit(V(e)))return void(e.tokenType=w.DELIMITER)}else{while(O.isDigit(V(e)))e.token+=V(e),T(e);O.isDecimalMark(V(e),M(e))&&(e.token+=V(e),T(e))}while(O.isDigit(V(e)))e.token+=V(e),T(e);if("E"===V(e)||"e"===V(e))if(O.isDigit(M(e))||"-"===M(e)||"+"===M(e)){if(e.token+=V(e),T(e),"+"!==V(e)&&"-"!==V(e)||(e.token+=V(e),T(e)),!O.isDigit(V(e)))throw ke(e,'Digit expected, got "'+V(e)+'"');while(O.isDigit(V(e)))e.token+=V(e),T(e);if(O.isDecimalMark(V(e),M(e)))throw ke(e,'Digit expected, got "'+V(e)+'"')}else if("."===M(e))throw T(e),ke(e,'Digit expected, got "'+V(e)+'"')}else{if(!O.isAlpha(V(e),P(e),M(e))){e.tokenType=w.UNKNOWN;while(""!==V(e))e.token+=V(e),T(e);throw ke(e,'Syntax error in part "'+e.token+'"')}while(O.isAlpha(V(e),P(e),M(e))||O.isDigit(V(e)))e.token+=V(e),T(e);Q(x,e.token)?e.tokenType=w.DELIMITER:e.tokenType=w.SYMBOL}}else e.tokenType=w.DELIMITER}function F(e){do{D(e)}while("\n"===e.token)}function _(e){e.nestingLevel++}function I(e){e.nestingLevel--}function U(e,t){var n=C();a()(n,{expression:e,extraNodes:t}),D(n);var r=H(n);if(""!==n.token)throw n.tokenType===w.DELIMITER?Ee(n,"Unexpected operator "+n.token):ke(n,'Unexpected part "'+n.token+'"');return r}function H(e){var t,n,r=[];""!==e.token&&"\n"!==e.token&&";"!==e.token&&(t=R(e),t.comment=e.comment);while("\n"===e.token||";"===e.token)0===r.length&&t&&(n=";"!==e.token,r.push({node:t,visible:n})),D(e),"\n"!==e.token&&";"!==e.token&&""!==e.token&&(t=R(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 R(e){var t,n,r,o,i=z(e);if("="===e.token){if(q(i))return t=i.name,F(e),r=R(e),new s(new v(t),r);if(A(i))return F(e),r=R(e),new s(i.object,i.index,r);if($(i)&&q(i.fn)&&(o=!0,n=[],t=i.name,i.args.forEach((function(e,t){q(e)?n[t]=e.name:o=!1})),o))return F(e),r=R(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=R(e);if(":"!==e.token)throw ke(e,"False part of conditional expression expected");e.conditionalLevel=null,F(e);var i=R(e);t=new c(r,o,i),e.conditionalLevel=n}return t}function W(e){var t=J(e);while("or"===e.token)F(e),t=new h("or","or",[t,J(e)]);return t}function J(e){var t=G(e);while("xor"===e.token)F(e),t=new h("xor","xor",[t,G(e)]);return t}function G(e){var t=K(e);while("and"===e.token)F(e),t=new h("and","and",[t,K(e)]);return t}function K(e){var t=Y(e);while("|"===e.token)F(e),t=new h("|","bitOr",[t,Y(e)]);return t}function Y(e){var t=Z(e);while("^|"===e.token)F(e),t=new h("^|","bitXor",[t,Z(e)]);return t}function Z(e){var t=X(e);while("&"===e.token)F(e),t=new h("&","bitAnd",[t,X(e)]);return t}function X(e){var t=[ee(e)],n=[],r={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};while(Q(r,e.token)){var o={name:e.token,fn:r[e.token]};n.push(o),F(e),t.push(ee(e))}return 1===t.length?t[0]:2===t.length?new h(n[0].name,n[0].fn,t):new y(n.map(e=>e.fn),t)}function ee(e){var t,n,r,o;t=te(e);var i={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};while(Q(i,e.token))n=e.token,r=i[n],F(e),o=[t,te(e)],t=new h(n,r,o);return t}function te(e){var t,n,r,o;t=ne(e);var i={to:"to",in:"to"};while(Q(i,e.token))n=e.token,r=i[n],F(e),"in"===n&&""===e.token?t=new h("*","multiply",[t,new v("in")],!0):(o=[t,ne(e)],t=new h(n,r,o));return t}function ne(e){var t,n=[];if(t=":"===e.token?new u(1):re(e),":"===e.token&&e.conditionalLevel!==e.nestingLevel){n.push(t);while(":"===e.token&&n.length<3)F(e),")"===e.token||"]"===e.token||","===e.token||""===e.token?n.push(new v("end")):n.push(re(e));t=3===n.length?new b(n[0],n[2],n[1]):new b(n[0],n[1])}return t}function re(e){var t,n,r,o;t=oe(e);var i={"+":"add","-":"subtract"};while(Q(i,e.token)){n=e.token,r=i[n],F(e);var a=oe(e);o=a.isPercentage?[t,new h("*","multiply",[t,a])]:[t,a],t=new h(n,r,o)}return t}function oe(e){var t,n,r,o;t=ie(e),n=t;var i={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};while(1){if(!Q(i,e.token))break;r=e.token,o=i[r],F(e),n=ie(e),t=new h(r,o,[t,n])}return t}function ie(e){var t,n;t=ae(e),n=t;while(1){if(!(e.tokenType===w.SYMBOL||"in"===e.token&&B(t))&&(e.tokenType!==w.NUMBER||B(n)||L(n)&&"!"!==n.op)&&"("!==e.token)break;n=ae(e),t=new h("*","multiply",[t,n],!0)}return t}function ae(e){var t=se(e),n=t,r=[];while(1){if("/"!==e.token||!B(n))break;if(r.push(a()({},e)),F(e),e.tokenType!==w.NUMBER){a()(e,r.pop());break}if(r.push(a()({},e)),F(e),e.tokenType!==w.SYMBOL&&"("!==e.token){r.pop(),a()(e,r.pop());break}a()(e,r.pop()),r.pop(),n=se(e),t=new h("/","divide",[t,n])}return t}function se(e){var t,n,r,o;t=le(e);var i={"%":"mod",mod:"mod"};while(Q(i,e.token))n=e.token,r=i[n],F(e),"%"===n&&e.tokenType===w.DELIMITER&&"("!==e.token?t=new h("/","divide",[t,new u(100)],!1,!0):(o=[t,le(e)],t=new h(n,r,o));return t}function le(e){var t,n,r,o={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Q(o,e.token)?(r=o[e.token],t=e.token,F(e),n=[le(e)],new h(t,r,n)):ce(e)}function ce(e){var t,n,r,o;return t=ue(e),"^"!==e.token&&".^"!==e.token||(n=e.token,r="^"===n?"pow":"dotPow",F(e),o=[t,le(e)],t=new h(n,r,o)),t}function ue(e){var t,n,r,o;t=pe(e);var i={"!":"factorial","'":"ctranspose"};while(Q(i,e.token))n=e.token,r=i[n],D(e),o=[t],t=new h(n,r,o),t=fe(e,t);return t}function pe(e){var t=[];if(e.tokenType===w.SYMBOL&&Q(e.extraNodes,e.token)){var n=e.extraNodes[e.token];if(D(e),"("===e.token){if(t=[],_(e),D(e),")"!==e.token){t.push(R(e));while(","===e.token)D(e),t.push(R(e))}if(")"!==e.token)throw ke(e,"Parenthesis ) expected");I(e),D(e)}return new n(t)}return de(e)}function de(e){var t,r;return e.tokenType===w.SYMBOL||e.tokenType===w.DELIMITER&&e.token in x?(r=e.token,D(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(!q(t)&&!A(t))return t;if(_(e),D(e),")"!==e.token){r.push(R(e));while(","===e.token)D(e),r.push(R(e))}if(")"!==e.token)throw ke(e,"Parenthesis ) expected");I(e),D(e),t=new d(t,r)}else if("["===e.token){if(_(e),D(e),"]"!==e.token){r.push(R(e));while(","===e.token)D(e),r.push(R(e))}if("]"!==e.token)throw ke(e,"Parenthesis ] expected");I(e),D(e),t=new o(t,new f(r))}else{if(D(e),e.tokenType!==w.SYMBOL)throw ke(e,"Property name expected after dot");r.push(new u(e.token)),D(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(""!==V(e)&&'"'!==V(e))"\\"===V(e)&&(t+=V(e),T(e)),t+=V(e),T(e);if(D(e),'"'!==e.token)throw ke(e,'End of string " expected');return D(e),JSON.parse('"'+t+'"')}function ge(e){var t,n;return"'"===e.token?(n=be(e),t=new u(n),t=fe(e,t),t):ye(e)}function be(e){var t="";while(""!==V(e)&&"'"!==V(e))"\\"===V(e)&&(t+=V(e),T(e)),t+=V(e),T(e);if(D(e),"'"!==e.token)throw ke(e,"End of string ' expected");return D(e),JSON.parse('"'+t+'"')}function ye(e){var t,n,r,o;if("["===e.token){if(_(e),D(e),"]"!==e.token){var a=ve(e);if(";"===e.token){r=1,n=[a];while(";"===e.token)D(e),n[r]=ve(e),r++;if("]"!==e.token)throw ke(e,"End of matrix ] expected");I(e),D(e),o=n[0].items.length;for(var s=1;s<r;s++)if(n[s].items.length!==o)throw Ee(e,"Column dimensions mismatch ("+n[s].items.length+" !== "+o+")");t=new i(n)}else{if("]"!==e.token)throw ke(e,"End of matrix ] expected");I(e),D(e),t=a}}else I(e),D(e),t=new i([]);return fe(e,t)}return Oe(e)}function ve(e){var t=[R(e)],n=1;while(","===e.token)D(e),t[n]=R(e),n++;return new i(t)}function Oe(e){if("{"===e.token){var t;_(e);var n={};do{if(D(e),"}"!==e.token){if('"'===e.token)t=he(e);else if("'"===e.token)t=be(e);else{if(!(e.tokenType===w.SYMBOL||e.tokenType===w.DELIMITER&&e.token in x))throw ke(e,"Symbol or string expected as object key");t=e.token,D(e)}if(":"!==e.token)throw ke(e,"Colon : expected after object key");D(e),n[t]=R(e)}}while(","===e.token);if("}"!==e.token)throw ke(e,"Comma , or bracket } expected after object value");I(e),D(e);var r=new m(n);return r=fe(e,r),r}return je(e)}function je(e){var t;return e.tokenType===w.NUMBER?(t=e.token,D(e),new u(n(t,r.number))):we(e)}function we(e){var t;if("("===e.token){if(_(e),D(e),t=R(e),")"!==e.token)throw ke(e,"Parenthesis ) expected");return I(e),D(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:Ar,BlockNodeDependencies:Fr,ConditionalNodeDependencies:Ur,ConstantNodeDependencies:eo,FunctionAssignmentNodeDependencies:ho,FunctionNodeDependencies:xo,IndexNodeDependencies:Po,ObjectNodeDependencies:$o,OperatorNodeDependencies:Lo,ParenthesisNodeDependencies:Ro,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"),ji={class:"form-group row matomo-form-field"},wi={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["openBlock"])(),Object(Oi["createElementBlock"])("div",ji,[e.formField.introduction?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("h3",wi,Object(Oi["toDisplayString"])(e.formField.introduction),1)):Object(Oi["createCommentVNode"])("",!0),Object(Oi["createElementVNode"])("div",{class:Object(Oi["normalizeClass"])(["col s12",{"input-field":"checkbox"!==e.formField.uiControl&&"radio"!==e.formField.uiControl,"file-field":"file"===e.formField.uiControl,m6:!e.formField.fullWidth}])},[(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(Object(Oi["resolveDynamicComponent"])(e.childComponent),Object(Oi["mergeProps"])(Object.assign(Object.assign({formField:e.formField},e.formField),{},{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)])}var Ci=n("19dc"),Si={class:"checkbox"},Ai=["checked","id","name"],Vi=["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,Ai),Object(Oi["createElementVNode"])("span",{innerHTML:e.$sanitize(e.title)},null,8,Vi)])])}var Pi=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}}});Pi.render=Ti;var Mi=Pi,Bi={ref:"root"},Di=["value","checked","onChange","id","name"];function $i(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Bi,[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,Di),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)||Li(e)||Ii(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 Ii(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 Li(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 qi(e,t){return(e||[]).map((function(e){return t&&-1!==t.indexOf(e.key)}))}var Ri=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 qi(this.availableOptions,this.modelValue)}},mounted:function(){setTimeout((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)}}});Ri.render=$i;var zi=Ri,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,{focused: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-chevron-right":e.showCategory!==t.group,"icon-chevron-down":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,rows:e.uiControlAttributes.rows},null,8,["name","model-value","model-modifiers","field","rows"])])}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 ja=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)}}});ja.render=Oa;var wa=ja,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,rows:e.uiControlAttributes.rows},null,8,["name","model-value","onUpdate:modelValue","model-modifiers","field1","field2","field3","field4","rows"])])}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"],Aa=["for","innerHTML"];function Va(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,Aa)],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(){setTimeout((function(){window.Materialize.updateTextFields()}))},watch:{modelValue:function(){setTimeout((function(){window.Materialize.updateTextFields()}))}},computed:{modelValueFormatted:function(){return(this.modelValue||"").toString()}}});Ta.render=Va;var Pa=Ta,Ma={ref:"root"},Ba=["value","id","name","disabled","checked"];function Da(e,t,n,r,o,i){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Ma,[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,Ba),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=Da;var Fa=$a;function _a(e,t){return qa(e)||Ha(e,t)||La(e,t)||Ia()}function Ia(){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 La(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 qa(e){if(Array.isArray(e))return e}var Ra={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",Ra,[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 js=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)}}});js.render=Os;var ws=js,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"],As=["type","name","value"];function Vs(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,As)])}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=Vs;var Ps=Ts,Ms=["name","id","value"],Bs=["for","innerHTML"];function Ds(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,Ms),Object(Oi["createElementVNode"])("label",{for:e.name,innerHTML:e.$sanitize(e.title)},null,8,Bs)],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=Ds;var Fs=$s,_s=["for","innerHTML"],Is=["name","value"];function Ls(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,Is)])}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)}var Hs="\n",qs=Object(Oi["defineComponent"])({props:{name:String,title:String,uiControlAttributes:Object,modelValue:[Array,String],modelModifiers:Object},inheritAttrs:!1,emits:["update:modelValue"],computed:{concattedValue:function(){if("string"===typeof this.modelValue)return this.modelValue;if("object"===Us(this.modelValue))return Object.values(this.modelValue).join(Hs);try{return(this.modelValue||[]).join(Hs)}catch(e){return console.error(e),""}}},created:function(){this.onKeydown=Object(Ci["debounce"])(this.onKeydown.bind(this),50)},methods:{onKeydown:function(e){var t=this,n=e.target.value.split(Hs);if(n.join(Hs)!==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()}))}});qs.render=Ls;var Rs=qs;function zs(e){return zs="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},zs(e)}function Ws(e,t){return Zs(e)||Ys(e,t)||Gs(e,t)||Js()}function Js(){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 Gs(e,t){if(e){if("string"===typeof e)return Ks(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)?Ks(e,t):void 0}}function Ks(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 Ys(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 Zs(e){if(Array.isArray(e))return e}
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/function Xs(e,t){if(!e)return[];var n=[];return Object.entries(e).forEach((function(e){var r=Ws(e,2),o=r[0],i=r[1];if(i&&"object"===zs(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 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)}var el=["password","url","search","email"],tl=["textarea","checkbox","text"],nl={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"},rl={FieldSelect:ms,FieldCheckboxArray:Xs,FieldRadio:Xs,FieldExpandableSelect:oa},ol=Object(Oi["defineComponent"])({props:{modelValue:null,modelModifiers:Object,formField:{type:Object,required:!0}},emits:["update:modelValue"],components:{FieldCheckbox:Mi,FieldCheckboxArray:zi,FieldExpandableSelect:aa,FieldFieldArray:ua,FieldFile:ya,FieldHidden:wa,FieldMultituple:Ca,FieldNumber:Pa,FieldRadio:Fa,FieldSelect:bs,FieldSite:ws,FieldText:Cs,FieldTextArray:Ps,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=nl[i];return-1!==el.indexOf(i)&&(a="FieldText"),"array"===this.formField.type&&-1!==tl.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},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&&rl[e]?rl[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"===Qs(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)}}});ol.render=Ei;var il=ol;function al(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 sl={multiselect:"array",checkbox:"boolean",site:"object",number:"integer"},ll=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,varType:String,autofocus:Boolean,tabindex:Number,fullWidth:Boolean,maxlength:Number,required:Boolean,placeholder:String,rows:Number,min:Number,max:Number,component:null},emits:["update:modelValue"],components:{FormField:il},computed:{type:function(){if(this.varType)return this.varType;var e=this.uicontrol;return e&&sl[e]?sl[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,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)}}});ll.render=al;var cl=ll,ul={class:"pluginSettings",ref:"root"},pl=["id"],dl={class:"card-content"},fl=["id"],ml=["onClick","disabled","value"];function hl(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",ul,[(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",dl,[Object(Oi["createElementVNode"])("h2",{class:"card-title",id:t.pluginName},Object(Oi["toDisplayString"])(t.title),9,fl),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,ml),Object(Oi["createVNode"])(s,{loading:e.isLoading||e.isSaving[t.pluginName]},null,8,["loading"])])],8,pl)})),128)),Object(Oi["createVNode"])(l,{modelValue:e.showPasswordConfirmModal,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.showPasswordConfirmModal=t}),onConfirmed:e.confirmPassword},null,8,["modelValue","onConfirmed"])],512)}function gl(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 bl(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 yl=Object(Oi["defineComponent"])({props:{setting:{type:Object,required:!0},modelValue:null,conditionValues:{type:Object,required:!0}},components:{FormField:il},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)}}});yl.render=bl;var vl=yl;function Ol(e,t){return kl(e)||xl(e,t)||wl(e,t)||jl()}function jl(){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 Nl(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)?Nl(e,t):void 0}}function Nl(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 xl(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 kl(e){if(Array.isArray(e))return e}var El=Object(Oi["defineComponent"])({props:{groupName:String,settings:{type:Array,required:!0},allSettingValues:{type:Object,required:!0}},emits:["change"],components:{GroupedSetting:vl},computed:{settingValues:function(){var e=this,t=Object.entries(this.allSettingValues).filter((function(t){var n=Ol(t,1),r=n[0];if(e.groupName){var o=r.split("."),i=Ol(o,1),a=i[0];if(a!==e.groupName)return!1}return!0})).map((function(t){var n=Ol(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,"."):""}}});El.render=gl;var Cl=El,Sl={class:"confirm-password-modal modal",ref:"root"},Al={class:"modal-content"},Vl={class:"modal-text"},Tl={ref:"content"},Pl={key:0},Ml={key:1},Bl={key:2},Dl={class:"modal-footer"},$l=["disabled"];function Fl(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("Field");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Sl,[Object(Oi["createElementVNode"])("div",Al,[Object(Oi["createElementVNode"])("div",Vl,[Object(Oi["createElementVNode"])("div",Tl,[Object(Oi["renderSlot"])(e.$slots,"default")],512),e.requiresPasswordConfirmation||e.slotHasContent?Object(Oi["createCommentVNode"])("",!0):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("h2",Pl,Object(Oi["toDisplayString"])(e.translate("UsersManager_ConfirmThisChange")),1)),e.requiresPasswordConfirmation&&!e.slotHasContent?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("h2",Ml,Object(Oi["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)):Object(Oi["createCommentVNode"])("",!0),e.requiresPasswordConfirmation&&e.slotHasContent?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Bl,Object(Oi["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)):Object(Oi["createCommentVNode"])("",!0)]),Object(Oi["withDirectives"])(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"])],512),[[Oi["vShow"],e.requiresPasswordConfirmation]])]),Object(Oi["createElementVNode"])("div",Dl,[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){return e.onClickConfirm(t)})},Object(Oi["toDisplayString"])(e.translate("General_Confirm")),9,$l),Object(Oi["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no btn-flat",onClick:t[2]||(t[2]=function(t){return e.onClickCancel(t)})},Object(Oi["toDisplayString"])(e.translate("General_Cancel")),1)])],512)}var _l=window,Il=_l.$,Ll=Object(Oi["defineComponent"])({props:{modelValue:{type:Boolean,required:!0}},data:function(){return{passwordConfirmation:"",slotHasContent:!0}},emits:["confirmed","aborted","update:modelValue"],components:{Field:cl},activated:function(){this.$emit("update:modelValue",!1)},methods:{onClickConfirm:function(e){e.preventDefault(),this.$emit("confirmed",this.passwordConfirmation),this.passwordConfirmation=""},onClickCancel:function(e){e.preventDefault(),this.$emit("aborted"),this.passwordConfirmation=""},showPasswordConfirmModal:function(){var e=this;this.slotHasContent=!this.$refs.content.matches(":empty");var t=this.$refs.root,n=Il(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";Il(e).focus(),Il(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()}}});Ll.render=Fl;var Ul=Ll;function Hl(e,t){return Jl(e)||Wl(e,t)||Rl(e,t)||ql()}function ql(){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 Rl(e,t){if(e){if("string"===typeof e)return zl(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)?zl(e,t):void 0}}function zl(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 Wl(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 Jl(e){if(Array.isArray(e))return e}var Gl=window,Kl=Gl.$,Yl=Object(Oi["defineComponent"])({props:{mode:String},components:{PasswordConfirmation:Ul,ActivityIndicator:Ci["ActivityIndicator"],GroupedSettings:Cl},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=Kl("#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=Hl(n,2),o=r[0],i=r[1],a=o.split("."),s=Hl(a,2),l=s[0],c=s[1];if(l===e){var u=i;!1===u?u="0":!0===u&&(u="1"),Array.isArray(u)&&0===u.length&&(u="__empty__"),t[l].push({name:c,value:u})}})),t}}});Yl.render=hl;var Zl=Yl,Xl=window,Ql=Xl.$;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/function ec(e){return e.find(".origin a.active").data("filter-origin")}function tc(e){return e.find(".status a.active").data("filter-status")}function nc(e,t){var n="#plugins tr";return n+="all"===e?"[data-filter-origin]":"[data-filter-origin=".concat(e,"]"),n+="all"===t?"[data-filter-status]":"[data-filter-status=".concat(t,"]"),Ql(n)}function rc(e,t,n,r){var o=nc(n,r).length,i=" (".concat(o,")");e.find("".concat(t," .counter")).text(i)}function oc(e){var t=ec(e),n=tc(e);rc(e,'[data-filter-status="all"]',t,"all"),rc(e,'[data-filter-status="active"]',t,"active"),rc(e,'[data-filter-status="inactive"]',t,"inactive"),rc(e,'[data-filter-origin="all"]',"all",n),rc(e,'[data-filter-origin="core"]',"core",n),rc(e,'[data-filter-origin="official"]',"official",n),rc(e,'[data-filter-origin="thirdparty"]',"thirdparty",n)}function ic(e){var t=ec(e),n=tc(e),r=nc(t,n);Ql("#plugins tr[data-filter-origin][data-filter-status]").css("display","none"),r.css("display","table-row"),oc(e)}function ac(e,t){t.preventDefault(),Ql(t.target).siblings().removeClass("active"),Ql(t.target).addClass("active"),ic(e)}function sc(e,t){t.preventDefault(),Ql(t.target).siblings().removeClass("active"),Ql(t.target).addClass("active"),ic(e)}var lc={mounted:function(e){setTimeout((function(){oc(Ql(e)),Ql(e).find(".status").on("click","a",ac.bind(null,Ql(e))),Ql(e).find(".origin").on("click","a",sc.bind(null,Ql(e)))}))}},cc=window,uc=cc.$;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/function pc(e,t){t.preventDefault();var n=uc(t.target).attr("href"),r=uc(t.target).attr("data-plugin-name");if(n&&r){e.value.uninstallConfirmMessage||(e.value.uninstallConfirmMessage=uc("#uninstallPluginConfirm").text());var o=(e.value.uninstallConfirmMessage||"").replace("%s",r);uc("#uninstallPluginConfirm").text(o),Ci["Matomo"].helper.modalConfirm("#confirmUninstallPlugin",{yes:function(){window.location.href=n}})}}function dc(e){e.preventDefault();var t=uc(e.target).data("overlay-id");Ci["Matomo"].helper.modalConfirm("#".concat(t),{})}var fc={mounted:function(e,t){setTimeout((function(){t.value.uninstallConfirmMessage="",uc(e).find(".uninstall").click(pc.bind(null,t)),uc(e).find(".plugin-donation-link").click(dc)}))}},mc=window,hc=mc.$;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/function gc(e){e.preventDefault(),Ci["Matomo"].helper.modalConfirm("#installPluginByUpload",{})}function bc(e){var t=hc("[name=pluginZip]"),n=t.val();n&&".zip"===n.slice(-4)?t.data("maxSize")>0&&t[0].files[0].size>1048576*t.data("maxSize")&&(e.preventDefault(),alert(Object(Ci["translate"])("CorePluginsAdmin_FileExceedsUploadLimit"))):(e.preventDefault(),alert(Object(Ci["translate"])("CorePluginsAdmin_NoZipFileSelected")))}var yc={mounted:function(){setTimeout((function(){hc(".uploadPlugin").click(gc),hc("#uploadPluginForm").submit(bc)}))}},vc={class:"matomo-save-button",style:{display:"inline-block"}},Oc=["disabled","value"];function jc(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("ActivityIndicator");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",vc,[Object(Oi["createElementVNode"])("input",{type:"button",onClick:t[0]||(t[0]=function(t){return e.onConfirm(t)}),disabled:e.saving||e.disabled,class:"btn",value:e.value?e.value:e.translate("General_Save")},null,8,Oc),Object(Oi["createVNode"])(a,{loading:e.saving},null,8,["loading"])])}var wc=Object(Oi["defineComponent"])({props:{saving:Boolean,value:String,disabled:Boolean},components:{ActivityIndicator:Ci["ActivityIndicator"]},emits:["confirm"],methods:{onConfirm:function(e){this.$emit("confirm",e)}}});wc.render=jc;var Nc=wc,xc=window,kc=xc.$,Ec={mounted:function(e){setTimeout((function(){kc(e).find("input[type=text]").keypress((function(t){var n=t.keyCode||t.which;13===n&&kc(e).find(".matomo-save-button input").triggerHandler("click")}))}))}},Cc=["innerHTML"],Sc={key:1,style:{"margin-right":"3.5px"}},Ac=Object(Oi["createElementVNode"])("br",null,null,-1),Vc=["innerHTML"];
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/function Tc(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("EnrichedHeadline"),s=Object(Oi["resolveComponent"])("InstallAllPaidPluginsButton"),l=Object(Oi["resolveDirective"])("content-intro");return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])(Oi["Fragment"],null,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("div",null,[Object(Oi["createElementVNode"])("h2",null,[Object(Oi["createVNode"])(a,null,{default:Object(Oi["withCtx"])((function(){return[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_PluginsManagement")),1)]})),_:1})]),Object(Oi["createElementVNode"])("p",null,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_PluginsExtendPiwik"))+" "+Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_OncePluginIsInstalledYouMayActivateHere"))+" ",1),e.isMarketplaceEnabled||e.isPluginUploadEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.teaserExtendMatomoByPluginText),style:{"margin-right":"3.5px"}},null,8,Cc)):Object(Oi["createCommentVNode"])("",!0),e.isPluginsAdminEnabled?Object(Oi["createCommentVNode"])("",!0):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Sc,[Ac,Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_DoMoreContactPiwikAdmins")),1)])),Object(Oi["createElementVNode"])("span",{innerHTML:e.$sanitize(e.changeLookByManageThemesText)},null,8,Vc)])],512),[[l]]),Object(Oi["createVNode"])(s)],64)}var Pc={key:0},Mc=["disabled"],Bc={class:"ui-confirm",id:"installAllPaidPluginsAtOnce",ref:"installAllPaidPluginsAtOnce"},Dc=["data-href","value"],$c=["value"];function Fc(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("MatomoLoader");return e.paidPluginsToInstallAtOnce.length?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Pc,[Object(Oi["createElementVNode"])("button",{class:"btn installAllPaidPluginsAtOnceButton",onClick:t[0]||(t[0]=Object(Oi["withModifiers"])((function(t){return e.onInstallAllPaidPlugins()}),["prevent"])),disabled:e.disabled||e.loading},[e.loading?(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(a,{key:0})):Object(Oi["createCommentVNode"])("",!0),Object(Oi["createTextVNode"])(" "+Object(Oi["toDisplayString"])(e.translate("Marketplace_InstallPurchasedPlugins")),1)],8,Mc),Object(Oi["createElementVNode"])("div",Bc,[Object(Oi["createElementVNode"])("h2",null,Object(Oi["toDisplayString"])(e.translate("Marketplace_InstallAllPurchasedPlugins")),1),Object(Oi["createElementVNode"])("p",null,Object(Oi["toDisplayString"])(e.translate("Marketplace_InstallThesePlugins")),1),Object(Oi["createElementVNode"])("ul",null,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.paidPluginsToInstallAtOnce,(function(e){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("li",{key:e},Object(Oi["toDisplayString"])(e),1)})),128))]),Object(Oi["createElementVNode"])("p",null,[Object(Oi["createElementVNode"])("input",{role:"install",type:"button","data-href":e.installAllPaidPluginsLink,value:e.translate("Marketplace_InstallAllPurchasedPluginsAction",e.paidPluginsToInstallAtOnce.length)},null,8,Dc),Object(Oi["createElementVNode"])("input",{role:"cancel",type:"button",value:e.translate("General_Cancel")},null,8,$c)])],512)])):Object(Oi["createCommentVNode"])("",!0)}var _c=Object(Oi["defineComponent"])({components:{MatomoLoader:Ci["MatomoLoader"]},props:{disabled:{type:Boolean,required:!1,default:!1}},data:function(){return{paidPluginsToInstallAtOnce:[],installNonce:"",loading:!1}},created:function(){this.fetchPluginsToInstallAtOnce()},watch:{disabled:function(e,t){!1===e&&!0===t&&this.fetchPluginsToInstallAtOnce()}},methods:{onInstallAllPaidPlugins:function(){Ci["Matomo"].helper.modalConfirm(this.$refs.installAllPaidPluginsAtOnce)},fetchPluginsToInstallAtOnce:function(){var e=this;this.loading=!0,Ci["Matomo"].hasSuperUserAccess&&Ci["AjaxHelper"].fetch({module:"Marketplace",action:"getPaidPluginsToInstallAtOnceParams"}).then((function(t){var n,r;t&&(e.paidPluginsToInstallAtOnce=null!==(n=t.paidPluginsToInstallAtOnce)&&void 0!==n?n:[],e.installNonce=null!==(r=t.installAllPluginsNonce)&&void 0!==r?r:"");e.loading=!1}))}},computed:{installAllPaidPluginsLink:function(){return"?".concat(Ci["MatomoUrl"].stringify(Object.assign(Object.assign({},Ci["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"installAllPaidPlugins",nonce:this.installNonce})))}}});_c.render=Fc;var Ic=_c,Lc=Object(Oi["defineComponent"])({props:{isMarketplaceEnabled:Boolean,isPluginUploadEnabled:Boolean,isPluginsAdminEnabled:Boolean},components:{EnrichedHeadline:Ci["EnrichedHeadline"],InstallAllPaidPluginsButton:Ic},directives:{ContentIntro:Ci["ContentIntro"]},computed:{teaserExtendMatomoByPluginText:function(){var e="?".concat(Ci["MatomoUrl"].stringify(Object.assign(Object.assign({},Ci["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"overview",sort:null,activated:null})));return Object(Ci["translate"])("CorePluginsAdmin_TeaserExtendPiwikByPlugin",'<a href="'.concat(e,'">'),"</a>",'<a href="#" class="uploadPlugin">',"</a>")},changeLookByManageThemesText:function(){var e="?".concat(Ci["MatomoUrl"].stringify(Object.assign(Object.assign({},Ci["MatomoUrl"].urlParsed.value),{},{action:"themes",activated:null})));return Object(Ci["translate"])("CorePluginsAdmin_ChangeLookByManageThemes",'<a href="'.concat(e,'">'),"</a>")}}});Lc.render=Tc;var Uc=Lc,Hc=["innerHTML"],qc={key:1},Rc=Object(Oi["createElementVNode"])("br",null,null,-1),zc={key:2},Wc=Object(Oi["createElementVNode"])("br",null,null,-1);function Jc(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("EnrichedHeadline"),s=Object(Oi["resolveDirective"])("content-intro");return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",null,[Object(Oi["createElementVNode"])("h2",null,[Object(Oi["createVNode"])(a,null,{default:Object(Oi["withCtx"])((function(){return[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_ThemesManagement")),1)]})),_:1})]),Object(Oi["createElementVNode"])("p",null,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_ThemesDescription"))+" ",1),e.isMarketplaceEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.teaserExtendByThemeText)},null,8,Hc)):Object(Oi["createCommentVNode"])("",!0),e.otherUsersCount>0?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",qc,[Rc,Object(Oi["createTextVNode"])(" "+Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_InfoThemeIsUsedByOtherUsersAsWell",e.otherUsersCount,e.themeEnabled)),1)])):Object(Oi["createCommentVNode"])("",!0),e.isPluginsAdminEnabled?Object(Oi["createCommentVNode"])("",!0):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",zc,[Wc,Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_DoMoreContactPiwikAdmins")),1)]))])],512)),[[s]])}var Gc=Object(Oi["defineComponent"])({props:{isMarketplaceEnabled:Boolean,otherUsersCount:Number,themeEnabled:Boolean,isPluginsAdminEnabled:Boolean},components:{EnrichedHeadline:Ci["EnrichedHeadline"]},directives:{ContentIntro:Ci["ContentIntro"]},computed:{teaserExtendByThemeText:function(){var e=Ci["MatomoUrl"].stringify({module:"Marketplace",action:"overview"}),t=Ci["MatomoUrl"].stringify({pluginType:"themes"}),n="?".concat(e,"#?").concat(t);return Object(Ci["translate"])("CorePluginsAdmin_TeaserExtendPiwikByTheme",'<a href="'.concat(n,'">'),"</a>")}}});Gc.render=Jc;var Kc=Gc,Yc=window,Zc=Yc.$;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/function Xc(e,t){var n=e.value.pluginName,r=e.value.activePluginTab;t.preventDefault(),r&&(n+="!".concat(r)),window.broadcast.propagateNewPopoverParameter("browsePluginDetail",n)}window.broadcast.addPopoverHandler("browsePluginDetail",(function(e){var t=e,n=null;if(-1!==e.indexOf("!")&&(n=e.slice(e.indexOf("!")+1),t=e.slice(0,e.indexOf("!"))),"Marketplace"===Ci["MatomoUrl"].urlParsed.value.module&&"overview"===Ci["MatomoUrl"].urlParsed.value.action)return window.broadcast.propagateNewPopoverParameter(""),void Ci["MatomoUrl"].updateHash(Object.assign(Object.assign({},Ci["MatomoUrl"].hashParsed.value),{},{showPlugin:t,popover:null}));var r="module=Marketplace&action=pluginDetails&pluginName=".concat(encodeURIComponent(t));n&&(r+="&activeTab=".concat(encodeURIComponent(n))),window.Piwik_Popover.createPopupAndLoadUrl(r,"details")}));var Qc={mounted:function(e,t){var n=t.value.pluginName;n&&(t.value.onClickHandler=Xc.bind(null,t),Zc(e).on("click",t.value.onClickHandler).attr("matomo-plugin-name",n))},unmounted:function(e,t){Zc(e).off("click",t.value.onClickHandler)}},eu={class:"row pluginsFilter"},tu={class:"origin"},nu={style:{"margin-right":"3.5px"}},ru={"data-filter-origin":"all",href:"#",class:"active"},ou=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),iu=Object(Oi["createTextVNode"])(" | "),au={"data-filter-origin":"core",href:"#"},su=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),lu=Object(Oi["createTextVNode"])(" | "),cu={"data-filter-origin":"official",href:"#"},uu=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),pu=Object(Oi["createTextVNode"])(" | "),du={"data-filter-origin":"thirdparty",href:"#"},fu=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),mu={class:"status"},hu={style:{"margin-right":"3.5px"}},gu={"data-filter-status":"all",href:"#",class:"active"},bu=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),yu=Object(Oi["createTextVNode"])(" | "),vu={"data-filter-status":"active",href:"#"},Ou=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),ju=Object(Oi["createTextVNode"])(" | "),wu={"data-filter-status":"inactive",href:"#"},Nu=Object(Oi["createElementVNode"])("span",{class:"counter"},null,-1),xu={id:"confirmUninstallPlugin",class:"ui-confirm"},ku={id:"uninstallPluginConfirm"},Eu=["value"],Cu=["value"],Su={class:"status"},Au={key:0,class:"action-links"},Vu={id:"plugins"},Tu=["data-filter-status","data-filter-origin"],Pu={class:"name"},Mu=["name"],Bu={key:0},Du={key:1},$u=["title"],Fu={key:2},_u=Object(Oi["createElementVNode"])("br",null,null,-1),Iu=Object(Oi["createElementVNode"])("br",null,null,-1),Lu=["href"],Uu={class:"desc"},Hu={class:"plugin-desc-missingrequirements"},qu={key:0},Ru=Object(Oi["createElementVNode"])("br",null,null,-1),zu={class:"plugin-desc-text"},Wu={key:0,class:"plugin-homepage"},Ju=["href"],Gu={key:1,class:"plugin-donation"},Ku=["data-overlay-id"],Yu=["id","title"],Zu=["innerHTML"],Xu={class:"donation-links"},Qu=["href"],ep=Object(Oi["createElementVNode"])("img",{src:"plugins/CorePluginsAdmin/images/paypal_donate.png",height:"30"},null,-1),tp=[ep],np=["href"],rp=Object(Oi["createElementVNode"])("img",{class:"alignnone",title:"Flattr",alt:"",src:"plugins/CorePluginsAdmin/images/flattr.png",height:"29"},null,-1),op=[rp],ip={key:2,class:"donation-link bitcoin"},ap=Object(Oi["createElementVNode"])("span",null,"Donate Bitcoins to:",-1),sp=["href"],lp=["value"],cp={key:0,class:"plugin-license"},up=["title","href"],pp={key:1},dp={key:1,class:"plugin-author"},fp=Object(Oi["createTextVNode"])(" By "),mp=["title","href"],hp={key:1},gp={key:2,style:{"margin-right":"3.5px"}},bp=Object(Oi["createTextVNode"])(". "),yp={key:0},vp={key:0},Op={key:1},jp={key:0},wp=Object(Oi["createElementVNode"])("br",null,null,-1),Np=Object(Oi["createTextVNode"])(" - "),xp=["data-plugin-name","href"],kp={key:0},Ep={key:0},Cp={key:1},Sp=["href"],Ap={key:1},Vp=["href"],Tp={key:0,class:"tableActionBar"},Pp=["href"],Mp=Object(Oi["createElementVNode"])("span",{class:"icon-add"},null,-1),Bp=["href"],Dp=Object(Oi["createElementVNode"])("span",{class:"icon-add"},null,-1),$p={class:"footer-message"};function Fp(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("ContentBlock"),s=Object(Oi["resolveDirective"])("plugin-filter"),l=Object(Oi["resolveDirective"])("plugin-name"),c=Object(Oi["resolveDirective"])("content-table"),u=Object(Oi["resolveDirective"])("plugin-management");return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createBlock"])(a,{"content-title":e.title,class:"pluginsManagement"},{default:Object(Oi["withCtx"])((function(){return[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("p",eu,[Object(Oi["createElementVNode"])("span",tu,[Object(Oi["createElementVNode"])("strong",nu,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Origin")),1),Object(Oi["createElementVNode"])("a",ru,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("General_All")),1),ou]),iu,Object(Oi["createElementVNode"])("a",au,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_OriginCore")),1),su]),lu,Object(Oi["createElementVNode"])("a",cu,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_OriginOfficial")),1),uu]),pu,Object(Oi["createElementVNode"])("a",du,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_OriginThirdParty")),1),fu])]),Object(Oi["createElementVNode"])("span",mu,[Object(Oi["createElementVNode"])("strong",hu,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),Object(Oi["createElementVNode"])("a",gu,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("General_All")),1),bu]),yu,Object(Oi["createElementVNode"])("a",vu,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Active")),1),Ou]),ju,Object(Oi["createElementVNode"])("a",wu,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Inactive")),1),Nu])])],512),[[s]]),Object(Oi["createElementVNode"])("div",xu,[Object(Oi["createElementVNode"])("h2",ku,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_UninstallConfirm")),1),Object(Oi["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Eu),Object(Oi["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Cu)]),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("table",null,[Object(Oi["createElementVNode"])("thead",null,[Object(Oi["createElementVNode"])("tr",null,[Object(Oi["createElementVNode"])("th",null,Object(Oi["toDisplayString"])(e.isTheme?e.translate("CorePluginsAdmin_Theme"):e.translate("General_Plugin")),1),Object(Oi["createElementVNode"])("th",null,Object(Oi["toDisplayString"])(e.translate("General_Description")),1),Object(Oi["createElementVNode"])("th",Su,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),e.displayAdminLinks?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("th",Au,Object(Oi["toDisplayString"])(e.translate("General_Action")),1)):Object(Oi["createCommentVNode"])("",!0)])]),Object(Oi["createElementVNode"])("tbody",Vu,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.pluginsToDisplay,(function(n,r){var o,i,a,s,c,u,p,d,f,m,h,g,b,y;return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("tr",{key:r,class:Object(Oi["normalizeClass"])(n.activated?"active-plugin":"inactive-plugin"),"data-filter-status":n.activated?"active":"inactive","data-filter-origin":e.getPluginOrigin(n)},[Object(Oi["createElementVNode"])("td",Pu,[Object(Oi["createElementVNode"])("a",{name:r},null,8,Mu),n.isCorePlugin||-1===e.marketplacePluginNames.indexOf(r)?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Du,Object(Oi["toDisplayString"])(r),1)):Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",Bu,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(r),1)],512)),[[l,{pluginName:r}]]),Object(Oi["createElementVNode"])("span",{class:"plugin-version",title:n.isCorePlugin?e.translate("CorePluginsAdmin_CorePluginTooltip"):void 0}," ("+Object(Oi["toDisplayString"])(n.isCorePlugin?e.translate("CorePluginsAdmin_OriginCore"):n.info.version)+") ",9,$u),-1!==e.pluginNamesHavingSettings.indexOf(r)?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Fu,[_u,Iu,Object(Oi["createElementVNode"])("a",{href:"".concat(e.generalSettingsLink,"#").concat(r),class:"settingsLink"},Object(Oi["toDisplayString"])(e.translate("General_Settings")),9,Lu)])):Object(Oi["createCommentVNode"])("",!0)]),Object(Oi["createElementVNode"])("td",Uu,[Object(Oi["createElementVNode"])("div",Hu,[n.missingRequirements?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",qu,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(n.missingRequirements)+" ",1),Ru])):Object(Oi["createCommentVNode"])("",!0)]),Object(Oi["createElementVNode"])("div",zu,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(n.info.description.replaceAll("\n","<br/>"))+" ",1),null!==(o=n.info)&&void 0!==o&&o.homepage&&!e.isMatomoUrl(null===(i=n.info)||void 0===i?void 0:i.homepage)?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Wu,[Object(Oi["createElementVNode"])("a",{target:"_blank",rel:"noreferrer noopener",href:n.info.homepage}," ("+Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_PluginHomepage").replaceAll(" "," "))+") ",9,Ju)])):Object(Oi["createCommentVNode"])("",!0),null!==(a=n.info)&&void 0!==a&&null!==(s=a.donate)&&void 0!==s&&s.length?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Gu,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_LikeThisPlugin"))+" ",1),Object(Oi["createElementVNode"])("a",{onClick:t[0]||(t[0]=Object(Oi["withModifiers"])((function(){}),["prevent"])),class:"plugin-donation-link","data-overlay-id":"overlay-".concat(r)},Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_ConsiderDonating")),9,Ku),Object(Oi["createElementVNode"])("div",{id:"overlay-".concat(r),class:"donation-overlay ui-confirm",title:e.translate("CorePluginsAdmin_LikeThisPlugin")},[Object(Oi["createElementVNode"])("p",null,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_CommunityContributedPlugin")),1),Object(Oi["createElementVNode"])("p",{innerHTML:e.$sanitize(e.translate("CorePluginsAdmin_ConsiderDonatingCreatorOf","<b>".concat(r,"</b>")))},null,8,Zu),Object(Oi["createElementVNode"])("div",Xu,[null!==(c=n.info)&&void 0!==c&&null!==(u=c.donate)&&void 0!==u&&u.paypal?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:0,class:"donation-link paypal",target:"_blank",rel:"noreferrer noopener",href:e.getPluginDonateLink(r,n.info.donate.paypal)},tp,8,Qu)):Object(Oi["createCommentVNode"])("",!0),null!==(p=n.info)&&void 0!==p&&null!==(d=p.donate)&&void 0!==d&&d.flattr?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:1,class:"donation-link flattr",target:"_blank",rel:"noreferrer noopener",href:null===(f=n.info.donate)||void 0===f?void 0:f.flattr},op,8,np)):Object(Oi["createCommentVNode"])("",!0),null!==(m=n.info)&&void 0!==m&&null!==(h=m.donate)&&void 0!==h&&h.bitcoin?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",ip,[ap,Object(Oi["createElementVNode"])("a",{href:"bitcoin:".concat(encodeURIComponent(n.info.donate.bitcoin))},Object(Oi["toDisplayString"])(n.info.donate.bitcoin),9,sp)])):Object(Oi["createCommentVNode"])("",!0)]),Object(Oi["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_Close")},null,8,lp)],8,Yu)])):Object(Oi["createCommentVNode"])("",!0)]),null!==(g=n.info)&&void 0!==g&&g.license?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",cp,[null!==(b=n.info)&&void 0!==b&&b.license_file?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:0,title:e.translate("CorePluginsAdmin_LicenseHomepage"),rel:"noreferrer noopener",target:"_blank",href:"index.php?module=CorePluginsAdmin&action=showLicense&pluginName=".concat(r)},Object(Oi["toDisplayString"])(n.info.license),9,up)):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",pp,Object(Oi["toDisplayString"])(n.info.license),1))])):Object(Oi["createCommentVNode"])("",!0),null!==(y=n.info)&&void 0!==y&&y.authors?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",dp,[fp,(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(n.info.authors.filter((function(e){return e.name})),(function(t,r){return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",{key:r},[t.homepage?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:0,title:e.translate("CorePluginsAdmin_AuthorHomepage"),href:t.homepage,rel:"noreferrer noopener",target:"_blank"},Object(Oi["toDisplayString"])(t.name),9,mp)):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",hp,Object(Oi["toDisplayString"])(t.name),1)),n.info.authors.length-1>r?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",gp,",")):Object(Oi["createCommentVNode"])("",!0)])})),128)),bp])):Object(Oi["createCommentVNode"])("",!0)]),Object(Oi["createElementVNode"])("td",{class:"status",style:Object(Oi["normalizeStyle"])({"border-left-width":e.isDefaultTheme(r)?"0":void 0})},[e.isDefaultTheme(r)?Object(Oi["createCommentVNode"])("",!0):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",yp,[n.activated?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",vp,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Active")),1)):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Op,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Inactive"))+" ",1),n.uninstallable&&e.displayAdminLinks?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",jp,[wp,Np,Object(Oi["createElementVNode"])("a",{"data-plugin-name":r,class:"uninstall",href:e.getUninstallLink(r)},Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_ActionUninstall")),9,xp)])):Object(Oi["createCommentVNode"])("",!0)]))]))],4),e.displayAdminLinks?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("td",{key:0,class:"togl action-links",style:Object(Oi["normalizeStyle"])({"border-left-width":e.isDefaultTheme(r)?0:void 0})},[e.isDefaultTheme(r)?Object(Oi["createCommentVNode"])("",!0):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",kp,[n.invalid&&n.alwaysActivated?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Ep,"-")):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Cp,[n.activated?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:0,href:e.getDeactivateLink(r)},Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Deactivate")),9,Sp)):n.missingRequirements?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",Ap,"-")):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:2,href:e.getActivateLink(r)},Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Activate")),9,Vp))]))]))],4)):Object(Oi["createCommentVNode"])("",!0)],10,Tu)})),128))])],512),[[c]]),e.displayAdminLinks?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Tp,[e.isTheme?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:0,href:e.themeOverviewLink},[Mp,Object(Oi["createTextVNode"])(" "+Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_InstallNewThemes")),1)],8,Pp)):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:1,href:e.overviewLink},[Dp,Object(Oi["createTextVNode"])(" "+Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_InstallNewPlugins")),1)],8,Bp))])):Object(Oi["createCommentVNode"])("",!0),Object(Oi["createElementVNode"])("div",$p,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_AlwaysActivatedPluginsList",e.pluginsAlwaysActivated)),1)]})),_:1},8,["content-title"])),[[u,{}]])}function _p(e,t){return qp(e)||Hp(e,t)||Lp(e,t)||Ip()}function Ip(){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 Lp(e,t){if(e){if("string"===typeof e)return Up(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)?Up(e,t):void 0}}function Up(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 Hp(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 qp(e){if(Array.isArray(e))return e}var Rp=Object(Oi["defineComponent"])({props:{isTheme:Boolean,displayAdminLinks:Boolean,pluginsInfo:{type:Object,required:!0},uninstallNonce:{type:String,required:!0},deactivateNonce:{type:String,required:!0},activateNonce:{type:String,required:!0},marketplacePluginNames:{type:Array,required:!0},pluginNamesHavingSettings:{type:Array,required:!0},title:{type:String,required:!0}},components:{ContentBlock:Ci["ContentBlock"]},directives:{PluginManagement:fc,PluginFilter:lc,ContentTable:Ci["ContentTable"],PluginName:Qc},methods:{getPluginOrigin:function(e){return e.isCorePlugin?"core":e.isOfficialPlugin?"official":"thirdparty"},getPluginDonateLink:function(e,t){return"https://www.paypal.com/cgi-bin/webscr?".concat(Ci["MatomoUrl"].stringify({cmd:"_donations",item_name:"Matomo Plugin ".concat(e),bn:"PP-DonationsBF:btn_donateCC_LG.gif:NonHosted",business:t}))},getUninstallLink:function(e){return"?".concat(Ci["MatomoUrl"].stringify({module:"CorePluginsAdmin",action:"uninstall",pluginName:e,nonce:this.uninstallNonce}))},isDefaultTheme:function(e){return this.isTheme&&"Morpheus"===e},getDeactivateLink:function(e){return"?".concat(Ci["MatomoUrl"].stringify({module:"CorePluginsAdmin",action:"deactivate",pluginName:e,nonce:this.deactivateNonce,redirectTo:"referrer"}))},getActivateLink:function(e){return"?".concat(Ci["MatomoUrl"].stringify({module:"CorePluginsAdmin",action:"activate",pluginName:e,nonce:this.activateNonce,redirectTo:"referrer"}))},isMatomoUrl:function(e){try{var t=new URL(e).host;return-1!==this.matomoHosts.indexOf(t)}catch(n){return!1}}},computed:{pluginsToDisplay:function(){var e=this,t=this.pluginsInfo;return Object.fromEntries(Object.entries(t).filter((function(t){var n=_p(t,2),r=n[1];if(e.isTheme)return!0;var o=r.alwaysActivated;return"undefined"!==typeof o&&null!==o&&!o})))},generalSettingsLink:function(){return"?".concat(Ci["MatomoUrl"].stringify(Object.assign(Object.assign({},Ci["MatomoUrl"].urlParsed.value),{},{module:"CoreAdminHome",action:"generalSettings"})))},matomoHosts:function(){return["piwik.org","www.piwik.org","matomo.org","www.matomo.org"]},themeOverviewLink:function(){var e=Ci["MatomoUrl"].stringify({module:"Marketplace",action:"overview"}),t=Ci["MatomoUrl"].stringify({pluginType:"themes"});return"?".concat(e,"#?").concat(t)},overviewLink:function(){return"?".concat(Ci["MatomoUrl"].stringify(Object.assign(Object.assign({},Ci["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"overview",sort:""})))},pluginsAlwaysActivated:function(){var e=this.pluginsInfo;return Object.entries(e).filter((function(e){var t=_p(e,2),n=t[1];return n.alwaysActivated})).map((function(e){var t=_p(e,1),n=t[0];return n})).join(", ")}}});Rp.render=Fp;var zp=Rp,Wp={key:0},Jp={key:0},Gp={class:"checkbox-container"},Kp=Object(Oi["createElementVNode"])("span",null,null,-1),Yp={class:"num"},Zp={class:"status"},Xp={key:1,class:"action-links"},Qp={id:"plugins"},ed={key:0,class:"select-cell"},td={class:"checkbox-container"},nd=["id","disabled","onUpdate:modelValue"],rd=Object(Oi["createElementVNode"])("span",null,null,-1),od={class:"name"},id={class:"vers"},ad=["href","title"],sd={key:1},ld={class:"desc"},cd={class:"status"},ud={key:1,class:"togl action-links"},pd=["title"],dd=["href"],fd=["href"],md={key:3};function hd(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("MissingReqsNotice"),s=Object(Oi["resolveComponent"])("ContentBlock"),l=Object(Oi["resolveDirective"])("plugin-name"),c=Object(Oi["resolveDirective"])("content-table");return Object.keys(e.pluginsHavingUpdate).length?(Object(Oi["openBlock"])(),Object(Oi["createBlock"])(s,{key:0,"content-title":e.translate("CorePluginsAdmin_NUpdatesAvailable",Object.keys(e.pluginsHavingUpdate).length)},{default:Object(Oi["withCtx"])((function(){return[Object(Oi["createElementVNode"])("p",null,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_InfoPluginUpdateIsRecommended")),1),e.isPluginsAdminEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Wp,[Object(Oi["createElementVNode"])("a",{id:"update-selected-plugins",onClick:t[0]||(t[0]=Object(Oi["withModifiers"])((function(t){return e.updateSelectedPlugins()}),["prevent"])),class:Object(Oi["normalizeClass"])({btn:!0,disabled:e.isUpdateLinkDisabled})},Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_UpdateSelected")),3)])):Object(Oi["createCommentVNode"])("",!0),Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("table",null,[Object(Oi["createElementVNode"])("thead",null,[Object(Oi["createElementVNode"])("tr",null,[e.isPluginsAdminEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("th",Jp,[Object(Oi["createElementVNode"])("span",Gp,[Object(Oi["createElementVNode"])("label",null,[Object(Oi["createElementVNode"])("input",{type:"checkbox",id:"select-plugin-all",onChange:t[1]||(t[1]=function(t){return e.selectAll(t.target.checked)})},null,32),Kp])])])):Object(Oi["createCommentVNode"])("",!0),Object(Oi["createElementVNode"])("th",null,Object(Oi["toDisplayString"])(e.translate("General_Plugin")),1),Object(Oi["createElementVNode"])("th",Yp,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Version")),1),Object(Oi["createElementVNode"])("th",null,Object(Oi["toDisplayString"])(e.translate("General_Description")),1),Object(Oi["createElementVNode"])("th",Zp,Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_Status")),1),e.isPluginsAdminEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("th",Xp,Object(Oi["toDisplayString"])(e.translate("General_Action")),1)):Object(Oi["createCommentVNode"])("",!0)])]),Object(Oi["createElementVNode"])("tbody",Qp,[(Object(Oi["openBlock"])(!0),Object(Oi["createElementBlock"])(Oi["Fragment"],null,Object(Oi["renderList"])(e.pluginsHavingUpdate,(function(n,r){var o;return Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("tr",{key:r,class:Object(Oi["normalizeClass"])(n.isActivated?"active-plugin":"inactive-plugin")},[e.isPluginsAdminEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("td",ed,[Object(Oi["createElementVNode"])("span",td,[Object(Oi["createElementVNode"])("label",null,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("input",{type:"checkbox",id:"select-plugin-".concat(n.name),disabled:"undefined"!==typeof n.isDownloadable&&null!==n.isDownloadable&&!n.isDownloadable,"onUpdate:modelValue":function(t){return e.pluginsSelected[r]=t}},null,8,nd),[[Oi["vModelCheckbox"],e.pluginsSelected[r]]]),rd])])])):Object(Oi["createCommentVNode"])("",!0),Object(Oi["createElementVNode"])("td",od,[Object(Oi["withDirectives"])(Object(Oi["createElementVNode"])("a",{onClick:t[2]||(t[2]=Object(Oi["withModifiers"])((function(){}),["prevent"])),class:"plugin-details"},[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(n.name),1)],512),[[l,{pluginName:n.name}]])]),Object(Oi["createElementVNode"])("td",id,[null!==(o=n.changelog)&&void 0!==o&&o.url?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:0,href:n.changelog.url,title:e.translate("CorePluginsAdmin_Changelog"),target:"_blank",rel:"noreferrer noopener"},Object(Oi["toDisplayString"])(n.currentVersion)+" => "+Object(Oi["toDisplayString"])(n.latestVersion),9,ad)):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",sd,Object(Oi["toDisplayString"])(n.currentVersion)+" => "+Object(Oi["toDisplayString"])(n.latestVersion),1))]),Object(Oi["createElementVNode"])("td",ld,[Object(Oi["createTextVNode"])(Object(Oi["toDisplayString"])(n.description)+" ",1),Object(Oi["createVNode"])(a,{plugin:n},null,8,["plugin"])]),Object(Oi["createElementVNode"])("td",cd,Object(Oi["toDisplayString"])(n.isActivated?e.translate("CorePluginsAdmin_Active"):e.translate("CorePluginsAdmin_Inactive")),1),e.isPluginsAdminEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("td",ud,["undefined"===typeof n.isDownloadable||null===n.isDownloadable||n.isDownloadable?e.isMultiServerEnvironment?Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:1,onClick:t[3]||(t[3]=function(t){return e.isPluginDownloadLinkClicked=!0}),href:e.downloadPluginLink(n)},Object(Oi["toDisplayString"])(e.translate("General_Download")),9,dd)),[[Oi["vShow"],!e.isPluginDownloadLinkClicked]]):0===n.missingRequirements.length?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("a",{key:2,href:e.updatePluginLink(n)},Object(Oi["toDisplayString"])(e.translate("CoreUpdater_UpdateTitle")),9,fd)):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",md,"-")):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("span",{key:0,title:"".concat(e.translate("CorePluginsAdmin_PluginNotDownloadable")," ").concat(n.isPaid?e.translate("CorePluginsAdmin_PluginNotDownloadablePaidReason"):"")},Object(Oi["toDisplayString"])(e.translate("CorePluginsAdmin_NotDownloadable")),9,pd))])):Object(Oi["createCommentVNode"])("",!0)],2)})),128))])],512),[[c]])]})),_:1},8,["content-title"])):Object(Oi["createCommentVNode"])("",!0)}function gd(e,t){return jd(e)||Od(e,t)||yd(e,t)||bd()}function bd(){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 yd(e,t){if(e){if("string"===typeof e)return vd(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)?vd(e,t):void 0}}function vd(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 Od(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 jd(e){if(Array.isArray(e))return e}var wd=Object(Ci["useExternalPluginComponent"])("Marketplace","MissingReqsNotice"),Nd=Object(Oi["defineComponent"])({props:{pluginsHavingUpdate:{type:Object,required:!0},pluginUpdateNonces:{type:Object,required:!0},updateNonce:{type:String,required:!0},isMultiServerEnvironment:Boolean,isPluginsAdminEnabled:Boolean},components:{ContentBlock:Ci["ContentBlock"],MissingReqsNotice:wd},directives:{ContentTable:Ci["ContentTable"],PluginName:Qc},data:function(){return{isUpdating:!1,isPluginDownloadLinkClicked:!1,pluginsSelected:{}}},computed:{isUpdateLinkDisabled:function(){return this.isUpdating||!Object.keys(this.pluginsSelected).length||!Object.values(this.pluginsSelected).some((function(e){return!!e}))}},methods:{selectAll:function(e){var t=this,n=this.pluginsHavingUpdate;Object.entries(n).forEach((function(n){var r=gd(n,2),o=r[0],i=r[1];(null===i.isDownloadable||"undefined"===typeof i.isDownloadable||i.isDownloadable)&&(t.pluginsSelected[o]=e)}))},downloadPluginLink:function(e){return"?".concat(Ci["MatomoUrl"].stringify(Object.assign(Object.assign({},Ci["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"download",pluginName:e.name,nonce:this.pluginUpdateNonces[e.name]})))},updatePluginLink:function(e){return"?".concat(Ci["MatomoUrl"].stringify(Object.assign(Object.assign({},Ci["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"updatePlugin",pluginName:e.name,nonce:this.updateNonce})))},updateSelectedPlugins:function(){this.isUpdating=!0;var e=Object.entries(this.pluginsSelected).filter((function(e){var t=gd(e,2),n=t[1];return n})).map((function(e){var t=gd(e,1),n=t[0];return n}));Ci["MatomoUrl"].updateUrl(Object.assign(Object.assign({},Ci["MatomoUrl"].urlParsed.value),{},{module:"Marketplace",action:"updatePlugin",nonce:this.updateNonce,pluginName:e.join(",")}))}}});Nd.render=hd;var xd=Nd,kd={class:"ui-confirm",id:"installPluginByUpload"},Ed={key:0},Cd={class:"description"},Sd=["action"],Ad=["data-max-size"],Vd=Object(Oi["createElementVNode"])("br",null,null,-1),Td=["value"],Pd={key:1},Md=["innerHTML"],Bd=Object(Oi["createElementVNode"])("pre",null,"[General]\n enable_plugin_upload = 1",-1),Dd=["value"];function $d(e,t,n,r,o,i){var a=Object(Oi["resolveComponent"])("Field"),s=Object(Oi["resolveDirective"])("plugin-upload");return Object(Oi["withDirectives"])((Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",kd,[Object(Oi["createElementVNode"])("h2",null,Object(Oi["toDisplayString"])(e.translate("Marketplace_TeaserExtendPiwikByUpload")),1),e.isPluginUploadEnabled?(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Ed,[Object(Oi["createElementVNode"])("p",Cd,Object(Oi["toDisplayString"])(e.translate("Marketplace_AllowedUploadFormats")),1),Object(Oi["createElementVNode"])("form",{enctype:"multipart/form-data",method:"post",id:"uploadPluginForm",action:e.uploadPluginAction},[Object(Oi["createElementVNode"])("input",{type:"file",name:"pluginZip","data-max-size":e.uploadLimit},null,8,Ad),Vd,Object(Oi["createVNode"])(a,{uicontrol:"password",name:"confirmPassword",autocomplete:"off",title:e.translate("Login_ConfirmPasswordToContinue"),modelValue:e.confirmPassword,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.confirmPassword=t})},null,8,["title","modelValue"]),Object(Oi["createElementVNode"])("input",{class:"startUpload btn",type:"submit",value:e.translate("Marketplace_UploadZipFile")},null,8,Td)],8,Sd)])):(Object(Oi["openBlock"])(),Object(Oi["createElementBlock"])("div",Pd,[Object(Oi["createElementVNode"])("p",{class:"description",innerHTML:e.$sanitize(e.translate("Marketplace_PluginUploadDisabled"))},null,8,Md),Bd,Object(Oi["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Ok")},null,8,Dd)]))],512)),[[s]])}var Fd=Object(Oi["defineComponent"])({props:{isPluginUploadEnabled:Boolean,uploadLimit:[String,Number],installNonce:String},components:{Field:cl},directives:{PluginUpload:yc},data:function(){return{confirmPassword:""}},computed:{uploadPluginAction:function(){return"?".concat(Ci["MatomoUrl"].stringify(Object.assign(Object.assign({},Ci["MatomoUrl"].urlParsed.value),{},{module:"CorePluginsAdmin",action:"uploadPlugin",nonce:this.installNonce})))}}});Fd.render=$d;var _d=Fd;
/*!
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/}})}));
//# sourceMappingURL=CorePluginsAdmin.umd.min.js.map