adsoda
Version:
ADSODA - Arbitrary-Dimensional Solid Object Display Algorithm - after a Greg Ferrar algorithm
141 lines (109 loc) • 458 kB
JavaScript
((typeof self !== 'undefined' ? self : this)["webpackJsonpadsoda"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpadsoda"] || []).push([["vendors~main"],{
/***/ "./node_modules/escape-latex/dist/index.js":
/*!*************************************************!*\
!*** ./node_modules/escape-latex/dist/index.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\n// Map the characters to escape to their escaped values. The list is derived\n// from http://www.cespedes.org/blog/85/how-to-escape-latex-special-characters\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar defaultEscapes = {\n \"{\": \"\\\\{\",\n \"}\": \"\\\\}\",\n \"\\\\\": \"\\\\textbackslash{}\",\n \"#\": \"\\\\#\",\n $: \"\\\\$\",\n \"%\": \"\\\\%\",\n \"&\": \"\\\\&\",\n \"^\": \"\\\\textasciicircum{}\",\n _: \"\\\\_\",\n \"~\": \"\\\\textasciitilde{}\"\n};\nvar formatEscapes = {\n \"\\u2013\": \"\\\\--\",\n \"\\u2014\": \"\\\\---\",\n \" \": \"~\",\n \"\\t\": \"\\\\qquad{}\",\n \"\\r\\n\": \"\\\\newline{}\",\n \"\\n\": \"\\\\newline{}\"\n};\n\nvar defaultEscapeMapFn = function defaultEscapeMapFn(defaultEscapes, formatEscapes) {\n return _extends({}, defaultEscapes, formatEscapes);\n};\n\n/**\n * Escape a string to be used in LaTeX documents.\n * @param {string} str the string to be escaped.\n * @param {boolean} params.preserveFormatting whether formatting escapes should\n * be performed (default: false).\n * @param {function} params.escapeMapFn the function to modify the escape maps.\n * @return {string} the escaped string, ready to be used in LaTeX.\n */\nmodule.exports = function (str) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$preserveFormatti = _ref.preserveFormatting,\n preserveFormatting = _ref$preserveFormatti === undefined ? false : _ref$preserveFormatti,\n _ref$escapeMapFn = _ref.escapeMapFn,\n escapeMapFn = _ref$escapeMapFn === undefined ? defaultEscapeMapFn : _ref$escapeMapFn;\n\n var runningStr = String(str);\n var result = \"\";\n\n var escapes = escapeMapFn(_extends({}, defaultEscapes), preserveFormatting ? _extends({}, formatEscapes) : {});\n var escapeKeys = Object.keys(escapes); // as it is reused later on\n\n // Algorithm: Go through the string character by character, if it matches\n // with one of the special characters then we'll replace it with the escaped\n // version.\n\n var _loop = function _loop() {\n var specialCharFound = false;\n escapeKeys.forEach(function (key, index) {\n if (specialCharFound) {\n return;\n }\n if (runningStr.length >= key.length && runningStr.slice(0, key.length) === key) {\n result += escapes[escapeKeys[index]];\n runningStr = runningStr.slice(key.length, runningStr.length);\n specialCharFound = true;\n }\n });\n if (!specialCharFound) {\n result += runningStr.slice(0, 1);\n runningStr = runningStr.slice(1, runningStr.length);\n }\n };\n\n while (runningStr) {\n _loop();\n }\n return result;\n};\n\n//# sourceURL=webpack://adsoda/./node_modules/escape-latex/dist/index.js?");
/***/ }),
/***/ "./node_modules/mathjs/core.js":
/*!*************************************!*\
!*** ./node_modules/mathjs/core.js ***!
\*************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {
eval("module.exports = __webpack_require__(/*! ./lib/core/core */ \"./node_modules/mathjs/lib/core/core.js\")\n\n\n//# sourceURL=webpack://adsoda/./node_modules/mathjs/core.js?");
/***/ }),
/***/ "./node_modules/mathjs/lib/core/core.js":
/*!**********************************************!*\
!*** ./node_modules/mathjs/lib/core/core.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\n__webpack_require__(/*! ./../utils/polyfills */ \"./node_modules/mathjs/lib/utils/polyfills.js\");\n\nvar isFactory = __webpack_require__(/*! ./../utils/object */ \"./node_modules/mathjs/lib/utils/object.js\").isFactory;\n\nvar typedFactory = __webpack_require__(/*! ./typed */ \"./node_modules/mathjs/lib/core/typed.js\");\n\nvar emitter = __webpack_require__(/*! ./../utils/emitter */ \"./node_modules/mathjs/lib/utils/emitter.js\");\n\nvar importFactory = __webpack_require__(/*! ./function/import */ \"./node_modules/mathjs/lib/core/function/import.js\");\n\nvar configFactory = __webpack_require__(/*! ./function/config */ \"./node_modules/mathjs/lib/core/function/config.js\");\n/**\n * Math.js core. Creates a new, empty math.js instance\n * @param {Object} [options] Available options:\n * {number} epsilon\n * Minimum relative difference between two\n * compared values, used by all comparison functions.\n * {string} matrix\n * A string 'Matrix' (default) or 'Array'.\n * {string} number\n * A string 'number' (default), 'BigNumber', or 'Fraction'\n * {number} precision\n * The number of significant digits for BigNumbers.\n * Not applicable for Numbers.\n * {boolean} predictable\n * Predictable output type of functions. When true,\n * output type depends only on the input types. When\n * false (default), output type can vary depending\n * on input values. For example `math.sqrt(-4)`\n * returns `complex('2i')` when predictable is false, and\n * returns `NaN` when true.\n * {string} randomSeed\n * Random seed for seeded pseudo random number generator.\n * Set to null to randomly seed.\n * @returns {Object} Returns a bare-bone math.js instance containing\n * functions:\n * - `import` to add new functions\n * - `config` to change configuration\n * - `on`, `off`, `once`, `emit` for events\n */\n\n\nexports.create = function create(options) {\n // simple test for ES5 support\n if (typeof Object.create !== 'function') {\n throw new Error('ES5 not supported by this JavaScript engine. ' + 'Please load the es5-shim and es5-sham library for compatibility.');\n } // cached factories and instances\n\n\n var factories = [];\n var instances = []; // create a namespace for the mathjs instance, and attach emitter functions\n\n var math = emitter.mixin({});\n math.type = {};\n math.expression = {\n transform: {},\n mathWithTransform: {} // create a new typed instance\n\n };\n math.typed = typedFactory.create(math.type); // create configuration options. These are private\n\n var _config = {\n // minimum relative difference between two compared values,\n // used by all comparison functions\n epsilon: 1e-12,\n // type of default matrix output. Choose 'matrix' (default) or 'array'\n matrix: 'Matrix',\n // type of default number output. Choose 'number' (default) 'BigNumber', or 'Fraction\n number: 'number',\n // number of significant digits in BigNumbers\n precision: 64,\n // predictable output type of functions. When true, output type depends only\n // on the input types. When false (default), output type can vary depending\n // on input values. For example `math.sqrt(-4)` returns `complex('2i')` when\n // predictable is false, and returns `NaN` when true.\n predictable: false,\n // random seed for seeded pseudo random number generation\n // null = randomly seed\n randomSeed: null\n /**\n * Load a function or data type from a factory.\n * If the function or data type already exists, the existing instance is\n * returned.\n * @param {{type: string, name: string, factory: Function}} factory\n * @returns {*}\n */\n\n };\n\n function load(factory) {\n if (!isFactory(factory)) {\n throw new Error('Factory object with properties `type`, `name`, and `factory` expected');\n }\n\n var index = factories.indexOf(factory);\n var instance;\n\n if (index === -1) {\n // doesn't yet exist\n if (factory.math === true) {\n // pass with math namespace\n instance = factory.factory(math.type, _config, load, math.typed, math);\n } else {\n instance = factory.factory(math.type, _config, load, math.typed);\n } // append to the cache\n\n\n factories.push(factory);\n instances.push(instance);\n } else {\n // already existing function, return the cached instance\n instance = instances[index];\n }\n\n return instance;\n } // load the import and config functions\n\n\n math['import'] = load(importFactory);\n math['config'] = load(configFactory);\n math.expression.mathWithTransform['config'] = math['config']; // apply options\n\n if (options) {\n math.config(options);\n }\n\n return math;\n};\n\n//# sourceURL=webpack://adsoda/./node_modules/mathjs/lib/core/core.js?");
/***/ }),
/***/ "./node_modules/mathjs/lib/core/function/config.js":
/*!*********************************************************!*\
!*** ./node_modules/mathjs/lib/core/function/config.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar object = __webpack_require__(/*! ../../utils/object */ \"./node_modules/mathjs/lib/utils/object.js\");\n\nfunction factory(type, config, load, typed, math) {\n var MATRIX = ['Matrix', 'Array']; // valid values for option matrix\n\n var NUMBER = ['number', 'BigNumber', 'Fraction']; // valid values for option number\n\n /**\n * Set configuration options for math.js, and get current options.\n * Will emit a 'config' event, with arguments (curr, prev, changes).\n *\n * Syntax:\n *\n * math.config(config: Object): Object\n *\n * Examples:\n *\n * math.config().number // outputs 'number'\n * math.eval('0.4') // outputs number 0.4\n * math.config({number: 'Fraction'})\n * math.eval('0.4') // outputs Fraction 2/5\n *\n * @param {Object} [options] Available options:\n * {number} epsilon\n * Minimum relative difference between two\n * compared values, used by all comparison functions.\n * {string} matrix\n * A string 'Matrix' (default) or 'Array'.\n * {string} number\n * A string 'number' (default), 'BigNumber', or 'Fraction'\n * {number} precision\n * The number of significant digits for BigNumbers.\n * Not applicable for Numbers.\n * {string} parenthesis\n * How to display parentheses in LaTeX and string\n * output.\n * {string} randomSeed\n * Random seed for seeded pseudo random number generator.\n * Set to null to randomly seed.\n * @return {Object} Returns the current configuration\n */\n\n function _config(options) {\n if (options) {\n var prev = object.map(config, object.clone); // validate some of the options\n\n validateOption(options, 'matrix', MATRIX);\n validateOption(options, 'number', NUMBER); // merge options\n\n object.deepExtend(config, options);\n var curr = object.map(config, object.clone);\n var changes = object.map(options, object.clone); // emit 'config' event\n\n math.emit('config', curr, prev, changes);\n return curr;\n } else {\n return object.map(config, object.clone);\n }\n } // attach the valid options to the function so they can be extended\n\n\n _config.MATRIX = MATRIX;\n _config.NUMBER = NUMBER;\n return _config;\n}\n/**\n * Test whether an Array contains a specific item.\n * @param {Array.<string>} array\n * @param {string} item\n * @return {boolean}\n */\n\n\nfunction contains(array, item) {\n return array.indexOf(item) !== -1;\n}\n/**\n * Find a string in an array. Case insensitive search\n * @param {Array.<string>} array\n * @param {string} item\n * @return {number} Returns the index when found. Returns -1 when not found\n */\n\n\nfunction findIndex(array, item) {\n return array.map(function (i) {\n return i.toLowerCase();\n }).indexOf(item.toLowerCase());\n}\n/**\n * Validate an option\n * @param {Object} options Object with options\n * @param {string} name Name of the option to validate\n * @param {Array.<string>} values Array with valid values for this option\n */\n\n\nfunction validateOption(options, name, values) {\n if (options[name] !== undefined && !contains(values, options[name])) {\n var index = findIndex(values, options[name]);\n\n if (index !== -1) {\n // right value, wrong casing\n // TODO: lower case values are deprecated since v3, remove this warning some day.\n console.warn('Warning: Wrong casing for configuration option \"' + name + '\", should be \"' + values[index] + '\" instead of \"' + options[name] + '\".');\n options[name] = values[index]; // change the option to the right casing\n } else {\n // unknown value\n console.warn('Warning: Unknown value \"' + options[name] + '\" for configuration option \"' + name + '\". Available options: ' + values.map(JSON.stringify).join(', ') + '.');\n }\n }\n}\n\nexports.name = 'config';\nexports.math = true; // request the math namespace as fifth argument\n\nexports.factory = factory;\n\n//# sourceURL=webpack://adsoda/./node_modules/mathjs/lib/core/function/config.js?");
/***/ }),
/***/ "./node_modules/mathjs/lib/core/function/import.js":
/*!*********************************************************!*\
!*** ./node_modules/mathjs/lib/core/function/import.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar lazy = __webpack_require__(/*! ../../utils/object */ \"./node_modules/mathjs/lib/utils/object.js\").lazy;\n\nvar isFactory = __webpack_require__(/*! ../../utils/object */ \"./node_modules/mathjs/lib/utils/object.js\").isFactory;\n\nvar traverse = __webpack_require__(/*! ../../utils/object */ \"./node_modules/mathjs/lib/utils/object.js\").traverse;\n\nvar ArgumentsError = __webpack_require__(/*! ../../error/ArgumentsError */ \"./node_modules/mathjs/lib/error/ArgumentsError.js\");\n\nfunction factory(type, config, load, typed, math) {\n /**\n * Import functions from an object or a module\n *\n * Syntax:\n *\n * math.import(object)\n * math.import(object, options)\n *\n * Where:\n *\n * - `object: Object`\n * An object with functions to be imported.\n * - `options: Object` An object with import options. Available options:\n * - `override: boolean`\n * If true, existing functions will be overwritten. False by default.\n * - `silent: boolean`\n * If true, the function will not throw errors on duplicates or invalid\n * types. False by default.\n * - `wrap: boolean`\n * If true, the functions will be wrapped in a wrapper function\n * which converts data types like Matrix to primitive data types like Array.\n * The wrapper is needed when extending math.js with libraries which do not\n * support these data type. False by default.\n *\n * Examples:\n *\n * // define new functions and variables\n * math.import({\n * myvalue: 42,\n * hello: function (name) {\n * return 'hello, ' + name + '!'\n * }\n * })\n *\n * // use the imported function and variable\n * math.myvalue * 2 // 84\n * math.hello('user') // 'hello, user!'\n *\n * // import the npm module 'numbers'\n * // (must be installed first with `npm install numbers`)\n * math.import(require('numbers'), {wrap: true})\n *\n * math.fibonacci(7) // returns 13\n *\n * @param {Object | Array} object Object with functions to be imported.\n * @param {Object} [options] Import options.\n */\n function mathImport(object, options) {\n var num = arguments.length;\n\n if (num !== 1 && num !== 2) {\n throw new ArgumentsError('import', num, 1, 2);\n }\n\n if (!options) {\n options = {};\n } // TODO: allow a typed-function with name too\n\n\n if (isFactory(object)) {\n _importFactory(object, options);\n } else if (Array.isArray(object)) {\n object.forEach(function (entry) {\n mathImport(entry, options);\n });\n } else if (_typeof(object) === 'object') {\n // a map with functions\n for (var name in object) {\n if (object.hasOwnProperty(name)) {\n var value = object[name];\n\n if (isSupportedType(value)) {\n _import(name, value, options);\n } else if (isFactory(object)) {\n _importFactory(object, options);\n } else {\n mathImport(value, options);\n }\n }\n }\n } else {\n if (!options.silent) {\n throw new TypeError('Factory, Object, or Array expected');\n }\n }\n }\n /**\n * Add a property to the math namespace and create a chain proxy for it.\n * @param {string} name\n * @param {*} value\n * @param {Object} options See import for a description of the options\n * @private\n */\n\n\n function _import(name, value, options) {\n // TODO: refactor this function, it's to complicated and contains duplicate code\n if (options.wrap && typeof value === 'function') {\n // create a wrapper around the function\n value = _wrap(value);\n }\n\n if (isTypedFunction(math[name]) && isTypedFunction(value)) {\n if (options.override) {\n // give the typed function the right name\n value = typed(name, value.signatures);\n } else {\n // merge the existing and typed function\n value = typed(math[name], value);\n }\n\n math[name] = value;\n\n _importTransform(name, value);\n\n math.emit('import', name, function resolver() {\n return value;\n });\n return;\n }\n\n if (math[name] === undefined || options.override) {\n math[name] = value;\n\n _importTransform(name, value);\n\n math.emit('import', name, function resolver() {\n return value;\n });\n return;\n }\n\n if (!options.silent) {\n throw new Error('Cannot import \"' + name + '\": already exists');\n }\n }\n\n function _importTransform(name, value) {\n if (value && typeof value.transform === 'function') {\n math.expression.transform[name] = value.transform;\n\n if (allowedInExpressions(name)) {\n math.expression.mathWithTransform[name] = value.transform;\n }\n } else {\n // remove existing transform\n delete math.expression.transform[name];\n\n if (allowedInExpressions(name)) {\n math.expression.mathWithTransform[name] = value;\n }\n }\n }\n\n function _deleteTransform(name) {\n delete math.expression.transform[name];\n\n if (allowedInExpressions(name)) {\n math.expression.mathWithTransform[name] = math[name];\n } else {\n delete math.expression.mathWithTransform[name];\n }\n }\n /**\n * Create a wrapper a round an function which converts the arguments\n * to their primitive values (like convert a Matrix to Array)\n * @param {Function} fn\n * @return {Function} Returns the wrapped function\n * @private\n */\n\n\n function _wrap(fn) {\n var wrapper = function wrapper() {\n var args = [];\n\n for (var i = 0, len = arguments.length; i < len; i++) {\n var arg = arguments[i];\n args[i] = arg && arg.valueOf();\n }\n\n return fn.apply(math, args);\n };\n\n if (fn.transform) {\n wrapper.transform = fn.transform;\n }\n\n return wrapper;\n }\n /**\n * Import an instance of a factory into math.js\n * @param {{factory: Function, name: string, path: string, math: boolean}} factory\n * @param {Object} options See import for a description of the options\n * @private\n */\n\n\n function _importFactory(factory, options) {\n if (typeof factory.name === 'string') {\n var name = factory.name;\n var existingTransform = name in math.expression.transform;\n var namespace = factory.path ? traverse(math, factory.path) : math;\n var existing = namespace.hasOwnProperty(name) ? namespace[name] : undefined;\n\n var resolver = function resolver() {\n var instance = load(factory);\n\n if (instance && typeof instance.transform === 'function') {\n throw new Error('Transforms cannot be attached to factory functions. ' + 'Please create a separate function for it with exports.path=\"expression.transform\"');\n }\n\n if (isTypedFunction(existing) && isTypedFunction(instance)) {\n if (options.override) {// replace the existing typed function (nothing to do)\n } else {\n // merge the existing and new typed function\n instance = typed(existing, instance);\n }\n\n return instance;\n }\n\n if (existing === undefined || options.override) {\n return instance;\n }\n\n if (!options.silent) {\n throw new Error('Cannot import \"' + name + '\": already exists');\n }\n };\n\n if (factory.lazy !== false) {\n lazy(namespace, name, resolver);\n\n if (existingTransform) {\n _deleteTransform(name);\n } else {\n if (factory.path === 'expression.transform' || factoryAllowedInExpressions(factory)) {\n lazy(math.expression.mathWithTransform, name, resolver);\n }\n }\n } else {\n namespace[name] = resolver();\n\n if (existingTransform) {\n _deleteTransform(name);\n } else {\n if (factory.path === 'expression.transform' || factoryAllowedInExpressions(factory)) {\n math.expression.mathWithTransform[name] = resolver();\n }\n }\n }\n\n math.emit('import', name, resolver, factory.path);\n } else {\n // unnamed factory.\n // no lazy loading\n load(factory);\n }\n }\n /**\n * Check whether given object is a type which can be imported\n * @param {Function | number | string | boolean | null | Unit | Complex} object\n * @return {boolean}\n * @private\n */\n\n\n function isSupportedType(object) {\n return typeof object === 'function' || typeof object === 'number' || typeof object === 'string' || typeof object === 'boolean' || object === null || object && type.isUnit(object) || object && type.isComplex(object) || object && type.isBigNumber(object) || object && type.isFraction(object) || object && type.isMatrix(object) || object && Array.isArray(object);\n }\n /**\n * Test whether a given thing is a typed-function\n * @param {*} fn\n * @return {boolean} Returns true when `fn` is a typed-function\n */\n\n\n function isTypedFunction(fn) {\n return typeof fn === 'function' && _typeof(fn.signatures) === 'object';\n }\n\n function allowedInExpressions(name) {\n return !unsafe.hasOwnProperty(name);\n }\n\n function factoryAllowedInExpressions(factory) {\n return factory.path === undefined && !unsafe.hasOwnProperty(factory.name);\n } // namespaces and functions not available in the parser for safety reasons\n\n\n var unsafe = {\n 'expression': true,\n 'type': true,\n 'docs': true,\n 'error': true,\n 'json': true,\n 'chain': true // chain method not supported. Note that there is a unit chain too.\n\n };\n return mathImport;\n}\n\nexports.math = true; // request access to the math namespace as 5th argument of the factory function\n\nexports.name = 'import';\nexports.factory = factory;\nexports.lazy = true;\n\n//# sourceURL=webpack://adsoda/./node_modules/mathjs/lib/core/function/import.js?");
/***/ }),
/***/ "./node_modules/mathjs/lib/core/typed.js":
/*!***********************************************!*\
!*** ./node_modules/mathjs/lib/core/typed.js ***!
\***********************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar typedFunction = __webpack_require__(/*! typed-function */ \"./node_modules/typed-function/typed-function.js\");\n\nvar digits = __webpack_require__(/*! ./../utils/number */ \"./node_modules/mathjs/lib/utils/number.js\").digits;\n\nvar isBigNumber = __webpack_require__(/*! ./../utils/bignumber/isBigNumber */ \"./node_modules/mathjs/lib/utils/bignumber/isBigNumber.js\");\n\nvar isMatrix = __webpack_require__(/*! ./../utils/collection/isMatrix */ \"./node_modules/mathjs/lib/utils/collection/isMatrix.js\"); // returns a new instance of typed-function\n\n\nvar _createTyped = function createTyped() {\n // initially, return the original instance of typed-function\n // consecutively, return a new instance from typed.create.\n _createTyped = typedFunction.create;\n return typedFunction;\n};\n/**\n * Factory function for creating a new typed instance\n * @param {Object} type Object with data types like Complex and BigNumber\n * @returns {Function}\n */\n\n\nexports.create = function create(type) {\n // TODO: typed-function must be able to silently ignore signatures with unknown data types\n // type checks for all known types\n //\n // note that:\n //\n // - check by duck-typing on a property like `isUnit`, instead of checking instanceof.\n // instanceof cannot be used because that would not allow to pass data from\n // one instance of math.js to another since each has it's own instance of Unit.\n // - check the `isUnit` property via the constructor, so there will be no\n // matches for \"fake\" instances like plain objects with a property `isUnit`.\n // That is important for security reasons.\n // - It must not be possible to override the type checks used internally,\n // for security reasons, so these functions are not exposed in the expression\n // parser.\n type.isNumber = function (x) {\n return typeof x === 'number';\n };\n\n type.isComplex = function (x) {\n return type.Complex && x instanceof type.Complex || false;\n };\n\n type.isBigNumber = isBigNumber;\n\n type.isFraction = function (x) {\n return type.Fraction && x instanceof type.Fraction || false;\n };\n\n type.isUnit = function (x) {\n return x && x.constructor.prototype.isUnit || false;\n };\n\n type.isString = function (x) {\n return typeof x === 'string';\n };\n\n type.isArray = Array.isArray;\n type.isMatrix = isMatrix;\n\n type.isDenseMatrix = function (x) {\n return x && x.isDenseMatrix && x.constructor.prototype.isMatrix || false;\n };\n\n type.isSparseMatrix = function (x) {\n return x && x.isSparseMatrix && x.constructor.prototype.isMatrix || false;\n };\n\n type.isRange = function (x) {\n return x && x.constructor.prototype.isRange || false;\n };\n\n type.isIndex = function (x) {\n return x && x.constructor.prototype.isIndex || false;\n };\n\n type.isBoolean = function (x) {\n return typeof x === 'boolean';\n };\n\n type.isResultSet = function (x) {\n return x && x.constructor.prototype.isResultSet || false;\n };\n\n type.isHelp = function (x) {\n return x && x.constructor.prototype.isHelp || false;\n };\n\n type.isFunction = function (x) {\n return typeof x === 'function';\n };\n\n type.isDate = function (x) {\n return x instanceof Date;\n };\n\n type.isRegExp = function (x) {\n return x instanceof RegExp;\n };\n\n type.isObject = function (x) {\n return _typeof(x) === 'object' && x.constructor === Object && !type.isComplex(x) && !type.isFraction(x);\n };\n\n type.isNull = function (x) {\n return x === null;\n };\n\n type.isUndefined = function (x) {\n return x === undefined;\n };\n\n type.isAccessorNode = function (x) {\n return x && x.isAccessorNode && x.constructor.prototype.isNode || false;\n };\n\n type.isArrayNode = function (x) {\n return x && x.isArrayNode && x.constructor.prototype.isNode || false;\n };\n\n type.isAssignmentNode = function (x) {\n return x && x.isAssignmentNode && x.constructor.prototype.isNode || false;\n };\n\n type.isBlockNode = function (x) {\n return x && x.isBlockNode && x.constructor.prototype.isNode || false;\n };\n\n type.isConditionalNode = function (x) {\n return x && x.isConditionalNode && x.constructor.prototype.isNode || false;\n };\n\n type.isConstantNode = function (x) {\n return x && x.isConstantNode && x.constructor.prototype.isNode || false;\n };\n\n type.isFunctionAssignmentNode = function (x) {\n return x && x.isFunctionAssignmentNode && x.constructor.prototype.isNode || false;\n };\n\n type.isFunctionNode = function (x) {\n return x && x.isFunctionNode && x.constructor.prototype.isNode || false;\n };\n\n type.isIndexNode = function (x) {\n return x && x.isIndexNode && x.constructor.prototype.isNode || false;\n };\n\n type.isNode = function (x) {\n return x && x.isNode && x.constructor.prototype.isNode || false;\n };\n\n type.isObjectNode = function (x) {\n return x && x.isObjectNode && x.constructor.prototype.isNode || false;\n };\n\n type.isOperatorNode = function (x) {\n return x && x.isOperatorNode && x.constructor.prototype.isNode || false;\n };\n\n type.isParenthesisNode = function (x) {\n return x && x.isParenthesisNode && x.constructor.prototype.isNode || false;\n };\n\n type.isRangeNode = function (x) {\n return x && x.isRangeNode && x.constructor.prototype.isNode || false;\n };\n\n type.isSymbolNode = function (x) {\n return x && x.isSymbolNode && x.constructor.prototype.isNode || false;\n };\n\n type.isChain = function (x) {\n return x && x.constructor.prototype.isChain || false;\n }; // get a new instance of typed-function\n\n\n var typed = _createTyped(); // define all types. The order of the types determines in which order function\n // arguments are type-checked (so for performance it's important to put the\n // most used types first).\n\n\n typed.types = [{\n name: 'number',\n test: type.isNumber\n }, {\n name: 'Complex',\n test: type.isComplex\n }, {\n name: 'BigNumber',\n test: type.isBigNumber\n }, {\n name: 'Fraction',\n test: type.isFraction\n }, {\n name: 'Unit',\n test: type.isUnit\n }, {\n name: 'string',\n test: type.isString\n }, {\n name: 'Array',\n test: type.isArray\n }, {\n name: 'Matrix',\n test: type.isMatrix\n }, {\n name: 'DenseMatrix',\n test: type.isDenseMatrix\n }, {\n name: 'SparseMatrix',\n test: type.isSparseMatrix\n }, {\n name: 'Range',\n test: type.isRange\n }, {\n name: 'Index',\n test: type.isIndex\n }, {\n name: 'boolean',\n test: type.isBoolean\n }, {\n name: 'ResultSet',\n test: type.isResultSet\n }, {\n name: 'Help',\n test: type.isHelp\n }, {\n name: 'function',\n test: type.isFunction\n }, {\n name: 'Date',\n test: type.isDate\n }, {\n name: 'RegExp',\n test: type.isRegExp\n }, {\n name: 'null',\n test: type.isNull\n }, {\n name: 'undefined',\n test: type.isUndefined\n }, {\n name: 'OperatorNode',\n test: type.isOperatorNode\n }, {\n name: 'ConstantNode',\n test: type.isConstantNode\n }, {\n name: 'SymbolNode',\n test: type.isSymbolNode\n }, {\n name: 'ParenthesisNode',\n test: type.isParenthesisNode\n }, {\n name: 'FunctionNode',\n test: type.isFunctionNode\n }, {\n name: 'FunctionAssignmentNode',\n test: type.isFunctionAssignmentNode\n }, {\n name: 'ArrayNode',\n test: type.isArrayNode\n }, {\n name: 'AssignmentNode',\n test: type.isAssignmentNode\n }, {\n name: 'BlockNode',\n test: type.isBlockNode\n }, {\n name: 'ConditionalNode',\n test: type.isConditionalNode\n }, {\n name: 'IndexNode',\n test: type.isIndexNode\n }, {\n name: 'RangeNode',\n test: type.isRangeNode\n }, {\n name: 'Node',\n test: type.isNode\n }, {\n name: 'Object',\n test: type.isObject // order 'Object' last, it matches on other classes too\n\n }]; // TODO: add conversion from BigNumber to number?\n\n typed.conversions = [{\n from: 'number',\n to: 'BigNumber',\n convert: function convert(x) {\n // note: conversion from number to BigNumber can fail if x has >15 digits\n if (digits(x) > 15) {\n throw new TypeError('Cannot implicitly convert a number with >15 significant digits to BigNumber ' + '(value: ' + x + '). ' + 'Use function bignumber(x) to convert to BigNumber.');\n }\n\n return new type.BigNumber(x);\n }\n }, {\n from: 'number',\n to: 'Complex',\n convert: function convert(x) {\n return new type.Complex(x, 0);\n }\n }, {\n from: 'number',\n to: 'string',\n convert: function convert(x) {\n return x + '';\n }\n }, {\n from: 'BigNumber',\n to: 'Complex',\n convert: function convert(x) {\n return new type.Complex(x.toNumber(), 0);\n }\n }, {\n from: 'Fraction',\n to: 'BigNumber',\n convert: function convert(x) {\n 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.');\n }\n }, {\n from: 'Fraction',\n to: 'Complex',\n convert: function convert(x) {\n return new type.Complex(x.valueOf(), 0);\n }\n }, {\n from: 'number',\n to: 'Fraction',\n convert: function convert(x) {\n var f = new type.Fraction(x);\n\n if (f.valueOf() !== x) {\n throw new TypeError('Cannot implicitly convert a number to a Fraction when there will be a loss of precision ' + '(value: ' + x + '). ' + 'Use function fraction(x) to convert to Fraction.');\n }\n\n return new type.Fraction(x);\n }\n }, {\n // FIXME: add conversion from Fraction to number, for example for `sqrt(fraction(1,3))`\n // from: 'Fraction',\n // to: 'number',\n // convert: function (x) {\n // return x.valueOf()\n // }\n // }, {\n from: 'string',\n to: 'number',\n convert: function convert(x) {\n var n = Number(x);\n\n if (isNaN(n)) {\n throw new Error('Cannot convert \"' + x + '\" to a number');\n }\n\n return n;\n }\n }, {\n from: 'string',\n to: 'BigNumber',\n convert: function convert(x) {\n try {\n return new type.BigNumber(x);\n } catch (err) {\n throw new Error('Cannot convert \"' + x + '\" to BigNumber');\n }\n }\n }, {\n from: 'string',\n to: 'Fraction',\n convert: function convert(x) {\n try {\n return new type.Fraction(x);\n } catch (err) {\n throw new Error('Cannot convert \"' + x + '\" to Fraction');\n }\n }\n }, {\n from: 'string',\n to: 'Complex',\n convert: function convert(x) {\n try {\n return new type.Complex(x);\n } catch (err) {\n throw new Error('Cannot convert \"' + x + '\" to Complex');\n }\n }\n }, {\n from: 'boolean',\n to: 'number',\n convert: function convert(x) {\n return +x;\n }\n }, {\n from: 'boolean',\n to: 'BigNumber',\n convert: function convert(x) {\n return new type.BigNumber(+x);\n }\n }, {\n from: 'boolean',\n to: 'Fraction',\n convert: function convert(x) {\n return new type.Fraction(+x);\n }\n }, {\n from: 'boolean',\n to: 'string',\n convert: function convert(x) {\n return +x;\n }\n }, {\n from: 'Array',\n to: 'Matrix',\n convert: function convert(array) {\n return new type.DenseMatrix(array);\n }\n }, {\n from: 'Matrix',\n to: 'Array',\n convert: function convert(matrix) {\n return matrix.valueOf();\n }\n }];\n return typed;\n};\n\n//# sourceURL=webpack://adsoda/./node_modules/mathjs/lib/core/typed.js?");
/***/ }),
/***/ "./node_modules/mathjs/lib/error/ArgumentsError.js":
/*!*********************************************************!*\
!*** ./node_modules/mathjs/lib/error/ArgumentsError.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n/**\n * Create a syntax error with the message:\n * 'Wrong number of arguments in function <fn> (<count> provided, <min>-<max> expected)'\n * @param {string} fn Function name\n * @param {number} count Actual argument count\n * @param {number} min Minimum required argument count\n * @param {number} [max] Maximum required argument count\n * @extends Error\n */\n\nfunction ArgumentsError(fn, count, min, max) {\n if (!(this instanceof ArgumentsError)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n this.fn = fn;\n this.count = count;\n this.min = min;\n this.max = max;\n this.message = 'Wrong number of arguments in function ' + fn + ' (' + count + ' provided, ' + min + (max !== undefined && max !== null ? '-' + max : '') + ' expected)';\n this.stack = new Error().stack;\n}\n\nArgumentsError.prototype = new Error();\nArgumentsError.prototype.constructor = Error;\nArgumentsError.prototype.name = 'ArgumentsError';\nArgumentsError.prototype.isArgumentsError = true;\nmodule.exports = ArgumentsError;\n\n//# sourceURL=webpack://adsoda/./node_modules/mathjs/lib/error/ArgumentsError.js?");
/***/ }),
/***/ "./node_modules/mathjs/lib/error/DimensionError.js":
/*!*********************************************************!*\
!*** ./node_modules/mathjs/lib/error/DimensionError.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n/**\n * Create a range error with the message:\n * 'Dimension mismatch (<actual size> != <expected size>)'\n * @param {number | number[]} actual The actual size\n * @param {number | number[]} expected The expected size\n * @param {string} [relation='!='] Optional relation between actual\n * and expected size: '!=', '<', etc.\n * @extends RangeError\n */\n\nfunction DimensionError(actual, expected, relation) {\n if (!(this instanceof DimensionError)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n this.actual = actual;\n this.expected = expected;\n this.relation = relation;\n this.message = 'Dimension mismatch (' + (Array.isArray(actual) ? '[' + actual.join(', ') + ']' : actual) + ' ' + (this.relation || '!=') + ' ' + (Array.isArray(expected) ? '[' + expected.join(', ') + ']' : expected) + ')';\n this.stack = new Error().stack;\n}\n\nDimensionError.prototype = new RangeError();\nDimensionError.prototype.constructor = RangeError;\nDimensionError.prototype.name = 'DimensionError';\nDimensionError.prototype.isDimensionError = true;\nmodule.exports = DimensionError;\n\n//# sourceURL=webpack://adsoda/./node_modules/mathjs/lib/error/DimensionError.js?");
/***/ }),
/***/ "./node_modules/mathjs/lib/error/IndexError.js":
/*!*****************************************************!*\
!*** ./node_modules/mathjs/lib/error/IndexError.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n/**\n * Create a range error with the message:\n * 'Index out of range (index < min)'\n * 'Index out of range (index < max)'\n *\n * @param {number} index The actual index\n * @param {number} [min=0] Minimum index (included)\n * @param {number} [max] Maximum index (excluded)\n * @extends RangeError\n */\n\nfunction IndexError(index, min, max) {\n if (!(this instanceof IndexError)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n this.index = index;\n\n if (arguments.length < 3) {\n this.min = 0;\n this.max = min;\n } else {\n this.min = min;\n this.max = max;\n }\n\n if (this.min !== undefined && this.index < this.min) {\n this.message = 'Index out of range (' + this.index + ' < ' + this.min + ')';\n } else if (this.max !== undefined && this.index >= this.max) {\n this.message = 'Index out of range (' + this.index + ' > ' + (this.max - 1) + ')';\n } else {\n this.message = 'Index out of range (' + this.index + ')';\n }\n\n this.stack = new Error().stack;\n}\n\nIndexError.prototype = new RangeError();\nIndexError.prototype.constructor = RangeError;\nIndexError.prototype.name = 'IndexError';\nIndexError.prototype.isIndexError = true;\nmodule.exports = IndexError;\n\n//# sourceURL=webpack://adsoda/./node_modules/mathjs/lib/error/IndexError.js?");
/***/ }),
/***/ "./node_modules/mathjs/lib/function/arithmetic/abs.js":
/*!************************************************************!*\
!*** ./node_modules/mathjs/lib/function/arithmetic/abs.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar deepMap = __webpack_require__(/*! ../../utils/collection/deepMap */ \"./node_modules/mathjs/lib/utils/collection/deepMap.js\");\n\nfunction factory(type, config, load, typed) {\n /**\n * Calculate the absolute value of a number. For matrices, the function is\n * evaluated element wise.\n *\n * Syntax:\n *\n * math.abs(x)\n *\n * Examples:\n *\n * math.abs(3.5) // returns number 3.5\n * math.abs(-4.2) // returns number 4.2\n *\n * math.abs([3, -5, -1, 0, 2]) // returns Array [3, 5, 1, 0, 2]\n *\n * See also:\n *\n * sign\n *\n * @param {number | BigNumber | Fraction | Complex | Array | Matrix | Unit} x\n * A number or matrix for which to get the absolute value\n * @return {number | BigNumber | Fraction | Complex | Array | Matrix | Unit}\n * Absolute value of `x`\n */\n var abs = typed('abs', {\n 'number': Math.abs,\n 'Complex': function Complex(x) {\n return x.abs();\n },\n 'BigNumber': function BigNumber(x) {\n return x.abs();\n },\n 'Fraction': function Fraction(x) {\n return x.abs();\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n // deep map collection, skip zeros since abs(0) = 0\n return deepMap(x, abs, true);\n },\n 'Unit': function Unit(x) {\n return x.abs();\n }\n });\n abs.toTex = {\n 1: \"\\\\left|${args[0]}\\\\right|\"\n };\n return abs;\n}\n\nexports.name = 'abs';\nexports.factory = factory;\n\n//# sourceURL=webpack://adsoda/./node_modules/mathjs/lib/function/arithmetic/abs.js?");
/***/ }),
/***/ "./node_modules/mathjs/lib/function/arithmetic/add.js":
/*!************************************************************!*\
!*** ./node_modules/mathjs/lib/function/arithmetic/add.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar extend = __webpack_require__(/*! ../../utils/object */ \"./node_modules/mathjs/lib/utils/object.js\").extend;\n\nfunction factory(type, config, load, typed) {\n var matrix = load(__webpack_require__(/*! ../../type/matrix/function/matrix */ \"./node_modules/mathjs/lib/type/matrix/function/matrix.js\"));\n var addScalar = load(__webpack_require__(/*! ./addScalar */ \"./node_modules/mathjs/lib/function/arithmetic/addScalar.js\"));\n\n var latex = __webpack_require__(/*! ../../utils/latex.js */ \"./node_modules/mathjs/lib/utils/latex.js\");\n\n var algorithm01 = load(__webpack_require__(/*! ../../type/matrix/utils/algorithm01 */ \"./node_modules/mathjs/lib/type/matrix/utils/algorithm01.js\"));\n var algorithm04 = load(__webpack_require__(/*! ../../type/matrix/utils/algorithm04 */ \"./node_modules/mathjs/lib/type/matrix/utils/algorithm04.js\"));\n var algorithm10 = load(__webpack_require__(/*! ../../type/matrix/utils/algorithm10 */ \"./node_modules/mathjs/lib/type/matrix/utils/algorithm10.js\"));\n var algorithm13 = load(__webpack_require__(/*! ../../type/matrix/utils/algorithm13 */ \"./node_modules/mathjs/lib/type/matrix/utils/algorithm13.js\"));\n var algorithm14 = load(__webpack_require__(/*! ../../type/matrix/utils/algorithm14 */ \"./node_modules/mathjs/lib/type/matrix/utils/algorithm14.js\"));\n /**\n * Add two or more values, `x + y`.\n * For matrices, the function is evaluated element wise.\n *\n * Syntax:\n *\n * math.add(x, y)\n * math.add(x, y, z, ...)\n *\n * Examples:\n *\n * math.add(2, 3) // returns number 5\n * math.add(2, 3, 4) // returns number 9\n *\n * const a = math.complex(2, 3)\n * const b = math.complex(-4, 1)\n * math.add(a, b) // returns Complex -2 + 4i\n *\n * math.add([1, 2, 3], 4) // returns Array [5, 6, 7]\n *\n * const c = math.unit('5 cm')\n * const d = math.unit('2.1 mm')\n * math.add(c, d) // returns Unit 52.1 mm\n *\n * math.add(\"2.3\", \"4\") // returns number 6.3\n *\n * See also:\n *\n * subtract, sum\n *\n * @param {number | BigNumber | Fraction | Complex | Unit | Array | Matrix} x First value to add\n * @param {number | BigNumber | Fraction | Complex | Unit | Array | Matrix} y Second value to add\n * @return {number | BigNumber | Fraction | Complex | Unit | Array | Matrix} Sum of `x` and `y`\n */\n\n var add = typed('add', extend({\n // we extend the signatures of addScalar with signatures dealing with matrices\n 'DenseMatrix, DenseMatrix': function DenseMatrixDenseMatrix(x, y) {\n return algorithm13(x, y, addScalar);\n },\n 'DenseMatrix, SparseMatrix': function DenseMatrixSparseMatrix(x, y) {\n return algorithm01(x, y, addScalar, false);\n },\n 'SparseMatrix, DenseMatrix': function SparseMatrixDenseMatrix(x, y) {\n return algorithm01(y, x, addScalar, true);\n },\n 'SparseMatrix, SparseMatrix': function SparseMatrixSparseMatrix(x, y) {\n return algorithm04(x, y, addScalar);\n },\n 'Array, Array': function ArrayArray(x, y) {\n // use matrix implementation\n return add(matrix(x), matrix(y)).valueOf();\n },\n 'Array, Matrix': function ArrayMatrix(x, y) {\n // use matrix implementation\n return add(matrix(x), y);\n },\n 'Matrix, Array': function MatrixArray(x, y) {\n // use matrix implementation\n return add(x, matrix(y));\n },\n 'DenseMatrix, any': function DenseMatrixAny(x, y) {\n return algorithm14(x, y, addScalar, false);\n },\n 'SparseMatrix, any': function SparseMatrixAny(x, y) {\n return algorithm10(x, y, addScalar, false);\n },\n 'any, DenseMatrix': function anyDenseMatrix(x, y) {\n return algorithm14(y, x, addScalar, true);\n },\n 'any, SparseMatrix': function anySparseMatrix(x, y) {\n return algorithm10(y, x, addScalar, true);\n },\n 'Array, any': function ArrayAny(x, y) {\n // use matrix implementation\n return algorithm14(matrix(x), y, addScalar, false).valueOf();\n },\n 'any, Array': function anyArray(x, y) {\n // use matrix implementation\n return algorithm14(matrix(y), x, addScalar, true).valueOf();\n },\n 'any, any': addScalar,\n 'any, any, ...any': function anyAnyAny(x, y, rest) {\n var result = add(x, y);\n\n for (var i = 0; i < rest.length; i++) {\n result = add(result, rest[i]);\n }\n\n return result;\n }\n }, addScalar.signatures));\n add.toTex = {\n