UNPKG

813 kBSource Map (JSON)View Raw
1{"version":3,"file":"vis-graph3d.min.js","sources":["../node_modules/core-js-pure/internals/to-integer.js","../node_modules/core-js-pure/internals/path.js","../node_modules/core-js-pure/internals/global.js","../node_modules/core-js-pure/internals/engine-v8-version.js","../node_modules/core-js-pure/internals/get-built-in.js","../node_modules/core-js-pure/internals/engine-user-agent.js","../node_modules/core-js-pure/internals/fails.js","../node_modules/core-js-pure/internals/native-symbol.js","../node_modules/core-js-pure/internals/use-symbol-as-uid.js","../node_modules/core-js-pure/internals/is-symbol.js","../node_modules/core-js-pure/internals/to-string.js","../node_modules/core-js-pure/internals/require-object-coercible.js","../node_modules/core-js-pure/internals/string-multibyte.js","../node_modules/core-js-pure/internals/shared-store.js","../node_modules/core-js-pure/internals/set-global.js","../node_modules/core-js-pure/internals/inspect-source.js","../node_modules/core-js-pure/internals/internal-state.js","../node_modules/core-js-pure/internals/native-weak-map.js","../node_modules/core-js-pure/internals/is-object.js","../node_modules/core-js-pure/internals/descriptors.js","../node_modules/core-js-pure/internals/document-create-element.js","../node_modules/core-js-pure/internals/ie8-dom-define.js","../node_modules/core-js-pure/internals/an-object.js","../node_modules/core-js-pure/internals/shared.js","../node_modules/core-js-pure/internals/to-object.js","../node_modules/core-js-pure/internals/has.js","../node_modules/core-js-pure/internals/uid.js","../node_modules/core-js-pure/internals/well-known-symbol.js","../node_modules/core-js-pure/internals/to-primitive.js","../node_modules/core-js-pure/internals/ordinary-to-primitive.js","../node_modules/core-js-pure/internals/to-property-key.js","../node_modules/core-js-pure/internals/object-define-property.js","../node_modules/core-js-pure/internals/create-property-descriptor.js","../node_modules/core-js-pure/internals/create-non-enumerable-property.js","../node_modules/core-js-pure/internals/shared-key.js","../node_modules/core-js-pure/internals/hidden-keys.js","../node_modules/core-js-pure/internals/iterators-core.js","../node_modules/core-js-pure/internals/object-property-is-enumerable.js","../node_modules/core-js-pure/internals/classof-raw.js","../node_modules/core-js-pure/internals/indexed-object.js","../node_modules/core-js-pure/internals/to-indexed-object.js","../node_modules/core-js-pure/internals/object-get-own-property-descriptor.js","../node_modules/core-js-pure/internals/is-forced.js","../node_modules/core-js-pure/internals/a-function.js","../node_modules/core-js-pure/internals/function-bind-context.js","../node_modules/core-js-pure/internals/export.js","../node_modules/core-js-pure/internals/correct-prototype-getter.js","../node_modules/core-js-pure/internals/object-get-prototype-of.js","../node_modules/core-js-pure/internals/object-create.js","../node_modules/core-js-pure/internals/to-length.js","../node_modules/core-js-pure/internals/to-absolute-index.js","../node_modules/core-js-pure/internals/array-includes.js","../node_modules/core-js-pure/internals/object-keys-internal.js","../node_modules/core-js-pure/internals/enum-bug-keys.js","../node_modules/core-js-pure/internals/object-keys.js","../node_modules/core-js-pure/internals/object-define-properties.js","../node_modules/core-js-pure/internals/html.js","../node_modules/core-js-pure/internals/to-string-tag-support.js","../node_modules/core-js-pure/internals/classof.js","../node_modules/core-js-pure/internals/object-to-string.js","../node_modules/core-js-pure/internals/set-to-string-tag.js","../node_modules/core-js-pure/internals/iterators.js","../node_modules/core-js-pure/internals/create-iterator-constructor.js","../node_modules/core-js-pure/internals/object-set-prototype-of.js","../node_modules/core-js-pure/internals/a-possible-prototype.js","../node_modules/core-js-pure/internals/redefine.js","../node_modules/core-js-pure/internals/define-iterator.js","../node_modules/core-js-pure/modules/es.string.iterator.js","../node_modules/core-js-pure/internals/iterator-close.js","../node_modules/core-js-pure/internals/call-with-safe-iteration-closing.js","../node_modules/core-js-pure/internals/is-array-iterator-method.js","../node_modules/core-js-pure/internals/create-property.js","../node_modules/core-js-pure/internals/get-iterator-method.js","../node_modules/core-js-pure/internals/check-correctness-of-iteration.js","../node_modules/core-js-pure/modules/es.array.from.js","../node_modules/core-js-pure/internals/array-from.js","../node_modules/core-js-pure/es/array/from.js","../node_modules/@babel/runtime-corejs3/core-js-stable/array/from.js","../node_modules/core-js-pure/modules/es.array.iterator.js","../node_modules/core-js-pure/es/get-iterator-method.js","../node_modules/core-js-pure/modules/web.dom-collections.iterator.js","../node_modules/core-js-pure/internals/dom-iterables.js","../node_modules/core-js-pure/stable/get-iterator-method.js","../node_modules/core-js-pure/internals/is-array.js","../node_modules/core-js-pure/internals/object-get-own-property-names.js","../node_modules/core-js-pure/internals/object-get-own-property-names-external.js","../node_modules/core-js-pure/internals/object-get-own-property-symbols.js","../node_modules/core-js-pure/internals/well-known-symbol-wrapped.js","../node_modules/core-js-pure/internals/define-well-known-symbol.js","../node_modules/core-js-pure/internals/array-species-constructor.js","../node_modules/core-js-pure/internals/array-species-create.js","../node_modules/core-js-pure/internals/array-iteration.js","../node_modules/core-js-pure/modules/es.symbol.js","../node_modules/core-js-pure/es/object/get-own-property-symbols.js","../node_modules/core-js-pure/modules/es.object.get-own-property-descriptor.js","../node_modules/core-js-pure/es/object/get-own-property-descriptor.js","../node_modules/core-js-pure/internals/own-keys.js","../node_modules/core-js-pure/modules/es.object.get-own-property-descriptors.js","../node_modules/core-js-pure/es/object/get-own-property-descriptors.js","../node_modules/core-js-pure/modules/es.object.define-properties.js","../node_modules/core-js-pure/es/object/define-properties.js","../node_modules/core-js-pure/modules/es.object.define-property.js","../node_modules/core-js-pure/es/object/define-property.js","../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js","../node_modules/@babel/runtime-corejs3/helpers/classCallCheck.js","../node_modules/core-js-pure/features/object/define-property.js","../node_modules/@babel/runtime-corejs3/helpers/createClass.js","../node_modules/@babel/runtime-corejs3/helpers/defineProperty.js","../node_modules/core-js-pure/modules/es.array.is-array.js","../node_modules/core-js-pure/es/array/is-array.js","../node_modules/core-js-pure/features/array/is-array.js","../node_modules/@babel/runtime-corejs3/helpers/arrayWithHoles.js","../node_modules/core-js-pure/internals/array-method-has-species-support.js","../node_modules/core-js-pure/modules/es.array.concat.js","../node_modules/core-js-pure/modules/es.symbol.async-iterator.js","../node_modules/core-js-pure/modules/es.symbol.has-instance.js","../node_modules/core-js-pure/modules/es.symbol.is-concat-spreadable.js","../node_modules/core-js-pure/modules/es.symbol.iterator.js","../node_modules/core-js-pure/modules/es.symbol.match.js","../node_modules/core-js-pure/modules/es.symbol.match-all.js","../node_modules/core-js-pure/modules/es.symbol.replace.js","../node_modules/core-js-pure/modules/es.symbol.search.js","../node_modules/core-js-pure/modules/es.symbol.species.js","../node_modules/core-js-pure/modules/es.symbol.split.js","../node_modules/core-js-pure/modules/es.symbol.to-primitive.js","../node_modules/core-js-pure/modules/es.symbol.to-string-tag.js","../node_modules/core-js-pure/modules/es.symbol.unscopables.js","../node_modules/core-js-pure/modules/es.json.to-string-tag.js","../node_modules/core-js-pure/es/symbol/index.js","../node_modules/core-js-pure/modules/esnext.symbol.async-dispose.js","../node_modules/core-js-pure/modules/esnext.symbol.dispose.js","../node_modules/core-js-pure/modules/esnext.symbol.matcher.js","../node_modules/core-js-pure/modules/esnext.symbol.metadata.js","../node_modules/core-js-pure/modules/esnext.symbol.observable.js","../node_modules/core-js-pure/modules/esnext.symbol.pattern-match.js","../node_modules/core-js-pure/modules/esnext.symbol.replace-all.js","../node_modules/core-js-pure/features/symbol/index.js","../node_modules/@babel/runtime-corejs3/helpers/iterableToArrayLimit.js","../node_modules/core-js-pure/modules/es.array.slice.js","../node_modules/core-js-pure/internals/entry-virtual.js","../node_modules/core-js-pure/es/array/virtual/slice.js","../node_modules/core-js-pure/es/instance/slice.js","../node_modules/core-js-pure/features/instance/slice.js","../node_modules/core-js-pure/features/array/from.js","../node_modules/@babel/runtime-corejs3/helpers/arrayLikeToArray.js","../node_modules/@babel/runtime-corejs3/helpers/unsupportedIterableToArray.js","../node_modules/@babel/runtime-corejs3/helpers/nonIterableRest.js","../node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js","../node_modules/core-js-pure/es/symbol/iterator.js","../node_modules/core-js-pure/features/symbol/iterator.js","../node_modules/@babel/runtime-corejs3/helpers/typeof.js","../node_modules/@babel/runtime-corejs3/helpers/arrayWithoutHoles.js","../node_modules/@babel/runtime-corejs3/helpers/iterableToArray.js","../node_modules/@babel/runtime-corejs3/helpers/nonIterableSpread.js","../node_modules/@babel/runtime-corejs3/helpers/toConsumableArray.js","../node_modules/@babel/runtime-corejs3/core-js-stable/symbol.js","../node_modules/core-js-pure/es/array/virtual/concat.js","../node_modules/core-js-pure/es/instance/concat.js","../node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js","../node_modules/core-js-pure/modules/es.reflect.own-keys.js","../node_modules/core-js-pure/es/reflect/own-keys.js","../node_modules/@babel/runtime-corejs3/core-js-stable/array/is-array.js","../node_modules/core-js-pure/modules/es.array.map.js","../node_modules/core-js-pure/es/array/virtual/map.js","../node_modules/core-js-pure/es/instance/map.js","../node_modules/core-js-pure/modules/es.object.keys.js","../node_modules/core-js-pure/es/object/keys.js","../node_modules/core-js-pure/modules/es.date.now.js","../node_modules/core-js-pure/es/date/now.js","../node_modules/core-js-pure/internals/function-bind.js","../node_modules/core-js-pure/modules/es.function.bind.js","../node_modules/core-js-pure/es/function/virtual/bind.js","../node_modules/core-js-pure/es/instance/bind.js","../node_modules/core-js-pure/internals/array-method-is-strict.js","../node_modules/core-js-pure/internals/array-for-each.js","../node_modules/core-js-pure/modules/es.array.for-each.js","../node_modules/core-js-pure/es/array/virtual/for-each.js","../node_modules/core-js-pure/stable/instance/for-each.js","../node_modules/core-js-pure/modules/es.array.reverse.js","../node_modules/core-js-pure/es/array/virtual/reverse.js","../node_modules/core-js-pure/es/instance/reverse.js","../node_modules/core-js-pure/modules/es.array.splice.js","../node_modules/core-js-pure/es/array/virtual/splice.js","../node_modules/core-js-pure/es/instance/splice.js","../node_modules/core-js-pure/internals/object-assign.js","../node_modules/core-js-pure/modules/es.object.assign.js","../node_modules/core-js-pure/es/object/assign.js","../node_modules/core-js-pure/modules/es.array.includes.js","../node_modules/core-js-pure/es/array/virtual/includes.js","../node_modules/core-js-pure/internals/is-regexp.js","../node_modules/core-js-pure/internals/not-a-regexp.js","../node_modules/core-js-pure/internals/correct-is-regexp-logic.js","../node_modules/core-js-pure/modules/es.string.includes.js","../node_modules/core-js-pure/es/string/virtual/includes.js","../node_modules/core-js-pure/es/instance/includes.js","../node_modules/core-js-pure/modules/es.object.get-prototype-of.js","../node_modules/core-js-pure/es/object/get-prototype-of.js","../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-prototype-of.js","../node_modules/core-js-pure/modules/es.array.filter.js","../node_modules/core-js-pure/es/array/virtual/filter.js","../node_modules/core-js-pure/es/instance/filter.js","../node_modules/core-js-pure/internals/object-to-array.js","../node_modules/core-js-pure/modules/es.object.values.js","../node_modules/core-js-pure/es/object/values.js","../node_modules/core-js-pure/internals/whitespaces.js","../node_modules/core-js-pure/internals/string-trim.js","../node_modules/core-js-pure/internals/number-parse-int.js","../node_modules/core-js-pure/modules/es.parse-int.js","../node_modules/core-js-pure/es/parse-int.js","../node_modules/core-js-pure/modules/es.array.index-of.js","../node_modules/core-js-pure/es/array/virtual/index-of.js","../node_modules/core-js-pure/internals/string-trim-forced.js","../node_modules/core-js-pure/es/instance/index-of.js","../node_modules/core-js-pure/modules/es.string.trim.js","../node_modules/core-js-pure/es/string/virtual/trim.js","../node_modules/core-js-pure/es/instance/trim.js","../node_modules/core-js-pure/modules/es.object.create.js","../node_modules/core-js-pure/es/object/create.js","../node_modules/@babel/runtime-corejs3/core-js-stable/object/create.js","../node_modules/core-js-pure/modules/es.json.stringify.js","../node_modules/core-js-pure/es/json/stringify.js","../node_modules/core-js-pure/modules/web.timers.js","../node_modules/core-js-pure/stable/set-timeout.js","../node_modules/core-js-pure/modules/es.array.fill.js","../node_modules/core-js-pure/internals/array-fill.js","../node_modules/core-js-pure/es/array/virtual/fill.js","../node_modules/core-js-pure/es/instance/fill.js","../node_modules/component-emitter/index.js","../node_modules/@egjs/hammerjs/dist/hammer.esm.js","../node_modules/vis-util/esnext/esm/vis-util.js","../lib/DOMutil.js","../node_modules/core-js-pure/modules/es.reflect.construct.js","../node_modules/core-js-pure/es/reflect/construct.js","../node_modules/@babel/runtime-corejs3/helpers/assertThisInitialized.js","../node_modules/core-js-pure/features/object/create.js","../node_modules/core-js-pure/modules/es.object.set-prototype-of.js","../node_modules/core-js-pure/es/object/set-prototype-of.js","../node_modules/@babel/runtime-corejs3/helpers/setPrototypeOf.js","../node_modules/@babel/runtime-corejs3/helpers/inherits.js","../node_modules/@babel/runtime-corejs3/helpers/possibleConstructorReturn.js","../node_modules/core-js-pure/features/object/get-prototype-of.js","../node_modules/@babel/runtime-corejs3/helpers/getPrototypeOf.js","../node_modules/regenerator-runtime/runtime.js","../node_modules/core-js-pure/internals/array-reduce.js","../node_modules/core-js-pure/internals/engine-is-node.js","../node_modules/core-js-pure/modules/es.array.reduce.js","../node_modules/core-js-pure/es/array/virtual/reduce.js","../node_modules/core-js-pure/es/instance/reduce.js","../node_modules/core-js-pure/internals/flatten-into-array.js","../node_modules/core-js-pure/modules/es.array.flat-map.js","../node_modules/core-js-pure/es/array/virtual/flat-map.js","../node_modules/core-js-pure/es/instance/flat-map.js","../node_modules/core-js-pure/internals/freezing.js","../node_modules/core-js-pure/internals/internal-metadata.js","../node_modules/core-js-pure/internals/iterate.js","../node_modules/core-js-pure/internals/an-instance.js","../node_modules/core-js-pure/internals/collection.js","../node_modules/core-js-pure/internals/redefine-all.js","../node_modules/core-js-pure/internals/set-species.js","../node_modules/core-js-pure/internals/collection-strong.js","../node_modules/core-js-pure/modules/es.map.js","../node_modules/core-js-pure/es/map/index.js","../node_modules/core-js-pure/modules/es.set.js","../node_modules/core-js-pure/es/set/index.js","../node_modules/@babel/runtime-corejs3/core-js-stable/symbol/iterator.js","../node_modules/core-js-pure/internals/get-iterator.js","../node_modules/core-js-pure/internals/array-sort.js","../node_modules/core-js-pure/internals/engine-ff-version.js","../node_modules/core-js-pure/internals/engine-is-ie-or-edge.js","../node_modules/core-js-pure/internals/engine-webkit-version.js","../node_modules/core-js-pure/modules/es.array.sort.js","../node_modules/core-js-pure/es/array/virtual/sort.js","../node_modules/core-js-pure/es/instance/sort.js","../node_modules/core-js-pure/modules/es.array.some.js","../node_modules/core-js-pure/es/array/virtual/some.js","../node_modules/uuid/dist/esm-browser/rng.js","../node_modules/core-js-pure/es/instance/some.js","../node_modules/core-js-pure/es/array/virtual/keys.js","../node_modules/core-js-pure/stable/instance/keys.js","../node_modules/core-js-pure/es/array/virtual/values.js","../node_modules/core-js-pure/stable/instance/values.js","../node_modules/core-js-pure/es/array/virtual/entries.js","../node_modules/core-js-pure/stable/instance/entries.js","../node_modules/uuid/dist/esm-browser/regex.js","../node_modules/uuid/dist/esm-browser/validate.js","../node_modules/uuid/dist/esm-browser/stringify.js","../node_modules/uuid/dist/esm-browser/v4.js","../node_modules/vis-data/esnext/esm/vis-data.js","../node_modules/core-js-pure/internals/number-parse-float.js","../node_modules/core-js-pure/modules/es.parse-float.js","../node_modules/core-js-pure/es/parse-float.js","../node_modules/core-js-pure/modules/es.number.is-nan.js","../node_modules/core-js-pure/es/number/is-nan.js","../lib/graph3d/Point3d.js","../lib/graph3d/Point2d.js","../lib/graph3d/Slider.js","../lib/graph3d/StepNumber.js","../node_modules/core-js-pure/internals/math-sign.js","../node_modules/core-js-pure/modules/es.math.sign.js","../node_modules/core-js-pure/es/math/sign.js","../lib/graph3d/Camera.js","../lib/graph3d/Settings.js","../lib/graph3d/options.js","../lib/graph3d/Range.js","../lib/graph3d/Filter.js","../lib/graph3d/DataGroup.js","../lib/graph3d/Graph3d.js","../node_modules/keycharm/src/keycharm.js","../index.js"],"sourcesContent":["var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","module.exports = {};\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","var getBuiltIn = require('../internals/get-built-in');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return typeof $Symbol == 'function' && Object(it) instanceof $Symbol;\n};\n","var isSymbol = require('../internals/is-symbol');\n\nmodule.exports = function (argument) {\n if (isSymbol(argument)) throw TypeError('Cannot convert a Symbol value to a string');\n return String(argument);\n};\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var toInteger = require('../internals/to-integer');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.codePointAt` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = toString(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var global = require('../internals/global');\n\nmodule.exports = function (key, value) {\n try {\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- requied for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.16.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2021 Denis Pushkarev (zloirock.ru)'\n});\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(it), key);\n};\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n if (NATIVE_SYMBOL && has(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\n } return WellKnownSymbolsStore[name];\n};\n","var isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = input[TO_PRIMITIVE];\n var result;\n if (exoticToPrim !== undefined) {\n if (pref === undefined) pref = 'default';\n result = exoticToPrim.call(input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","var isObject = require('../internals/is-object');\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (pref !== 'string' && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : String(key);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","module.exports = {};\n","'use strict';\nvar fails = require('../internals/fails');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {\n createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","'use strict';\nvar global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar isForced = require('../internals/is-forced');\nvar path = require('../internals/path');\nvar bind = require('../internals/function-bind-context');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\n\nvar wrapConstructor = function (NativeConstructor) {\n var Wrapper = function (a, b, c) {\n if (this instanceof NativeConstructor) {\n switch (arguments.length) {\n case 0: return new NativeConstructor();\n case 1: return new NativeConstructor(a);\n case 2: return new NativeConstructor(a, b);\n } return new NativeConstructor(a, b, c);\n } return NativeConstructor.apply(this, arguments);\n };\n Wrapper.prototype = NativeConstructor.prototype;\n return Wrapper;\n};\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var PROTO = options.proto;\n\n var nativeSource = GLOBAL ? global : STATIC ? global[TARGET] : (global[TARGET] || {}).prototype;\n\n var target = GLOBAL ? path : path[TARGET] || (path[TARGET] = {});\n var targetPrototype = target.prototype;\n\n var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;\n var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;\n\n for (key in source) {\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contains in native\n USE_NATIVE = !FORCED && nativeSource && has(nativeSource, key);\n\n targetProperty = target[key];\n\n if (USE_NATIVE) if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(nativeSource, key);\n nativeProperty = descriptor && descriptor.value;\n } else nativeProperty = nativeSource[key];\n\n // export native or implementation\n sourceProperty = (USE_NATIVE && nativeProperty) ? nativeProperty : source[key];\n\n if (USE_NATIVE && typeof targetProperty === typeof sourceProperty) continue;\n\n // bind timers to global for call from export context\n if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, global);\n // wrap global constructors for prevent changs in this version\n else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);\n // make static versions for prototype methods\n else if (PROTO && typeof sourceProperty == 'function') resultProperty = bind(Function.call, sourceProperty);\n // default case\n else resultProperty = sourceProperty;\n\n // add a flag to not completely full polyfills\n if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(resultProperty, 'sham', true);\n }\n\n target[key] = resultProperty;\n\n if (PROTO) {\n VIRTUAL_PROTOTYPE = TARGET + 'Prototype';\n if (!has(path, VIRTUAL_PROTOTYPE)) {\n createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});\n }\n // export virtual prototype methods\n path[VIRTUAL_PROTOTYPE][key] = sourceProperty;\n // export real prototype methods\n if (options.real && targetPrototype && !targetPrototype[key]) {\n createNonEnumerableProperty(targetPrototype, key, sourceProperty);\n }\n }\n }\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","var has = require('../internals/has');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n","/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n if (iframe.style) {\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n }\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = document.domain && activeXDocument ?\n NullProtoObjectViaActiveX(activeXDocument) : // old IE\n NullProtoObjectViaIFrame() ||\n NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar defineProperty = require('../internals/object-define-property').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar toString = require('../internals/object-to-string');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC, SET_METHOD) {\n if (it) {\n var target = STATIC ? it : it.prototype;\n if (!has(target, TO_STRING_TAG)) {\n defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n if (SET_METHOD && !TO_STRING_TAG_SUPPORT) {\n createNonEnumerableProperty(target, 'toString', toString);\n }\n }\n};\n","module.exports = {};\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","/* eslint-disable no-proto -- safe */\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n","var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (target, key, value, options) {\n if (options && options.enumerable) target[key] = value;\n else createNonEnumerableProperty(target, key, value);\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar toString = require('../internals/to-string');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: toString(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n","var anObject = require('../internals/an-object');\n\nmodule.exports = function (iterator) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) {\n return anObject(returnMethod.call(iterator)).value;\n }\n};\n","var anObject = require('../internals/an-object');\nvar iteratorClose = require('../internals/iterator-close');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n } catch (error) {\n iteratorClose(iterator);\n throw error;\n }\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","'use strict';\nvar toPropertyKey = require('../internals/to-property-key');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPropertyKey(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","var classof = require('../internals/classof');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n // eslint-disable-next-line es/no-array-from -- required for testing\n Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.es/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: from\n});\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = iteratorMethod.call(O);\n next = iterator.next;\n result = new C();\n for (;!(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = toLength(O.length);\n result = new C(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","require('../../modules/es.string.iterator');\nrequire('../../modules/es.array.from');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Array.from;\n","module.exports = require(\"core-js-pure/stable/array/from\");","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","require('../modules/es.array.iterator');\nrequire('../modules/es.string.iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nmodule.exports = getIteratorMethod;\n","require('./es.array.iterator');\nvar DOMIterables = require('../internals/dom-iterables');\nvar global = require('../internals/global');\nvar classof = require('../internals/classof');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n if (CollectionPrototype && classof(CollectionPrototype) !== TO_STRING_TAG) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n Iterators[COLLECTION_NAME] = Iterators.Array;\n}\n","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","var parent = require('../es/get-iterator-method');\nrequire('../modules/web.dom-collections.iterator');\n\nmodule.exports = parent;\n","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(arg) {\n return classof(arg) == 'Array';\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","/* eslint-disable es/no-object-getownpropertynames -- safe */\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar $getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\n\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return $getOwnPropertyNames(it);\n } catch (error) {\n return windowNames.slice();\n }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]'\n ? getWindowNames(it)\n : $getOwnPropertyNames(toIndexedObject(it));\n};\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nexports.f = wellKnownSymbol;\n","var path = require('../internals/path');\nvar has = require('../internals/has');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {\n value: wrappedWellKnownSymbolModule.f(NAME)\n });\n};\n","var isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","var arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_REJECT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push.call(target, value); // filterReject\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterReject` method\n // https://github.com/tc39/proposal-array-filtering\n filterReject: createMethod(7)\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar fails = require('../internals/fails');\nvar has = require('../internals/has');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar anObject = require('../internals/an-object');\nvar toObject = require('../internals/to-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar $toString = require('../internals/to-string');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar nativeObjectCreate = require('../internals/object-create');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternal = require('../internals/object-get-own-property-names-external');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar shared = require('../internals/shared');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar uid = require('../internals/uid');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineWellKnownSymbol = require('../internals/define-well-known-symbol');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore = shared('wks');\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty(O, P, Attributes);\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!DESCRIPTORS) symbol.description = description;\n return symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPropertyKey(P);\n anObject(Attributes);\n if (has(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n } return setSymbolDescriptor(O, key, Attributes);\n } return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n};\n\nvar $create = function create(O, Properties) {\n return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPropertyKey(V);\n var enumerable = nativePropertyIsEnumerable.call(this, P);\n if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPropertyKey(P);\n if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);\n });\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {\n result.push(AllSymbols[key]);\n }\n });\n return result;\n};\n\n// `Symbol` constructor\n// https://tc39.es/ecma262/#sec-symbol-constructor\nif (!NATIVE_SYMBOL) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);\n var tag = uid(description);\n var setter = function (value) {\n if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n return wrap(tag, description);\n };\n\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return getInternalState(this).tag;\n });\n\n redefine($Symbol, 'withoutSetter', function (description) {\n return wrap(uid(description), description);\n });\n\n propertyIsEnumerableModule.f = $propertyIsEnumerable;\n definePropertyModule.f = $defineProperty;\n getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n wrappedWellKnownSymbolModule.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n\n if (DESCRIPTORS) {\n // https://github.com/tc39/proposal-Symbol-description\n nativeDefineProperty($Symbol[PROTOTYPE], 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n if (!IS_PURE) {\n redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n }\n }\n}\n\n$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n Symbol: $Symbol\n});\n\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n defineWellKnownSymbol(name);\n});\n\n$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n // `Symbol.for` method\n // https://tc39.es/ecma262/#sec-symbol.for\n 'for': function (key) {\n var string = $toString(key);\n if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = $Symbol(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n },\n // `Symbol.keyFor` method\n // https://tc39.es/ecma262/#sec-symbol.keyfor\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n },\n useSetter: function () { USE_SETTER = true; },\n useSimple: function () { USE_SETTER = false; }\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n // `Object.create` method\n // https://tc39.es/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.es/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.es/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.es/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames,\n // `Object.getOwnPropertySymbols` method\n // https://tc39.es/ecma262/#sec-object.getownpropertysymbols\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return getOwnPropertySymbolsModule.f(toObject(it));\n }\n});\n\n// `JSON.stringify` method behavior with symbols\n// https://tc39.es/ecma262/#sec-json.stringify\nif ($stringify) {\n var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {\n var symbol = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n return $stringify([symbol]) != '[null]'\n // WebKit converts symbol values to JSON as null\n || $stringify({ a: symbol }) != '{}'\n // V8 throws on boxed symbols\n || $stringify(Object(symbol)) != '{}';\n });\n\n $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n stringify: function stringify(it, replacer, space) {\n var args = [it];\n var index = 1;\n var $replacer;\n while (arguments.length > index) args.push(arguments[index++]);\n $replacer = replacer;\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return $stringify.apply(null, args);\n }\n });\n}\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\nif (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {\n createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n}\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag($Symbol, SYMBOL);\n\nhiddenKeys[HIDDEN] = true;\n","require('../../modules/es.symbol');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.getOwnPropertySymbols;\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });\nvar FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\n$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {\n return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);\n }\n});\n","require('../../modules/es.object.get-own-property-descriptor');\nvar path = require('../../internals/path');\n\nvar Object = path.Object;\n\nvar getOwnPropertyDescriptor = module.exports = function getOwnPropertyDescriptor(it, key) {\n return Object.getOwnPropertyDescriptor(it, key);\n};\n\nif (Object.getOwnPropertyDescriptor.sham) getOwnPropertyDescriptor.sham = true;\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar ownKeys = require('../internals/own-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar createProperty = require('../internals/create-property');\n\n// `Object.getOwnPropertyDescriptors` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n var O = toIndexedObject(object);\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n var keys = ownKeys(O);\n var result = {};\n var index = 0;\n var key, descriptor;\n while (keys.length > index) {\n descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);\n if (descriptor !== undefined) createProperty(result, key, descriptor);\n }\n return result;\n }\n});\n","require('../../modules/es.object.get-own-property-descriptors');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.getOwnPropertyDescriptors;\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar defineProperties = require('../internals/object-define-properties');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n$({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, {\n defineProperties: defineProperties\n});\n","require('../../modules/es.object.define-properties');\nvar path = require('../../internals/path');\n\nvar Object = path.Object;\n\nvar defineProperties = module.exports = function defineProperties(T, D) {\n return Object.defineProperties(T, D);\n};\n\nif (Object.defineProperties.sham) defineProperties.sham = true;\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar objectDefinePropertyModile = require('../internals/object-define-property');\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\n$({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, {\n defineProperty: objectDefinePropertyModile.f\n});\n","require('../../modules/es.object.define-property');\nvar path = require('../../internals/path');\n\nvar Object = path.Object;\n\nvar defineProperty = module.exports = function defineProperty(it, key, desc) {\n return Object.defineProperty(it, key, desc);\n};\n\nif (Object.defineProperty.sham) defineProperty.sham = true;\n","module.exports = require(\"core-js-pure/stable/object/define-property\");","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var parent = require('../../stable/object/define-property');\n\nmodule.exports = parent;\n","var _Object$defineProperty = require(\"@babel/runtime-corejs3/core-js/object/define-property\");\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n\n _Object$defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var _Object$defineProperty = require(\"@babel/runtime-corejs3/core-js/object/define-property\");\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n _Object$defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var $ = require('../internals/export');\nvar isArray = require('../internals/is-array');\n\n// `Array.isArray` method\n// https://tc39.es/ecma262/#sec-array.isarray\n$({ target: 'Array', stat: true }, {\n isArray: isArray\n});\n","require('../../modules/es.array.is-array');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Array.isArray;\n","var parent = require('../../stable/array/is-array');\n\nmodule.exports = parent;\n","var _Array$isArray = require(\"@babel/runtime-corejs3/core-js/array/is-array\");\n\nfunction _arrayWithHoles(arr) {\n if (_Array$isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.es/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n concat: function concat(arg) {\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = toLength(E.length);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\n});\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.asyncIterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.asynciterator\ndefineWellKnownSymbol('asyncIterator');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.hasInstance` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.hasinstance\ndefineWellKnownSymbol('hasInstance');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.isConcatSpreadable` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.isconcatspreadable\ndefineWellKnownSymbol('isConcatSpreadable');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.iterator` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.iterator\ndefineWellKnownSymbol('iterator');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.match` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.match\ndefineWellKnownSymbol('match');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.matchAll` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.matchall\ndefineWellKnownSymbol('matchAll');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.replace` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.replace\ndefineWellKnownSymbol('replace');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.search` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.search\ndefineWellKnownSymbol('search');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.species` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.species\ndefineWellKnownSymbol('species');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.split` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.split\ndefineWellKnownSymbol('split');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.toPrimitive` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.toprimitive\ndefineWellKnownSymbol('toPrimitive');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.toStringTag` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.tostringtag\ndefineWellKnownSymbol('toStringTag');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.unscopables` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.unscopables\ndefineWellKnownSymbol('unscopables');\n","var global = require('../internals/global');\nvar setToStringTag = require('../internals/set-to-string-tag');\n\n// JSON[@@toStringTag] property\n// https://tc39.es/ecma262/#sec-json-@@tostringtag\nsetToStringTag(global.JSON, 'JSON', true);\n","require('../../modules/es.array.concat');\nrequire('../../modules/es.object.to-string');\nrequire('../../modules/es.symbol');\nrequire('../../modules/es.symbol.async-iterator');\nrequire('../../modules/es.symbol.description');\nrequire('../../modules/es.symbol.has-instance');\nrequire('../../modules/es.symbol.is-concat-spreadable');\nrequire('../../modules/es.symbol.iterator');\nrequire('../../modules/es.symbol.match');\nrequire('../../modules/es.symbol.match-all');\nrequire('../../modules/es.symbol.replace');\nrequire('../../modules/es.symbol.search');\nrequire('../../modules/es.symbol.species');\nrequire('../../modules/es.symbol.split');\nrequire('../../modules/es.symbol.to-primitive');\nrequire('../../modules/es.symbol.to-string-tag');\nrequire('../../modules/es.symbol.unscopables');\nrequire('../../modules/es.json.to-string-tag');\nrequire('../../modules/es.math.to-string-tag');\nrequire('../../modules/es.reflect.to-string-tag');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Symbol;\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.asyncDispose` well-known symbol\n// https://github.com/tc39/proposal-using-statement\ndefineWellKnownSymbol('asyncDispose');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.dispose` well-known symbol\n// https://github.com/tc39/proposal-using-statement\ndefineWellKnownSymbol('dispose');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.matcher` well-known symbol\n// https://github.com/tc39/proposal-pattern-matching\ndefineWellKnownSymbol('matcher');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.metadata` well-known symbol\n// https://github.com/tc39/proposal-decorators\ndefineWellKnownSymbol('metadata');\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.observable` well-known symbol\n// https://github.com/tc39/proposal-observable\ndefineWellKnownSymbol('observable');\n","// TODO: remove from `core-js@4`\nvar defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.patternMatch` well-known symbol\n// https://github.com/tc39/proposal-pattern-matching\ndefineWellKnownSymbol('patternMatch');\n","// TODO: remove from `core-js@4`\nvar defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\ndefineWellKnownSymbol('replaceAll');\n","var parent = require('../../stable/symbol');\nrequire('../../modules/esnext.symbol.async-dispose');\nrequire('../../modules/esnext.symbol.dispose');\nrequire('../../modules/esnext.symbol.matcher');\nrequire('../../modules/esnext.symbol.metadata');\nrequire('../../modules/esnext.symbol.observable');\n// TODO: Remove from `core-js@4`\nrequire('../../modules/esnext.symbol.pattern-match');\n// TODO: Remove from `core-js@4`\nrequire('../../modules/esnext.symbol.replace-all');\n\nmodule.exports = parent;\n","var _Symbol = require(\"@babel/runtime-corejs3/core-js/symbol\");\n\nvar _getIteratorMethod = require(\"@babel/runtime-corejs3/core-js/get-iterator-method\");\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof _Symbol !== \"undefined\" && _getIteratorMethod(arr) || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.es/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","var path = require('../internals/path');\n\nmodule.exports = function (CONSTRUCTOR) {\n return path[CONSTRUCTOR + 'Prototype'];\n};\n","require('../../../modules/es.array.slice');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').slice;\n","var slice = require('../array/virtual/slice');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.slice;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.slice) ? slice : own;\n};\n","var parent = require('../../stable/instance/slice');\n\nmodule.exports = parent;\n","var parent = require('../../stable/array/from');\n\nmodule.exports = parent;\n","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var _sliceInstanceProperty = require(\"@babel/runtime-corejs3/core-js/instance/slice\");\n\nvar _Array$from = require(\"@babel/runtime-corejs3/core-js/array/from\");\n\nvar arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n var _context;\n\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n\n var n = _sliceInstanceProperty(_context = Object.prototype.toString.call(o)).call(_context, 8, -1);\n\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return _Array$from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableRest = require(\"./nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","require('../../modules/es.array.iterator');\nrequire('../../modules/es.object.to-string');\nrequire('../../modules/es.string.iterator');\nrequire('../../modules/es.symbol.iterator');\nvar WrappedWellKnownSymbolModule = require('../../internals/well-known-symbol-wrapped');\n\nmodule.exports = WrappedWellKnownSymbolModule.f('iterator');\n","var parent = require('../../stable/symbol/iterator');\n\nmodule.exports = parent;\n","var _Symbol = require(\"@babel/runtime-corejs3/core-js/symbol\");\n\nvar _Symbol$iterator = require(\"@babel/runtime-corejs3/core-js/symbol/iterator\");\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof _Symbol === \"function\" && typeof _Symbol$iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof _Symbol === \"function\" && obj.constructor === _Symbol && obj !== _Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var _Array$isArray = require(\"@babel/runtime-corejs3/core-js/array/is-array\");\n\nvar arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (_Array$isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var _Symbol = require(\"@babel/runtime-corejs3/core-js/symbol\");\n\nvar _getIteratorMethod = require(\"@babel/runtime-corejs3/core-js/get-iterator-method\");\n\nvar _Array$from = require(\"@babel/runtime-corejs3/core-js/array/from\");\n\nfunction _iterableToArray(iter) {\n if (typeof _Symbol !== \"undefined\" && _getIteratorMethod(iter) != null || iter[\"@@iterator\"] != null) return _Array$from(iter);\n}\n\nmodule.exports = _iterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","module.exports = require(\"core-js-pure/stable/symbol\");","require('../../../modules/es.array.concat');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').concat;\n","var concat = require('../array/virtual/concat');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.concat;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.concat) ? concat : own;\n};\n","module.exports = require(\"core-js-pure/stable/instance/slice\");","var $ = require('../internals/export');\nvar ownKeys = require('../internals/own-keys');\n\n// `Reflect.ownKeys` method\n// https://tc39.es/ecma262/#sec-reflect.ownkeys\n$({ target: 'Reflect', stat: true }, {\n ownKeys: ownKeys\n});\n","require('../../modules/es.reflect.own-keys');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Reflect.ownKeys;\n","module.exports = require(\"core-js-pure/stable/array/is-array\");","'use strict';\nvar $ = require('../internals/export');\nvar $map = require('../internals/array-iteration').map;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n\n// `Array.prototype.map` method\n// https://tc39.es/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","require('../../../modules/es.array.map');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').map;\n","var map = require('../array/virtual/map');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.map;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.map) ? map : own;\n};\n","var $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar nativeKeys = require('../internals/object-keys');\nvar fails = require('../internals/fails');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n keys: function keys(it) {\n return nativeKeys(toObject(it));\n }\n});\n","require('../../modules/es.object.keys');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.keys;\n","var $ = require('../internals/export');\n\n// `Date.now` method\n// https://tc39.es/ecma262/#sec-date.now\n$({ target: 'Date', stat: true }, {\n now: function now() {\n return new Date().getTime();\n }\n});\n","require('../../modules/es.date.now');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Date.now;\n","'use strict';\nvar aFunction = require('../internals/a-function');\nvar isObject = require('../internals/is-object');\n\nvar slice = [].slice;\nvar factories = {};\n\nvar construct = function (C, argsLength, args) {\n if (!(argsLength in factories)) {\n for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';\n // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only\n factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');\n } return factories[argsLength](C, args);\n};\n\n// `Function.prototype.bind` method implementation\n// https://tc39.es/ecma262/#sec-function.prototype.bind\nmodule.exports = Function.bind || function bind(that /* , ...args */) {\n var fn = aFunction(this);\n var partArgs = slice.call(arguments, 1);\n var boundFunction = function bound(/* args... */) {\n var args = partArgs.concat(slice.call(arguments));\n return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);\n };\n if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;\n return boundFunction;\n};\n","var $ = require('../internals/export');\nvar bind = require('../internals/function-bind');\n\n// `Function.prototype.bind` method\n// https://tc39.es/ecma262/#sec-function.prototype.bind\n$({ target: 'Function', proto: true }, {\n bind: bind\n});\n","require('../../../modules/es.function.bind');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Function').bind;\n","var bind = require('../function/virtual/bind');\n\nvar FunctionPrototype = Function.prototype;\n\nmodule.exports = function (it) {\n var own = it.bind;\n return it === FunctionPrototype || (it instanceof Function && own === FunctionPrototype.bind) ? bind : own;\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n","'use strict';\nvar $ = require('../internals/export');\nvar forEach = require('../internals/array-for-each');\n\n// `Array.prototype.forEach` method\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {\n forEach: forEach\n});\n","require('../../../modules/es.array.for-each');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').forEach;\n","require('../../modules/web.dom-collections.iterator');\nvar forEach = require('../array/virtual/for-each');\nvar classof = require('../../internals/classof');\nvar ArrayPrototype = Array.prototype;\n\nvar DOMIterables = {\n DOMTokenList: true,\n NodeList: true\n};\n\nmodule.exports = function (it) {\n var own = it.forEach;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.forEach)\n // eslint-disable-next-line no-prototype-builtins -- safe\n || DOMIterables.hasOwnProperty(classof(it)) ? forEach : own;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar isArray = require('../internals/is-array');\n\nvar nativeReverse = [].reverse;\nvar test = [1, 2];\n\n// `Array.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-array.prototype.reverse\n// fix for Safari 12.0 bug\n// https://bugs.webkit.org/show_bug.cgi?id=188794\n$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {\n reverse: function reverse() {\n // eslint-disable-next-line no-self-assign -- dirty hack\n if (isArray(this)) this.length = this.length;\n return nativeReverse.call(this);\n }\n});\n","require('../../../modules/es.array.reverse');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').reverse;\n","var reverse = require('../array/virtual/reverse');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.reverse;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.reverse) ? reverse : own;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.es/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n","require('../../../modules/es.array.splice');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').splice;\n","var splice = require('../array/virtual/splice');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.splice;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.splice) ? splice : own;\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es/no-symbol -- safe\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","var $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\n// eslint-disable-next-line es/no-object-assign -- required for testing\n$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {\n assign: assign\n});\n","require('../../modules/es.object.assign');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.assign;\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.includes` method\n// https://tc39.es/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","require('../../../modules/es.array.includes');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').includes;\n","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.es/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (error1) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (error2) { /* empty */ }\n } return false;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\n// `String.prototype.includes` method\n// https://tc39.es/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~toString(requireObjectCoercible(this))\n .indexOf(toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","require('../../../modules/es.string.includes');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('String').includes;\n","var arrayIncludes = require('../array/virtual/includes');\nvar stringIncludes = require('../string/virtual/includes');\n\nvar ArrayPrototype = Array.prototype;\nvar StringPrototype = String.prototype;\n\nmodule.exports = function (it) {\n var own = it.includes;\n if (it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.includes)) return arrayIncludes;\n if (typeof it === 'string' || it === StringPrototype || (it instanceof String && own === StringPrototype.includes)) {\n return stringIncludes;\n } return own;\n};\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toObject = require('../internals/to-object');\nvar nativeGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {\n getPrototypeOf: function getPrototypeOf(it) {\n return nativeGetPrototypeOf(toObject(it));\n }\n});\n\n","require('../../modules/es.object.get-prototype-of');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.getPrototypeOf;\n","module.exports = require(\"core-js-pure/stable/object/get-prototype-of\");","'use strict';\nvar $ = require('../internals/export');\nvar $filter = require('../internals/array-iteration').filter;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');\n\n// `Array.prototype.filter` method\n// https://tc39.es/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","require('../../../modules/es.array.filter');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').filter;\n","var filter = require('../array/virtual/filter');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.filter;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.filter) ? filter : own;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.es/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.es/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","var $ = require('../internals/export');\nvar $values = require('../internals/object-to-array').values;\n\n// `Object.values` method\n// https://tc39.es/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n values: function values(O) {\n return $values(O);\n }\n});\n","require('../../modules/es.object.values');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.values;\n","// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = toString(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","var global = require('../internals/global');\nvar toString = require('../internals/to-string');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar $parseInt = global.parseInt;\nvar hex = /^[+-]?0[Xx]/;\nvar FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;\n\n// `parseInt` method\n// https://tc39.es/ecma262/#sec-parseint-string-radix\nmodule.exports = FORCED ? function parseInt(string, radix) {\n var S = trim(toString(string));\n return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));\n} : $parseInt;\n","var $ = require('../internals/export');\nvar parseIntImplementation = require('../internals/number-parse-int');\n\n// `parseInt` method\n// https://tc39.es/ecma262/#sec-parseint-string-radix\n$({ global: true, forced: parseInt != parseIntImplementation }, {\n parseInt: parseIntImplementation\n});\n","require('../modules/es.parse-int');\nvar path = require('../internals/path');\n\nmodule.exports = path.parseInt;\n","'use strict';\n/* eslint-disable es/no-array-prototype-indexof -- required for testing */\nvar $ = require('../internals/export');\nvar $indexOf = require('../internals/array-includes').indexOf;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeIndexOf = [].indexOf;\n\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('indexOf');\n\n// `Array.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-array.prototype.indexof\n$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {\n indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n return NEGATIVE_ZERO\n // convert -0 to +0\n ? nativeIndexOf.apply(this, arguments) || 0\n : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","require('../../../modules/es.array.index-of');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').indexOf;\n","var fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n","var indexOf = require('../array/virtual/index-of');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.indexOf;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.indexOf) ? indexOf : own;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.es/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","require('../../../modules/es.string.trim');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('String').trim;\n","var trim = require('../string/virtual/trim');\n\nvar StringPrototype = String.prototype;\n\nmodule.exports = function (it) {\n var own = it.trim;\n return typeof it === 'string' || it === StringPrototype\n || (it instanceof String && own === StringPrototype.trim) ? trim : own;\n};\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar create = require('../internals/object-create');\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {\n create: create\n});\n","require('../../modules/es.object.create');\nvar path = require('../../internals/path');\n\nvar Object = path.Object;\n\nmodule.exports = function create(P, D) {\n return Object.create(P, D);\n};\n","module.exports = require(\"core-js-pure/stable/object/create\");","var $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar fails = require('../internals/fails');\n\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar re = /[\\uD800-\\uDFFF]/g;\nvar low = /^[\\uD800-\\uDBFF]$/;\nvar hi = /^[\\uDC00-\\uDFFF]$/;\n\nvar fix = function (match, offset, string) {\n var prev = string.charAt(offset - 1);\n var next = string.charAt(offset + 1);\n if ((low.test(match) && !hi.test(next)) || (hi.test(match) && !low.test(prev))) {\n return '\\\\u' + match.charCodeAt(0).toString(16);\n } return match;\n};\n\nvar FORCED = fails(function () {\n return $stringify('\\uDF06\\uD834') !== '\"\\\\udf06\\\\ud834\"'\n || $stringify('\\uDEAD') !== '\"\\\\udead\"';\n});\n\nif ($stringify) {\n // `JSON.stringify` method\n // https://tc39.es/ecma262/#sec-json.stringify\n // https://github.com/tc39/proposal-well-formed-stringify\n $({ target: 'JSON', stat: true, forced: FORCED }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n stringify: function stringify(it, replacer, space) {\n var result = $stringify.apply(null, arguments);\n return typeof result == 'string' ? result.replace(re, fix) : result;\n }\n });\n}\n","require('../../modules/es.json.stringify');\nvar core = require('../../internals/path');\n\n// eslint-disable-next-line es/no-json -- safe\nif (!core.JSON) core.JSON = { stringify: JSON.stringify };\n\n// eslint-disable-next-line no-unused-vars -- required for `.length`\nmodule.exports = function stringify(it, replacer, space) {\n return core.JSON.stringify.apply(null, arguments);\n};\n","var $ = require('../internals/export');\nvar global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar slice = [].slice;\nvar MSIE = /MSIE .\\./.test(userAgent); // <- dirty ie9- check\n\nvar wrap = function (scheduler) {\n return function (handler, timeout /* , ...arguments */) {\n var boundArgs = arguments.length > 2;\n var args = boundArgs ? slice.call(arguments, 2) : undefined;\n return scheduler(boundArgs ? function () {\n // eslint-disable-next-line no-new-func -- spec requirement\n (typeof handler == 'function' ? handler : Function(handler)).apply(this, args);\n } : handler, timeout);\n };\n};\n\n// ie9- setTimeout & setInterval additional parameters fix\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers\n$({ global: true, bind: true, forced: MSIE }, {\n // `setTimeout` method\n // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout\n setTimeout: wrap(global.setTimeout),\n // `setInterval` method\n // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval\n setInterval: wrap(global.setInterval)\n});\n","require('../modules/web.timers');\nvar path = require('../internals/path');\n\nmodule.exports = path.setTimeout;\n","var $ = require('../internals/export');\nvar fill = require('../internals/array-fill');\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// `Array.prototype.fill` method\n// https://tc39.es/ecma262/#sec-array.prototype.fill\n$({ target: 'Array', proto: true }, {\n fill: fill\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('fill');\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.fill` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.fill\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var argumentsLength = arguments.length;\n var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n var end = argumentsLength > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n","require('../../../modules/es.array.fill');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').fill;\n","var fill = require('../array/virtual/fill');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.fill;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.fill) ? fill : own;\n};\n","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n\r\n // Remove event specific arrays for event types that no\r\n // one is subscribed for to avoid memory leak.\r\n if (callbacks.length === 0) {\r\n delete this._callbacks['$' + event];\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n\r\n var args = new Array(arguments.length - 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n for (var i = 1; i < arguments.length; i++) {\r\n args[i - 1] = arguments[i];\r\n }\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n","/*! Hammer.JS - v2.0.17-rc - 2019-12-16\n * http://naver.github.io/egjs\n *\n * Forked By Naver egjs\n * Copyright (c) hammerjs\n * Licensed under the MIT license */\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\n\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\nvar assign$1 = assign;\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = typeof document === \"undefined\" ? {\n style: {}\n} : document.createElement('div');\nvar TYPE_FUNCTION = 'function';\nvar round = Math.round,\n abs = Math.abs;\nvar now = Date.now;\n\n/**\n * @private\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\n\nfunction prefixed(obj, property) {\n var prefix;\n var prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n var i = 0;\n\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = prefix ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n\n i++;\n }\n\n return undefined;\n}\n\n/* eslint-disable no-new-func, no-nested-ternary */\nvar win;\n\nif (typeof window === \"undefined\") {\n // window is undefined in node.js\n win = {};\n} else {\n win = window;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n\n var touchMap = {};\n var cssSupports = win.CSS && win.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function (val) {\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n return touchMap[val] = cssSupports ? win.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\n\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\nvar SUPPORT_TOUCH = 'ontouchstart' in win;\nvar SUPPORT_POINTER_EVENTS = prefixed(win, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\nvar COMPUTE_INTERVAL = 25;\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * @private\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n\n/**\n * @private\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\n\nfunction boolOrFn(val, args) {\n if (typeof val === TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n\n return val;\n}\n\n/**\n * @private\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n\n/**\n * @private\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\n\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n } // pan-x OR pan-y\n\n\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n } // manipulation\n\n\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n\n/**\n * @private\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\n\nvar TouchAction =\n/*#__PURE__*/\nfunction () {\n function TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n }\n /**\n * @private\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n\n\n var _proto = TouchAction.prototype;\n\n _proto.set = function set(value) {\n // find out the touch-action by the event handlers\n if (value === TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n\n this.actions = value.toLowerCase().trim();\n };\n /**\n * @private\n * just re-set the touchAction value\n */\n\n\n _proto.update = function update() {\n this.set(this.manager.options.touchAction);\n };\n /**\n * @private\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n\n\n _proto.compute = function compute() {\n var actions = [];\n each(this.manager.recognizers, function (recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n };\n /**\n * @private\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n\n\n _proto.preventDefaults = function preventDefaults(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection; // if the touch action did prevented once this session\n\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n // do not prevent defaults if this is a tap gesture\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone || hasPanY && direction & DIRECTION_HORIZONTAL || hasPanX && direction & DIRECTION_VERTICAL) {\n return this.preventSrc(srcEvent);\n }\n };\n /**\n * @private\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n\n\n _proto.preventSrc = function preventSrc(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n };\n\n return TouchAction;\n}();\n\n/**\n * @private\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n while (node) {\n if (node === parent) {\n return true;\n }\n\n node = node.parentNode;\n }\n\n return false;\n}\n\n/**\n * @private\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\n\nfunction getCenter(pointers) {\n var pointersLength = pointers.length; // no need to loop when only one touch\n\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0;\n var y = 0;\n var i = 0;\n\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n\n/**\n * @private\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\n\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n\n/**\n * @private\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\n\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.sqrt(x * x + y * y);\n}\n\n/**\n * @private\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\n\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n\n var x = p2[props[0]] - p1[props[0]];\n var y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * @private\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\n\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center; // let { offsetDelta:offset = {}, prevDelta = {}, prevInput = {} } = session;\n // jscs throwing error on defalut destructured values and without defaults tests fail\n\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * @private\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n\n/**\n * @private\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\n\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\n/**\n * @private\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\n\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * @private\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\n\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input;\n var deltaTime = input.timeStamp - last.timeStamp;\n var velocity;\n var velocityX;\n var velocityY;\n var direction;\n\n if (input.eventType !== INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = abs(v.x) > abs(v.y) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n\n/**\n* @private\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\n\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length; // store the first input to calculate the distance and direction\n\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n } // to compute scale and rotation we need to store the multiple touches\n\n\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput,\n firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = abs(overallVelocity.x) > abs(overallVelocity.y) ? overallVelocity.x : overallVelocity.y;\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n input.maxPointers = !session.prevInput ? input.pointers.length : input.pointers.length > session.prevInput.maxPointers ? input.pointers.length : session.prevInput.maxPointers;\n computeIntervalInputData(session, input); // find the correct target\n\n var target = manager.element;\n var srcEvent = input.srcEvent;\n var srcEventTarget;\n\n if (srcEvent.composedPath) {\n srcEventTarget = srcEvent.composedPath()[0];\n } else if (srcEvent.path) {\n srcEventTarget = srcEvent.path[0];\n } else {\n srcEventTarget = srcEvent.target;\n }\n\n if (hasParent(srcEventTarget, target)) {\n target = srcEventTarget;\n }\n\n input.target = target;\n}\n\n/**\n * @private\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\n\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = eventType & INPUT_START && pointersLen - changedPointersLen === 0;\n var isFinal = eventType & (INPUT_END | INPUT_CANCEL) && pointersLen - changedPointersLen === 0;\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n } // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n\n\n input.eventType = eventType; // compute scale, rotation etc\n\n computeInputData(manager, input); // emit secret event\n\n manager.emit('hammer.input', input);\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n\n/**\n * @private\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n\n/**\n * @private\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.addEventListener(type, handler, false);\n });\n}\n\n/**\n * @private\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\n\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function (type) {\n target.removeEventListener(type, handler, false);\n });\n}\n\n/**\n * @private\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return doc.defaultView || doc.parentWindow || window;\n}\n\n/**\n * @private\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\n\nvar Input =\n/*#__PURE__*/\nfunction () {\n function Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget; // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n\n this.domHandler = function (ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n }\n /**\n * @private\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n\n\n var _proto = Input.prototype;\n\n _proto.handler = function handler() {};\n /**\n * @private\n * bind the events\n */\n\n\n _proto.init = function init() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n /**\n * @private\n * unbind the events\n */\n\n\n _proto.destroy = function destroy() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n };\n\n return Input;\n}();\n\n/**\n * @private\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n\n while (i < src.length) {\n if (findByKey && src[i][findByKey] == find || !findByKey && src[i] === find) {\n // do not use === here, test fails\n return i;\n }\n\n i++;\n }\n\n return -1;\n }\n}\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n}; // in IE10 the pointer types is defined as an enum\n\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n\n};\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel'; // IE10 has prefixed support, and case-sensitive\n\nif (win.MSPointerEvent && !win.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n/**\n * @private\n * Pointer events input\n * @constructor\n * @extends Input\n */\n\n\nvar PointerEventInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(PointerEventInput, _Input);\n\n function PointerEventInput() {\n var _this;\n\n var proto = PointerEventInput.prototype;\n proto.evEl = POINTER_ELEMENT_EVENTS;\n proto.evWin = POINTER_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.store = _this.manager.session.pointerEvents = [];\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = PointerEventInput.prototype;\n\n _proto.handler = function handler(ev) {\n var store = this.store;\n var removePointer = false;\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n var isTouch = pointerType === INPUT_TYPE_TOUCH; // get index of the event in the store\n\n var storeIndex = inArray(store, ev.pointerId, 'pointerId'); // start and mouse must be down\n\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n } // it not found, so the pointer hasn't been down (so it's probably a hover)\n\n\n if (storeIndex < 0) {\n return;\n } // update the event in the store\n\n\n store[storeIndex] = ev;\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n };\n\n return PointerEventInput;\n}(Input);\n\n/**\n * @private\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * @private\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\n\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function (a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\n\nvar TouchInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(TouchInput, _Input);\n\n function TouchInput() {\n var _this;\n\n TouchInput.prototype.evTarget = TOUCH_TARGET_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.targetIds = {}; // this.evTarget = TOUCH_TARGET_EVENTS;\n\n return _this;\n }\n\n var _proto = TouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return TouchInput;\n}(Input);\n\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds; // when there is only one touch, the process can be simplified\n\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i;\n var targetTouches;\n var changedTouches = toArray(ev.changedTouches);\n var changedTargetTouches = [];\n var target = this.target; // get target touches from touches\n\n targetTouches = allTouches.filter(function (touch) {\n return hasParent(touch.target, target);\n }); // collect touches\n\n if (type === INPUT_START) {\n i = 0;\n\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n } // filter changed touches to only contain touches that exist in the collected target ids\n\n\n i = 0;\n\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n } // cleanup removed touches\n\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true), changedTargetTouches];\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n/**\n * @private\n * Mouse events input\n * @constructor\n * @extends Input\n */\n\nvar MouseInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(MouseInput, _Input);\n\n function MouseInput() {\n var _this;\n\n var proto = MouseInput.prototype;\n proto.evEl = MOUSE_ELEMENT_EVENTS;\n proto.evWin = MOUSE_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.pressed = false; // mousedown state\n\n return _this;\n }\n /**\n * @private\n * handle mouse events\n * @param {Object} ev\n */\n\n\n var _proto = MouseInput.prototype;\n\n _proto.handler = function handler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type]; // on start we want to have the left mouse button down\n\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n } // mouse must be down\n\n\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n };\n\n return MouseInput;\n}(Input);\n\n/**\n * @private\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction setLastTouch(eventData) {\n var _eventData$changedPoi = eventData.changedPointers,\n touch = _eventData$changedPoi[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {\n x: touch.clientX,\n y: touch.clientY\n };\n var lts = this.lastTouches;\n this.lastTouches.push(lastTouch);\n\n var removeLastTouch = function removeLastTouch() {\n var i = lts.indexOf(lastTouch);\n\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX;\n var y = eventData.srcEvent.clientY;\n\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x);\n var dy = Math.abs(y - t.y);\n\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n\n return false;\n}\n\nvar TouchMouseInput =\n/*#__PURE__*/\nfunction () {\n var TouchMouseInput =\n /*#__PURE__*/\n function (_Input) {\n _inheritsLoose(TouchMouseInput, _Input);\n\n function TouchMouseInput(_manager, callback) {\n var _this;\n\n _this = _Input.call(this, _manager, callback) || this;\n\n _this.handler = function (manager, inputEvent, inputData) {\n var isTouch = inputData.pointerType === INPUT_TYPE_TOUCH;\n var isMouse = inputData.pointerType === INPUT_TYPE_MOUSE;\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n } // when we're in a touch event, record touches to de-dupe synthetic mouse event\n\n\n if (isTouch) {\n recordTouches.call(_assertThisInitialized(_assertThisInitialized(_this)), inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(_assertThisInitialized(_assertThisInitialized(_this)), inputData)) {\n return;\n }\n\n _this.callback(manager, inputEvent, inputData);\n };\n\n _this.touch = new TouchInput(_this.manager, _this.handler);\n _this.mouse = new MouseInput(_this.manager, _this.handler);\n _this.primaryTouch = null;\n _this.lastTouches = [];\n return _this;\n }\n /**\n * @private\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n\n\n var _proto = TouchMouseInput.prototype;\n\n /**\n * @private\n * remove the event listeners\n */\n _proto.destroy = function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n };\n\n return TouchMouseInput;\n }(Input);\n\n return TouchMouseInput;\n}();\n\n/**\n * @private\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\n\nfunction createInputInstance(manager) {\n var Type; // let inputClass = manager.options.inputClass;\n\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n\n return new Type(manager, inputHandler);\n}\n\n/**\n * @private\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\n\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n\n return false;\n}\n\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * @private\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n return _uniqueId++;\n}\n\n/**\n * @private\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n\n if (manager) {\n return manager.get(otherRecognizer);\n }\n\n return otherRecognizer;\n}\n\n/**\n * @private\n * get a usable string, used as event postfix\n * @param {constant} state\n * @returns {String} state\n */\n\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n\n return '';\n}\n\n/**\n * @private\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\n\n/**\n * @private\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\n\nvar Recognizer =\n/*#__PURE__*/\nfunction () {\n function Recognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n this.options = _extends({\n enable: true\n }, options);\n this.id = uniqueId();\n this.manager = null; // default is enable true\n\n this.state = STATE_POSSIBLE;\n this.simultaneous = {};\n this.requireFail = [];\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n\n\n var _proto = Recognizer.prototype;\n\n _proto.set = function set(options) {\n assign$1(this.options, options); // also update the touchAction, in case something changed about the directions/enabled state\n\n this.manager && this.manager.touchAction.update();\n return this;\n };\n /**\n * @private\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.recognizeWith = function recognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRecognizeWith = function dropRecognizeWith(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n };\n /**\n * @private\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.requireFailure = function requireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n\n return this;\n };\n /**\n * @private\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n\n\n _proto.dropRequireFailure = function dropRequireFailure(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n\n return this;\n };\n /**\n * @private\n * has require failures boolean\n * @returns {boolean}\n */\n\n\n _proto.hasRequireFailures = function hasRequireFailures() {\n return this.requireFail.length > 0;\n };\n /**\n * @private\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n\n\n _proto.canRecognizeWith = function canRecognizeWith(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n };\n /**\n * @private\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n\n\n _proto.emit = function emit(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n } // 'panstart' and 'panmove'\n\n\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) {\n // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n } // panend and pancancel\n\n\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n };\n /**\n * @private\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n\n\n _proto.tryEmit = function tryEmit(input) {\n if (this.canEmit()) {\n return this.emit(input);\n } // it's failing anyway\n\n\n this.state = STATE_FAILED;\n };\n /**\n * @private\n * can we emit?\n * @returns {boolean}\n */\n\n\n _proto.canEmit = function canEmit() {\n var i = 0;\n\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n\n i++;\n }\n\n return true;\n };\n /**\n * @private\n * update the recognizer\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign$1({}, inputData); // is is enabled and allow recognizing?\n\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n } // reset when we've reached the end\n\n\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone); // the recognizer has recognized a gesture\n // so trigger an event\n\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n };\n /**\n * @private\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {constant} STATE\n */\n\n /* jshint ignore:start */\n\n\n _proto.process = function process(inputData) {};\n /* jshint ignore:end */\n\n /**\n * @private\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n\n\n _proto.getTouchAction = function getTouchAction() {};\n /**\n * @private\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n\n\n _proto.reset = function reset() {};\n\n return Recognizer;\n}();\n\n/**\n * @private\n * A tap is recognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\n\nvar TapRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(TapRecognizer, _Recognizer);\n\n function TapRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300,\n // max time between the multi-tap taps\n time: 250,\n // max time of the pointer to be down (like finger on the screen)\n threshold: 9,\n // a minimal movement is ok, but keep it low\n posThreshold: 10\n }, options)) || this; // previous time and center,\n // used for tap counting\n\n _this.pTime = false;\n _this.pCenter = false;\n _this._timer = null;\n _this._input = null;\n _this.count = 0;\n return _this;\n }\n\n var _proto = TapRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_MANIPULATION];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n this.reset();\n\n if (input.eventType & INPUT_START && this.count === 0) {\n return this.failTimeout();\n } // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType !== INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input; // if tap count matches we have recognized it,\n // else it has began recognizing...\n\n var tapCount = this.count % options.taps;\n\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.interval);\n return STATE_BEGAN;\n }\n }\n }\n\n return STATE_FAILED;\n };\n\n _proto.failTimeout = function failTimeout() {\n var _this3 = this;\n\n this._timer = setTimeout(function () {\n _this3.state = STATE_FAILED;\n }, this.options.interval);\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit() {\n if (this.state === STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return TapRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\n\nvar AttrRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(AttrRecognizer, _Recognizer);\n\n function AttrRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _Recognizer.call(this, _extends({\n pointers: 1\n }, options)) || this;\n }\n /**\n * @private\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n\n\n var _proto = AttrRecognizer.prototype;\n\n _proto.attrTest = function attrTest(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n };\n /**\n * @private\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n\n\n _proto.process = function process(input) {\n var state = this.state;\n var eventType = input.eventType;\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input); // on cancel input and we've recognized before, return STATE_CANCELLED\n\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n\n return state | STATE_CHANGED;\n }\n\n return STATE_FAILED;\n };\n\n return AttrRecognizer;\n}(Recognizer);\n\n/**\n * @private\n * direction cons to string\n * @param {constant} direction\n * @returns {String}\n */\n\nfunction directionStr(direction) {\n if (direction === DIRECTION_DOWN) {\n return 'down';\n } else if (direction === DIRECTION_UP) {\n return 'up';\n } else if (direction === DIRECTION_LEFT) {\n return 'left';\n } else if (direction === DIRECTION_RIGHT) {\n return 'right';\n }\n\n return '';\n}\n\n/**\n * @private\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar PanRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(PanRecognizer, _AttrRecognizer);\n\n function PanRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _AttrRecognizer.call(this, _extends({\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n }, options)) || this;\n _this.pX = null;\n _this.pY = null;\n return _this;\n }\n\n var _proto = PanRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n var direction = this.options.direction;\n var actions = [];\n\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n\n return actions;\n };\n\n _proto.directionTest = function directionTest(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY; // lock to axis?\n\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = x === 0 ? DIRECTION_NONE : x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x !== this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = y === 0 ? DIRECTION_NONE : y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y !== this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n };\n\n _proto.attrTest = function attrTest(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) && ( // replace with a super call\n this.state & STATE_BEGAN || !(this.state & STATE_BEGAN) && this.directionTest(input));\n };\n\n _proto.emit = function emit(input) {\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PanRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar SwipeRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(SwipeRecognizer, _AttrRecognizer);\n\n function SwipeRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n }, options)) || this;\n }\n\n var _proto = SwipeRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n };\n\n _proto.attrTest = function attrTest(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return _AttrRecognizer.prototype.attrTest.call(this, input) && direction & input.offsetDirection && input.distance > this.options.threshold && input.maxPointers === this.options.pointers && abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n };\n\n _proto.emit = function emit(input) {\n var direction = directionStr(input.offsetDirection);\n\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n };\n\n return SwipeRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar PinchRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(PinchRecognizer, _AttrRecognizer);\n\n function PinchRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'pinch',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = PinchRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n _proto.emit = function emit(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n\n _AttrRecognizer.prototype.emit.call(this, input);\n };\n\n return PinchRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\n\nvar RotateRecognizer =\n/*#__PURE__*/\nfunction (_AttrRecognizer) {\n _inheritsLoose(RotateRecognizer, _AttrRecognizer);\n\n function RotateRecognizer(options) {\n if (options === void 0) {\n options = {};\n }\n\n return _AttrRecognizer.call(this, _extends({\n event: 'rotate',\n threshold: 0,\n pointers: 2\n }, options)) || this;\n }\n\n var _proto = RotateRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_NONE];\n };\n\n _proto.attrTest = function attrTest(input) {\n return _AttrRecognizer.prototype.attrTest.call(this, input) && (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n };\n\n return RotateRecognizer;\n}(AttrRecognizer);\n\n/**\n * @private\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\n\nvar PressRecognizer =\n/*#__PURE__*/\nfunction (_Recognizer) {\n _inheritsLoose(PressRecognizer, _Recognizer);\n\n function PressRecognizer(options) {\n var _this;\n\n if (options === void 0) {\n options = {};\n }\n\n _this = _Recognizer.call(this, _extends({\n event: 'press',\n pointers: 1,\n time: 251,\n // minimal time of the pointer to be pressed\n threshold: 9\n }, options)) || this;\n _this._timer = null;\n _this._input = null;\n return _this;\n }\n\n var _proto = PressRecognizer.prototype;\n\n _proto.getTouchAction = function getTouchAction() {\n return [TOUCH_ACTION_AUTO];\n };\n\n _proto.process = function process(input) {\n var _this2 = this;\n\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n this._input = input; // we only allow little movement\n // and we've reached an end event, so a tap is possible\n\n if (!validMovement || !validPointers || input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeout(function () {\n _this2.state = STATE_RECOGNIZED;\n\n _this2.tryEmit();\n }, options.time);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n\n return STATE_FAILED;\n };\n\n _proto.reset = function reset() {\n clearTimeout(this._timer);\n };\n\n _proto.emit = function emit(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && input.eventType & INPUT_END) {\n this.manager.emit(this.options.event + \"up\", input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n };\n\n return PressRecognizer;\n}(Recognizer);\n\nvar defaults = {\n /**\n * @private\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * @private\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @private\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * @private\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * @private\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * @private\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * @private\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: \"none\",\n\n /**\n * @private\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: \"none\",\n\n /**\n * @private\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: \"none\",\n\n /**\n * @private\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: \"none\",\n\n /**\n * @private\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: \"none\",\n\n /**\n * @private\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: \"rgba(0,0,0,0)\"\n }\n};\n/**\n * @private\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * This is separated with other defaults because of tree-shaking.\n * @type {Array}\n */\n\nvar preset = [[RotateRecognizer, {\n enable: false\n}], [PinchRecognizer, {\n enable: false\n}, ['rotate']], [SwipeRecognizer, {\n direction: DIRECTION_HORIZONTAL\n}], [PanRecognizer, {\n direction: DIRECTION_HORIZONTAL\n}, ['swipe']], [TapRecognizer], [TapRecognizer, {\n event: 'doubletap',\n taps: 2\n}, ['tap']], [PressRecognizer]];\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n/**\n * @private\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\n\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n\n if (!element.style) {\n return;\n }\n\n var prop;\n each(manager.options.cssProps, function (value, name) {\n prop = prefixed(element.style, name);\n\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || \"\";\n }\n });\n\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n/**\n * @private\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\n\n\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent(\"Event\");\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n/**\n* @private\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\n\nvar Manager =\n/*#__PURE__*/\nfunction () {\n function Manager(element, options) {\n var _this = this;\n\n this.options = assign$1({}, defaults, options || {});\n this.options.inputTarget = this.options.inputTarget || element;\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n toggleCssProps(this, true);\n each(this.options.recognizers, function (item) {\n var recognizer = _this.add(new item[0](item[1]));\n\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n }\n /**\n * @private\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n\n\n var _proto = Manager.prototype;\n\n _proto.set = function set(options) {\n assign$1(this.options, options); // Options that need a little more setup\n\n if (options.touchAction) {\n this.touchAction.update();\n }\n\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n\n return this;\n };\n /**\n * @private\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n\n\n _proto.stop = function stop(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n };\n /**\n * @private\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n\n\n _proto.recognize = function recognize(inputData) {\n var session = this.session;\n\n if (session.stopped) {\n return;\n } // run the touch-action polyfill\n\n\n this.touchAction.preventDefaults(inputData);\n var recognizer;\n var recognizers = this.recognizers; // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n\n var curRecognizer = session.curRecognizer; // reset when the last recognizer is recognized\n // or when we're in a new session\n\n if (!curRecognizer || curRecognizer && curRecognizer.state & STATE_RECOGNIZED) {\n session.curRecognizer = null;\n curRecognizer = null;\n }\n\n var i = 0;\n\n while (i < recognizers.length) {\n recognizer = recognizers[i]; // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer === curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) {\n // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n } // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n\n\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n session.curRecognizer = recognizer;\n curRecognizer = recognizer;\n }\n\n i++;\n }\n };\n /**\n * @private\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n\n\n _proto.get = function get(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event === recognizer) {\n return recognizers[i];\n }\n }\n\n return null;\n };\n /**\n * @private add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n\n\n _proto.add = function add(recognizer) {\n if (invokeArrayArg(recognizer, \"add\", this)) {\n return this;\n } // remove existing\n\n\n var existing = this.get(recognizer.options.event);\n\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n this.touchAction.update();\n return recognizer;\n };\n /**\n * @private\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n\n\n _proto.remove = function remove(recognizer) {\n if (invokeArrayArg(recognizer, \"remove\", this)) {\n return this;\n }\n\n var targetRecognizer = this.get(recognizer); // let's make sure this recognizer exists\n\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, targetRecognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n };\n /**\n * @private\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n\n\n _proto.on = function on(events, handler) {\n if (events === undefined || handler === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n };\n /**\n * @private unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n\n\n _proto.off = function off(events, handler) {\n if (events === undefined) {\n return this;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function (event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n };\n /**\n * @private emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n\n\n _proto.emit = function emit(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n } // no handlers, so skip it all\n\n\n var handlers = this.handlers[event] && this.handlers[event].slice();\n\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n\n data.preventDefault = function () {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n };\n /**\n * @private\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n\n\n _proto.destroy = function destroy() {\n this.element && toggleCssProps(this, false);\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n };\n\n return Manager;\n}();\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n/**\n * @private\n * Touch events input\n * @constructor\n * @extends Input\n */\n\nvar SingleTouchInput =\n/*#__PURE__*/\nfunction (_Input) {\n _inheritsLoose(SingleTouchInput, _Input);\n\n function SingleTouchInput() {\n var _this;\n\n var proto = SingleTouchInput.prototype;\n proto.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n proto.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n _this = _Input.apply(this, arguments) || this;\n _this.started = false;\n return _this;\n }\n\n var _proto = SingleTouchInput.prototype;\n\n _proto.handler = function handler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type]; // should we handle the touch events?\n\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type); // when done, reset the started state\n\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n };\n\n return SingleTouchInput;\n}(Input);\n\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n\n/**\n * @private\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n var deprecationMessage = \"DEPRECATED METHOD: \" + name + \"\\n\" + message + \" AT \\n\";\n return function () {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '').replace(/^\\s+at\\s+/gm, '').replace(/^Object.<anonymous>\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n var log = window.console && (window.console.warn || window.console.log);\n\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n\n return method.apply(this, arguments);\n };\n}\n\n/**\n * @private\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\n\nvar extend = deprecate(function (dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n\n while (i < keys.length) {\n if (!merge || merge && dest[keys[i]] === undefined) {\n dest[keys[i]] = src[keys[i]];\n }\n\n i++;\n }\n\n return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * @private\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\n\nvar merge = deprecate(function (dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * @private\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\n\nfunction inherit(child, base, properties) {\n var baseP = base.prototype;\n var childP;\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign$1(childP, properties);\n }\n}\n\n/**\n * @private\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n\n/**\n * @private\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\n\nvar Hammer =\n/*#__PURE__*/\nfunction () {\n var Hammer =\n /**\n * @private\n * @const {string}\n */\n function Hammer(element, options) {\n if (options === void 0) {\n options = {};\n }\n\n return new Manager(element, _extends({\n recognizers: preset.concat()\n }, options));\n };\n\n Hammer.VERSION = \"2.0.17-rc\";\n Hammer.DIRECTION_ALL = DIRECTION_ALL;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.DIRECTION_LEFT = DIRECTION_LEFT;\n Hammer.DIRECTION_RIGHT = DIRECTION_RIGHT;\n Hammer.DIRECTION_UP = DIRECTION_UP;\n Hammer.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;\n Hammer.DIRECTION_VERTICAL = DIRECTION_VERTICAL;\n Hammer.DIRECTION_NONE = DIRECTION_NONE;\n Hammer.DIRECTION_DOWN = DIRECTION_DOWN;\n Hammer.INPUT_START = INPUT_START;\n Hammer.INPUT_MOVE = INPUT_MOVE;\n Hammer.INPUT_END = INPUT_END;\n Hammer.INPUT_CANCEL = INPUT_CANCEL;\n Hammer.STATE_POSSIBLE = STATE_POSSIBLE;\n Hammer.STATE_BEGAN = STATE_BEGAN;\n Hammer.STATE_CHANGED = STATE_CHANGED;\n Hammer.STATE_ENDED = STATE_ENDED;\n Hammer.STATE_RECOGNIZED = STATE_RECOGNIZED;\n Hammer.STATE_CANCELLED = STATE_CANCELLED;\n Hammer.STATE_FAILED = STATE_FAILED;\n Hammer.Manager = Manager;\n Hammer.Input = Input;\n Hammer.TouchAction = TouchAction;\n Hammer.TouchInput = TouchInput;\n Hammer.MouseInput = MouseInput;\n Hammer.PointerEventInput = PointerEventInput;\n Hammer.TouchMouseInput = TouchMouseInput;\n Hammer.SingleTouchInput = SingleTouchInput;\n Hammer.Recognizer = Recognizer;\n Hammer.AttrRecognizer = AttrRecognizer;\n Hammer.Tap = TapRecognizer;\n Hammer.Pan = PanRecognizer;\n Hammer.Swipe = SwipeRecognizer;\n Hammer.Pinch = PinchRecognizer;\n Hammer.Rotate = RotateRecognizer;\n Hammer.Press = PressRecognizer;\n Hammer.on = addEventListeners;\n Hammer.off = removeEventListeners;\n Hammer.each = each;\n Hammer.merge = merge;\n Hammer.extend = extend;\n Hammer.bindFn = bindFn;\n Hammer.assign = assign$1;\n Hammer.inherit = inherit;\n Hammer.bindFn = bindFn;\n Hammer.prefixed = prefixed;\n Hammer.toArray = toArray;\n Hammer.inArray = inArray;\n Hammer.uniqueArray = uniqueArray;\n Hammer.splitStr = splitStr;\n Hammer.boolOrFn = boolOrFn;\n Hammer.hasParent = hasParent;\n Hammer.addEventListeners = addEventListeners;\n Hammer.removeEventListeners = removeEventListeners;\n Hammer.defaults = assign$1({}, defaults, {\n preset: preset\n });\n return Hammer;\n}();\n\n// style loader but by script tag, not by the loader.\n\nvar defaults$1 = Hammer.defaults;\n\nexport default Hammer;\nexport { INPUT_START, INPUT_MOVE, INPUT_END, INPUT_CANCEL, STATE_POSSIBLE, STATE_BEGAN, STATE_CHANGED, STATE_ENDED, STATE_RECOGNIZED, STATE_CANCELLED, STATE_FAILED, DIRECTION_NONE, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DIRECTION_DOWN, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL, DIRECTION_ALL, Manager, Input, TouchAction, TouchInput, MouseInput, PointerEventInput, TouchMouseInput, SingleTouchInput, Recognizer, AttrRecognizer, TapRecognizer as Tap, PanRecognizer as Pan, SwipeRecognizer as Swipe, PinchRecognizer as Pinch, RotateRecognizer as Rotate, PressRecognizer as Press, addEventListeners as on, removeEventListeners as off, each, merge, extend, assign$1 as assign, inherit, bindFn, prefixed, toArray, inArray, uniqueArray, splitStr, boolOrFn, hasParent, addEventListeners, removeEventListeners, defaults$1 as defaults };\n//# sourceMappingURL=hammer.esm.js.map\n","/**\n * vis-util\n * https://github.com/visjs/vis-util\n *\n * utilitie collection for visjs\n *\n * @version 5.0.2\n * @date 2021-02-06T21:33:57.447Z\n *\n * @copyright (c) 2011-2017 Almende B.V, http://almende.com\n * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs\n *\n * @license\n * vis.js is dual licensed under both\n *\n * 1. The Apache 2.0 License\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * and\n *\n * 2. The MIT License\n * http://opensource.org/licenses/MIT\n *\n * vis.js may be distributed under either license.\n */\n\nimport Emitter from 'component-emitter';\nimport RealHammer from '@egjs/hammerjs';\n\n/**\r\n * Use this symbol to delete properies in deepObjectAssign.\r\n */\r\nconst DELETE = Symbol(\"DELETE\");\r\n/**\r\n * Pure version of deepObjectAssign, it doesn't modify any of it's arguments.\r\n *\r\n * @param base - The base object that fullfils the whole interface T.\r\n * @param updates - Updates that may change or delete props.\r\n *\r\n * @returns A brand new instance with all the supplied objects deeply merged.\r\n */\r\nfunction pureDeepObjectAssign(base, ...updates) {\r\n return deepObjectAssign({}, base, ...updates);\r\n}\r\n/**\r\n * Deep version of object assign with additional deleting by the DELETE symbol.\r\n *\r\n * @param values - Objects to be deeply merged.\r\n *\r\n * @returns The first object from values.\r\n */\r\nfunction deepObjectAssign(...values) {\r\n const merged = deepObjectAssignNonentry(...values);\r\n stripDelete(merged);\r\n return merged;\r\n}\r\n/**\r\n * Deep version of object assign with additional deleting by the DELETE symbol.\r\n *\r\n * @remarks\r\n * This doesn't strip the DELETE symbols so they may end up in the final object.\r\n *\r\n * @param values - Objects to be deeply merged.\r\n *\r\n * @returns The first object from values.\r\n */\r\nfunction deepObjectAssignNonentry(...values) {\r\n if (values.length < 2) {\r\n return values[0];\r\n }\r\n else if (values.length > 2) {\r\n return deepObjectAssignNonentry(deepObjectAssign(values[0], values[1]), ...values.slice(2));\r\n }\r\n const a = values[0];\r\n const b = values[1];\r\n for (const prop of Reflect.ownKeys(b)) {\r\n if (!Object.prototype.propertyIsEnumerable.call(b, prop)) ;\r\n else if (b[prop] === DELETE) {\r\n delete a[prop];\r\n }\r\n else if (a[prop] !== null &&\r\n b[prop] !== null &&\r\n typeof a[prop] === \"object\" &&\r\n typeof b[prop] === \"object\" &&\r\n !Array.isArray(a[prop]) &&\r\n !Array.isArray(b[prop])) {\r\n a[prop] = deepObjectAssignNonentry(a[prop], b[prop]);\r\n }\r\n else {\r\n a[prop] = clone(b[prop]);\r\n }\r\n }\r\n return a;\r\n}\r\n/**\r\n * Deep clone given object or array. In case of primitive simply return.\r\n *\r\n * @param a - Anything.\r\n *\r\n * @returns Deep cloned object/array or unchanged a.\r\n */\r\nfunction clone(a) {\r\n if (Array.isArray(a)) {\r\n return a.map((value) => clone(value));\r\n }\r\n else if (typeof a === \"object\" && a !== null) {\r\n return deepObjectAssignNonentry({}, a);\r\n }\r\n else {\r\n return a;\r\n }\r\n}\r\n/**\r\n * Strip DELETE from given object.\r\n *\r\n * @param a - Object which may contain DELETE but won't after this is executed.\r\n */\r\nfunction stripDelete(a) {\r\n for (const prop of Object.keys(a)) {\r\n if (a[prop] === DELETE) {\r\n delete a[prop];\r\n }\r\n else if (typeof a[prop] === \"object\" && a[prop] !== null) {\r\n stripDelete(a[prop]);\r\n }\r\n }\r\n}\n\n/**\r\n * Seedable, fast and reasonably good (not crypto but more than okay for our\r\n * needs) random number generator.\r\n *\r\n * @remarks\r\n * Adapted from {@link https://web.archive.org/web/20110429100736/http://baagoe.com:80/en/RandomMusings/javascript}.\r\n * Original algorithm created by Johannes Baagøe \\<baagoe\\@baagoe.com\\> in 2010.\r\n */\r\n/**\r\n * Create a seeded pseudo random generator based on Alea by Johannes Baagøe.\r\n *\r\n * @param seed - All supplied arguments will be used as a seed. In case nothing\r\n * is supplied the current time will be used to seed the generator.\r\n *\r\n * @returns A ready to use seeded generator.\r\n */\r\nfunction Alea(...seed) {\r\n return AleaImplementation(seed.length ? seed : [Date.now()]);\r\n}\r\n/**\r\n * An implementation of [[Alea]] without user input validation.\r\n *\r\n * @param seed - The data that will be used to seed the generator.\r\n *\r\n * @returns A ready to use seeded generator.\r\n */\r\nfunction AleaImplementation(seed) {\r\n let [s0, s1, s2] = mashSeed(seed);\r\n let c = 1;\r\n const random = () => {\r\n const t = 2091639 * s0 + c * 2.3283064365386963e-10; // 2^-32\r\n s0 = s1;\r\n s1 = s2;\r\n return (s2 = t - (c = t | 0));\r\n };\r\n random.uint32 = () => random() * 0x100000000; // 2^32\r\n random.fract53 = () => random() + ((random() * 0x200000) | 0) * 1.1102230246251565e-16; // 2^-53\r\n random.algorithm = \"Alea\";\r\n random.seed = seed;\r\n random.version = \"0.9\";\r\n return random;\r\n}\r\n/**\r\n * Turn arbitrary data into values [[AleaImplementation]] can use to generate\r\n * random numbers.\r\n *\r\n * @param seed - Arbitrary data that will be used as the seed.\r\n *\r\n * @returns Three numbers to use as initial values for [[AleaImplementation]].\r\n */\r\nfunction mashSeed(...seed) {\r\n const mash = Mash();\r\n let s0 = mash(\" \");\r\n let s1 = mash(\" \");\r\n let s2 = mash(\" \");\r\n for (let i = 0; i < seed.length; i++) {\r\n s0 -= mash(seed[i]);\r\n if (s0 < 0) {\r\n s0 += 1;\r\n }\r\n s1 -= mash(seed[i]);\r\n if (s1 < 0) {\r\n s1 += 1;\r\n }\r\n s2 -= mash(seed[i]);\r\n if (s2 < 0) {\r\n s2 += 1;\r\n }\r\n }\r\n return [s0, s1, s2];\r\n}\r\n/**\r\n * Create a new mash function.\r\n *\r\n * @returns A nonpure function that takes arbitrary [[Mashable]] data and turns\r\n * them into numbers.\r\n */\r\nfunction Mash() {\r\n let n = 0xefc8249d;\r\n return function (data) {\r\n const string = data.toString();\r\n for (let i = 0; i < string.length; i++) {\r\n n += string.charCodeAt(i);\r\n let h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000; // 2^32\r\n }\r\n return (n >>> 0) * 2.3283064365386963e-10; // 2^-32\r\n };\r\n}\n\n/**\n * Setup a mock hammer.js object, for unit testing.\n *\n * Inspiration: https://github.com/uber/deck.gl/pull/658\n *\n * @returns {{on: noop, off: noop, destroy: noop, emit: noop, get: get}}\n */\nfunction hammerMock() {\n const noop = () => {};\n\n return {\n on: noop,\n off: noop,\n destroy: noop,\n emit: noop,\n\n get() {\n return {\n set: noop,\n };\n },\n };\n}\n\nconst Hammer =\n typeof window !== \"undefined\"\n ? window.Hammer || RealHammer\n : function () {\n // hammer.js is only available in a browser, not in node.js. Replacing it with a mock object.\n return hammerMock();\n };\n\n/**\n * Turn an element into an clickToUse element.\n * When not active, the element has a transparent overlay. When the overlay is\n * clicked, the mode is changed to active.\n * When active, the element is displayed with a blue border around it, and\n * the interactive contents of the element can be used. When clicked outside\n * the element, the elements mode is changed to inactive.\n *\n * @param {Element} container\n * @class Activator\n */\nfunction Activator(container) {\n this._cleanupQueue = [];\n\n this.active = false;\n\n this._dom = {\n container,\n overlay: document.createElement(\"div\"),\n };\n\n this._dom.overlay.classList.add(\"vis-overlay\");\n\n this._dom.container.appendChild(this._dom.overlay);\n this._cleanupQueue.push(() => {\n this._dom.overlay.parentNode.removeChild(this._dom.overlay);\n });\n\n const hammer = Hammer(this._dom.overlay);\n hammer.on(\"tap\", this._onTapOverlay.bind(this));\n this._cleanupQueue.push(() => {\n hammer.destroy();\n // FIXME: cleaning up hammer instances doesn't work (Timeline not removed\n // from memory)\n });\n\n // block all touch events (except tap)\n const events = [\n \"tap\",\n \"doubletap\",\n \"press\",\n \"pinch\",\n \"pan\",\n \"panstart\",\n \"panmove\",\n \"panend\",\n ];\n events.forEach((event) => {\n hammer.on(event, (event) => {\n event.srcEvent.stopPropagation();\n });\n });\n\n // attach a click event to the window, in order to deactivate when clicking outside the timeline\n if (document && document.body) {\n this._onClick = (event) => {\n if (!_hasParent(event.target, container)) {\n this.deactivate();\n }\n };\n document.body.addEventListener(\"click\", this._onClick);\n this._cleanupQueue.push(() => {\n document.body.removeEventListener(\"click\", this._onClick);\n });\n }\n\n // prepare escape key listener for deactivating when active\n this._escListener = (event) => {\n if (\n \"key\" in event\n ? event.key === \"Escape\"\n : event.keyCode === 27 /* the keyCode is for IE11 */\n ) {\n this.deactivate();\n }\n };\n}\n\n// turn into an event emitter\nEmitter(Activator.prototype);\n\n// The currently active activator\nActivator.current = null;\n\n/**\n * Destroy the activator. Cleans up all created DOM and event listeners\n */\nActivator.prototype.destroy = function () {\n this.deactivate();\n\n for (const callback of this._cleanupQueue.splice(0).reverse()) {\n callback();\n }\n};\n\n/**\n * Activate the element\n * Overlay is hidden, element is decorated with a blue shadow border\n */\nActivator.prototype.activate = function () {\n // we allow only one active activator at a time\n if (Activator.current) {\n Activator.current.deactivate();\n }\n Activator.current = this;\n\n this.active = true;\n this._dom.overlay.style.display = \"none\";\n this._dom.container.classList.add(\"vis-active\");\n\n this.emit(\"change\");\n this.emit(\"activate\");\n\n // ugly hack: bind ESC after emitting the events, as the Network rebinds all\n // keyboard events on a 'change' event\n document.body.addEventListener(\"keydown\", this._escListener);\n};\n\n/**\n * Deactivate the element\n * Overlay is displayed on top of the element\n */\nActivator.prototype.deactivate = function () {\n this.active = false;\n this._dom.overlay.style.display = \"block\";\n this._dom.container.classList.remove(\"vis-active\");\n document.body.removeEventListener(\"keydown\", this._escListener);\n\n this.emit(\"change\");\n this.emit(\"deactivate\");\n};\n\n/**\n * Handle a tap event: activate the container\n *\n * @param {Event} event The event\n * @private\n */\nActivator.prototype._onTapOverlay = function (event) {\n // activate the container\n this.activate();\n event.srcEvent.stopPropagation();\n};\n\n/**\n * Test whether the element has the requested parent element somewhere in\n * its chain of parent nodes.\n *\n * @param {HTMLElement} element\n * @param {HTMLElement} parent\n * @returns {boolean} Returns true when the parent is found somewhere in the\n * chain of parent nodes.\n * @private\n */\nfunction _hasParent(element, parent) {\n while (element) {\n if (element === parent) {\n return true;\n }\n element = element.parentNode;\n }\n return false;\n}\n\n// utility functions\r\n// parse ASP.Net Date pattern,\r\n// for example '/Date(1198908717056)/' or '/Date(1198908717056-0700)/'\r\n// code from http://momentjs.com/\r\nconst ASPDateRegex = /^\\/?Date\\((-?\\d+)/i;\r\n// Color REs\r\nconst fullHexRE = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\r\nconst shortHexRE = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\r\nconst rgbRE = /^rgb\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *\\)$/i;\r\nconst rgbaRE = /^rgba\\( *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *(1?\\d{1,2}|2[0-4]\\d|25[0-5]) *, *([01]|0?\\.\\d+) *\\)$/i;\r\n/**\r\n * Test whether given object is a number.\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if number, false otherwise.\r\n */\r\nfunction isNumber(value) {\r\n return value instanceof Number || typeof value === \"number\";\r\n}\r\n/**\r\n * Remove everything in the DOM object.\r\n *\r\n * @param DOMobject - Node whose child nodes will be recursively deleted.\r\n */\r\nfunction recursiveDOMDelete(DOMobject) {\r\n if (DOMobject) {\r\n while (DOMobject.hasChildNodes() === true) {\r\n const child = DOMobject.firstChild;\r\n if (child) {\r\n recursiveDOMDelete(child);\r\n DOMobject.removeChild(child);\r\n }\r\n }\r\n }\r\n}\r\n/**\r\n * Test whether given object is a string.\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if string, false otherwise.\r\n */\r\nfunction isString(value) {\r\n return value instanceof String || typeof value === \"string\";\r\n}\r\n/**\r\n * Test whether given object is a object (not primitive or null).\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if not null object, false otherwise.\r\n */\r\nfunction isObject(value) {\r\n return typeof value === \"object\" && value !== null;\r\n}\r\n/**\r\n * Test whether given object is a Date, or a String containing a Date.\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if Date instance or string date representation, false otherwise.\r\n */\r\nfunction isDate(value) {\r\n if (value instanceof Date) {\r\n return true;\r\n }\r\n else if (isString(value)) {\r\n // test whether this string contains a date\r\n const match = ASPDateRegex.exec(value);\r\n if (match) {\r\n return true;\r\n }\r\n else if (!isNaN(Date.parse(value))) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\n/**\r\n * Copy property from b to a if property present in a.\r\n * If property in b explicitly set to null, delete it if `allowDeletion` set.\r\n *\r\n * Internal helper routine, should not be exported. Not added to `exports` for that reason.\r\n *\r\n * @param a - Target object.\r\n * @param b - Source object.\r\n * @param prop - Name of property to copy from b to a.\r\n * @param allowDeletion - If true, delete property in a if explicitly set to null in b.\r\n */\r\nfunction copyOrDelete(a, b, prop, allowDeletion) {\r\n let doDeletion = false;\r\n if (allowDeletion === true) {\r\n doDeletion = b[prop] === null && a[prop] !== undefined;\r\n }\r\n if (doDeletion) {\r\n delete a[prop];\r\n }\r\n else {\r\n a[prop] = b[prop]; // Remember, this is a reference copy!\r\n }\r\n}\r\n/**\r\n * Fill an object with a possibly partially defined other object.\r\n *\r\n * Only copies values for the properties already present in a.\r\n * That means an object is not created on a property if only the b object has it.\r\n *\r\n * @param a - The object that will have it's properties updated.\r\n * @param b - The object with property updates.\r\n * @param allowDeletion - If true, delete properties in a that are explicitly set to null in b.\r\n */\r\nfunction fillIfDefined(a, b, allowDeletion = false) {\r\n // NOTE: iteration of properties of a\r\n // NOTE: prototype properties iterated over as well\r\n for (const prop in a) {\r\n if (b[prop] !== undefined) {\r\n if (b[prop] === null || typeof b[prop] !== \"object\") {\r\n // Note: typeof null === 'object'\r\n copyOrDelete(a, b, prop, allowDeletion);\r\n }\r\n else {\r\n const aProp = a[prop];\r\n const bProp = b[prop];\r\n if (isObject(aProp) && isObject(bProp)) {\r\n fillIfDefined(aProp, bProp, allowDeletion);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n/**\r\n * Copy the values of all of the enumerable own properties from one or more source objects to a\r\n * target object. Returns the target object.\r\n *\r\n * @param target - The target object to copy to.\r\n * @param source - The source object from which to copy properties.\r\n *\r\n * @returns The target object.\r\n */\r\nconst extend = Object.assign;\r\n/**\r\n * Extend object a with selected properties of object b or a series of objects.\r\n *\r\n * @remarks\r\n * Only properties with defined values are copied.\r\n *\r\n * @param props - Properties to be copied to a.\r\n * @param a - The target.\r\n * @param others - The sources.\r\n *\r\n * @returns Argument a.\r\n */\r\nfunction selectiveExtend(props, a, ...others) {\r\n if (!Array.isArray(props)) {\r\n throw new Error(\"Array with property names expected as first argument\");\r\n }\r\n for (const other of others) {\r\n for (let p = 0; p < props.length; p++) {\r\n const prop = props[p];\r\n if (other && Object.prototype.hasOwnProperty.call(other, prop)) {\r\n a[prop] = other[prop];\r\n }\r\n }\r\n }\r\n return a;\r\n}\r\n/**\r\n * Extend object a with selected properties of object b.\r\n * Only properties with defined values are copied.\r\n *\r\n * @remarks\r\n * Previous version of this routine implied that multiple source objects could\r\n * be used; however, the implementation was **wrong**. Since multiple (\\>1)\r\n * sources weren't used anywhere in the `vis.js` code, this has been removed\r\n *\r\n * @param props - Names of first-level properties to copy over.\r\n * @param a - Target object.\r\n * @param b - Source object.\r\n * @param allowDeletion - If true, delete property in a if explicitly set to null in b.\r\n *\r\n * @returns Argument a.\r\n */\r\nfunction selectiveDeepExtend(props, a, b, allowDeletion = false) {\r\n // TODO: add support for Arrays to deepExtend\r\n if (Array.isArray(b)) {\r\n throw new TypeError(\"Arrays are not supported by deepExtend\");\r\n }\r\n for (let p = 0; p < props.length; p++) {\r\n const prop = props[p];\r\n if (Object.prototype.hasOwnProperty.call(b, prop)) {\r\n if (b[prop] && b[prop].constructor === Object) {\r\n if (a[prop] === undefined) {\r\n a[prop] = {};\r\n }\r\n if (a[prop].constructor === Object) {\r\n deepExtend(a[prop], b[prop], false, allowDeletion);\r\n }\r\n else {\r\n copyOrDelete(a, b, prop, allowDeletion);\r\n }\r\n }\r\n else if (Array.isArray(b[prop])) {\r\n throw new TypeError(\"Arrays are not supported by deepExtend\");\r\n }\r\n else {\r\n copyOrDelete(a, b, prop, allowDeletion);\r\n }\r\n }\r\n }\r\n return a;\r\n}\r\n/**\r\n * Extend object `a` with properties of object `b`, ignoring properties which\r\n * are explicitly specified to be excluded.\r\n *\r\n * @remarks\r\n * The properties of `b` are considered for copying. Properties which are\r\n * themselves objects are are also extended. Only properties with defined\r\n * values are copied.\r\n *\r\n * @param propsToExclude - Names of properties which should *not* be copied.\r\n * @param a - Object to extend.\r\n * @param b - Object to take properties from for extension.\r\n * @param allowDeletion - If true, delete properties in a that are explicitly\r\n * set to null in b.\r\n *\r\n * @returns Argument a.\r\n */\r\nfunction selectiveNotDeepExtend(propsToExclude, a, b, allowDeletion = false) {\r\n // TODO: add support for Arrays to deepExtend\r\n // NOTE: array properties have an else-below; apparently, there is a problem here.\r\n if (Array.isArray(b)) {\r\n throw new TypeError(\"Arrays are not supported by deepExtend\");\r\n }\r\n for (const prop in b) {\r\n if (!Object.prototype.hasOwnProperty.call(b, prop)) {\r\n continue;\r\n } // Handle local properties only\r\n if (propsToExclude.includes(prop)) {\r\n continue;\r\n } // In exclusion list, skip\r\n if (b[prop] && b[prop].constructor === Object) {\r\n if (a[prop] === undefined) {\r\n a[prop] = {};\r\n }\r\n if (a[prop].constructor === Object) {\r\n deepExtend(a[prop], b[prop]); // NOTE: allowDeletion not propagated!\r\n }\r\n else {\r\n copyOrDelete(a, b, prop, allowDeletion);\r\n }\r\n }\r\n else if (Array.isArray(b[prop])) {\r\n a[prop] = [];\r\n for (let i = 0; i < b[prop].length; i++) {\r\n a[prop].push(b[prop][i]);\r\n }\r\n }\r\n else {\r\n copyOrDelete(a, b, prop, allowDeletion);\r\n }\r\n }\r\n return a;\r\n}\r\n/**\r\n * Deep extend an object a with the properties of object b.\r\n *\r\n * @param a - Target object.\r\n * @param b - Source object.\r\n * @param protoExtend - If true, the prototype values will also be extended.\r\n * (That is the options objects that inherit from others will also get the\r\n * inherited options).\r\n * @param allowDeletion - If true, the values of fields that are null will be deleted.\r\n *\r\n * @returns Argument a.\r\n */\r\nfunction deepExtend(a, b, protoExtend = false, allowDeletion = false) {\r\n for (const prop in b) {\r\n if (Object.prototype.hasOwnProperty.call(b, prop) || protoExtend === true) {\r\n if (typeof b[prop] === \"object\" &&\r\n b[prop] !== null &&\r\n Object.getPrototypeOf(b[prop]) === Object.prototype) {\r\n if (a[prop] === undefined) {\r\n a[prop] = deepExtend({}, b[prop], protoExtend); // NOTE: allowDeletion not propagated!\r\n }\r\n else if (typeof a[prop] === \"object\" &&\r\n a[prop] !== null &&\r\n Object.getPrototypeOf(a[prop]) === Object.prototype) {\r\n deepExtend(a[prop], b[prop], protoExtend); // NOTE: allowDeletion not propagated!\r\n }\r\n else {\r\n copyOrDelete(a, b, prop, allowDeletion);\r\n }\r\n }\r\n else if (Array.isArray(b[prop])) {\r\n a[prop] = b[prop].slice();\r\n }\r\n else {\r\n copyOrDelete(a, b, prop, allowDeletion);\r\n }\r\n }\r\n }\r\n return a;\r\n}\r\n/**\r\n * Test whether all elements in two arrays are equal.\r\n *\r\n * @param a - First array.\r\n * @param b - Second array.\r\n *\r\n * @returns True if both arrays have the same length and same elements (1 = '1').\r\n */\r\nfunction equalArray(a, b) {\r\n if (a.length !== b.length) {\r\n return false;\r\n }\r\n for (let i = 0, len = a.length; i < len; i++) {\r\n if (a[i] != b[i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n/**\r\n * Get the type of an object, for example exports.getType([]) returns 'Array'.\r\n *\r\n * @param object - Input value of unknown type.\r\n *\r\n * @returns Detected type.\r\n */\r\nfunction getType(object) {\r\n const type = typeof object;\r\n if (type === \"object\") {\r\n if (object === null) {\r\n return \"null\";\r\n }\r\n if (object instanceof Boolean) {\r\n return \"Boolean\";\r\n }\r\n if (object instanceof Number) {\r\n return \"Number\";\r\n }\r\n if (object instanceof String) {\r\n return \"String\";\r\n }\r\n if (Array.isArray(object)) {\r\n return \"Array\";\r\n }\r\n if (object instanceof Date) {\r\n return \"Date\";\r\n }\r\n return \"Object\";\r\n }\r\n if (type === \"number\") {\r\n return \"Number\";\r\n }\r\n if (type === \"boolean\") {\r\n return \"Boolean\";\r\n }\r\n if (type === \"string\") {\r\n return \"String\";\r\n }\r\n if (type === undefined) {\r\n return \"undefined\";\r\n }\r\n return type;\r\n}\r\n/**\r\n * Used to extend an array and copy it. This is used to propagate paths recursively.\r\n *\r\n * @param arr - First part.\r\n * @param newValue - The value to be aadded into the array.\r\n *\r\n * @returns A new array with all items from arr and newValue (which is last).\r\n */\r\nfunction copyAndExtendArray(arr, newValue) {\r\n return [...arr, newValue];\r\n}\r\n/**\r\n * Used to extend an array and copy it. This is used to propagate paths recursively.\r\n *\r\n * @param arr - The array to be copied.\r\n *\r\n * @returns Shallow copy of arr.\r\n */\r\nfunction copyArray(arr) {\r\n return arr.slice();\r\n}\r\n/**\r\n * Retrieve the absolute left value of a DOM element.\r\n *\r\n * @param elem - A dom element, for example a div.\r\n *\r\n * @returns The absolute left position of this element in the browser page.\r\n */\r\nfunction getAbsoluteLeft(elem) {\r\n return elem.getBoundingClientRect().left;\r\n}\r\n/**\r\n * Retrieve the absolute right value of a DOM element.\r\n *\r\n * @param elem - A dom element, for example a div.\r\n *\r\n * @returns The absolute right position of this element in the browser page.\r\n */\r\nfunction getAbsoluteRight(elem) {\r\n return elem.getBoundingClientRect().right;\r\n}\r\n/**\r\n * Retrieve the absolute top value of a DOM element.\r\n *\r\n * @param elem - A dom element, for example a div.\r\n *\r\n * @returns The absolute top position of this element in the browser page.\r\n */\r\nfunction getAbsoluteTop(elem) {\r\n return elem.getBoundingClientRect().top;\r\n}\r\n/**\r\n * Add a className to the given elements style.\r\n *\r\n * @param elem - The element to which the classes will be added.\r\n * @param classNames - Space separated list of classes.\r\n */\r\nfunction addClassName(elem, classNames) {\r\n let classes = elem.className.split(\" \");\r\n const newClasses = classNames.split(\" \");\r\n classes = classes.concat(newClasses.filter(function (className) {\r\n return !classes.includes(className);\r\n }));\r\n elem.className = classes.join(\" \");\r\n}\r\n/**\r\n * Remove a className from the given elements style.\r\n *\r\n * @param elem - The element from which the classes will be removed.\r\n * @param classNames - Space separated list of classes.\r\n */\r\nfunction removeClassName(elem, classNames) {\r\n let classes = elem.className.split(\" \");\r\n const oldClasses = classNames.split(\" \");\r\n classes = classes.filter(function (className) {\r\n return !oldClasses.includes(className);\r\n });\r\n elem.className = classes.join(\" \");\r\n}\r\n/**\r\n * For each method for both arrays and objects.\r\n * In case of an array, the built-in Array.forEach() is applied (**No, it's not!**).\r\n * In case of an Object, the method loops over all properties of the object.\r\n *\r\n * @param object - An Object or Array to be iterated over.\r\n * @param callback - Array.forEach-like callback.\r\n */\r\nfunction forEach(object, callback) {\r\n if (Array.isArray(object)) {\r\n // array\r\n const len = object.length;\r\n for (let i = 0; i < len; i++) {\r\n callback(object[i], i, object);\r\n }\r\n }\r\n else {\r\n // object\r\n for (const key in object) {\r\n if (Object.prototype.hasOwnProperty.call(object, key)) {\r\n callback(object[key], key, object);\r\n }\r\n }\r\n }\r\n}\r\n/**\r\n * Convert an object into an array: all objects properties are put into the array. The resulting array is unordered.\r\n *\r\n * @param o - Object that contains the properties and methods.\r\n *\r\n * @returns An array of unordered values.\r\n */\r\nconst toArray = Object.values;\r\n/**\r\n * Update a property in an object.\r\n *\r\n * @param object - The object whose property will be updated.\r\n * @param key - Name of the property to be updated.\r\n * @param value - The new value to be assigned.\r\n *\r\n * @returns Whether the value was updated (true) or already strictly the same in the original object (false).\r\n */\r\nfunction updateProperty(object, key, value) {\r\n if (object[key] !== value) {\r\n object[key] = value;\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n}\r\n/**\r\n * Throttle the given function to be only executed once per animation frame.\r\n *\r\n * @param fn - The original function.\r\n *\r\n * @returns The throttled function.\r\n */\r\nfunction throttle(fn) {\r\n let scheduled = false;\r\n return () => {\r\n if (!scheduled) {\r\n scheduled = true;\r\n requestAnimationFrame(() => {\r\n scheduled = false;\r\n fn();\r\n });\r\n }\r\n };\r\n}\r\n/**\r\n * Add and event listener. Works for all browsers.\r\n *\r\n * @param element - The element to bind the event listener to.\r\n * @param action - Same as Element.addEventListener(action, —, —).\r\n * @param listener - Same as Element.addEventListener(—, listener, —).\r\n * @param useCapture - Same as Element.addEventListener(—, —, useCapture).\r\n */\r\nfunction addEventListener(element, action, listener, useCapture) {\r\n if (element.addEventListener) {\r\n if (useCapture === undefined) {\r\n useCapture = false;\r\n }\r\n if (action === \"mousewheel\" && navigator.userAgent.includes(\"Firefox\")) {\r\n action = \"DOMMouseScroll\"; // For Firefox\r\n }\r\n element.addEventListener(action, listener, useCapture);\r\n }\r\n else {\r\n // @TODO: IE types? Does anyone care?\r\n element.attachEvent(\"on\" + action, listener); // IE browsers\r\n }\r\n}\r\n/**\r\n * Remove an event listener from an element.\r\n *\r\n * @param element - The element to bind the event listener to.\r\n * @param action - Same as Element.removeEventListener(action, —, —).\r\n * @param listener - Same as Element.removeEventListener(—, listener, —).\r\n * @param useCapture - Same as Element.removeEventListener(—, —, useCapture).\r\n */\r\nfunction removeEventListener(element, action, listener, useCapture) {\r\n if (element.removeEventListener) {\r\n // non-IE browsers\r\n if (useCapture === undefined) {\r\n useCapture = false;\r\n }\r\n if (action === \"mousewheel\" && navigator.userAgent.includes(\"Firefox\")) {\r\n action = \"DOMMouseScroll\"; // For Firefox\r\n }\r\n element.removeEventListener(action, listener, useCapture);\r\n }\r\n else {\r\n // @TODO: IE types? Does anyone care?\r\n element.detachEvent(\"on\" + action, listener); // IE browsers\r\n }\r\n}\r\n/**\r\n * Cancels the event's default action if it is cancelable, without stopping further propagation of the event.\r\n *\r\n * @param event - The event whose default action should be prevented.\r\n */\r\nfunction preventDefault(event) {\r\n if (!event) {\r\n event = window.event;\r\n }\r\n if (!event) ;\r\n else if (event.preventDefault) {\r\n event.preventDefault(); // non-IE browsers\r\n }\r\n else {\r\n // @TODO: IE types? Does anyone care?\r\n event.returnValue = false; // IE browsers\r\n }\r\n}\r\n/**\r\n * Get HTML element which is the target of the event.\r\n *\r\n * @param event - The event.\r\n *\r\n * @returns The element or null if not obtainable.\r\n */\r\nfunction getTarget(event = window.event) {\r\n // code from http://www.quirksmode.org/js/events_properties.html\r\n // @TODO: EventTarget can be almost anything, is it okay to return only Elements?\r\n let target = null;\r\n if (!event) ;\r\n else if (event.target) {\r\n target = event.target;\r\n }\r\n else if (event.srcElement) {\r\n target = event.srcElement;\r\n }\r\n if (!(target instanceof Element)) {\r\n return null;\r\n }\r\n if (target.nodeType != null && target.nodeType == 3) {\r\n // defeat Safari bug\r\n target = target.parentNode;\r\n if (!(target instanceof Element)) {\r\n return null;\r\n }\r\n }\r\n return target;\r\n}\r\n/**\r\n * Check if given element contains given parent somewhere in the DOM tree.\r\n *\r\n * @param element - The element to be tested.\r\n * @param parent - The ancestor (not necessarily parent) of the element.\r\n *\r\n * @returns True if parent is an ancestor of the element, false otherwise.\r\n */\r\nfunction hasParent(element, parent) {\r\n let elem = element;\r\n while (elem) {\r\n if (elem === parent) {\r\n return true;\r\n }\r\n else if (elem.parentNode) {\r\n elem = elem.parentNode;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n return false;\r\n}\r\nconst option = {\r\n /**\r\n * Convert a value into a boolean.\r\n *\r\n * @param value - Value to be converted intoboolean, a function will be executed as `(() => unknown)`.\r\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\r\n *\r\n * @returns Corresponding boolean value, if none then the default value, if none then null.\r\n */\r\n asBoolean(value, defaultValue) {\r\n if (typeof value == \"function\") {\r\n value = value();\r\n }\r\n if (value != null) {\r\n return value != false;\r\n }\r\n return defaultValue || null;\r\n },\r\n /**\r\n * Convert a value into a number.\r\n *\r\n * @param value - Value to be converted intonumber, a function will be executed as `(() => unknown)`.\r\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\r\n *\r\n * @returns Corresponding **boxed** number value, if none then the default value, if none then null.\r\n */\r\n asNumber(value, defaultValue) {\r\n if (typeof value == \"function\") {\r\n value = value();\r\n }\r\n if (value != null) {\r\n return Number(value) || defaultValue || null;\r\n }\r\n return defaultValue || null;\r\n },\r\n /**\r\n * Convert a value into a string.\r\n *\r\n * @param value - Value to be converted intostring, a function will be executed as `(() => unknown)`.\r\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\r\n *\r\n * @returns Corresponding **boxed** string value, if none then the default value, if none then null.\r\n */\r\n asString(value, defaultValue) {\r\n if (typeof value == \"function\") {\r\n value = value();\r\n }\r\n if (value != null) {\r\n return String(value);\r\n }\r\n return defaultValue || null;\r\n },\r\n /**\r\n * Convert a value into a size.\r\n *\r\n * @param value - Value to be converted intosize, a function will be executed as `(() => unknown)`.\r\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\r\n *\r\n * @returns Corresponding string value (number + 'px'), if none then the default value, if none then null.\r\n */\r\n asSize(value, defaultValue) {\r\n if (typeof value == \"function\") {\r\n value = value();\r\n }\r\n if (isString(value)) {\r\n return value;\r\n }\r\n else if (isNumber(value)) {\r\n return value + \"px\";\r\n }\r\n else {\r\n return defaultValue || null;\r\n }\r\n },\r\n /**\r\n * Convert a value into a DOM Element.\r\n *\r\n * @param value - Value to be converted into DOM Element, a function will be executed as `(() => unknown)`.\r\n * @param defaultValue - If the value or the return value of the function == null then this will be returned.\r\n *\r\n * @returns The DOM Element, if none then the default value, if none then null.\r\n */\r\n asElement(value, defaultValue) {\r\n if (typeof value == \"function\") {\r\n value = value();\r\n }\r\n return value || defaultValue || null;\r\n },\r\n};\r\n/**\r\n * Convert hex color string into RGB color object.\r\n *\r\n * @remarks\r\n * {@link http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb}\r\n *\r\n * @param hex - Hex color string (3 or 6 digits, with or without #).\r\n *\r\n * @returns RGB color object.\r\n */\r\nfunction hexToRGB(hex) {\r\n let result;\r\n switch (hex.length) {\r\n case 3:\r\n case 4:\r\n result = shortHexRE.exec(hex);\r\n return result\r\n ? {\r\n r: parseInt(result[1] + result[1], 16),\r\n g: parseInt(result[2] + result[2], 16),\r\n b: parseInt(result[3] + result[3], 16),\r\n }\r\n : null;\r\n case 6:\r\n case 7:\r\n result = fullHexRE.exec(hex);\r\n return result\r\n ? {\r\n r: parseInt(result[1], 16),\r\n g: parseInt(result[2], 16),\r\n b: parseInt(result[3], 16),\r\n }\r\n : null;\r\n default:\r\n return null;\r\n }\r\n}\r\n/**\r\n * This function takes string color in hex or RGB format and adds the opacity, RGBA is passed through unchanged.\r\n *\r\n * @param color - The color string (hex, RGB, RGBA).\r\n * @param opacity - The new opacity.\r\n *\r\n * @returns RGBA string, for example 'rgba(255, 0, 127, 0.3)'.\r\n */\r\nfunction overrideOpacity(color, opacity) {\r\n if (color.includes(\"rgba\")) {\r\n return color;\r\n }\r\n else if (color.includes(\"rgb\")) {\r\n const rgb = color\r\n .substr(color.indexOf(\"(\") + 1)\r\n .replace(\")\", \"\")\r\n .split(\",\");\r\n return \"rgba(\" + rgb[0] + \",\" + rgb[1] + \",\" + rgb[2] + \",\" + opacity + \")\";\r\n }\r\n else {\r\n const rgb = hexToRGB(color);\r\n if (rgb == null) {\r\n return color;\r\n }\r\n else {\r\n return \"rgba(\" + rgb.r + \",\" + rgb.g + \",\" + rgb.b + \",\" + opacity + \")\";\r\n }\r\n }\r\n}\r\n/**\r\n * Convert RGB \\<0, 255\\> into hex color string.\r\n *\r\n * @param red - Red channel.\r\n * @param green - Green channel.\r\n * @param blue - Blue channel.\r\n *\r\n * @returns Hex color string (for example: '#0acdc0').\r\n */\r\nfunction RGBToHex(red, green, blue) {\r\n return (\"#\" + ((1 << 24) + (red << 16) + (green << 8) + blue).toString(16).slice(1));\r\n}\r\n/**\r\n * Parse a color property into an object with border, background, and highlight colors.\r\n *\r\n * @param inputColor - Shorthand color string or input color object.\r\n * @param defaultColor - Full color object to fill in missing values in inputColor.\r\n *\r\n * @returns Color object.\r\n */\r\nfunction parseColor(inputColor, defaultColor) {\r\n if (isString(inputColor)) {\r\n let colorStr = inputColor;\r\n if (isValidRGB(colorStr)) {\r\n const rgb = colorStr\r\n .substr(4)\r\n .substr(0, colorStr.length - 5)\r\n .split(\",\")\r\n .map(function (value) {\r\n return parseInt(value);\r\n });\r\n colorStr = RGBToHex(rgb[0], rgb[1], rgb[2]);\r\n }\r\n if (isValidHex(colorStr) === true) {\r\n const hsv = hexToHSV(colorStr);\r\n const lighterColorHSV = {\r\n h: hsv.h,\r\n s: hsv.s * 0.8,\r\n v: Math.min(1, hsv.v * 1.02),\r\n };\r\n const darkerColorHSV = {\r\n h: hsv.h,\r\n s: Math.min(1, hsv.s * 1.25),\r\n v: hsv.v * 0.8,\r\n };\r\n const darkerColorHex = HSVToHex(darkerColorHSV.h, darkerColorHSV.s, darkerColorHSV.v);\r\n const lighterColorHex = HSVToHex(lighterColorHSV.h, lighterColorHSV.s, lighterColorHSV.v);\r\n return {\r\n background: colorStr,\r\n border: darkerColorHex,\r\n highlight: {\r\n background: lighterColorHex,\r\n border: darkerColorHex,\r\n },\r\n hover: {\r\n background: lighterColorHex,\r\n border: darkerColorHex,\r\n },\r\n };\r\n }\r\n else {\r\n return {\r\n background: colorStr,\r\n border: colorStr,\r\n highlight: {\r\n background: colorStr,\r\n border: colorStr,\r\n },\r\n hover: {\r\n background: colorStr,\r\n border: colorStr,\r\n },\r\n };\r\n }\r\n }\r\n else {\r\n if (defaultColor) {\r\n const color = {\r\n background: inputColor.background || defaultColor.background,\r\n border: inputColor.border || defaultColor.border,\r\n highlight: isString(inputColor.highlight)\r\n ? {\r\n border: inputColor.highlight,\r\n background: inputColor.highlight,\r\n }\r\n : {\r\n background: (inputColor.highlight && inputColor.highlight.background) ||\r\n defaultColor.highlight.background,\r\n border: (inputColor.highlight && inputColor.highlight.border) ||\r\n defaultColor.highlight.border,\r\n },\r\n hover: isString(inputColor.hover)\r\n ? {\r\n border: inputColor.hover,\r\n background: inputColor.hover,\r\n }\r\n : {\r\n border: (inputColor.hover && inputColor.hover.border) ||\r\n defaultColor.hover.border,\r\n background: (inputColor.hover && inputColor.hover.background) ||\r\n defaultColor.hover.background,\r\n },\r\n };\r\n return color;\r\n }\r\n else {\r\n const color = {\r\n background: inputColor.background || undefined,\r\n border: inputColor.border || undefined,\r\n highlight: isString(inputColor.highlight)\r\n ? {\r\n border: inputColor.highlight,\r\n background: inputColor.highlight,\r\n }\r\n : {\r\n background: (inputColor.highlight && inputColor.highlight.background) ||\r\n undefined,\r\n border: (inputColor.highlight && inputColor.highlight.border) ||\r\n undefined,\r\n },\r\n hover: isString(inputColor.hover)\r\n ? {\r\n border: inputColor.hover,\r\n background: inputColor.hover,\r\n }\r\n : {\r\n border: (inputColor.hover && inputColor.hover.border) || undefined,\r\n background: (inputColor.hover && inputColor.hover.background) || undefined,\r\n },\r\n };\r\n return color;\r\n }\r\n }\r\n}\r\n/**\r\n * Convert RGB \\<0, 255\\> into HSV object.\r\n *\r\n * @remarks\r\n * {@link http://www.javascripter.net/faq/rgb2hsv.htm}\r\n *\r\n * @param red - Red channel.\r\n * @param green - Green channel.\r\n * @param blue - Blue channel.\r\n *\r\n * @returns HSV color object.\r\n */\r\nfunction RGBToHSV(red, green, blue) {\r\n red = red / 255;\r\n green = green / 255;\r\n blue = blue / 255;\r\n const minRGB = Math.min(red, Math.min(green, blue));\r\n const maxRGB = Math.max(red, Math.max(green, blue));\r\n // Black-gray-white\r\n if (minRGB === maxRGB) {\r\n return { h: 0, s: 0, v: minRGB };\r\n }\r\n // Colors other than black-gray-white:\r\n const d = red === minRGB ? green - blue : blue === minRGB ? red - green : blue - red;\r\n const h = red === minRGB ? 3 : blue === minRGB ? 1 : 5;\r\n const hue = (60 * (h - d / (maxRGB - minRGB))) / 360;\r\n const saturation = (maxRGB - minRGB) / maxRGB;\r\n const value = maxRGB;\r\n return { h: hue, s: saturation, v: value };\r\n}\r\nconst cssUtil = {\r\n // split a string with css styles into an object with key/values\r\n split(cssText) {\r\n const styles = {};\r\n cssText.split(\";\").forEach((style) => {\r\n if (style.trim() != \"\") {\r\n const parts = style.split(\":\");\r\n const key = parts[0].trim();\r\n const value = parts[1].trim();\r\n styles[key] = value;\r\n }\r\n });\r\n return styles;\r\n },\r\n // build a css text string from an object with key/values\r\n join(styles) {\r\n return Object.keys(styles)\r\n .map(function (key) {\r\n return key + \": \" + styles[key];\r\n })\r\n .join(\"; \");\r\n },\r\n};\r\n/**\r\n * Append a string with css styles to an element.\r\n *\r\n * @param element - The element that will receive new styles.\r\n * @param cssText - The styles to be appended.\r\n */\r\nfunction addCssText(element, cssText) {\r\n const currentStyles = cssUtil.split(element.style.cssText);\r\n const newStyles = cssUtil.split(cssText);\r\n const styles = {\r\n ...currentStyles,\r\n ...newStyles,\r\n };\r\n element.style.cssText = cssUtil.join(styles);\r\n}\r\n/**\r\n * Remove a string with css styles from an element.\r\n *\r\n * @param element - The element from which styles should be removed.\r\n * @param cssText - The styles to be removed.\r\n */\r\nfunction removeCssText(element, cssText) {\r\n const styles = cssUtil.split(element.style.cssText);\r\n const removeStyles = cssUtil.split(cssText);\r\n for (const key in removeStyles) {\r\n if (Object.prototype.hasOwnProperty.call(removeStyles, key)) {\r\n delete styles[key];\r\n }\r\n }\r\n element.style.cssText = cssUtil.join(styles);\r\n}\r\n/**\r\n * Convert HSV \\<0, 1\\> into RGB color object.\r\n *\r\n * @remarks\r\n * {@link https://gist.github.com/mjijackson/5311256}\r\n *\r\n * @param h - Hue.\r\n * @param s - Saturation.\r\n * @param v - Value.\r\n *\r\n * @returns RGB color object.\r\n */\r\nfunction HSVToRGB(h, s, v) {\r\n let r;\r\n let g;\r\n let b;\r\n const i = Math.floor(h * 6);\r\n const f = h * 6 - i;\r\n const p = v * (1 - s);\r\n const q = v * (1 - f * s);\r\n const t = v * (1 - (1 - f) * s);\r\n switch (i % 6) {\r\n case 0:\r\n (r = v), (g = t), (b = p);\r\n break;\r\n case 1:\r\n (r = q), (g = v), (b = p);\r\n break;\r\n case 2:\r\n (r = p), (g = v), (b = t);\r\n break;\r\n case 3:\r\n (r = p), (g = q), (b = v);\r\n break;\r\n case 4:\r\n (r = t), (g = p), (b = v);\r\n break;\r\n case 5:\r\n (r = v), (g = p), (b = q);\r\n break;\r\n }\r\n return {\r\n r: Math.floor(r * 255),\r\n g: Math.floor(g * 255),\r\n b: Math.floor(b * 255),\r\n };\r\n}\r\n/**\r\n * Convert HSV \\<0, 1\\> into hex color string.\r\n *\r\n * @param h - Hue.\r\n * @param s - Saturation.\r\n * @param v - Value.\r\n *\r\n * @returns Hex color string.\r\n */\r\nfunction HSVToHex(h, s, v) {\r\n const rgb = HSVToRGB(h, s, v);\r\n return RGBToHex(rgb.r, rgb.g, rgb.b);\r\n}\r\n/**\r\n * Convert hex color string into HSV \\<0, 1\\>.\r\n *\r\n * @param hex - Hex color string.\r\n *\r\n * @returns HSV color object.\r\n */\r\nfunction hexToHSV(hex) {\r\n const rgb = hexToRGB(hex);\r\n if (!rgb) {\r\n throw new TypeError(`'${hex}' is not a valid color.`);\r\n }\r\n return RGBToHSV(rgb.r, rgb.g, rgb.b);\r\n}\r\n/**\r\n * Validate hex color string.\r\n *\r\n * @param hex - Unknown string that may contain a color.\r\n *\r\n * @returns True if the string is valid, false otherwise.\r\n */\r\nfunction isValidHex(hex) {\r\n const isOk = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex);\r\n return isOk;\r\n}\r\n/**\r\n * Validate RGB color string.\r\n *\r\n * @param rgb - Unknown string that may contain a color.\r\n *\r\n * @returns True if the string is valid, false otherwise.\r\n */\r\nfunction isValidRGB(rgb) {\r\n return rgbRE.test(rgb);\r\n}\r\n/**\r\n * Validate RGBA color string.\r\n *\r\n * @param rgba - Unknown string that may contain a color.\r\n *\r\n * @returns True if the string is valid, false otherwise.\r\n */\r\nfunction isValidRGBA(rgba) {\r\n return rgbaRE.test(rgba);\r\n}\r\n/**\r\n * This recursively redirects the prototype of JSON objects to the referenceObject.\r\n * This is used for default options.\r\n *\r\n * @param fields - Names of properties to be bridged.\r\n * @param referenceObject - The original object.\r\n *\r\n * @returns A new object inheriting from the referenceObject.\r\n */\r\nfunction selectiveBridgeObject(fields, referenceObject) {\r\n if (referenceObject !== null && typeof referenceObject === \"object\") {\r\n // !!! typeof null === 'object'\r\n const objectTo = Object.create(referenceObject);\r\n for (let i = 0; i < fields.length; i++) {\r\n if (Object.prototype.hasOwnProperty.call(referenceObject, fields[i])) {\r\n if (typeof referenceObject[fields[i]] == \"object\") {\r\n objectTo[fields[i]] = bridgeObject(referenceObject[fields[i]]);\r\n }\r\n }\r\n }\r\n return objectTo;\r\n }\r\n else {\r\n return null;\r\n }\r\n}\r\n/**\r\n * This recursively redirects the prototype of JSON objects to the referenceObject.\r\n * This is used for default options.\r\n *\r\n * @param referenceObject - The original object.\r\n *\r\n * @returns The Element if the referenceObject is an Element, or a new object inheriting from the referenceObject.\r\n */\r\nfunction bridgeObject(referenceObject) {\r\n if (referenceObject === null || typeof referenceObject !== \"object\") {\r\n return null;\r\n }\r\n if (referenceObject instanceof Element) {\r\n // Avoid bridging DOM objects\r\n return referenceObject;\r\n }\r\n const objectTo = Object.create(referenceObject);\r\n for (const i in referenceObject) {\r\n if (Object.prototype.hasOwnProperty.call(referenceObject, i)) {\r\n if (typeof referenceObject[i] == \"object\") {\r\n objectTo[i] = bridgeObject(referenceObject[i]);\r\n }\r\n }\r\n }\r\n return objectTo;\r\n}\r\n/**\r\n * This method provides a stable sort implementation, very fast for presorted data.\r\n *\r\n * @param a - The array to be sorted (in-place).\r\n * @param compare - An order comparator.\r\n *\r\n * @returns The argument a.\r\n */\r\nfunction insertSort(a, compare) {\r\n for (let i = 0; i < a.length; i++) {\r\n const k = a[i];\r\n let j;\r\n for (j = i; j > 0 && compare(k, a[j - 1]) < 0; j--) {\r\n a[j] = a[j - 1];\r\n }\r\n a[j] = k;\r\n }\r\n return a;\r\n}\r\n/**\r\n * This is used to set the options of subobjects in the options object.\r\n *\r\n * A requirement of these subobjects is that they have an 'enabled' element\r\n * which is optional for the user but mandatory for the program.\r\n *\r\n * The added value here of the merge is that option 'enabled' is set as required.\r\n *\r\n * @param mergeTarget - Either this.options or the options used for the groups.\r\n * @param options - Options.\r\n * @param option - Option key in the options argument.\r\n * @param globalOptions - Global options, passed in to determine value of option 'enabled'.\r\n */\r\nfunction mergeOptions(mergeTarget, options, option, globalOptions = {}) {\r\n // Local helpers\r\n const isPresent = function (obj) {\r\n return obj !== null && obj !== undefined;\r\n };\r\n const isObject = function (obj) {\r\n return obj !== null && typeof obj === \"object\";\r\n };\r\n // https://stackoverflow.com/a/34491287/1223531\r\n const isEmpty = function (obj) {\r\n for (const x in obj) {\r\n if (Object.prototype.hasOwnProperty.call(obj, x)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n // Guards\r\n if (!isObject(mergeTarget)) {\r\n throw new Error(\"Parameter mergeTarget must be an object\");\r\n }\r\n if (!isObject(options)) {\r\n throw new Error(\"Parameter options must be an object\");\r\n }\r\n if (!isPresent(option)) {\r\n throw new Error(\"Parameter option must have a value\");\r\n }\r\n if (!isObject(globalOptions)) {\r\n throw new Error(\"Parameter globalOptions must be an object\");\r\n }\r\n //\r\n // Actual merge routine, separated from main logic\r\n // Only a single level of options is merged. Deeper levels are ref'd. This may actually be an issue.\r\n //\r\n const doMerge = function (target, options, option) {\r\n if (!isObject(target[option])) {\r\n target[option] = {};\r\n }\r\n const src = options[option];\r\n const dst = target[option];\r\n for (const prop in src) {\r\n if (Object.prototype.hasOwnProperty.call(src, prop)) {\r\n dst[prop] = src[prop];\r\n }\r\n }\r\n };\r\n // Local initialization\r\n const srcOption = options[option];\r\n const globalPassed = isObject(globalOptions) && !isEmpty(globalOptions);\r\n const globalOption = globalPassed ? globalOptions[option] : undefined;\r\n const globalEnabled = globalOption ? globalOption.enabled : undefined;\r\n /////////////////////////////////////////\r\n // Main routine\r\n /////////////////////////////////////////\r\n if (srcOption === undefined) {\r\n return; // Nothing to do\r\n }\r\n if (typeof srcOption === \"boolean\") {\r\n if (!isObject(mergeTarget[option])) {\r\n mergeTarget[option] = {};\r\n }\r\n mergeTarget[option].enabled = srcOption;\r\n return;\r\n }\r\n if (srcOption === null && !isObject(mergeTarget[option])) {\r\n // If possible, explicit copy from globals\r\n if (isPresent(globalOption)) {\r\n mergeTarget[option] = Object.create(globalOption);\r\n }\r\n else {\r\n return; // Nothing to do\r\n }\r\n }\r\n if (!isObject(srcOption)) {\r\n return;\r\n }\r\n //\r\n // Ensure that 'enabled' is properly set. It is required internally\r\n // Note that the value from options will always overwrite the existing value\r\n //\r\n let enabled = true; // default value\r\n if (srcOption.enabled !== undefined) {\r\n enabled = srcOption.enabled;\r\n }\r\n else {\r\n // Take from globals, if present\r\n if (globalEnabled !== undefined) {\r\n enabled = globalOption.enabled;\r\n }\r\n }\r\n doMerge(mergeTarget, options, option);\r\n mergeTarget[option].enabled = enabled;\r\n}\r\n/**\r\n * This function does a binary search for a visible item in a sorted list. If we find a visible item, the code that uses\r\n * this function will then iterate in both directions over this sorted list to find all visible items.\r\n *\r\n * @param orderedItems - Items ordered by start.\r\n * @param comparator - -1 is lower, 0 is equal, 1 is higher.\r\n * @param field - Property name on an item (That is item[field]).\r\n * @param field2 - Second property name on an item (That is item[field][field2]).\r\n *\r\n * @returns Index of the found item or -1 if nothing was found.\r\n */\r\nfunction binarySearchCustom(orderedItems, comparator, field, field2) {\r\n const maxIterations = 10000;\r\n let iteration = 0;\r\n let low = 0;\r\n let high = orderedItems.length - 1;\r\n while (low <= high && iteration < maxIterations) {\r\n const middle = Math.floor((low + high) / 2);\r\n const item = orderedItems[middle];\r\n const value = field2 === undefined ? item[field] : item[field][field2];\r\n const searchResult = comparator(value);\r\n if (searchResult == 0) {\r\n // jihaa, found a visible item!\r\n return middle;\r\n }\r\n else if (searchResult == -1) {\r\n // it is too small --> increase low\r\n low = middle + 1;\r\n }\r\n else {\r\n // it is too big --> decrease high\r\n high = middle - 1;\r\n }\r\n iteration++;\r\n }\r\n return -1;\r\n}\r\n/**\r\n * This function does a binary search for a specific value in a sorted array.\r\n * If it does not exist but is in between of two values, we return either the\r\n * one before or the one after, depending on user input If it is found, we\r\n * return the index, else -1.\r\n *\r\n * @param orderedItems - Sorted array.\r\n * @param target - The searched value.\r\n * @param field - Name of the property in items to be searched.\r\n * @param sidePreference - If the target is between two values, should the index of the before or the after be returned?\r\n * @param comparator - An optional comparator, returning -1, 0, 1 for \\<, ===, \\>.\r\n *\r\n * @returns The index of found value or -1 if nothing was found.\r\n */\r\nfunction binarySearchValue(orderedItems, target, field, sidePreference, comparator) {\r\n const maxIterations = 10000;\r\n let iteration = 0;\r\n let low = 0;\r\n let high = orderedItems.length - 1;\r\n let prevValue;\r\n let value;\r\n let nextValue;\r\n let middle;\r\n comparator =\r\n comparator != undefined\r\n ? comparator\r\n : function (a, b) {\r\n return a == b ? 0 : a < b ? -1 : 1;\r\n };\r\n while (low <= high && iteration < maxIterations) {\r\n // get a new guess\r\n middle = Math.floor(0.5 * (high + low));\r\n prevValue = orderedItems[Math.max(0, middle - 1)][field];\r\n value = orderedItems[middle][field];\r\n nextValue =\r\n orderedItems[Math.min(orderedItems.length - 1, middle + 1)][field];\r\n if (comparator(value, target) == 0) {\r\n // we found the target\r\n return middle;\r\n }\r\n else if (comparator(prevValue, target) < 0 &&\r\n comparator(value, target) > 0) {\r\n // target is in between of the previous and the current\r\n return sidePreference == \"before\" ? Math.max(0, middle - 1) : middle;\r\n }\r\n else if (comparator(value, target) < 0 &&\r\n comparator(nextValue, target) > 0) {\r\n // target is in between of the current and the next\r\n return sidePreference == \"before\"\r\n ? middle\r\n : Math.min(orderedItems.length - 1, middle + 1);\r\n }\r\n else {\r\n // didnt find the target, we need to change our boundaries.\r\n if (comparator(value, target) < 0) {\r\n // it is too small --> increase low\r\n low = middle + 1;\r\n }\r\n else {\r\n // it is too big --> decrease high\r\n high = middle - 1;\r\n }\r\n }\r\n iteration++;\r\n }\r\n // didnt find anything. Return -1.\r\n return -1;\r\n}\r\n/*\r\n * Easing Functions.\r\n * Only considering the t value for the range [0, 1] => [0, 1].\r\n *\r\n * Inspiration: from http://gizma.com/easing/\r\n * https://gist.github.com/gre/1650294\r\n */\r\nconst easingFunctions = {\r\n /**\r\n * Provides no easing and no acceleration.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\r\n linear(t) {\r\n return t;\r\n },\r\n /**\r\n * Accelerate from zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\r\n easeInQuad(t) {\r\n return t * t;\r\n },\r\n /**\r\n * Decelerate to zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\r\n easeOutQuad(t) {\r\n return t * (2 - t);\r\n },\r\n /**\r\n * Accelerate until halfway, then decelerate.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\r\n easeInOutQuad(t) {\r\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\r\n },\r\n /**\r\n * Accelerate from zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\r\n easeInCubic(t) {\r\n return t * t * t;\r\n },\r\n /**\r\n * Decelerate to zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\r\n easeOutCubic(t) {\r\n return --t * t * t + 1;\r\n },\r\n /**\r\n * Accelerate until halfway, then decelerate.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\r\n easeInOutCubic(t) {\r\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\r\n },\r\n /**\r\n * Accelerate from zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\r\n easeInQuart(t) {\r\n return t * t * t * t;\r\n },\r\n /**\r\n * Decelerate to zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\r\n easeOutQuart(t) {\r\n return 1 - --t * t * t * t;\r\n },\r\n /**\r\n * Accelerate until halfway, then decelerate.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\r\n easeInOutQuart(t) {\r\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t;\r\n },\r\n /**\r\n * Accelerate from zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\r\n easeInQuint(t) {\r\n return t * t * t * t * t;\r\n },\r\n /**\r\n * Decelerate to zero velocity.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\r\n easeOutQuint(t) {\r\n return 1 + --t * t * t * t * t;\r\n },\r\n /**\r\n * Accelerate until halfway, then decelerate.\r\n *\r\n * @param t - Time.\r\n *\r\n * @returns Value at time t.\r\n */\r\n easeInOutQuint(t) {\r\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * --t * t * t * t * t;\r\n },\r\n};\r\n/**\r\n * Experimentaly compute the width of the scrollbar for this browser.\r\n *\r\n * @returns The width in pixels.\r\n */\r\nfunction getScrollBarWidth() {\r\n const inner = document.createElement(\"p\");\r\n inner.style.width = \"100%\";\r\n inner.style.height = \"200px\";\r\n const outer = document.createElement(\"div\");\r\n outer.style.position = \"absolute\";\r\n outer.style.top = \"0px\";\r\n outer.style.left = \"0px\";\r\n outer.style.visibility = \"hidden\";\r\n outer.style.width = \"200px\";\r\n outer.style.height = \"150px\";\r\n outer.style.overflow = \"hidden\";\r\n outer.appendChild(inner);\r\n document.body.appendChild(outer);\r\n const w1 = inner.offsetWidth;\r\n outer.style.overflow = \"scroll\";\r\n let w2 = inner.offsetWidth;\r\n if (w1 == w2) {\r\n w2 = outer.clientWidth;\r\n }\r\n document.body.removeChild(outer);\r\n return w1 - w2;\r\n}\r\n// @TODO: This doesn't work properly.\r\n// It works only for single property objects,\r\n// otherwise it combines all of the types in a union.\r\n// export function topMost<K1 extends string, V1> (\r\n// pile: Record<K1, undefined | V1>[],\r\n// accessors: K1 | [K1]\r\n// ): undefined | V1\r\n// export function topMost<K1 extends string, K2 extends string, V1, V2> (\r\n// pile: Record<K1, undefined | V1 | Record<K2, undefined | V2>>[],\r\n// accessors: [K1, K2]\r\n// ): undefined | V1 | V2\r\n// export function topMost<K1 extends string, K2 extends string, K3 extends string, V1, V2, V3> (\r\n// pile: Record<K1, undefined | V1 | Record<K2, undefined | V2 | Record<K3, undefined | V3>>>[],\r\n// accessors: [K1, K2, K3]\r\n// ): undefined | V1 | V2 | V3\r\n/**\r\n * Get the top most property value from a pile of objects.\r\n *\r\n * @param pile - Array of objects, no required format.\r\n * @param accessors - Array of property names.\r\n * For example `object['foo']['bar']` → `['foo', 'bar']`.\r\n *\r\n * @returns Value of the property with given accessors path from the first pile item where it's not undefined.\r\n */\r\nfunction topMost(pile, accessors) {\r\n let candidate;\r\n if (!Array.isArray(accessors)) {\r\n accessors = [accessors];\r\n }\r\n for (const member of pile) {\r\n if (member) {\r\n candidate = member[accessors[0]];\r\n for (let i = 1; i < accessors.length; i++) {\r\n if (candidate) {\r\n candidate = candidate[accessors[i]];\r\n }\r\n }\r\n if (typeof candidate !== \"undefined\") {\r\n break;\r\n }\r\n }\r\n }\r\n return candidate;\r\n}\n\nconst htmlColors = {\n black: \"#000000\",\n navy: \"#000080\",\n darkblue: \"#00008B\",\n mediumblue: \"#0000CD\",\n blue: \"#0000FF\",\n darkgreen: \"#006400\",\n green: \"#008000\",\n teal: \"#008080\",\n darkcyan: \"#008B8B\",\n deepskyblue: \"#00BFFF\",\n darkturquoise: \"#00CED1\",\n mediumspringgreen: \"#00FA9A\",\n lime: \"#00FF00\",\n springgreen: \"#00FF7F\",\n aqua: \"#00FFFF\",\n cyan: \"#00FFFF\",\n midnightblue: \"#191970\",\n dodgerblue: \"#1E90FF\",\n lightseagreen: \"#20B2AA\",\n forestgreen: \"#228B22\",\n seagreen: \"#2E8B57\",\n darkslategray: \"#2F4F4F\",\n limegreen: \"#32CD32\",\n mediumseagreen: \"#3CB371\",\n turquoise: \"#40E0D0\",\n royalblue: \"#4169E1\",\n steelblue: \"#4682B4\",\n darkslateblue: \"#483D8B\",\n mediumturquoise: \"#48D1CC\",\n indigo: \"#4B0082\",\n darkolivegreen: \"#556B2F\",\n cadetblue: \"#5F9EA0\",\n cornflowerblue: \"#6495ED\",\n mediumaquamarine: \"#66CDAA\",\n dimgray: \"#696969\",\n slateblue: \"#6A5ACD\",\n olivedrab: \"#6B8E23\",\n slategray: \"#708090\",\n lightslategray: \"#778899\",\n mediumslateblue: \"#7B68EE\",\n lawngreen: \"#7CFC00\",\n chartreuse: \"#7FFF00\",\n aquamarine: \"#7FFFD4\",\n maroon: \"#800000\",\n purple: \"#800080\",\n olive: \"#808000\",\n gray: \"#808080\",\n skyblue: \"#87CEEB\",\n lightskyblue: \"#87CEFA\",\n blueviolet: \"#8A2BE2\",\n darkred: \"#8B0000\",\n darkmagenta: \"#8B008B\",\n saddlebrown: \"#8B4513\",\n darkseagreen: \"#8FBC8F\",\n lightgreen: \"#90EE90\",\n mediumpurple: \"#9370D8\",\n darkviolet: \"#9400D3\",\n palegreen: \"#98FB98\",\n darkorchid: \"#9932CC\",\n yellowgreen: \"#9ACD32\",\n sienna: \"#A0522D\",\n brown: \"#A52A2A\",\n darkgray: \"#A9A9A9\",\n lightblue: \"#ADD8E6\",\n greenyellow: \"#ADFF2F\",\n paleturquoise: \"#AFEEEE\",\n lightsteelblue: \"#B0C4DE\",\n powderblue: \"#B0E0E6\",\n firebrick: \"#B22222\",\n darkgoldenrod: \"#B8860B\",\n mediumorchid: \"#BA55D3\",\n rosybrown: \"#BC8F8F\",\n darkkhaki: \"#BDB76B\",\n silver: \"#C0C0C0\",\n mediumvioletred: \"#C71585\",\n indianred: \"#CD5C5C\",\n peru: \"#CD853F\",\n chocolate: \"#D2691E\",\n tan: \"#D2B48C\",\n lightgrey: \"#D3D3D3\",\n palevioletred: \"#D87093\",\n thistle: \"#D8BFD8\",\n orchid: \"#DA70D6\",\n goldenrod: \"#DAA520\",\n crimson: \"#DC143C\",\n gainsboro: \"#DCDCDC\",\n plum: \"#DDA0DD\",\n burlywood: \"#DEB887\",\n lightcyan: \"#E0FFFF\",\n lavender: \"#E6E6FA\",\n darksalmon: \"#E9967A\",\n violet: \"#EE82EE\",\n palegoldenrod: \"#EEE8AA\",\n lightcoral: \"#F08080\",\n khaki: \"#F0E68C\",\n aliceblue: \"#F0F8FF\",\n honeydew: \"#F0FFF0\",\n azure: \"#F0FFFF\",\n sandybrown: \"#F4A460\",\n wheat: \"#F5DEB3\",\n beige: \"#F5F5DC\",\n whitesmoke: \"#F5F5F5\",\n mintcream: \"#F5FFFA\",\n ghostwhite: \"#F8F8FF\",\n salmon: \"#FA8072\",\n antiquewhite: \"#FAEBD7\",\n linen: \"#FAF0E6\",\n lightgoldenrodyellow: \"#FAFAD2\",\n oldlace: \"#FDF5E6\",\n red: \"#FF0000\",\n fuchsia: \"#FF00FF\",\n magenta: \"#FF00FF\",\n deeppink: \"#FF1493\",\n orangered: \"#FF4500\",\n tomato: \"#FF6347\",\n hotpink: \"#FF69B4\",\n coral: \"#FF7F50\",\n darkorange: \"#FF8C00\",\n lightsalmon: \"#FFA07A\",\n orange: \"#FFA500\",\n lightpink: \"#FFB6C1\",\n pink: \"#FFC0CB\",\n gold: \"#FFD700\",\n peachpuff: \"#FFDAB9\",\n navajowhite: \"#FFDEAD\",\n moccasin: \"#FFE4B5\",\n bisque: \"#FFE4C4\",\n mistyrose: \"#FFE4E1\",\n blanchedalmond: \"#FFEBCD\",\n papayawhip: \"#FFEFD5\",\n lavenderblush: \"#FFF0F5\",\n seashell: \"#FFF5EE\",\n cornsilk: \"#FFF8DC\",\n lemonchiffon: \"#FFFACD\",\n floralwhite: \"#FFFAF0\",\n snow: \"#FFFAFA\",\n yellow: \"#FFFF00\",\n lightyellow: \"#FFFFE0\",\n ivory: \"#FFFFF0\",\n white: \"#FFFFFF\",\n};\n\n/**\n * @param {number} [pixelRatio=1]\n */\nclass ColorPicker {\n /**\n * @param {number} [pixelRatio=1]\n */\n constructor(pixelRatio = 1) {\n this.pixelRatio = pixelRatio;\n this.generated = false;\n this.centerCoordinates = { x: 289 / 2, y: 289 / 2 };\n this.r = 289 * 0.49;\n this.color = { r: 255, g: 255, b: 255, a: 1.0 };\n this.hueCircle = undefined;\n this.initialColor = { r: 255, g: 255, b: 255, a: 1.0 };\n this.previousColor = undefined;\n this.applied = false;\n\n // bound by\n this.updateCallback = () => {};\n this.closeCallback = () => {};\n\n // create all DOM elements\n this._create();\n }\n\n /**\n * this inserts the colorPicker into a div from the DOM\n *\n * @param {Element} container\n */\n insertTo(container) {\n if (this.hammer !== undefined) {\n this.hammer.destroy();\n this.hammer = undefined;\n }\n this.container = container;\n this.container.appendChild(this.frame);\n this._bindHammer();\n\n this._setSize();\n }\n\n /**\n * the callback is executed on apply and save. Bind it to the application\n *\n * @param {Function} callback\n */\n setUpdateCallback(callback) {\n if (typeof callback === \"function\") {\n this.updateCallback = callback;\n } else {\n throw new Error(\n \"Function attempted to set as colorPicker update callback is not a function.\"\n );\n }\n }\n\n /**\n * the callback is executed on apply and save. Bind it to the application\n *\n * @param {Function} callback\n */\n setCloseCallback(callback) {\n if (typeof callback === \"function\") {\n this.closeCallback = callback;\n } else {\n throw new Error(\n \"Function attempted to set as colorPicker closing callback is not a function.\"\n );\n }\n }\n\n /**\n *\n * @param {string} color\n * @returns {string}\n * @private\n */\n _isColorString(color) {\n if (typeof color === \"string\") {\n return htmlColors[color];\n }\n }\n\n /**\n * Set the color of the colorPicker\n * Supported formats:\n * 'red' --> HTML color string\n * '#ffffff' --> hex string\n * 'rgb(255,255,255)' --> rgb string\n * 'rgba(255,255,255,1.0)' --> rgba string\n * {r:255,g:255,b:255} --> rgb object\n * {r:255,g:255,b:255,a:1.0} --> rgba object\n *\n * @param {string | object} color\n * @param {boolean} [setInitial=true]\n */\n setColor(color, setInitial = true) {\n if (color === \"none\") {\n return;\n }\n\n let rgba;\n\n // if a html color shorthand is used, convert to hex\n const htmlColor = this._isColorString(color);\n if (htmlColor !== undefined) {\n color = htmlColor;\n }\n\n // check format\n if (isString(color) === true) {\n if (isValidRGB(color) === true) {\n const rgbaArray = color\n .substr(4)\n .substr(0, color.length - 5)\n .split(\",\");\n rgba = { r: rgbaArray[0], g: rgbaArray[1], b: rgbaArray[2], a: 1.0 };\n } else if (isValidRGBA(color) === true) {\n const rgbaArray = color\n .substr(5)\n .substr(0, color.length - 6)\n .split(\",\");\n rgba = {\n r: rgbaArray[0],\n g: rgbaArray[1],\n b: rgbaArray[2],\n a: rgbaArray[3],\n };\n } else if (isValidHex(color) === true) {\n const rgbObj = hexToRGB(color);\n rgba = { r: rgbObj.r, g: rgbObj.g, b: rgbObj.b, a: 1.0 };\n }\n } else {\n if (color instanceof Object) {\n if (\n color.r !== undefined &&\n color.g !== undefined &&\n color.b !== undefined\n ) {\n const alpha = color.a !== undefined ? color.a : \"1.0\";\n rgba = { r: color.r, g: color.g, b: color.b, a: alpha };\n }\n }\n }\n\n // set color\n if (rgba === undefined) {\n throw new Error(\n \"Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: \" +\n JSON.stringify(color)\n );\n } else {\n this._setColor(rgba, setInitial);\n }\n }\n\n /**\n * this shows the color picker.\n * The hue circle is constructed once and stored.\n */\n show() {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n\n this.applied = false;\n this.frame.style.display = \"block\";\n this._generateHueCircle();\n }\n\n // ------------------------------------------ PRIVATE ----------------------------- //\n\n /**\n * Hide the picker. Is called by the cancel button.\n * Optional boolean to store the previous color for easy access later on.\n *\n * @param {boolean} [storePrevious=true]\n * @private\n */\n _hide(storePrevious = true) {\n // store the previous color for next time;\n if (storePrevious === true) {\n this.previousColor = Object.assign({}, this.color);\n }\n\n if (this.applied === true) {\n this.updateCallback(this.initialColor);\n }\n\n this.frame.style.display = \"none\";\n\n // call the closing callback, restoring the onclick method.\n // this is in a setTimeout because it will trigger the show again before the click is done.\n setTimeout(() => {\n if (this.closeCallback !== undefined) {\n this.closeCallback();\n this.closeCallback = undefined;\n }\n }, 0);\n }\n\n /**\n * bound to the save button. Saves and hides.\n *\n * @private\n */\n _save() {\n this.updateCallback(this.color);\n this.applied = false;\n this._hide();\n }\n\n /**\n * Bound to apply button. Saves but does not close. Is undone by the cancel button.\n *\n * @private\n */\n _apply() {\n this.applied = true;\n this.updateCallback(this.color);\n this._updatePicker(this.color);\n }\n\n /**\n * load the color from the previous session.\n *\n * @private\n */\n _loadLast() {\n if (this.previousColor !== undefined) {\n this.setColor(this.previousColor, false);\n } else {\n alert(\"There is no last color to load...\");\n }\n }\n\n /**\n * set the color, place the picker\n *\n * @param {object} rgba\n * @param {boolean} [setInitial=true]\n * @private\n */\n _setColor(rgba, setInitial = true) {\n // store the initial color\n if (setInitial === true) {\n this.initialColor = Object.assign({}, rgba);\n }\n\n this.color = rgba;\n const hsv = RGBToHSV(rgba.r, rgba.g, rgba.b);\n\n const angleConvert = 2 * Math.PI;\n const radius = this.r * hsv.s;\n const x =\n this.centerCoordinates.x + radius * Math.sin(angleConvert * hsv.h);\n const y =\n this.centerCoordinates.y + radius * Math.cos(angleConvert * hsv.h);\n\n this.colorPickerSelector.style.left =\n x - 0.5 * this.colorPickerSelector.clientWidth + \"px\";\n this.colorPickerSelector.style.top =\n y - 0.5 * this.colorPickerSelector.clientHeight + \"px\";\n\n this._updatePicker(rgba);\n }\n\n /**\n * bound to opacity control\n *\n * @param {number} value\n * @private\n */\n _setOpacity(value) {\n this.color.a = value / 100;\n this._updatePicker(this.color);\n }\n\n /**\n * bound to brightness control\n *\n * @param {number} value\n * @private\n */\n _setBrightness(value) {\n const hsv = RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.v = value / 100;\n const rgba = HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba[\"a\"] = this.color.a;\n this.color = rgba;\n this._updatePicker();\n }\n\n /**\n * update the color picker. A black circle overlays the hue circle to mimic the brightness decreasing.\n *\n * @param {object} rgba\n * @private\n */\n _updatePicker(rgba = this.color) {\n const hsv = RGBToHSV(rgba.r, rgba.g, rgba.b);\n const ctx = this.colorPickerCanvas.getContext(\"2d\");\n if (this.pixelRation === undefined) {\n this.pixelRatio =\n (window.devicePixelRatio || 1) /\n (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio ||\n 1);\n }\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n\n // clear the canvas\n const w = this.colorPickerCanvas.clientWidth;\n const h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n ctx.putImageData(this.hueCircle, 0, 0);\n ctx.fillStyle = \"rgba(0,0,0,\" + (1 - hsv.v) + \")\";\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.fill();\n\n this.brightnessRange.value = 100 * hsv.v;\n this.opacityRange.value = 100 * rgba.a;\n\n this.initialColorDiv.style.backgroundColor =\n \"rgba(\" +\n this.initialColor.r +\n \",\" +\n this.initialColor.g +\n \",\" +\n this.initialColor.b +\n \",\" +\n this.initialColor.a +\n \")\";\n this.newColorDiv.style.backgroundColor =\n \"rgba(\" +\n this.color.r +\n \",\" +\n this.color.g +\n \",\" +\n this.color.b +\n \",\" +\n this.color.a +\n \")\";\n }\n\n /**\n * used by create to set the size of the canvas.\n *\n * @private\n */\n _setSize() {\n this.colorPickerCanvas.style.width = \"100%\";\n this.colorPickerCanvas.style.height = \"100%\";\n\n this.colorPickerCanvas.width = 289 * this.pixelRatio;\n this.colorPickerCanvas.height = 289 * this.pixelRatio;\n }\n\n /**\n * create all dom elements\n * TODO: cleanup, lots of similar dom elements\n *\n * @private\n */\n _create() {\n this.frame = document.createElement(\"div\");\n this.frame.className = \"vis-color-picker\";\n\n this.colorPickerDiv = document.createElement(\"div\");\n this.colorPickerSelector = document.createElement(\"div\");\n this.colorPickerSelector.className = \"vis-selector\";\n this.colorPickerDiv.appendChild(this.colorPickerSelector);\n\n this.colorPickerCanvas = document.createElement(\"canvas\");\n this.colorPickerDiv.appendChild(this.colorPickerCanvas);\n\n if (!this.colorPickerCanvas.getContext) {\n const noCanvas = document.createElement(\"DIV\");\n noCanvas.style.color = \"red\";\n noCanvas.style.fontWeight = \"bold\";\n noCanvas.style.padding = \"10px\";\n noCanvas.innerText = \"Error: your browser does not support HTML canvas\";\n this.colorPickerCanvas.appendChild(noCanvas);\n } else {\n const ctx = this.colorPickerCanvas.getContext(\"2d\");\n this.pixelRatio =\n (window.devicePixelRatio || 1) /\n (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio ||\n 1);\n this.colorPickerCanvas\n .getContext(\"2d\")\n .setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n }\n\n this.colorPickerDiv.className = \"vis-color\";\n\n this.opacityDiv = document.createElement(\"div\");\n this.opacityDiv.className = \"vis-opacity\";\n\n this.brightnessDiv = document.createElement(\"div\");\n this.brightnessDiv.className = \"vis-brightness\";\n\n this.arrowDiv = document.createElement(\"div\");\n this.arrowDiv.className = \"vis-arrow\";\n\n this.opacityRange = document.createElement(\"input\");\n try {\n this.opacityRange.type = \"range\"; // Not supported on IE9\n this.opacityRange.min = \"0\";\n this.opacityRange.max = \"100\";\n } catch (err) {\n // TODO: Add some error handling.\n }\n this.opacityRange.value = \"100\";\n this.opacityRange.className = \"vis-range\";\n\n this.brightnessRange = document.createElement(\"input\");\n try {\n this.brightnessRange.type = \"range\"; // Not supported on IE9\n this.brightnessRange.min = \"0\";\n this.brightnessRange.max = \"100\";\n } catch (err) {\n // TODO: Add some error handling.\n }\n this.brightnessRange.value = \"100\";\n this.brightnessRange.className = \"vis-range\";\n\n this.opacityDiv.appendChild(this.opacityRange);\n this.brightnessDiv.appendChild(this.brightnessRange);\n\n const me = this;\n this.opacityRange.onchange = function () {\n me._setOpacity(this.value);\n };\n this.opacityRange.oninput = function () {\n me._setOpacity(this.value);\n };\n this.brightnessRange.onchange = function () {\n me._setBrightness(this.value);\n };\n this.brightnessRange.oninput = function () {\n me._setBrightness(this.value);\n };\n\n this.brightnessLabel = document.createElement(\"div\");\n this.brightnessLabel.className = \"vis-label vis-brightness\";\n this.brightnessLabel.innerText = \"brightness:\";\n\n this.opacityLabel = document.createElement(\"div\");\n this.opacityLabel.className = \"vis-label vis-opacity\";\n this.opacityLabel.innerText = \"opacity:\";\n\n this.newColorDiv = document.createElement(\"div\");\n this.newColorDiv.className = \"vis-new-color\";\n this.newColorDiv.innerText = \"new\";\n\n this.initialColorDiv = document.createElement(\"div\");\n this.initialColorDiv.className = \"vis-initial-color\";\n this.initialColorDiv.innerText = \"initial\";\n\n this.cancelButton = document.createElement(\"div\");\n this.cancelButton.className = \"vis-button vis-cancel\";\n this.cancelButton.innerText = \"cancel\";\n this.cancelButton.onclick = this._hide.bind(this, false);\n\n this.applyButton = document.createElement(\"div\");\n this.applyButton.className = \"vis-button vis-apply\";\n this.applyButton.innerText = \"apply\";\n this.applyButton.onclick = this._apply.bind(this);\n\n this.saveButton = document.createElement(\"div\");\n this.saveButton.className = \"vis-button vis-save\";\n this.saveButton.innerText = \"save\";\n this.saveButton.onclick = this._save.bind(this);\n\n this.loadButton = document.createElement(\"div\");\n this.loadButton.className = \"vis-button vis-load\";\n this.loadButton.innerText = \"load last\";\n this.loadButton.onclick = this._loadLast.bind(this);\n\n this.frame.appendChild(this.colorPickerDiv);\n this.frame.appendChild(this.arrowDiv);\n this.frame.appendChild(this.brightnessLabel);\n this.frame.appendChild(this.brightnessDiv);\n this.frame.appendChild(this.opacityLabel);\n this.frame.appendChild(this.opacityDiv);\n this.frame.appendChild(this.newColorDiv);\n this.frame.appendChild(this.initialColorDiv);\n\n this.frame.appendChild(this.cancelButton);\n this.frame.appendChild(this.applyButton);\n this.frame.appendChild(this.saveButton);\n this.frame.appendChild(this.loadButton);\n }\n\n /**\n * bind hammer to the color picker\n *\n * @private\n */\n _bindHammer() {\n this.drag = {};\n this.pinch = {};\n this.hammer = new Hammer(this.colorPickerCanvas);\n this.hammer.get(\"pinch\").set({ enable: true });\n\n this.hammer.on(\"hammer.input\", (event) => {\n if (event.isFirst) {\n this._moveSelector(event);\n }\n });\n this.hammer.on(\"tap\", (event) => {\n this._moveSelector(event);\n });\n this.hammer.on(\"panstart\", (event) => {\n this._moveSelector(event);\n });\n this.hammer.on(\"panmove\", (event) => {\n this._moveSelector(event);\n });\n this.hammer.on(\"panend\", (event) => {\n this._moveSelector(event);\n });\n }\n\n /**\n * generate the hue circle. This is relatively heavy (200ms) and is done only once on the first time it is shown.\n *\n * @private\n */\n _generateHueCircle() {\n if (this.generated === false) {\n const ctx = this.colorPickerCanvas.getContext(\"2d\");\n if (this.pixelRation === undefined) {\n this.pixelRatio =\n (window.devicePixelRatio || 1) /\n (ctx.webkitBackingStorePixelRatio ||\n ctx.mozBackingStorePixelRatio ||\n ctx.msBackingStorePixelRatio ||\n ctx.oBackingStorePixelRatio ||\n ctx.backingStorePixelRatio ||\n 1);\n }\n ctx.setTransform(this.pixelRatio, 0, 0, this.pixelRatio, 0, 0);\n\n // clear the canvas\n const w = this.colorPickerCanvas.clientWidth;\n const h = this.colorPickerCanvas.clientHeight;\n ctx.clearRect(0, 0, w, h);\n\n // draw hue circle\n let x, y, hue, sat;\n this.centerCoordinates = { x: w * 0.5, y: h * 0.5 };\n this.r = 0.49 * w;\n const angleConvert = (2 * Math.PI) / 360;\n const hfac = 1 / 360;\n const sfac = 1 / this.r;\n let rgb;\n for (hue = 0; hue < 360; hue++) {\n for (sat = 0; sat < this.r; sat++) {\n x = this.centerCoordinates.x + sat * Math.sin(angleConvert * hue);\n y = this.centerCoordinates.y + sat * Math.cos(angleConvert * hue);\n rgb = HSVToRGB(hue * hfac, sat * sfac, 1);\n ctx.fillStyle = \"rgb(\" + rgb.r + \",\" + rgb.g + \",\" + rgb.b + \")\";\n ctx.fillRect(x - 0.5, y - 0.5, 2, 2);\n }\n }\n ctx.strokeStyle = \"rgba(0,0,0,1)\";\n ctx.circle(this.centerCoordinates.x, this.centerCoordinates.y, this.r);\n ctx.stroke();\n\n this.hueCircle = ctx.getImageData(0, 0, w, h);\n }\n this.generated = true;\n }\n\n /**\n * move the selector. This is called by hammer functions.\n *\n * @param {Event} event The event\n * @private\n */\n _moveSelector(event) {\n const rect = this.colorPickerDiv.getBoundingClientRect();\n const left = event.center.x - rect.left;\n const top = event.center.y - rect.top;\n\n const centerY = 0.5 * this.colorPickerDiv.clientHeight;\n const centerX = 0.5 * this.colorPickerDiv.clientWidth;\n\n const x = left - centerX;\n const y = top - centerY;\n\n const angle = Math.atan2(x, y);\n const radius = 0.98 * Math.min(Math.sqrt(x * x + y * y), centerX);\n\n const newTop = Math.cos(angle) * radius + centerY;\n const newLeft = Math.sin(angle) * radius + centerX;\n\n this.colorPickerSelector.style.top =\n newTop - 0.5 * this.colorPickerSelector.clientHeight + \"px\";\n this.colorPickerSelector.style.left =\n newLeft - 0.5 * this.colorPickerSelector.clientWidth + \"px\";\n\n // set color\n let h = angle / (2 * Math.PI);\n h = h < 0 ? h + 1 : h;\n const s = radius / this.r;\n const hsv = RGBToHSV(this.color.r, this.color.g, this.color.b);\n hsv.h = h;\n hsv.s = s;\n const rgba = HSVToRGB(hsv.h, hsv.s, hsv.v);\n rgba[\"a\"] = this.color.a;\n this.color = rgba;\n\n // update previews\n this.initialColorDiv.style.backgroundColor =\n \"rgba(\" +\n this.initialColor.r +\n \",\" +\n this.initialColor.g +\n \",\" +\n this.initialColor.b +\n \",\" +\n this.initialColor.a +\n \")\";\n this.newColorDiv.style.backgroundColor =\n \"rgba(\" +\n this.color.r +\n \",\" +\n this.color.g +\n \",\" +\n this.color.b +\n \",\" +\n this.color.a +\n \")\";\n }\n}\n\n/**\n * Wrap given text (last argument) in HTML elements (all preceding arguments).\n *\n * @param {...any} rest - List of tag names followed by inner text.\n *\n * @returns An element or a text node.\n */\nfunction wrapInTag(...rest) {\n if (rest.length < 1) {\n throw new TypeError(\"Invalid arguments.\");\n } else if (rest.length === 1) {\n return document.createTextNode(rest[0]);\n } else {\n const element = document.createElement(rest[0]);\n element.appendChild(wrapInTag(...rest.slice(1)));\n return element;\n }\n}\n\n/**\n * The way this works is for all properties of this.possible options, you can supply the property name in any form to list the options.\n * Boolean options are recognised as Boolean\n * Number options should be written as array: [default value, min value, max value, stepsize]\n * Colors should be written as array: ['color', '#ffffff']\n * Strings with should be written as array: [option1, option2, option3, ..]\n *\n * The options are matched with their counterparts in each of the modules and the values used in the configuration are\n */\nclass Configurator {\n /**\n * @param {object} parentModule | the location where parentModule.setOptions() can be called\n * @param {object} defaultContainer | the default container of the module\n * @param {object} configureOptions | the fully configured and predefined options set found in allOptions.js\n * @param {number} pixelRatio | canvas pixel ratio\n * @param {Function} hideOption | custom logic to dynamically hide options\n */\n constructor(\n parentModule,\n defaultContainer,\n configureOptions,\n pixelRatio = 1,\n hideOption = () => false\n ) {\n this.parent = parentModule;\n this.changedOptions = [];\n this.container = defaultContainer;\n this.allowCreation = false;\n this.hideOption = hideOption;\n\n this.options = {};\n this.initialized = false;\n this.popupCounter = 0;\n this.defaultOptions = {\n enabled: false,\n filter: true,\n container: undefined,\n showButton: true,\n };\n Object.assign(this.options, this.defaultOptions);\n\n this.configureOptions = configureOptions;\n this.moduleOptions = {};\n this.domElements = [];\n this.popupDiv = {};\n this.popupLimit = 5;\n this.popupHistory = {};\n this.colorPicker = new ColorPicker(pixelRatio);\n this.wrapper = undefined;\n }\n\n /**\n * refresh all options.\n * Because all modules parse their options by themselves, we just use their options. We copy them here.\n *\n * @param {object} options\n */\n setOptions(options) {\n if (options !== undefined) {\n // reset the popup history because the indices may have been changed.\n this.popupHistory = {};\n this._removePopup();\n\n let enabled = true;\n if (typeof options === \"string\") {\n this.options.filter = options;\n } else if (Array.isArray(options)) {\n this.options.filter = options.join();\n } else if (typeof options === \"object\") {\n if (options == null) {\n throw new TypeError(\"options cannot be null\");\n }\n if (options.container !== undefined) {\n this.options.container = options.container;\n }\n if (options.filter !== undefined) {\n this.options.filter = options.filter;\n }\n if (options.showButton !== undefined) {\n this.options.showButton = options.showButton;\n }\n if (options.enabled !== undefined) {\n enabled = options.enabled;\n }\n } else if (typeof options === \"boolean\") {\n this.options.filter = true;\n enabled = options;\n } else if (typeof options === \"function\") {\n this.options.filter = options;\n enabled = true;\n }\n if (this.options.filter === false) {\n enabled = false;\n }\n\n this.options.enabled = enabled;\n }\n this._clean();\n }\n\n /**\n *\n * @param {object} moduleOptions\n */\n setModuleOptions(moduleOptions) {\n this.moduleOptions = moduleOptions;\n if (this.options.enabled === true) {\n this._clean();\n if (this.options.container !== undefined) {\n this.container = this.options.container;\n }\n this._create();\n }\n }\n\n /**\n * Create all DOM elements\n *\n * @private\n */\n _create() {\n this._clean();\n this.changedOptions = [];\n\n const filter = this.options.filter;\n let counter = 0;\n let show = false;\n for (const option in this.configureOptions) {\n if (Object.prototype.hasOwnProperty.call(this.configureOptions, option)) {\n this.allowCreation = false;\n show = false;\n if (typeof filter === \"function\") {\n show = filter(option, []);\n show =\n show ||\n this._handleObject(this.configureOptions[option], [option], true);\n } else if (filter === true || filter.indexOf(option) !== -1) {\n show = true;\n }\n\n if (show !== false) {\n this.allowCreation = true;\n\n // linebreak between categories\n if (counter > 0) {\n this._makeItem([]);\n }\n // a header for the category\n this._makeHeader(option);\n\n // get the sub options\n this._handleObject(this.configureOptions[option], [option]);\n }\n counter++;\n }\n }\n this._makeButton();\n this._push();\n //~ this.colorPicker.insertTo(this.container);\n }\n\n /**\n * draw all DOM elements on the screen\n *\n * @private\n */\n _push() {\n this.wrapper = document.createElement(\"div\");\n this.wrapper.className = \"vis-configuration-wrapper\";\n this.container.appendChild(this.wrapper);\n for (let i = 0; i < this.domElements.length; i++) {\n this.wrapper.appendChild(this.domElements[i]);\n }\n\n this._showPopupIfNeeded();\n }\n\n /**\n * delete all DOM elements\n *\n * @private\n */\n _clean() {\n for (let i = 0; i < this.domElements.length; i++) {\n this.wrapper.removeChild(this.domElements[i]);\n }\n\n if (this.wrapper !== undefined) {\n this.container.removeChild(this.wrapper);\n this.wrapper = undefined;\n }\n this.domElements = [];\n\n this._removePopup();\n }\n\n /**\n * get the value from the actualOptions if it exists\n *\n * @param {Array} path | where to look for the actual option\n * @returns {*}\n * @private\n */\n _getValue(path) {\n let base = this.moduleOptions;\n for (let i = 0; i < path.length; i++) {\n if (base[path[i]] !== undefined) {\n base = base[path[i]];\n } else {\n base = undefined;\n break;\n }\n }\n return base;\n }\n\n /**\n * all option elements are wrapped in an item\n *\n * @param {Array} path | where to look for the actual option\n * @param {Array.<Element>} domElements\n * @returns {number}\n * @private\n */\n _makeItem(path, ...domElements) {\n if (this.allowCreation === true) {\n const item = document.createElement(\"div\");\n item.className =\n \"vis-configuration vis-config-item vis-config-s\" + path.length;\n domElements.forEach((element) => {\n item.appendChild(element);\n });\n this.domElements.push(item);\n return this.domElements.length;\n }\n return 0;\n }\n\n /**\n * header for major subjects\n *\n * @param {string} name\n * @private\n */\n _makeHeader(name) {\n const div = document.createElement(\"div\");\n div.className = \"vis-configuration vis-config-header\";\n div.innerText = name;\n this._makeItem([], div);\n }\n\n /**\n * make a label, if it is an object label, it gets different styling.\n *\n * @param {string} name\n * @param {Array} path | where to look for the actual option\n * @param {string} objectLabel\n * @returns {HTMLElement}\n * @private\n */\n _makeLabel(name, path, objectLabel = false) {\n const div = document.createElement(\"div\");\n div.className =\n \"vis-configuration vis-config-label vis-config-s\" + path.length;\n if (objectLabel === true) {\n while (div.firstChild) {\n div.removeChild(div.firstChild);\n }\n div.appendChild(wrapInTag(\"i\", \"b\", name));\n } else {\n div.innerText = name + \":\";\n }\n return div;\n }\n\n /**\n * make a dropdown list for multiple possible string optoins\n *\n * @param {Array.<number>} arr\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _makeDropdown(arr, value, path) {\n const select = document.createElement(\"select\");\n select.className = \"vis-configuration vis-config-select\";\n let selectedValue = 0;\n if (value !== undefined) {\n if (arr.indexOf(value) !== -1) {\n selectedValue = arr.indexOf(value);\n }\n }\n\n for (let i = 0; i < arr.length; i++) {\n const option = document.createElement(\"option\");\n option.value = arr[i];\n if (i === selectedValue) {\n option.selected = \"selected\";\n }\n option.innerText = arr[i];\n select.appendChild(option);\n }\n\n const me = this;\n select.onchange = function () {\n me._update(this.value, path);\n };\n\n const label = this._makeLabel(path[path.length - 1], path);\n this._makeItem(path, label, select);\n }\n\n /**\n * make a range object for numeric options\n *\n * @param {Array.<number>} arr\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _makeRange(arr, value, path) {\n const defaultValue = arr[0];\n const min = arr[1];\n const max = arr[2];\n const step = arr[3];\n const range = document.createElement(\"input\");\n range.className = \"vis-configuration vis-config-range\";\n try {\n range.type = \"range\"; // not supported on IE9\n range.min = min;\n range.max = max;\n } catch (err) {\n // TODO: Add some error handling.\n }\n range.step = step;\n\n // set up the popup settings in case they are needed.\n let popupString = \"\";\n let popupValue = 0;\n\n if (value !== undefined) {\n const factor = 1.2;\n if (value < 0 && value * factor < min) {\n range.min = Math.ceil(value * factor);\n popupValue = range.min;\n popupString = \"range increased\";\n } else if (value / factor < min) {\n range.min = Math.ceil(value / factor);\n popupValue = range.min;\n popupString = \"range increased\";\n }\n if (value * factor > max && max !== 1) {\n range.max = Math.ceil(value * factor);\n popupValue = range.max;\n popupString = \"range increased\";\n }\n range.value = value;\n } else {\n range.value = defaultValue;\n }\n\n const input = document.createElement(\"input\");\n input.className = \"vis-configuration vis-config-rangeinput\";\n input.value = range.value;\n\n const me = this;\n range.onchange = function () {\n input.value = this.value;\n me._update(Number(this.value), path);\n };\n range.oninput = function () {\n input.value = this.value;\n };\n\n const label = this._makeLabel(path[path.length - 1], path);\n const itemIndex = this._makeItem(path, label, range, input);\n\n // if a popup is needed AND it has not been shown for this value, show it.\n if (popupString !== \"\" && this.popupHistory[itemIndex] !== popupValue) {\n this.popupHistory[itemIndex] = popupValue;\n this._setupPopup(popupString, itemIndex);\n }\n }\n\n /**\n * make a button object\n *\n * @private\n */\n _makeButton() {\n if (this.options.showButton === true) {\n const generateButton = document.createElement(\"div\");\n generateButton.className = \"vis-configuration vis-config-button\";\n generateButton.innerText = \"generate options\";\n generateButton.onclick = () => {\n this._printOptions();\n };\n generateButton.onmouseover = () => {\n generateButton.className = \"vis-configuration vis-config-button hover\";\n };\n generateButton.onmouseout = () => {\n generateButton.className = \"vis-configuration vis-config-button\";\n };\n\n this.optionsContainer = document.createElement(\"div\");\n this.optionsContainer.className =\n \"vis-configuration vis-config-option-container\";\n\n this.domElements.push(this.optionsContainer);\n this.domElements.push(generateButton);\n }\n }\n\n /**\n * prepare the popup\n *\n * @param {string} string\n * @param {number} index\n * @private\n */\n _setupPopup(string, index) {\n if (\n this.initialized === true &&\n this.allowCreation === true &&\n this.popupCounter < this.popupLimit\n ) {\n const div = document.createElement(\"div\");\n div.id = \"vis-configuration-popup\";\n div.className = \"vis-configuration-popup\";\n div.innerText = string;\n div.onclick = () => {\n this._removePopup();\n };\n this.popupCounter += 1;\n this.popupDiv = { html: div, index: index };\n }\n }\n\n /**\n * remove the popup from the dom\n *\n * @private\n */\n _removePopup() {\n if (this.popupDiv.html !== undefined) {\n this.popupDiv.html.parentNode.removeChild(this.popupDiv.html);\n clearTimeout(this.popupDiv.hideTimeout);\n clearTimeout(this.popupDiv.deleteTimeout);\n this.popupDiv = {};\n }\n }\n\n /**\n * Show the popup if it is needed.\n *\n * @private\n */\n _showPopupIfNeeded() {\n if (this.popupDiv.html !== undefined) {\n const correspondingElement = this.domElements[this.popupDiv.index];\n const rect = correspondingElement.getBoundingClientRect();\n this.popupDiv.html.style.left = rect.left + \"px\";\n this.popupDiv.html.style.top = rect.top - 30 + \"px\"; // 30 is the height;\n document.body.appendChild(this.popupDiv.html);\n this.popupDiv.hideTimeout = setTimeout(() => {\n this.popupDiv.html.style.opacity = 0;\n }, 1500);\n this.popupDiv.deleteTimeout = setTimeout(() => {\n this._removePopup();\n }, 1800);\n }\n }\n\n /**\n * make a checkbox for boolean options.\n *\n * @param {number} defaultValue\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _makeCheckbox(defaultValue, value, path) {\n const checkbox = document.createElement(\"input\");\n checkbox.type = \"checkbox\";\n checkbox.className = \"vis-configuration vis-config-checkbox\";\n checkbox.checked = defaultValue;\n if (value !== undefined) {\n checkbox.checked = value;\n if (value !== defaultValue) {\n if (typeof defaultValue === \"object\") {\n if (value !== defaultValue.enabled) {\n this.changedOptions.push({ path: path, value: value });\n }\n } else {\n this.changedOptions.push({ path: path, value: value });\n }\n }\n }\n\n const me = this;\n checkbox.onchange = function () {\n me._update(this.checked, path);\n };\n\n const label = this._makeLabel(path[path.length - 1], path);\n this._makeItem(path, label, checkbox);\n }\n\n /**\n * make a text input field for string options.\n *\n * @param {number} defaultValue\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _makeTextInput(defaultValue, value, path) {\n const checkbox = document.createElement(\"input\");\n checkbox.type = \"text\";\n checkbox.className = \"vis-configuration vis-config-text\";\n checkbox.value = value;\n if (value !== defaultValue) {\n this.changedOptions.push({ path: path, value: value });\n }\n\n const me = this;\n checkbox.onchange = function () {\n me._update(this.value, path);\n };\n\n const label = this._makeLabel(path[path.length - 1], path);\n this._makeItem(path, label, checkbox);\n }\n\n /**\n * make a color field with a color picker for color fields\n *\n * @param {Array.<number>} arr\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _makeColorField(arr, value, path) {\n const defaultColor = arr[1];\n const div = document.createElement(\"div\");\n value = value === undefined ? defaultColor : value;\n\n if (value !== \"none\") {\n div.className = \"vis-configuration vis-config-colorBlock\";\n div.style.backgroundColor = value;\n } else {\n div.className = \"vis-configuration vis-config-colorBlock none\";\n }\n\n value = value === undefined ? defaultColor : value;\n div.onclick = () => {\n this._showColorPicker(value, div, path);\n };\n\n const label = this._makeLabel(path[path.length - 1], path);\n this._makeItem(path, label, div);\n }\n\n /**\n * used by the color buttons to call the color picker.\n *\n * @param {number} value\n * @param {HTMLElement} div\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _showColorPicker(value, div, path) {\n // clear the callback from this div\n div.onclick = function () {};\n\n this.colorPicker.insertTo(div);\n this.colorPicker.show();\n\n this.colorPicker.setColor(value);\n this.colorPicker.setUpdateCallback((color) => {\n const colorString =\n \"rgba(\" + color.r + \",\" + color.g + \",\" + color.b + \",\" + color.a + \")\";\n div.style.backgroundColor = colorString;\n this._update(colorString, path);\n });\n\n // on close of the colorpicker, restore the callback.\n this.colorPicker.setCloseCallback(() => {\n div.onclick = () => {\n this._showColorPicker(value, div, path);\n };\n });\n }\n\n /**\n * parse an object and draw the correct items\n *\n * @param {object} obj\n * @param {Array} [path=[]] | where to look for the actual option\n * @param {boolean} [checkOnly=false]\n * @returns {boolean}\n * @private\n */\n _handleObject(obj, path = [], checkOnly = false) {\n let show = false;\n const filter = this.options.filter;\n let visibleInSet = false;\n for (const subObj in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, subObj)) {\n show = true;\n const item = obj[subObj];\n const newPath = copyAndExtendArray(path, subObj);\n if (typeof filter === \"function\") {\n show = filter(subObj, path);\n\n // if needed we must go deeper into the object.\n if (show === false) {\n if (\n !Array.isArray(item) &&\n typeof item !== \"string\" &&\n typeof item !== \"boolean\" &&\n item instanceof Object\n ) {\n this.allowCreation = false;\n show = this._handleObject(item, newPath, true);\n this.allowCreation = checkOnly === false;\n }\n }\n }\n\n if (show !== false) {\n visibleInSet = true;\n const value = this._getValue(newPath);\n\n if (Array.isArray(item)) {\n this._handleArray(item, value, newPath);\n } else if (typeof item === \"string\") {\n this._makeTextInput(item, value, newPath);\n } else if (typeof item === \"boolean\") {\n this._makeCheckbox(item, value, newPath);\n } else if (item instanceof Object) {\n // skip the options that are not enabled\n if (!this.hideOption(path, subObj, this.moduleOptions)) {\n // initially collapse options with an disabled enabled option.\n if (item.enabled !== undefined) {\n const enabledPath = copyAndExtendArray(newPath, \"enabled\");\n const enabledValue = this._getValue(enabledPath);\n if (enabledValue === true) {\n const label = this._makeLabel(subObj, newPath, true);\n this._makeItem(newPath, label);\n visibleInSet =\n this._handleObject(item, newPath) || visibleInSet;\n } else {\n this._makeCheckbox(item, enabledValue, newPath);\n }\n } else {\n const label = this._makeLabel(subObj, newPath, true);\n this._makeItem(newPath, label);\n visibleInSet =\n this._handleObject(item, newPath) || visibleInSet;\n }\n }\n } else {\n console.error(\"dont know how to handle\", item, subObj, newPath);\n }\n }\n }\n }\n return visibleInSet;\n }\n\n /**\n * handle the array type of option\n *\n * @param {Array.<number>} arr\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _handleArray(arr, value, path) {\n if (typeof arr[0] === \"string\" && arr[0] === \"color\") {\n this._makeColorField(arr, value, path);\n if (arr[1] !== value) {\n this.changedOptions.push({ path: path, value: value });\n }\n } else if (typeof arr[0] === \"string\") {\n this._makeDropdown(arr, value, path);\n if (arr[0] !== value) {\n this.changedOptions.push({ path: path, value: value });\n }\n } else if (typeof arr[0] === \"number\") {\n this._makeRange(arr, value, path);\n if (arr[0] !== value) {\n this.changedOptions.push({ path: path, value: Number(value) });\n }\n }\n }\n\n /**\n * called to update the network with the new settings.\n *\n * @param {number} value\n * @param {Array} path | where to look for the actual option\n * @private\n */\n _update(value, path) {\n const options = this._constructOptions(value, path);\n\n if (\n this.parent.body &&\n this.parent.body.emitter &&\n this.parent.body.emitter.emit\n ) {\n this.parent.body.emitter.emit(\"configChange\", options);\n }\n this.initialized = true;\n this.parent.setOptions(options);\n }\n\n /**\n *\n * @param {string | boolean} value\n * @param {Array.<string>} path\n * @param {{}} optionsObj\n * @returns {{}}\n * @private\n */\n _constructOptions(value, path, optionsObj = {}) {\n let pointer = optionsObj;\n\n // when dropdown boxes can be string or boolean, we typecast it into correct types\n value = value === \"true\" ? true : value;\n value = value === \"false\" ? false : value;\n\n for (let i = 0; i < path.length; i++) {\n if (path[i] !== \"global\") {\n if (pointer[path[i]] === undefined) {\n pointer[path[i]] = {};\n }\n if (i !== path.length - 1) {\n pointer = pointer[path[i]];\n } else {\n pointer[path[i]] = value;\n }\n }\n }\n return optionsObj;\n }\n\n /**\n * @private\n */\n _printOptions() {\n const options = this.getOptions();\n\n while (this.optionsContainer.firstChild) {\n this.optionsContainer.removeChild(this.optionsContainer.firstChild);\n }\n this.optionsContainer.appendChild(\n wrapInTag(\"pre\", \"const options = \" + JSON.stringify(options, null, 2))\n );\n }\n\n /**\n *\n * @returns {{}} options\n */\n getOptions() {\n const options = {};\n for (let i = 0; i < this.changedOptions.length; i++) {\n this._constructOptions(\n this.changedOptions[i].value,\n this.changedOptions[i].path,\n options\n );\n }\n return options;\n }\n}\n\n/**\n * Popup is a class to create a popup window with some text\n */\nclass Popup {\n /**\n * @param {Element} container The container object.\n * @param {string} overflowMethod How the popup should act to overflowing ('flip' or 'cap')\n */\n constructor(container, overflowMethod) {\n this.container = container;\n this.overflowMethod = overflowMethod || \"cap\";\n\n this.x = 0;\n this.y = 0;\n this.padding = 5;\n this.hidden = false;\n\n // create the frame\n this.frame = document.createElement(\"div\");\n this.frame.className = \"vis-tooltip\";\n this.container.appendChild(this.frame);\n }\n\n /**\n * @param {number} x Horizontal position of the popup window\n * @param {number} y Vertical position of the popup window\n */\n setPosition(x, y) {\n this.x = parseInt(x);\n this.y = parseInt(y);\n }\n\n /**\n * Set the content for the popup window. This can be HTML code or text.\n *\n * @param {string | Element} content\n */\n setText(content) {\n if (content instanceof Element) {\n while (this.frame.firstChild) {\n this.frame.removeChild(this.frame.firstChild);\n }\n this.frame.appendChild(content);\n } else {\n // String containing literal text, element has to be used for HTML due to\n // XSS risks associated with innerHTML (i.e. prevent XSS by accident).\n this.frame.innerText = content;\n }\n }\n\n /**\n * Show the popup window\n *\n * @param {boolean} [doShow] Show or hide the window\n */\n show(doShow) {\n if (doShow === undefined) {\n doShow = true;\n }\n\n if (doShow === true) {\n const height = this.frame.clientHeight;\n const width = this.frame.clientWidth;\n const maxHeight = this.frame.parentNode.clientHeight;\n const maxWidth = this.frame.parentNode.clientWidth;\n\n let left = 0,\n top = 0;\n\n if (this.overflowMethod == \"flip\") {\n let isLeft = false,\n isTop = true; // Where around the position it's located\n\n if (this.y - height < this.padding) {\n isTop = false;\n }\n\n if (this.x + width > maxWidth - this.padding) {\n isLeft = true;\n }\n\n if (isLeft) {\n left = this.x - width;\n } else {\n left = this.x;\n }\n\n if (isTop) {\n top = this.y - height;\n } else {\n top = this.y;\n }\n } else {\n top = this.y - height;\n if (top + height + this.padding > maxHeight) {\n top = maxHeight - height - this.padding;\n }\n if (top < this.padding) {\n top = this.padding;\n }\n\n left = this.x;\n if (left + width + this.padding > maxWidth) {\n left = maxWidth - width - this.padding;\n }\n if (left < this.padding) {\n left = this.padding;\n }\n }\n\n this.frame.style.left = left + \"px\";\n this.frame.style.top = top + \"px\";\n this.frame.style.visibility = \"visible\";\n this.hidden = false;\n } else {\n this.hide();\n }\n }\n\n /**\n * Hide the popup window\n */\n hide() {\n this.hidden = true;\n this.frame.style.left = \"0\";\n this.frame.style.top = \"0\";\n this.frame.style.visibility = \"hidden\";\n }\n\n /**\n * Remove the popup window\n */\n destroy() {\n this.frame.parentNode.removeChild(this.frame); // Remove element from DOM\n }\n}\n\nlet errorFound = false;\nlet allOptions;\n\nconst VALIDATOR_PRINT_STYLE = \"background: #FFeeee; color: #dd0000\";\n\n/**\n * Used to validate options.\n */\nclass Validator {\n /**\n * Main function to be called\n *\n * @param {object} options\n * @param {object} referenceOptions\n * @param {object} subObject\n * @returns {boolean}\n * @static\n */\n static validate(options, referenceOptions, subObject) {\n errorFound = false;\n allOptions = referenceOptions;\n let usedOptions = referenceOptions;\n if (subObject !== undefined) {\n usedOptions = referenceOptions[subObject];\n }\n Validator.parse(options, usedOptions, []);\n return errorFound;\n }\n\n /**\n * Will traverse an object recursively and check every value\n *\n * @param {object} options\n * @param {object} referenceOptions\n * @param {Array} path | where to look for the actual option\n * @static\n */\n static parse(options, referenceOptions, path) {\n for (const option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option)) {\n Validator.check(option, options, referenceOptions, path);\n }\n }\n }\n\n /**\n * Check every value. If the value is an object, call the parse function on that object.\n *\n * @param {string} option\n * @param {object} options\n * @param {object} referenceOptions\n * @param {Array} path | where to look for the actual option\n * @static\n */\n static check(option, options, referenceOptions, path) {\n if (\n referenceOptions[option] === undefined &&\n referenceOptions.__any__ === undefined\n ) {\n Validator.getSuggestion(option, referenceOptions, path);\n return;\n }\n\n let referenceOption = option;\n let is_object = true;\n\n if (\n referenceOptions[option] === undefined &&\n referenceOptions.__any__ !== undefined\n ) {\n // NOTE: This only triggers if the __any__ is in the top level of the options object.\n // THAT'S A REALLY BAD PLACE TO ALLOW IT!!!!\n // TODO: Examine if needed, remove if possible\n\n // __any__ is a wildcard. Any value is accepted and will be further analysed by reference.\n referenceOption = \"__any__\";\n\n // if the any-subgroup is not a predefined object in the configurator,\n // we do not look deeper into the object.\n is_object = Validator.getType(options[option]) === \"object\";\n }\n\n let refOptionObj = referenceOptions[referenceOption];\n if (is_object && refOptionObj.__type__ !== undefined) {\n refOptionObj = refOptionObj.__type__;\n }\n\n Validator.checkFields(\n option,\n options,\n referenceOptions,\n referenceOption,\n refOptionObj,\n path\n );\n }\n\n /**\n *\n * @param {string} option | the option property\n * @param {object} options | The supplied options object\n * @param {object} referenceOptions | The reference options containing all options and their allowed formats\n * @param {string} referenceOption | Usually this is the same as option, except when handling an __any__ tag.\n * @param {string} refOptionObj | This is the type object from the reference options\n * @param {Array} path | where in the object is the option\n * @static\n */\n static checkFields(\n option,\n options,\n referenceOptions,\n referenceOption,\n refOptionObj,\n path\n ) {\n const log = function (message) {\n console.error(\n \"%c\" + message + Validator.printLocation(path, option),\n VALIDATOR_PRINT_STYLE\n );\n };\n\n const optionType = Validator.getType(options[option]);\n const refOptionType = refOptionObj[optionType];\n\n if (refOptionType !== undefined) {\n // if the type is correct, we check if it is supposed to be one of a few select values\n if (\n Validator.getType(refOptionType) === \"array\" &&\n refOptionType.indexOf(options[option]) === -1\n ) {\n log(\n 'Invalid option detected in \"' +\n option +\n '\".' +\n \" Allowed values are:\" +\n Validator.print(refOptionType) +\n ' not \"' +\n options[option] +\n '\". '\n );\n errorFound = true;\n } else if (optionType === \"object\" && referenceOption !== \"__any__\") {\n path = copyAndExtendArray(path, option);\n Validator.parse(\n options[option],\n referenceOptions[referenceOption],\n path\n );\n }\n } else if (refOptionObj[\"any\"] === undefined) {\n // type of the field is incorrect and the field cannot be any\n log(\n 'Invalid type received for \"' +\n option +\n '\". Expected: ' +\n Validator.print(Object.keys(refOptionObj)) +\n \". Received [\" +\n optionType +\n '] \"' +\n options[option] +\n '\"'\n );\n errorFound = true;\n }\n }\n\n /**\n *\n * @param {object | boolean | number | string | Array.<number> | Date | Node | Moment | undefined | null} object\n * @returns {string}\n * @static\n */\n static getType(object) {\n const type = typeof object;\n\n if (type === \"object\") {\n if (object === null) {\n return \"null\";\n }\n if (object instanceof Boolean) {\n return \"boolean\";\n }\n if (object instanceof Number) {\n return \"number\";\n }\n if (object instanceof String) {\n return \"string\";\n }\n if (Array.isArray(object)) {\n return \"array\";\n }\n if (object instanceof Date) {\n return \"date\";\n }\n if (object.nodeType !== undefined) {\n return \"dom\";\n }\n if (object._isAMomentObject === true) {\n return \"moment\";\n }\n return \"object\";\n } else if (type === \"number\") {\n return \"number\";\n } else if (type === \"boolean\") {\n return \"boolean\";\n } else if (type === \"string\") {\n return \"string\";\n } else if (type === undefined) {\n return \"undefined\";\n }\n return type;\n }\n\n /**\n * @param {string} option\n * @param {object} options\n * @param {Array.<string>} path\n * @static\n */\n static getSuggestion(option, options, path) {\n const localSearch = Validator.findInOptions(option, options, path, false);\n const globalSearch = Validator.findInOptions(option, allOptions, [], true);\n\n const localSearchThreshold = 8;\n const globalSearchThreshold = 4;\n\n let msg;\n if (localSearch.indexMatch !== undefined) {\n msg =\n \" in \" +\n Validator.printLocation(localSearch.path, option, \"\") +\n 'Perhaps it was incomplete? Did you mean: \"' +\n localSearch.indexMatch +\n '\"?\\n\\n';\n } else if (\n globalSearch.distance <= globalSearchThreshold &&\n localSearch.distance > globalSearch.distance\n ) {\n msg =\n \" in \" +\n Validator.printLocation(localSearch.path, option, \"\") +\n \"Perhaps it was misplaced? Matching option found at: \" +\n Validator.printLocation(\n globalSearch.path,\n globalSearch.closestMatch,\n \"\"\n );\n } else if (localSearch.distance <= localSearchThreshold) {\n msg =\n '. Did you mean \"' +\n localSearch.closestMatch +\n '\"?' +\n Validator.printLocation(localSearch.path, option);\n } else {\n msg =\n \". Did you mean one of these: \" +\n Validator.print(Object.keys(options)) +\n Validator.printLocation(path, option);\n }\n\n console.error(\n '%cUnknown option detected: \"' + option + '\"' + msg,\n VALIDATOR_PRINT_STYLE\n );\n errorFound = true;\n }\n\n /**\n * traverse the options in search for a match.\n *\n * @param {string} option\n * @param {object} options\n * @param {Array} path | where to look for the actual option\n * @param {boolean} [recursive=false]\n * @returns {{closestMatch: string, path: Array, distance: number}}\n * @static\n */\n static findInOptions(option, options, path, recursive = false) {\n let min = 1e9;\n let closestMatch = \"\";\n let closestMatchPath = [];\n const lowerCaseOption = option.toLowerCase();\n let indexMatch = undefined;\n for (const op in options) {\n let distance;\n if (options[op].__type__ !== undefined && recursive === true) {\n const result = Validator.findInOptions(\n option,\n options[op],\n copyAndExtendArray(path, op)\n );\n if (min > result.distance) {\n closestMatch = result.closestMatch;\n closestMatchPath = result.path;\n min = result.distance;\n indexMatch = result.indexMatch;\n }\n } else {\n if (op.toLowerCase().indexOf(lowerCaseOption) !== -1) {\n indexMatch = op;\n }\n distance = Validator.levenshteinDistance(option, op);\n if (min > distance) {\n closestMatch = op;\n closestMatchPath = copyArray(path);\n min = distance;\n }\n }\n }\n return {\n closestMatch: closestMatch,\n path: closestMatchPath,\n distance: min,\n indexMatch: indexMatch,\n };\n }\n\n /**\n * @param {Array.<string>} path\n * @param {object} option\n * @param {string} prefix\n * @returns {string}\n * @static\n */\n static printLocation(path, option, prefix = \"Problem value found at: \\n\") {\n let str = \"\\n\\n\" + prefix + \"options = {\\n\";\n for (let i = 0; i < path.length; i++) {\n for (let j = 0; j < i + 1; j++) {\n str += \" \";\n }\n str += path[i] + \": {\\n\";\n }\n for (let j = 0; j < path.length + 1; j++) {\n str += \" \";\n }\n str += option + \"\\n\";\n for (let i = 0; i < path.length + 1; i++) {\n for (let j = 0; j < path.length - i; j++) {\n str += \" \";\n }\n str += \"}\\n\";\n }\n return str + \"\\n\\n\";\n }\n\n /**\n * @param {object} options\n * @returns {string}\n * @static\n */\n static print(options) {\n return JSON.stringify(options)\n .replace(/(\")|(\\[)|(\\])|(,\"__type__\")/g, \"\")\n .replace(/(,)/g, \", \");\n }\n\n /**\n * Compute the edit distance between the two given strings\n * http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#JavaScript\n *\n * Copyright (c) 2011 Andrei Mackenzie\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n * @param {string} a\n * @param {string} b\n * @returns {Array.<Array.<number>>}}\n * @static\n */\n static levenshteinDistance(a, b) {\n if (a.length === 0) return b.length;\n if (b.length === 0) return a.length;\n\n const matrix = [];\n\n // increment along the first column of each row\n let i;\n for (i = 0; i <= b.length; i++) {\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n let j;\n for (j = 0; j <= a.length; j++) {\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for (i = 1; i <= b.length; i++) {\n for (j = 1; j <= a.length; j++) {\n if (b.charAt(i - 1) == a.charAt(j - 1)) {\n matrix[i][j] = matrix[i - 1][j - 1];\n } else {\n matrix[i][j] = Math.min(\n matrix[i - 1][j - 1] + 1, // substitution\n Math.min(\n matrix[i][j - 1] + 1, // insertion\n matrix[i - 1][j] + 1\n )\n ); // deletion\n }\n }\n }\n\n return matrix[b.length][a.length];\n }\n}\n\nconst Activator$1 = Activator;\r\nconst ColorPicker$1 = ColorPicker;\r\nconst Configurator$1 = Configurator;\r\nconst Hammer$1 = Hammer;\r\nconst Popup$1 = Popup;\r\nconst VALIDATOR_PRINT_STYLE$1 = VALIDATOR_PRINT_STYLE;\r\nconst Validator$1 = Validator;\n\nexport { Activator$1 as Activator, Alea, ColorPicker$1 as ColorPicker, Configurator$1 as Configurator, DELETE, HSVToHex, HSVToRGB, Hammer$1 as Hammer, Popup$1 as Popup, RGBToHSV, RGBToHex, VALIDATOR_PRINT_STYLE$1 as VALIDATOR_PRINT_STYLE, Validator$1 as Validator, addClassName, addCssText, addEventListener, binarySearchCustom, binarySearchValue, bridgeObject, copyAndExtendArray, copyArray, deepExtend, deepObjectAssign, easingFunctions, equalArray, extend, fillIfDefined, forEach, getAbsoluteLeft, getAbsoluteRight, getAbsoluteTop, getScrollBarWidth, getTarget, getType, hasParent, hexToHSV, hexToRGB, insertSort, isDate, isNumber, isObject, isString, isValidHex, isValidRGB, isValidRGBA, mergeOptions, option, overrideOpacity, parseColor, preventDefault, pureDeepObjectAssign, recursiveDOMDelete, removeClassName, removeCssText, removeEventListener, selectiveBridgeObject, selectiveDeepExtend, selectiveExtend, selectiveNotDeepExtend, throttle, toArray, topMost, updateProperty };\n//# sourceMappingURL=vis-util.js.map\n","// DOM utility methods\n\n/**\n * this prepares the JSON container for allocating SVG elements\n * @param {Object} JSONcontainer\n * @private\n */\nexports.prepareElements = function(JSONcontainer) {\n // cleanup the redundant svgElements;\n for (var elementType in JSONcontainer) {\n if (JSONcontainer.hasOwnProperty(elementType)) {\n JSONcontainer[elementType].redundant = JSONcontainer[elementType].used;\n JSONcontainer[elementType].used = [];\n }\n }\n};\n\n/**\n * this cleans up all the unused SVG elements. By asking for the parentNode, we only need to supply the JSON container from\n * which to remove the redundant elements.\n *\n * @param {Object} JSONcontainer\n * @private\n */\nexports.cleanupElements = function(JSONcontainer) {\n // cleanup the redundant svgElements;\n for (var elementType in JSONcontainer) {\n if (JSONcontainer.hasOwnProperty(elementType)) {\n if (JSONcontainer[elementType].redundant) {\n for (var i = 0; i < JSONcontainer[elementType].redundant.length; i++) {\n JSONcontainer[elementType].redundant[i].parentNode.removeChild(JSONcontainer[elementType].redundant[i]);\n }\n JSONcontainer[elementType].redundant = [];\n }\n }\n }\n};\n\n/**\n * Ensures that all elements are removed first up so they can be recreated cleanly\n * @param {Object} JSONcontainer\n */\nexports.resetElements = function(JSONcontainer) {\n exports.prepareElements(JSONcontainer);\n exports.cleanupElements(JSONcontainer);\n exports.prepareElements(JSONcontainer);\n};\n\n/**\n * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer\n * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this.\n *\n * @param {string} elementType\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @returns {Element}\n * @private\n */\nexports.getSVGElement = function (elementType, JSONcontainer, svgContainer) {\n var element;\n // allocate SVG element, if it doesnt yet exist, create one.\n if (JSONcontainer.hasOwnProperty(elementType)) { // this element has been created before\n // check if there is an redundant element\n if (JSONcontainer[elementType].redundant.length > 0) {\n element = JSONcontainer[elementType].redundant[0];\n JSONcontainer[elementType].redundant.shift();\n }\n else {\n // create a new element and add it to the SVG\n element = document.createElementNS('http://www.w3.org/2000/svg', elementType);\n svgContainer.appendChild(element);\n }\n }\n else {\n // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it.\n element = document.createElementNS('http://www.w3.org/2000/svg', elementType);\n JSONcontainer[elementType] = {used: [], redundant: []};\n svgContainer.appendChild(element);\n }\n JSONcontainer[elementType].used.push(element);\n return element;\n};\n\n\n/**\n * Allocate or generate an SVG element if needed. Store a reference to it in the JSON container and draw it in the svgContainer\n * the JSON container and the SVG container have to be supplied so other svg containers (like the legend) can use this.\n *\n * @param {string} elementType\n * @param {Object} JSONcontainer\n * @param {Element} DOMContainer\n * @param {Element} insertBefore\n * @returns {*}\n */\nexports.getDOMElement = function (elementType, JSONcontainer, DOMContainer, insertBefore) {\n var element;\n // allocate DOM element, if it doesnt yet exist, create one.\n if (JSONcontainer.hasOwnProperty(elementType)) { // this element has been created before\n // check if there is an redundant element\n if (JSONcontainer[elementType].redundant.length > 0) {\n element = JSONcontainer[elementType].redundant[0];\n JSONcontainer[elementType].redundant.shift();\n }\n else {\n // create a new element and add it to the SVG\n element = document.createElement(elementType);\n if (insertBefore !== undefined) {\n DOMContainer.insertBefore(element, insertBefore);\n }\n else {\n DOMContainer.appendChild(element);\n }\n }\n }\n else {\n // create a new element and add it to the SVG, also create a new object in the svgElements to keep track of it.\n element = document.createElement(elementType);\n JSONcontainer[elementType] = {used: [], redundant: []};\n if (insertBefore !== undefined) {\n DOMContainer.insertBefore(element, insertBefore);\n }\n else {\n DOMContainer.appendChild(element);\n }\n }\n JSONcontainer[elementType].used.push(element);\n return element;\n};\n\n\n\n\n/**\n * Draw a point object. This is a separate function because it can also be called by the legend.\n * The reason the JSONcontainer and the target SVG svgContainer have to be supplied is so the legend can use these functions\n * as well.\n *\n * @param {number} x\n * @param {number} y\n * @param {Object} groupTemplate: A template containing the necessary information to draw the datapoint e.g., {style: 'circle', size: 5, className: 'className' }\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @param {Object} labelObj\n * @returns {vis.PointItem}\n */\nexports.drawPoint = function(x, y, groupTemplate, JSONcontainer, svgContainer, labelObj) {\n var point;\n if (groupTemplate.style == 'circle') {\n point = exports.getSVGElement('circle', JSONcontainer, svgContainer);\n point.setAttributeNS(null, \"cx\", x);\n point.setAttributeNS(null, \"cy\", y);\n point.setAttributeNS(null, \"r\", 0.5 * groupTemplate.size);\n }\n else {\n point = exports.getSVGElement('rect', JSONcontainer, svgContainer);\n point.setAttributeNS(null, \"x\", x - 0.5 * groupTemplate.size);\n point.setAttributeNS(null, \"y\", y - 0.5 * groupTemplate.size);\n point.setAttributeNS(null, \"width\", groupTemplate.size);\n point.setAttributeNS(null, \"height\", groupTemplate.size);\n }\n\n if (groupTemplate.styles !== undefined) {\n point.setAttributeNS(null, \"style\", groupTemplate.styles);\n }\n point.setAttributeNS(null, \"class\", groupTemplate.className + \" vis-point\");\n //handle label\n\n\n if (labelObj) {\n var label = exports.getSVGElement('text', JSONcontainer, svgContainer);\n if (labelObj.xOffset) {\n x = x + labelObj.xOffset;\n }\n\n if (labelObj.yOffset) {\n y = y + labelObj.yOffset;\n }\n if (labelObj.content) {\n label.textContent = labelObj.content;\n }\n\n if (labelObj.className) {\n label.setAttributeNS(null, \"class\", labelObj.className + \" vis-label\");\n }\n label.setAttributeNS(null, \"x\", x);\n label.setAttributeNS(null, \"y\", y);\n }\n\n return point;\n};\n\n/**\n * draw a bar SVG element centered on the X coordinate\n *\n * @param {number} x\n * @param {number} y\n * @param {number} width\n * @param {number} height\n * @param {string} className\n * @param {Object} JSONcontainer\n * @param {Object} svgContainer\n * @param {string} style\n */\nexports.drawBar = function (x, y, width, height, className, JSONcontainer, svgContainer, style) {\n if (height != 0) {\n if (height < 0) {\n height *= -1;\n y -= height;\n }\n var rect = exports.getSVGElement('rect',JSONcontainer, svgContainer);\n rect.setAttributeNS(null, \"x\", x - 0.5 * width);\n rect.setAttributeNS(null, \"y\", y);\n rect.setAttributeNS(null, \"width\", width);\n rect.setAttributeNS(null, \"height\", height);\n rect.setAttributeNS(null, \"class\", className);\n if (style) {\n rect.setAttributeNS(null, \"style\", style);\n }\n }\n};","var $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar aFunction = require('../internals/a-function');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar bind = require('../internals/function-bind');\nvar fails = require('../internals/fails');\n\nvar nativeConstruct = getBuiltIn('Reflect', 'construct');\n\n// `Reflect.construct` method\n// https://tc39.es/ecma262/#sec-reflect.construct\n// MS Edge supports only 2 arguments and argumentsList argument is optional\n// FF Nightly sets third argument as `new.target`, but does not create `this` from it\nvar NEW_TARGET_BUG = fails(function () {\n function F() { /* empty */ }\n return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);\n});\nvar ARGS_BUG = !fails(function () {\n nativeConstruct(function () { /* empty */ });\n});\nvar FORCED = NEW_TARGET_BUG || ARGS_BUG;\n\n$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {\n construct: function construct(Target, args /* , newTarget */) {\n aFunction(Target);\n anObject(args);\n var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);\n if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);\n if (Target == newTarget) {\n // w/o altered newTarget, optimization for 0-4 arguments\n switch (args.length) {\n case 0: return new Target();\n case 1: return new Target(args[0]);\n case 2: return new Target(args[0], args[1]);\n case 3: return new Target(args[0], args[1], args[2]);\n case 4: return new Target(args[0], args[1], args[2], args[3]);\n }\n // w/o altered newTarget, lot of arguments case\n var $args = [null];\n $args.push.apply($args, args);\n return new (bind.apply(Target, $args))();\n }\n // with altered newTarget, not support built-in constructors\n var proto = newTarget.prototype;\n var instance = create(isObject(proto) ? proto : Object.prototype);\n var result = Function.apply.call(Target, instance, args);\n return isObject(result) ? result : instance;\n }\n});\n","require('../../modules/es.reflect.construct');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Reflect.construct;\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var parent = require('../../stable/object/create');\n\nmodule.exports = parent;\n","var $ = require('../internals/export');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n$({ target: 'Object', stat: true }, {\n setPrototypeOf: setPrototypeOf\n});\n","require('../../modules/es.object.set-prototype-of');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.setPrototypeOf;\n","var _Object$setPrototypeOf = require(\"@babel/runtime-corejs3/core-js/object/set-prototype-of\");\n\nfunction _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = _Object$setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var _Object$create = require(\"@babel/runtime-corejs3/core-js/object/create\");\n\nvar setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = _Object$create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var _typeof = require(\"@babel/runtime-corejs3/helpers/typeof\")[\"default\"];\n\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var parent = require('../../stable/object/get-prototype-of');\n\nmodule.exports = parent;\n","var _Object$setPrototypeOf = require(\"@babel/runtime-corejs3/core-js/object/set-prototype-of\");\n\nvar _Object$getPrototypeOf = require(\"@babel/runtime-corejs3/core-js/object/get-prototype-of\");\n\nfunction _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = _Object$setPrototypeOf ? _Object$getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || _Object$getPrototypeOf(o);\n };\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","var aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n","var classof = require('../internals/classof-raw');\nvar global = require('../internals/global');\n\nmodule.exports = classof(global.process) == 'process';\n","'use strict';\nvar $ = require('../internals/export');\nvar $reduce = require('../internals/array-reduce').left;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar CHROME_VERSION = require('../internals/engine-v8-version');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduce');\n// Chrome 80-82 has a critical bug\n// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\nvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\n\n// `Array.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {\n reduce: function reduce(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","require('../../../modules/es.array.reduce');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').reduce;\n","var reduce = require('../array/virtual/reduce');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.reduce;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.reduce) ? reduce : own;\n};\n","'use strict';\nvar isArray = require('../internals/is-array');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\n\n// `FlattenIntoArray` abstract operation\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? bind(mapper, thisArg, 3) : false;\n var element;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n if (depth > 0 && isArray(element)) {\n targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;\n } else {\n if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n};\n\nmodule.exports = flattenIntoArray;\n","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar aFunction = require('../internals/a-function');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flatMap` method\n// https://tc39.es/ecma262/#sec-array.prototype.flatmap\n$({ target: 'Array', proto: true }, {\n flatMap: function flatMap(callbackfn /* , thisArg */) {\n var O = toObject(this);\n var sourceLen = toLength(O.length);\n var A;\n aFunction(callbackfn);\n A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return A;\n }\n});\n","require('../../../modules/es.array.flat-map');\nrequire('../../../modules/es.array.unscopables.flat-map');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').flatMap;\n","var flatMap = require('../array/virtual/flat-map');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.flatMap;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.flatMap) ? flatMap : own;\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing\n return Object.isExtensible(Object.preventExtensions({}));\n});\n","var $ = require('../internals/export');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternalModule = require('../internals/object-get-own-property-names-external');\nvar uid = require('../internals/uid');\nvar FREEZING = require('../internals/freezing');\n\nvar REQUIRED = false;\nvar METADATA = uid('meta');\nvar id = 0;\n\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\n\nvar setMetadata = function (it) {\n defineProperty(it, METADATA, { value: {\n objectID: 'O' + id++, // object ID\n weakData: {} // weak collections IDs\n } });\n};\n\nvar fastKey = function (it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMetadata(it);\n // return object ID\n } return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMetadata(it);\n // return the store of weak collections IDs\n } return it[METADATA].weakData;\n};\n\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZING && REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);\n return it;\n};\n\nvar enable = function () {\n meta.enable = function () { /* empty */ };\n REQUIRED = true;\n var getOwnPropertyNames = getOwnPropertyNamesModule.f;\n var splice = [].splice;\n var test = {};\n test[METADATA] = 1;\n\n // prevent exposing of metadata key\n if (getOwnPropertyNames(test).length) {\n getOwnPropertyNamesModule.f = function (it) {\n var result = getOwnPropertyNames(it);\n for (var i = 0, length = result.length; i < length; i++) {\n if (result[i] === METADATA) {\n splice.call(result, i, 1);\n break;\n }\n } return result;\n };\n\n $({ target: 'Object', stat: true, forced: true }, {\n getOwnPropertyNames: getOwnPropertyNamesExternalModule.f\n });\n }\n};\n\nvar meta = module.exports = {\n enable: enable,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n};\n\nhiddenKeys[METADATA] = true;\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = iterFn.call(iterable);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator);\n throw error;\n }\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n","module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n","'use strict';\nvar $ = require('./export');\nvar global = require('../internals/global');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar fails = require('../internals/fails');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isObject = require('../internals/is-object');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar defineProperty = require('../internals/object-define-property').f;\nvar forEach = require('../internals/array-iteration').forEach;\nvar DESCRIPTORS = require('../internals/descriptors');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n var ADDER = IS_MAP ? 'set' : 'add';\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var exported = {};\n var Constructor;\n\n if (!DESCRIPTORS || typeof NativeConstructor != 'function'\n || !(IS_WEAK || NativePrototype.forEach && !fails(function () { new NativeConstructor().entries().next(); }))\n ) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.enable();\n } else {\n Constructor = wrapper(function (target, iterable) {\n setInternalState(anInstance(target, Constructor, CONSTRUCTOR_NAME), {\n type: CONSTRUCTOR_NAME,\n collection: new NativeConstructor()\n });\n if (iterable != undefined) iterate(iterable, target[ADDER], { that: target, AS_ENTRIES: IS_MAP });\n });\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n forEach(['add', 'clear', 'delete', 'forEach', 'get', 'has', 'set', 'keys', 'values', 'entries'], function (KEY) {\n var IS_ADDER = KEY == 'add' || KEY == 'set';\n if (KEY in NativePrototype && !(IS_WEAK && KEY == 'clear')) {\n createNonEnumerableProperty(Constructor.prototype, KEY, function (a, b) {\n var collection = getInternalState(this).collection;\n if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false;\n var result = collection[KEY](a === 0 ? 0 : a, b);\n return IS_ADDER ? this : result;\n });\n }\n });\n\n IS_WEAK || defineProperty(Constructor.prototype, 'size', {\n configurable: true,\n get: function () {\n return getInternalState(this).collection.size;\n }\n });\n }\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME, false, true);\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({ global: true, forced: true }, exported);\n\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n return Constructor;\n};\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) {\n if (options && options.unsafe && target[key]) target[key] = src[key];\n else redefine(target, key, src[key], options);\n } return target;\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","'use strict';\nvar defineProperty = require('../internals/object-define-property').f;\nvar create = require('../internals/object-create');\nvar redefineAll = require('../internals/redefine-all');\nvar bind = require('../internals/function-bind-context');\nvar anInstance = require('../internals/an-instance');\nvar iterate = require('../internals/iterate');\nvar defineIterator = require('../internals/define-iterator');\nvar setSpecies = require('../internals/set-species');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fastKey = require('../internals/internal-metadata').fastKey;\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n index: create(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!DESCRIPTORS) that.size = 0;\n if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n });\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index;\n // change existing entry\n if (entry) {\n entry.value = value;\n // create new entry\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first) state.first = entry;\n if (previous) previous.next = entry;\n if (DESCRIPTORS) state.size++;\n else that.size++;\n // add to index\n if (index !== 'F') state.index[index] = entry;\n } return that;\n };\n\n var getEntry = function (that, key) {\n var state = getInternalState(that);\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return state.index[index];\n // frozen object case\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key == key) return entry;\n }\n };\n\n redefineAll(C.prototype, {\n // `{ Map, Set }.prototype.clear()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.clear\n // https://tc39.es/ecma262/#sec-set.prototype.clear\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var data = state.index;\n var entry = state.first;\n while (entry) {\n entry.removed = true;\n if (entry.previous) entry.previous = entry.previous.next = undefined;\n delete data[entry.index];\n entry = entry.next;\n }\n state.first = state.last = undefined;\n if (DESCRIPTORS) state.size = 0;\n else that.size = 0;\n },\n // `{ Map, Set }.prototype.delete(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.delete\n // https://tc39.es/ecma262/#sec-set.prototype.delete\n 'delete': function (key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev) prev.next = next;\n if (next) next.previous = prev;\n if (state.first == entry) state.first = next;\n if (state.last == entry) state.last = prev;\n if (DESCRIPTORS) state.size--;\n else that.size--;\n } return !!entry;\n },\n // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.foreach\n // https://tc39.es/ecma262/#sec-set.prototype.foreach\n forEach: function forEach(callbackfn /* , that = undefined */) {\n var state = getInternalState(this);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this);\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n }\n },\n // `{ Map, Set}.prototype.has(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.has\n // https://tc39.es/ecma262/#sec-set.prototype.has\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n\n redefineAll(C.prototype, IS_MAP ? {\n // `Map.prototype.get(key)` method\n // https://tc39.es/ecma262/#sec-map.prototype.get\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n // `Map.prototype.set(key, value)` method\n // https://tc39.es/ecma262/#sec-map.prototype.set\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n // `Set.prototype.add(value)` method\n // https://tc39.es/ecma262/#sec-set.prototype.add\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (DESCRIPTORS) defineProperty(C.prototype, 'size', {\n get: function () {\n return getInternalState(this).size;\n }\n });\n return C;\n },\n setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.entries\n // https://tc39.es/ecma262/#sec-map.prototype.keys\n // https://tc39.es/ecma262/#sec-map.prototype.values\n // https://tc39.es/ecma262/#sec-map.prototype-@@iterator\n // https://tc39.es/ecma262/#sec-set.prototype.entries\n // https://tc39.es/ecma262/#sec-set.prototype.keys\n // https://tc39.es/ecma262/#sec-set.prototype.values\n // https://tc39.es/ecma262/#sec-set.prototype-@@iterator\n defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last;\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n // get next entry\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n // or finish the iteration\n state.target = undefined;\n return { value: undefined, done: true };\n }\n // return step by kind\n if (kind == 'keys') return { value: entry.key, done: false };\n if (kind == 'values') return { value: entry.value, done: false };\n return { value: [entry.key, entry.value], done: false };\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // `{ Map, Set }.prototype[@@species]` accessors\n // https://tc39.es/ecma262/#sec-get-map-@@species\n // https://tc39.es/ecma262/#sec-get-set-@@species\n setSpecies(CONSTRUCTOR_NAME);\n }\n};\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Map` constructor\n// https://tc39.es/ecma262/#sec-map-objects\nmodule.exports = collection('Map', function (init) {\n return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","require('../../modules/es.array.iterator');\nrequire('../../modules/es.map');\nrequire('../../modules/es.object.to-string');\nrequire('../../modules/es.string.iterator');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Map;\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Set` constructor\n// https://tc39.es/ecma262/#sec-set-objects\nmodule.exports = collection('Set', function (init) {\n return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","require('../../modules/es.array.iterator');\nrequire('../../modules/es.object.to-string');\nrequire('../../modules/es.set');\nrequire('../../modules/es.string.iterator');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Set;\n","module.exports = require(\"core-js-pure/stable/symbol/iterator\");","var anObject = require('../internals/an-object');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nmodule.exports = function (it) {\n var iteratorMethod = getIteratorMethod(it);\n if (typeof iteratorMethod != 'function') {\n throw TypeError(String(it) + ' is not iterable');\n } return anObject(iteratorMethod.call(it));\n};\n","// TODO: use something more complex like timsort?\nvar floor = Math.floor;\n\nvar mergeSort = function (array, comparefn) {\n var length = array.length;\n var middle = floor(length / 2);\n return length < 8 ? insertionSort(array, comparefn) : merge(\n mergeSort(array.slice(0, middle), comparefn),\n mergeSort(array.slice(middle), comparefn),\n comparefn\n );\n};\n\nvar insertionSort = function (array, comparefn) {\n var length = array.length;\n var i = 1;\n var element, j;\n\n while (i < length) {\n j = i;\n element = array[i];\n while (j && comparefn(array[j - 1], element) > 0) {\n array[j] = array[--j];\n }\n if (j !== i++) array[j] = element;\n } return array;\n};\n\nvar merge = function (left, right, comparefn) {\n var llength = left.length;\n var rlength = right.length;\n var lindex = 0;\n var rindex = 0;\n var result = [];\n\n while (lindex < llength || rindex < rlength) {\n if (lindex < llength && rindex < rlength) {\n result.push(comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]);\n } else {\n result.push(lindex < llength ? left[lindex++] : right[rindex++]);\n }\n } return result;\n};\n\nmodule.exports = mergeSort;\n","var userAgent = require('../internals/engine-user-agent');\n\nvar firefox = userAgent.match(/firefox\\/(\\d+)/i);\n\nmodule.exports = !!firefox && +firefox[1];\n","var UA = require('../internals/engine-user-agent');\n\nmodule.exports = /MSIE|Trident/.test(UA);\n","var userAgent = require('../internals/engine-user-agent');\n\nvar webkit = userAgent.match(/AppleWebKit\\/(\\d+)\\./);\n\nmodule.exports = !!webkit && +webkit[1];\n","'use strict';\nvar $ = require('../internals/export');\nvar aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar internalSort = require('../internals/array-sort');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar test = [];\nvar nativeSort = test.sort;\n\n// IE8-\nvar FAILS_ON_UNDEFINED = fails(function () {\n test.sort(undefined);\n});\n// V8 bug\nvar FAILS_ON_NULL = fails(function () {\n test.sort(null);\n});\n// Old WebKit\nvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\nvar STABLE_SORT = !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 70;\n if (FF && FF > 3) return;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 603;\n\n var result = '';\n var code, chr, value, index;\n\n // generate an array with more 512 elements (Chakra and old V8 fails only in this case)\n for (code = 65; code < 76; code++) {\n chr = String.fromCharCode(code);\n\n switch (code) {\n case 66: case 69: case 70: case 72: value = 3; break;\n case 68: case 71: value = 4; break;\n default: value = 2;\n }\n\n for (index = 0; index < 47; index++) {\n test.push({ k: chr + index, v: value });\n }\n }\n\n test.sort(function (a, b) { return b.v - a.v; });\n\n for (index = 0; index < test.length; index++) {\n chr = test[index].k.charAt(0);\n if (result.charAt(result.length - 1) !== chr) result += chr;\n }\n\n return result !== 'DGBEFHACIJK';\n});\n\nvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (y === undefined) return -1;\n if (x === undefined) return 1;\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n return toString(x) > toString(y) ? 1 : -1;\n };\n};\n\n// `Array.prototype.sort` method\n// https://tc39.es/ecma262/#sec-array.prototype.sort\n$({ target: 'Array', proto: true, forced: FORCED }, {\n sort: function sort(comparefn) {\n if (comparefn !== undefined) aFunction(comparefn);\n\n var array = toObject(this);\n\n if (STABLE_SORT) return comparefn === undefined ? nativeSort.call(array) : nativeSort.call(array, comparefn);\n\n var items = [];\n var arrayLength = toLength(array.length);\n var itemsLength, index;\n\n for (index = 0; index < arrayLength; index++) {\n if (index in array) items.push(array[index]);\n }\n\n items = internalSort(items, getSortCompare(comparefn));\n itemsLength = items.length;\n index = 0;\n\n while (index < itemsLength) array[index] = items[index++];\n while (index < arrayLength) delete array[index++];\n\n return array;\n }\n});\n","require('../../../modules/es.array.sort');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').sort;\n","var sort = require('../array/virtual/sort');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.sort;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.sort) ? sort : own;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $some = require('../internals/array-iteration').some;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('some');\n\n// `Array.prototype.some` method\n// https://tc39.es/ecma262/#sec-array.prototype.some\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n some: function some(callbackfn /* , thisArg */) {\n return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","require('../../../modules/es.array.some');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').some;\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","var some = require('../array/virtual/some');\n\nvar ArrayPrototype = Array.prototype;\n\nmodule.exports = function (it) {\n var own = it.some;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.some) ? some : own;\n};\n","require('../../../modules/es.array.iterator');\nrequire('../../../modules/es.object.to-string');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').keys;\n","require('../../modules/web.dom-collections.iterator');\nvar keys = require('../array/virtual/keys');\nvar classof = require('../../internals/classof');\nvar ArrayPrototype = Array.prototype;\n\nvar DOMIterables = {\n DOMTokenList: true,\n NodeList: true\n};\n\nmodule.exports = function (it) {\n var own = it.keys;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.keys)\n // eslint-disable-next-line no-prototype-builtins -- safe\n || DOMIterables.hasOwnProperty(classof(it)) ? keys : own;\n};\n","require('../../../modules/es.array.iterator');\nrequire('../../../modules/es.object.to-string');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').values;\n","require('../../modules/web.dom-collections.iterator');\nvar values = require('../array/virtual/values');\nvar classof = require('../../internals/classof');\nvar ArrayPrototype = Array.prototype;\n\nvar DOMIterables = {\n DOMTokenList: true,\n NodeList: true\n};\n\nmodule.exports = function (it) {\n var own = it.values;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.values)\n // eslint-disable-next-line no-prototype-builtins -- safe\n || DOMIterables.hasOwnProperty(classof(it)) ? values : own;\n};\n","require('../../../modules/es.array.iterator');\nrequire('../../../modules/es.object.to-string');\nvar entryVirtual = require('../../../internals/entry-virtual');\n\nmodule.exports = entryVirtual('Array').entries;\n","require('../../modules/web.dom-collections.iterator');\nvar entries = require('../array/virtual/entries');\nvar classof = require('../../internals/classof');\nvar ArrayPrototype = Array.prototype;\n\nvar DOMIterables = {\n DOMTokenList: true,\n NodeList: true\n};\n\nmodule.exports = function (it) {\n var own = it.entries;\n return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.entries)\n // eslint-disable-next-line no-prototype-builtins -- safe\n || DOMIterables.hasOwnProperty(classof(it)) ? entries : own;\n};\n","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","/**\n * vis-data\n * http://visjs.org/\n *\n * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.\n *\n * @version 7.1.2\n * @date 2021-01-08T20:37:11.601Z\n *\n * @copyright (c) 2011-2017 Almende B.V, http://almende.com\n * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs\n *\n * @license\n * vis.js is dual licensed under both\n *\n * 1. The Apache 2.0 License\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * and\n *\n * 2. The MIT License\n * http://opensource.org/licenses/MIT\n *\n * vis.js may be distributed under either license.\n */\n\nimport { pureDeepObjectAssign } from 'vis-util/esnext/esm/vis-util.js';\nexport { DELETE } from 'vis-util/esnext/esm/vis-util.js';\nimport { v4 } from 'uuid';\n\n/**\r\n * Create new data pipe.\r\n *\r\n * @param from - The source data set or data view.\r\n *\r\n * @remarks\r\n * Example usage:\r\n * ```typescript\r\n * interface AppItem {\r\n * whoami: string;\r\n * appData: unknown;\r\n * visData: VisItem;\r\n * }\r\n * interface VisItem {\r\n * id: number;\r\n * label: string;\r\n * color: string;\r\n * x: number;\r\n * y: number;\r\n * }\r\n *\r\n * const ds1 = new DataSet<AppItem, \"whoami\">([], { fieldId: \"whoami\" });\r\n * const ds2 = new DataSet<VisItem, \"id\">();\r\n *\r\n * const pipe = createNewDataPipeFrom(ds1)\r\n * .filter((item): boolean => item.enabled === true)\r\n * .map<VisItem, \"id\">((item): VisItem => item.visData)\r\n * .to(ds2);\r\n *\r\n * pipe.start();\r\n * ```\r\n *\r\n * @returns A factory whose methods can be used to configure the pipe.\r\n */\r\nfunction createNewDataPipeFrom(from) {\r\n return new DataPipeUnderConstruction(from);\r\n}\r\n/**\r\n * Internal implementation of the pipe. This should be accessible only through\r\n * `createNewDataPipeFrom` from the outside.\r\n *\r\n * @typeParam SI - Source item type.\r\n * @typeParam SP - Source item type's id property name.\r\n * @typeParam TI - Target item type.\r\n * @typeParam TP - Target item type's id property name.\r\n */\r\nclass SimpleDataPipe {\r\n /**\r\n * Create a new data pipe.\r\n *\r\n * @param _source - The data set or data view that will be observed.\r\n * @param _transformers - An array of transforming functions to be used to\r\n * filter or transform the items in the pipe.\r\n * @param _target - The data set or data view that will receive the items.\r\n */\r\n constructor(_source, _transformers, _target) {\r\n this._source = _source;\r\n this._transformers = _transformers;\r\n this._target = _target;\r\n /**\r\n * Bound listeners for use with `DataInterface['on' | 'off']`.\r\n */\r\n this._listeners = {\r\n add: this._add.bind(this),\r\n remove: this._remove.bind(this),\r\n update: this._update.bind(this),\r\n };\r\n }\r\n /** @inheritDoc */\r\n all() {\r\n this._target.update(this._transformItems(this._source.get()));\r\n return this;\r\n }\r\n /** @inheritDoc */\r\n start() {\r\n this._source.on(\"add\", this._listeners.add);\r\n this._source.on(\"remove\", this._listeners.remove);\r\n this._source.on(\"update\", this._listeners.update);\r\n return this;\r\n }\r\n /** @inheritDoc */\r\n stop() {\r\n this._source.off(\"add\", this._listeners.add);\r\n this._source.off(\"remove\", this._listeners.remove);\r\n this._source.off(\"update\", this._listeners.update);\r\n return this;\r\n }\r\n /**\r\n * Apply the transformers to the items.\r\n *\r\n * @param items - The items to be transformed.\r\n *\r\n * @returns The transformed items.\r\n */\r\n _transformItems(items) {\r\n return this._transformers.reduce((items, transform) => {\r\n return transform(items);\r\n }, items);\r\n }\r\n /**\r\n * Handle an add event.\r\n *\r\n * @param _name - Ignored.\r\n * @param payload - The payload containing the ids of the added items.\r\n */\r\n _add(_name, payload) {\r\n if (payload == null) {\r\n return;\r\n }\r\n this._target.add(this._transformItems(this._source.get(payload.items)));\r\n }\r\n /**\r\n * Handle an update event.\r\n *\r\n * @param _name - Ignored.\r\n * @param payload - The payload containing the ids of the updated items.\r\n */\r\n _update(_name, payload) {\r\n if (payload == null) {\r\n return;\r\n }\r\n this._target.update(this._transformItems(this._source.get(payload.items)));\r\n }\r\n /**\r\n * Handle a remove event.\r\n *\r\n * @param _name - Ignored.\r\n * @param payload - The payload containing the data of the removed items.\r\n */\r\n _remove(_name, payload) {\r\n if (payload == null) {\r\n return;\r\n }\r\n this._target.remove(this._transformItems(payload.oldData));\r\n }\r\n}\r\n/**\r\n * Internal implementation of the pipe factory. This should be accessible\r\n * only through `createNewDataPipeFrom` from the outside.\r\n *\r\n * @typeParam TI - Target item type.\r\n * @typeParam TP - Target item type's id property name.\r\n */\r\nclass DataPipeUnderConstruction {\r\n /**\r\n * Create a new data pipe factory. This is an internal constructor that\r\n * should never be called from outside of this file.\r\n *\r\n * @param _source - The source data set or data view for this pipe.\r\n */\r\n constructor(_source) {\r\n this._source = _source;\r\n /**\r\n * Array transformers used to transform items within the pipe. This is typed\r\n * as any for the sake of simplicity.\r\n */\r\n this._transformers = [];\r\n }\r\n /**\r\n * Filter the items.\r\n *\r\n * @param callback - A filtering function that returns true if given item\r\n * should be piped and false if not.\r\n *\r\n * @returns This factory for further configuration.\r\n */\r\n filter(callback) {\r\n this._transformers.push((input) => input.filter(callback));\r\n return this;\r\n }\r\n /**\r\n * Map each source item to a new type.\r\n *\r\n * @param callback - A mapping function that takes a source item and returns\r\n * corresponding mapped item.\r\n *\r\n * @typeParam TI - Target item type.\r\n * @typeParam TP - Target item type's id property name.\r\n *\r\n * @returns This factory for further configuration.\r\n */\r\n map(callback) {\r\n this._transformers.push((input) => input.map(callback));\r\n return this;\r\n }\r\n /**\r\n * Map each source item to zero or more items of a new type.\r\n *\r\n * @param callback - A mapping function that takes a source item and returns\r\n * an array of corresponding mapped items.\r\n *\r\n * @typeParam TI - Target item type.\r\n * @typeParam TP - Target item type's id property name.\r\n *\r\n * @returns This factory for further configuration.\r\n */\r\n flatMap(callback) {\r\n this._transformers.push((input) => input.flatMap(callback));\r\n return this;\r\n }\r\n /**\r\n * Connect this pipe to given data set.\r\n *\r\n * @param target - The data set that will receive the items from this pipe.\r\n *\r\n * @returns The pipe connected between given data sets and performing\r\n * configured transformation on the processed items.\r\n */\r\n to(target) {\r\n return new SimpleDataPipe(this._source, this._transformers, target);\r\n }\r\n}\n\n/**\r\n * Determine whether a value can be used as an id.\r\n *\r\n * @param value - Input value of unknown type.\r\n *\r\n * @returns True if the value is valid id, false otherwise.\r\n */\r\nfunction isId(value) {\r\n return typeof value === \"string\" || typeof value === \"number\";\r\n}\n\n/**\r\n * A queue.\r\n *\r\n * @typeParam T - The type of method names to be replaced by queued versions.\r\n */\r\nclass Queue {\r\n /**\r\n * Construct a new Queue.\r\n *\r\n * @param options - Queue configuration.\r\n */\r\n constructor(options) {\r\n this._queue = [];\r\n this._timeout = null;\r\n this._extended = null;\r\n // options\r\n this.delay = null;\r\n this.max = Infinity;\r\n this.setOptions(options);\r\n }\r\n /**\r\n * Update the configuration of the queue.\r\n *\r\n * @param options - Queue configuration.\r\n */\r\n setOptions(options) {\r\n if (options && typeof options.delay !== \"undefined\") {\r\n this.delay = options.delay;\r\n }\r\n if (options && typeof options.max !== \"undefined\") {\r\n this.max = options.max;\r\n }\r\n this._flushIfNeeded();\r\n }\r\n /**\r\n * Extend an object with queuing functionality.\r\n * The object will be extended with a function flush, and the methods provided in options.replace will be replaced with queued ones.\r\n *\r\n * @param object - The object to be extended.\r\n * @param options - Additional options.\r\n *\r\n * @returns The created queue.\r\n */\r\n static extend(object, options) {\r\n const queue = new Queue(options);\r\n if (object.flush !== undefined) {\r\n throw new Error(\"Target object already has a property flush\");\r\n }\r\n object.flush = () => {\r\n queue.flush();\r\n };\r\n const methods = [\r\n {\r\n name: \"flush\",\r\n original: undefined,\r\n },\r\n ];\r\n if (options && options.replace) {\r\n for (let i = 0; i < options.replace.length; i++) {\r\n const name = options.replace[i];\r\n methods.push({\r\n name: name,\r\n // @TODO: better solution?\r\n original: object[name],\r\n });\r\n // @TODO: better solution?\r\n queue.replace(object, name);\r\n }\r\n }\r\n queue._extended = {\r\n object: object,\r\n methods: methods,\r\n };\r\n return queue;\r\n }\r\n /**\r\n * Destroy the queue. The queue will first flush all queued actions, and in case it has extended an object, will restore the original object.\r\n */\r\n destroy() {\r\n this.flush();\r\n if (this._extended) {\r\n const object = this._extended.object;\r\n const methods = this._extended.methods;\r\n for (let i = 0; i < methods.length; i++) {\r\n const method = methods[i];\r\n if (method.original) {\r\n // @TODO: better solution?\r\n object[method.name] = method.original;\r\n }\r\n else {\r\n // @TODO: better solution?\r\n delete object[method.name];\r\n }\r\n }\r\n this._extended = null;\r\n }\r\n }\r\n /**\r\n * Replace a method on an object with a queued version.\r\n *\r\n * @param object - Object having the method.\r\n * @param method - The method name.\r\n */\r\n replace(object, method) {\r\n /* eslint-disable-next-line @typescript-eslint/no-this-alias -- Function this is necessary in the function bellow, so class this has to be saved into a variable here. */\r\n const me = this;\r\n const original = object[method];\r\n if (!original) {\r\n throw new Error(\"Method \" + method + \" undefined\");\r\n }\r\n object[method] = function (...args) {\r\n // add this call to the queue\r\n me.queue({\r\n args: args,\r\n fn: original,\r\n context: this,\r\n });\r\n };\r\n }\r\n /**\r\n * Queue a call.\r\n *\r\n * @param entry - The function or entry to be queued.\r\n */\r\n queue(entry) {\r\n if (typeof entry === \"function\") {\r\n this._queue.push({ fn: entry });\r\n }\r\n else {\r\n this._queue.push(entry);\r\n }\r\n this._flushIfNeeded();\r\n }\r\n /**\r\n * Check whether the queue needs to be flushed.\r\n */\r\n _flushIfNeeded() {\r\n // flush when the maximum is exceeded.\r\n if (this._queue.length > this.max) {\r\n this.flush();\r\n }\r\n // flush after a period of inactivity when a delay is configured\r\n if (this._timeout != null) {\r\n clearTimeout(this._timeout);\r\n this._timeout = null;\r\n }\r\n if (this.queue.length > 0 && typeof this.delay === \"number\") {\r\n this._timeout = setTimeout(() => {\r\n this.flush();\r\n }, this.delay);\r\n }\r\n }\r\n /**\r\n * Flush all queued calls\r\n */\r\n flush() {\r\n this._queue.splice(0).forEach((entry) => {\r\n entry.fn.apply(entry.context || entry.fn, entry.args || []);\r\n });\r\n }\r\n}\n\n/**\r\n * [[DataSet]] code that can be reused in [[DataView]] or other similar implementations of [[DataInterface]].\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\r\nclass DataSetPart {\r\n constructor() {\r\n this._subscribers = {\r\n \"*\": [],\r\n add: [],\r\n remove: [],\r\n update: [],\r\n };\r\n /**\r\n * @deprecated Use on instead (PS: DataView.subscribe === DataView.on).\r\n */\r\n this.subscribe = DataSetPart.prototype.on;\r\n /**\r\n * @deprecated Use off instead (PS: DataView.unsubscribe === DataView.off).\r\n */\r\n this.unsubscribe = DataSetPart.prototype.off;\r\n }\r\n /**\r\n * Trigger an event\r\n *\r\n * @param event - Event name.\r\n * @param payload - Event payload.\r\n * @param senderId - Id of the sender.\r\n */\r\n _trigger(event, payload, senderId) {\r\n if (event === \"*\") {\r\n throw new Error(\"Cannot trigger event *\");\r\n }\r\n [...this._subscribers[event], ...this._subscribers[\"*\"]].forEach((subscriber) => {\r\n subscriber(event, payload, senderId != null ? senderId : null);\r\n });\r\n }\r\n /**\r\n * Subscribe to an event, add an event listener.\r\n *\r\n * @remarks Non-function callbacks are ignored.\r\n *\r\n * @param event - Event name.\r\n * @param callback - Callback method.\r\n */\r\n on(event, callback) {\r\n if (typeof callback === \"function\") {\r\n this._subscribers[event].push(callback);\r\n }\r\n // @TODO: Maybe throw for invalid callbacks?\r\n }\r\n /**\r\n * Unsubscribe from an event, remove an event listener.\r\n *\r\n * @remarks If the same callback was subscribed more than once **all** occurences will be removed.\r\n *\r\n * @param event - Event name.\r\n * @param callback - Callback method.\r\n */\r\n off(event, callback) {\r\n this._subscribers[event] = this._subscribers[event].filter((subscriber) => subscriber !== callback);\r\n }\r\n}\n\n/**\r\n * Data stream\r\n *\r\n * @remarks\r\n * [[DataStream]] offers an always up to date stream of items from a [[DataSet]] or [[DataView]].\r\n * That means that the stream is evaluated at the time of iteration, conversion to another data type or when [[cache]] is called, not when the [[DataStream]] was created.\r\n * Multiple invocations of for example [[toItemArray]] may yield different results (if the data source like for example [[DataSet]] gets modified).\r\n *\r\n * @typeParam Item - The item type this stream is going to work with.\r\n */\r\nclass DataStream {\r\n /**\r\n * Create a new data stream.\r\n *\r\n * @param pairs - The id, item pairs.\r\n */\r\n constructor(pairs) {\r\n this._pairs = pairs;\r\n }\r\n /**\r\n * Return an iterable of key, value pairs for every entry in the stream.\r\n */\r\n *[Symbol.iterator]() {\r\n for (const [id, item] of this._pairs) {\r\n yield [id, item];\r\n }\r\n }\r\n /**\r\n * Return an iterable of key, value pairs for every entry in the stream.\r\n */\r\n *entries() {\r\n for (const [id, item] of this._pairs) {\r\n yield [id, item];\r\n }\r\n }\r\n /**\r\n * Return an iterable of keys in the stream.\r\n */\r\n *keys() {\r\n for (const [id] of this._pairs) {\r\n yield id;\r\n }\r\n }\r\n /**\r\n * Return an iterable of values in the stream.\r\n */\r\n *values() {\r\n for (const [, item] of this._pairs) {\r\n yield item;\r\n }\r\n }\r\n /**\r\n * Return an array containing all the ids in this stream.\r\n *\r\n * @remarks\r\n * The array may contain duplicities.\r\n *\r\n * @returns The array with all ids from this stream.\r\n */\r\n toIdArray() {\r\n return [...this._pairs].map((pair) => pair[0]);\r\n }\r\n /**\r\n * Return an array containing all the items in this stream.\r\n *\r\n * @remarks\r\n * The array may contain duplicities.\r\n *\r\n * @returns The array with all items from this stream.\r\n */\r\n toItemArray() {\r\n return [...this._pairs].map((pair) => pair[1]);\r\n }\r\n /**\r\n * Return an array containing all the entries in this stream.\r\n *\r\n * @remarks\r\n * The array may contain duplicities.\r\n *\r\n * @returns The array with all entries from this stream.\r\n */\r\n toEntryArray() {\r\n return [...this._pairs];\r\n }\r\n /**\r\n * Return an object map containing all the items in this stream accessible by ids.\r\n *\r\n * @remarks\r\n * In case of duplicate ids (coerced to string so `7 == '7'`) the last encoutered appears in the returned object.\r\n *\r\n * @returns The object map of all id → item pairs from this stream.\r\n */\r\n toObjectMap() {\r\n const map = Object.create(null);\r\n for (const [id, item] of this._pairs) {\r\n map[id] = item;\r\n }\r\n return map;\r\n }\r\n /**\r\n * Return a map containing all the items in this stream accessible by ids.\r\n *\r\n * @returns The map of all id → item pairs from this stream.\r\n */\r\n toMap() {\r\n return new Map(this._pairs);\r\n }\r\n /**\r\n * Return a set containing all the (unique) ids in this stream.\r\n *\r\n * @returns The set of all ids from this stream.\r\n */\r\n toIdSet() {\r\n return new Set(this.toIdArray());\r\n }\r\n /**\r\n * Return a set containing all the (unique) items in this stream.\r\n *\r\n * @returns The set of all items from this stream.\r\n */\r\n toItemSet() {\r\n return new Set(this.toItemArray());\r\n }\r\n /**\r\n * Cache the items from this stream.\r\n *\r\n * @remarks\r\n * This method allows for items to be fetched immediatelly and used (possibly multiple times) later.\r\n * It can also be used to optimize performance as [[DataStream]] would otherwise reevaluate everything upon each iteration.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * const ds = new DataSet([…])\r\n *\r\n * const cachedStream = ds.stream()\r\n * .filter(…)\r\n * .sort(…)\r\n * .map(…)\r\n * .cached(…) // Data are fetched, processed and cached here.\r\n *\r\n * ds.clear()\r\n * chachedStream // Still has all the items.\r\n * ```\r\n *\r\n * @returns A new [[DataStream]] with cached items (detached from the original [[DataSet]]).\r\n */\r\n cache() {\r\n return new DataStream([...this._pairs]);\r\n }\r\n /**\r\n * Get the distinct values of given property.\r\n *\r\n * @param callback - The function that picks and possibly converts the property.\r\n *\r\n * @typeParam T - The type of the distinct value.\r\n *\r\n * @returns A set of all distinct properties.\r\n */\r\n distinct(callback) {\r\n const set = new Set();\r\n for (const [id, item] of this._pairs) {\r\n set.add(callback(item, id));\r\n }\r\n return set;\r\n }\r\n /**\r\n * Filter the items of the stream.\r\n *\r\n * @param callback - The function that decides whether an item will be included.\r\n *\r\n * @returns A new data stream with the filtered items.\r\n */\r\n filter(callback) {\r\n const pairs = this._pairs;\r\n return new DataStream({\r\n *[Symbol.iterator]() {\r\n for (const [id, item] of pairs) {\r\n if (callback(item, id)) {\r\n yield [id, item];\r\n }\r\n }\r\n },\r\n });\r\n }\r\n /**\r\n * Execute a callback for each item of the stream.\r\n *\r\n * @param callback - The function that will be invoked for each item.\r\n */\r\n forEach(callback) {\r\n for (const [id, item] of this._pairs) {\r\n callback(item, id);\r\n }\r\n }\r\n /**\r\n * Map the items into a different type.\r\n *\r\n * @param callback - The function that does the conversion.\r\n *\r\n * @typeParam Mapped - The type of the item after mapping.\r\n *\r\n * @returns A new data stream with the mapped items.\r\n */\r\n map(callback) {\r\n const pairs = this._pairs;\r\n return new DataStream({\r\n *[Symbol.iterator]() {\r\n for (const [id, item] of pairs) {\r\n yield [id, callback(item, id)];\r\n }\r\n },\r\n });\r\n }\r\n /**\r\n * Get the item with the maximum value of given property.\r\n *\r\n * @param callback - The function that picks and possibly converts the property.\r\n *\r\n * @returns The item with the maximum if found otherwise null.\r\n */\r\n max(callback) {\r\n const iter = this._pairs[Symbol.iterator]();\r\n let curr = iter.next();\r\n if (curr.done) {\r\n return null;\r\n }\r\n let maxItem = curr.value[1];\r\n let maxValue = callback(curr.value[1], curr.value[0]);\r\n while (!(curr = iter.next()).done) {\r\n const [id, item] = curr.value;\r\n const value = callback(item, id);\r\n if (value > maxValue) {\r\n maxValue = value;\r\n maxItem = item;\r\n }\r\n }\r\n return maxItem;\r\n }\r\n /**\r\n * Get the item with the minimum value of given property.\r\n *\r\n * @param callback - The function that picks and possibly converts the property.\r\n *\r\n * @returns The item with the minimum if found otherwise null.\r\n */\r\n min(callback) {\r\n const iter = this._pairs[Symbol.iterator]();\r\n let curr = iter.next();\r\n if (curr.done) {\r\n return null;\r\n }\r\n let minItem = curr.value[1];\r\n let minValue = callback(curr.value[1], curr.value[0]);\r\n while (!(curr = iter.next()).done) {\r\n const [id, item] = curr.value;\r\n const value = callback(item, id);\r\n if (value < minValue) {\r\n minValue = value;\r\n minItem = item;\r\n }\r\n }\r\n return minItem;\r\n }\r\n /**\r\n * Reduce the items into a single value.\r\n *\r\n * @param callback - The function that does the reduction.\r\n * @param accumulator - The initial value of the accumulator.\r\n *\r\n * @typeParam T - The type of the accumulated value.\r\n *\r\n * @returns The reduced value.\r\n */\r\n reduce(callback, accumulator) {\r\n for (const [id, item] of this._pairs) {\r\n accumulator = callback(accumulator, item, id);\r\n }\r\n return accumulator;\r\n }\r\n /**\r\n * Sort the items.\r\n *\r\n * @param callback - Item comparator.\r\n *\r\n * @returns A new stream with sorted items.\r\n */\r\n sort(callback) {\r\n return new DataStream({\r\n [Symbol.iterator]: () => [...this._pairs]\r\n .sort(([idA, itemA], [idB, itemB]) => callback(itemA, itemB, idA, idB))[Symbol.iterator](),\r\n });\r\n }\r\n}\n\n/**\r\n * Add an id to given item if it doesn't have one already.\r\n *\r\n * @remarks\r\n * The item will be modified.\r\n *\r\n * @param item - The item that will have an id after a call to this function.\r\n * @param idProp - The key of the id property.\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n *\r\n * @returns true\r\n */\r\nfunction ensureFullItem(item, idProp) {\r\n if (item[idProp] == null) {\r\n // generate an id\r\n item[idProp] = v4();\r\n }\r\n return item;\r\n}\r\n/**\r\n * # DataSet\r\n *\r\n * Vis.js comes with a flexible DataSet, which can be used to hold and\r\n * manipulate unstructured data and listen for changes in the data. The DataSet\r\n * is key/value based. Data items can be added, updated and removed from the\r\n * DataSet, and one can subscribe to changes in the DataSet. The data in the\r\n * DataSet can be filtered and ordered. Data can be normalized when appending it\r\n * to the DataSet as well.\r\n *\r\n * ## Example\r\n *\r\n * The following example shows how to use a DataSet.\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * var options = {};\r\n * var data = new vis.DataSet(options);\r\n *\r\n * // add items\r\n * // note that the data items can contain different properties and data formats\r\n * data.add([\r\n * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},\r\n * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},\r\n * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},\r\n * {id: 4, text: 'item 4'}\r\n * ]);\r\n *\r\n * // subscribe to any change in the DataSet\r\n * data.on('*', function (event, properties, senderId) {\r\n * console.log('event', event, properties);\r\n * });\r\n *\r\n * // update an existing item\r\n * data.update({id: 2, group: 1});\r\n *\r\n * // remove an item\r\n * data.remove(4);\r\n *\r\n * // get all ids\r\n * var ids = data.getIds();\r\n * console.log('ids', ids);\r\n *\r\n * // get a specific item\r\n * var item1 = data.get(1);\r\n * console.log('item1', item1);\r\n *\r\n * // retrieve a filtered subset of the data\r\n * var items = data.get({\r\n * filter: function (item) {\r\n * return item.group == 1;\r\n * }\r\n * });\r\n * console.log('filtered items', items);\r\n * ```\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\r\nclass DataSet extends DataSetPart {\r\n /**\r\n * Construct a new DataSet.\r\n *\r\n * @param data - Initial data or options.\r\n * @param options - Options (type error if data is also options).\r\n */\r\n constructor(data, options) {\r\n super();\r\n this._queue = null;\r\n // correctly read optional arguments\r\n if (data && !Array.isArray(data)) {\r\n options = data;\r\n data = [];\r\n }\r\n this._options = options || {};\r\n this._data = new Map(); // map with data indexed by id\r\n this.length = 0; // number of items in the DataSet\r\n this._idProp = this._options.fieldId || \"id\"; // name of the field containing id\r\n // add initial data when provided\r\n if (data && data.length) {\r\n this.add(data);\r\n }\r\n this.setOptions(options);\r\n }\r\n /** @inheritDoc */\r\n get idProp() {\r\n return this._idProp;\r\n }\r\n /**\r\n * Set new options.\r\n *\r\n * @param options - The new options.\r\n */\r\n setOptions(options) {\r\n if (options && options.queue !== undefined) {\r\n if (options.queue === false) {\r\n // delete queue if loaded\r\n if (this._queue) {\r\n this._queue.destroy();\r\n this._queue = null;\r\n }\r\n }\r\n else {\r\n // create queue and update its options\r\n if (!this._queue) {\r\n this._queue = Queue.extend(this, {\r\n replace: [\"add\", \"update\", \"remove\"],\r\n });\r\n }\r\n if (options.queue && typeof options.queue === \"object\") {\r\n this._queue.setOptions(options.queue);\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * Add a data item or an array with items.\r\n *\r\n * After the items are added to the DataSet, the DataSet will trigger an event `add`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet()\r\n *\r\n * // add items\r\n * const ids = data.add([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { text: 'item without an id' }\r\n * ])\r\n *\r\n * console.log(ids) // [1, 2, '<UUIDv4>']\r\n * ```\r\n *\r\n * @param data - Items to be added (ids will be generated if missing).\r\n * @param senderId - Sender id.\r\n *\r\n * @returns addedIds - Array with the ids (generated if not present) of the added items.\r\n *\r\n * @throws When an item with the same id as any of the added items already exists.\r\n */\r\n add(data, senderId) {\r\n const addedIds = [];\r\n let id;\r\n if (Array.isArray(data)) {\r\n // Array\r\n const idsToAdd = data.map((d) => d[this._idProp]);\r\n if (idsToAdd.some((id) => this._data.has(id))) {\r\n throw new Error(\"A duplicate id was found in the parameter array.\");\r\n }\r\n for (let i = 0, len = data.length; i < len; i++) {\r\n id = this._addItem(data[i]);\r\n addedIds.push(id);\r\n }\r\n }\r\n else if (data && typeof data === \"object\") {\r\n // Single item\r\n id = this._addItem(data);\r\n addedIds.push(id);\r\n }\r\n else {\r\n throw new Error(\"Unknown dataType\");\r\n }\r\n if (addedIds.length) {\r\n this._trigger(\"add\", { items: addedIds }, senderId);\r\n }\r\n return addedIds;\r\n }\r\n /**\r\n * Update existing items. When an item does not exist, it will be created.\r\n *\r\n * @remarks\r\n * The provided properties will be merged in the existing item. When an item does not exist, it will be created.\r\n *\r\n * After the items are updated, the DataSet will trigger an event `add` for the added items, and an event `update`. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' }\r\n * ])\r\n *\r\n * // update items\r\n * const ids = data.update([\r\n * { id: 2, text: 'item 2 (updated)' },\r\n * { id: 4, text: 'item 4 (new)' }\r\n * ])\r\n *\r\n * console.log(ids) // [2, 4]\r\n * ```\r\n *\r\n * ## Warning for TypeScript users\r\n * This method may introduce partial items into the data set. Use add or updateOnly instead for better type safety.\r\n *\r\n * @param data - Items to be updated (if the id is already present) or added (if the id is missing).\r\n * @param senderId - Sender id.\r\n *\r\n * @returns updatedIds - The ids of the added (these may be newly generated if there was no id in the item from the data) or updated items.\r\n *\r\n * @throws When the supplied data is neither an item nor an array of items.\r\n */\r\n update(data, senderId) {\r\n const addedIds = [];\r\n const updatedIds = [];\r\n const oldData = [];\r\n const updatedData = [];\r\n const idProp = this._idProp;\r\n const addOrUpdate = (item) => {\r\n const origId = item[idProp];\r\n if (origId != null && this._data.has(origId)) {\r\n const fullItem = item; // it has an id, therefore it is a fullitem\r\n const oldItem = Object.assign({}, this._data.get(origId));\r\n // update item\r\n const id = this._updateItem(fullItem);\r\n updatedIds.push(id);\r\n updatedData.push(fullItem);\r\n oldData.push(oldItem);\r\n }\r\n else {\r\n // add new item\r\n const id = this._addItem(item);\r\n addedIds.push(id);\r\n }\r\n };\r\n if (Array.isArray(data)) {\r\n // Array\r\n for (let i = 0, len = data.length; i < len; i++) {\r\n if (data[i] && typeof data[i] === \"object\") {\r\n addOrUpdate(data[i]);\r\n }\r\n else {\r\n console.warn(\"Ignoring input item, which is not an object at index \" + i);\r\n }\r\n }\r\n }\r\n else if (data && typeof data === \"object\") {\r\n // Single item\r\n addOrUpdate(data);\r\n }\r\n else {\r\n throw new Error(\"Unknown dataType\");\r\n }\r\n if (addedIds.length) {\r\n this._trigger(\"add\", { items: addedIds }, senderId);\r\n }\r\n if (updatedIds.length) {\r\n const props = { items: updatedIds, oldData: oldData, data: updatedData };\r\n // TODO: remove deprecated property 'data' some day\r\n //Object.defineProperty(props, 'data', {\r\n // 'get': (function() {\r\n // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data');\r\n // return updatedData;\r\n // }).bind(this)\r\n //});\r\n this._trigger(\"update\", props, senderId);\r\n }\r\n return addedIds.concat(updatedIds);\r\n }\r\n /**\r\n * Update existing items. When an item does not exist, an error will be thrown.\r\n *\r\n * @remarks\r\n * The provided properties will be deeply merged into the existing item.\r\n * When an item does not exist (id not present in the data set or absent), an error will be thrown and nothing will be changed.\r\n *\r\n * After the items are updated, the DataSet will trigger an event `update`.\r\n * When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n *\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' },\r\n * ])\r\n *\r\n * // update items\r\n * const ids = data.update([\r\n * { id: 2, text: 'item 2 (updated)' }, // works\r\n * // { id: 4, text: 'item 4 (new)' }, // would throw\r\n * // { text: 'item 4 (new)' }, // would also throw\r\n * ])\r\n *\r\n * console.log(ids) // [2]\r\n * ```\r\n *\r\n * @param data - Updates (the id and optionally other props) to the items in this data set.\r\n * @param senderId - Sender id.\r\n *\r\n * @returns updatedIds - The ids of the updated items.\r\n *\r\n * @throws When the supplied data is neither an item nor an array of items, when the ids are missing.\r\n */\r\n updateOnly(data, senderId) {\r\n if (!Array.isArray(data)) {\r\n data = [data];\r\n }\r\n const updateEventData = data\r\n .map((update) => {\r\n const oldData = this._data.get(update[this._idProp]);\r\n if (oldData == null) {\r\n throw new Error(\"Updating non-existent items is not allowed.\");\r\n }\r\n return { oldData, update };\r\n })\r\n .map(({ oldData, update }) => {\r\n const id = oldData[this._idProp];\r\n const updatedData = pureDeepObjectAssign(oldData, update);\r\n this._data.set(id, updatedData);\r\n return {\r\n id,\r\n oldData: oldData,\r\n updatedData,\r\n };\r\n });\r\n if (updateEventData.length) {\r\n const props = {\r\n items: updateEventData.map((value) => value.id),\r\n oldData: updateEventData.map((value) => value.oldData),\r\n data: updateEventData.map((value) => value.updatedData),\r\n };\r\n // TODO: remove deprecated property 'data' some day\r\n //Object.defineProperty(props, 'data', {\r\n // 'get': (function() {\r\n // console.warn('Property data is deprecated. Use DataSet.get(ids) to retrieve the new data, use the oldData property on this object to get the old data');\r\n // return updatedData;\r\n // }).bind(this)\r\n //});\r\n this._trigger(\"update\", props, senderId);\r\n return props.items;\r\n }\r\n else {\r\n return [];\r\n }\r\n }\r\n /** @inheritDoc */\r\n get(first, second) {\r\n // @TODO: Woudn't it be better to split this into multiple methods?\r\n // parse the arguments\r\n let id = undefined;\r\n let ids = undefined;\r\n let options = undefined;\r\n if (isId(first)) {\r\n // get(id [, options])\r\n id = first;\r\n options = second;\r\n }\r\n else if (Array.isArray(first)) {\r\n // get(ids [, options])\r\n ids = first;\r\n options = second;\r\n }\r\n else {\r\n // get([, options])\r\n options = first;\r\n }\r\n // determine the return type\r\n const returnType = options && options.returnType === \"Object\" ? \"Object\" : \"Array\";\r\n // @TODO: WTF is this? Or am I missing something?\r\n // var returnType\r\n // if (options && options.returnType) {\r\n // var allowedValues = ['Array', 'Object']\r\n // returnType =\r\n // allowedValues.indexOf(options.returnType) == -1\r\n // ? 'Array'\r\n // : options.returnType\r\n // } else {\r\n // returnType = 'Array'\r\n // }\r\n // build options\r\n const filter = options && options.filter;\r\n const items = [];\r\n let item = undefined;\r\n let itemIds = undefined;\r\n let itemId = undefined;\r\n // convert items\r\n if (id != null) {\r\n // return a single item\r\n item = this._data.get(id);\r\n if (item && filter && !filter(item)) {\r\n item = undefined;\r\n }\r\n }\r\n else if (ids != null) {\r\n // return a subset of items\r\n for (let i = 0, len = ids.length; i < len; i++) {\r\n item = this._data.get(ids[i]);\r\n if (item != null && (!filter || filter(item))) {\r\n items.push(item);\r\n }\r\n }\r\n }\r\n else {\r\n // return all items\r\n itemIds = [...this._data.keys()];\r\n for (let i = 0, len = itemIds.length; i < len; i++) {\r\n itemId = itemIds[i];\r\n item = this._data.get(itemId);\r\n if (item != null && (!filter || filter(item))) {\r\n items.push(item);\r\n }\r\n }\r\n }\r\n // order the results\r\n if (options && options.order && id == undefined) {\r\n this._sort(items, options.order);\r\n }\r\n // filter fields of the items\r\n if (options && options.fields) {\r\n const fields = options.fields;\r\n if (id != undefined && item != null) {\r\n item = this._filterFields(item, fields);\r\n }\r\n else {\r\n for (let i = 0, len = items.length; i < len; i++) {\r\n items[i] = this._filterFields(items[i], fields);\r\n }\r\n }\r\n }\r\n // return the results\r\n if (returnType == \"Object\") {\r\n const result = {};\r\n for (let i = 0, len = items.length; i < len; i++) {\r\n const resultant = items[i];\r\n // @TODO: Shoudn't this be this._fieldId?\r\n // result[resultant.id] = resultant\r\n const id = resultant[this._idProp];\r\n result[id] = resultant;\r\n }\r\n return result;\r\n }\r\n else {\r\n if (id != null) {\r\n // a single item\r\n return item ?? null;\r\n }\r\n else {\r\n // just return our array\r\n return items;\r\n }\r\n }\r\n }\r\n /** @inheritDoc */\r\n getIds(options) {\r\n const data = this._data;\r\n const filter = options && options.filter;\r\n const order = options && options.order;\r\n const itemIds = [...data.keys()];\r\n const ids = [];\r\n if (filter) {\r\n // get filtered items\r\n if (order) {\r\n // create ordered list\r\n const items = [];\r\n for (let i = 0, len = itemIds.length; i < len; i++) {\r\n const id = itemIds[i];\r\n const item = this._data.get(id);\r\n if (item != null && filter(item)) {\r\n items.push(item);\r\n }\r\n }\r\n this._sort(items, order);\r\n for (let i = 0, len = items.length; i < len; i++) {\r\n ids.push(items[i][this._idProp]);\r\n }\r\n }\r\n else {\r\n // create unordered list\r\n for (let i = 0, len = itemIds.length; i < len; i++) {\r\n const id = itemIds[i];\r\n const item = this._data.get(id);\r\n if (item != null && filter(item)) {\r\n ids.push(item[this._idProp]);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n // get all items\r\n if (order) {\r\n // create an ordered list\r\n const items = [];\r\n for (let i = 0, len = itemIds.length; i < len; i++) {\r\n const id = itemIds[i];\r\n items.push(data.get(id));\r\n }\r\n this._sort(items, order);\r\n for (let i = 0, len = items.length; i < len; i++) {\r\n ids.push(items[i][this._idProp]);\r\n }\r\n }\r\n else {\r\n // create unordered list\r\n for (let i = 0, len = itemIds.length; i < len; i++) {\r\n const id = itemIds[i];\r\n const item = data.get(id);\r\n if (item != null) {\r\n ids.push(item[this._idProp]);\r\n }\r\n }\r\n }\r\n }\r\n return ids;\r\n }\r\n /** @inheritDoc */\r\n getDataSet() {\r\n return this;\r\n }\r\n /** @inheritDoc */\r\n forEach(callback, options) {\r\n const filter = options && options.filter;\r\n const data = this._data;\r\n const itemIds = [...data.keys()];\r\n if (options && options.order) {\r\n // execute forEach on ordered list\r\n const items = this.get(options);\r\n for (let i = 0, len = items.length; i < len; i++) {\r\n const item = items[i];\r\n const id = item[this._idProp];\r\n callback(item, id);\r\n }\r\n }\r\n else {\r\n // unordered\r\n for (let i = 0, len = itemIds.length; i < len; i++) {\r\n const id = itemIds[i];\r\n const item = this._data.get(id);\r\n if (item != null && (!filter || filter(item))) {\r\n callback(item, id);\r\n }\r\n }\r\n }\r\n }\r\n /** @inheritDoc */\r\n map(callback, options) {\r\n const filter = options && options.filter;\r\n const mappedItems = [];\r\n const data = this._data;\r\n const itemIds = [...data.keys()];\r\n // convert and filter items\r\n for (let i = 0, len = itemIds.length; i < len; i++) {\r\n const id = itemIds[i];\r\n const item = this._data.get(id);\r\n if (item != null && (!filter || filter(item))) {\r\n mappedItems.push(callback(item, id));\r\n }\r\n }\r\n // order items\r\n if (options && options.order) {\r\n this._sort(mappedItems, options.order);\r\n }\r\n return mappedItems;\r\n }\r\n /**\r\n * Filter the fields of an item.\r\n *\r\n * @param item - The item whose fields should be filtered.\r\n * @param fields - The names of the fields that will be kept.\r\n *\r\n * @typeParam K - Field name type.\r\n *\r\n * @returns The item without any additional fields.\r\n */\r\n _filterFields(item, fields) {\r\n if (!item) {\r\n // item is null\r\n return item;\r\n }\r\n return (Array.isArray(fields)\r\n ? // Use the supplied array\r\n fields\r\n : // Use the keys of the supplied object\r\n Object.keys(fields)).reduce((filteredItem, field) => {\r\n filteredItem[field] = item[field];\r\n return filteredItem;\r\n }, {});\r\n }\r\n /**\r\n * Sort the provided array with items.\r\n *\r\n * @param items - Items to be sorted in place.\r\n * @param order - A field name or custom sort function.\r\n *\r\n * @typeParam T - The type of the items in the items array.\r\n */\r\n _sort(items, order) {\r\n if (typeof order === \"string\") {\r\n // order by provided field name\r\n const name = order; // field name\r\n items.sort((a, b) => {\r\n // @TODO: How to treat missing properties?\r\n const av = a[name];\r\n const bv = b[name];\r\n return av > bv ? 1 : av < bv ? -1 : 0;\r\n });\r\n }\r\n else if (typeof order === \"function\") {\r\n // order by sort function\r\n items.sort(order);\r\n }\r\n else {\r\n // TODO: extend order by an Object {field:string, direction:string}\r\n // where direction can be 'asc' or 'desc'\r\n throw new TypeError(\"Order must be a function or a string\");\r\n }\r\n }\r\n /**\r\n * Remove an item or multiple items by “reference” (only the id is used) or by id.\r\n *\r\n * The method ignores removal of non-existing items, and returns an array containing the ids of the items which are actually removed from the DataSet.\r\n *\r\n * After the items are removed, the DataSet will trigger an event `remove` for the removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * // create a DataSet\r\n * const data = new vis.DataSet([\r\n * { id: 1, text: 'item 1' },\r\n * { id: 2, text: 'item 2' },\r\n * { id: 3, text: 'item 3' }\r\n * ])\r\n *\r\n * // remove items\r\n * const ids = data.remove([2, { id: 3 }, 4])\r\n *\r\n * console.log(ids) // [2, 3]\r\n * ```\r\n *\r\n * @param id - One or more items or ids of items to be removed.\r\n * @param senderId - Sender id.\r\n *\r\n * @returns The ids of the removed items.\r\n */\r\n remove(id, senderId) {\r\n const removedIds = [];\r\n const removedItems = [];\r\n // force everything to be an array for simplicity\r\n const ids = Array.isArray(id) ? id : [id];\r\n for (let i = 0, len = ids.length; i < len; i++) {\r\n const item = this._remove(ids[i]);\r\n if (item) {\r\n const itemId = item[this._idProp];\r\n if (itemId != null) {\r\n removedIds.push(itemId);\r\n removedItems.push(item);\r\n }\r\n }\r\n }\r\n if (removedIds.length) {\r\n this._trigger(\"remove\", { items: removedIds, oldData: removedItems }, senderId);\r\n }\r\n return removedIds;\r\n }\r\n /**\r\n * Remove an item by its id or reference.\r\n *\r\n * @param id - Id of an item or the item itself.\r\n *\r\n * @returns The removed item if removed, null otherwise.\r\n */\r\n _remove(id) {\r\n // @TODO: It origianlly returned the item although the docs say id.\r\n // The code expects the item, so probably an error in the docs.\r\n let ident;\r\n // confirm the id to use based on the args type\r\n if (isId(id)) {\r\n ident = id;\r\n }\r\n else if (id && typeof id === \"object\") {\r\n ident = id[this._idProp]; // look for the identifier field using ._idProp\r\n }\r\n // do the removing if the item is found\r\n if (ident != null && this._data.has(ident)) {\r\n const item = this._data.get(ident) || null;\r\n this._data.delete(ident);\r\n --this.length;\r\n return item;\r\n }\r\n return null;\r\n }\r\n /**\r\n * Clear the entire data set.\r\n *\r\n * After the items are removed, the [[DataSet]] will trigger an event `remove` for all removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.\r\n *\r\n * @param senderId - Sender id.\r\n *\r\n * @returns removedIds - The ids of all removed items.\r\n */\r\n clear(senderId) {\r\n const ids = [...this._data.keys()];\r\n const items = [];\r\n for (let i = 0, len = ids.length; i < len; i++) {\r\n items.push(this._data.get(ids[i]));\r\n }\r\n this._data.clear();\r\n this.length = 0;\r\n this._trigger(\"remove\", { items: ids, oldData: items }, senderId);\r\n return ids;\r\n }\r\n /**\r\n * Find the item with maximum value of a specified field.\r\n *\r\n * @param field - Name of the property that should be searched for max value.\r\n *\r\n * @returns Item containing max value, or null if no items.\r\n */\r\n max(field) {\r\n let max = null;\r\n let maxField = null;\r\n for (const item of this._data.values()) {\r\n const itemField = item[field];\r\n if (typeof itemField === \"number\" &&\r\n (maxField == null || itemField > maxField)) {\r\n max = item;\r\n maxField = itemField;\r\n }\r\n }\r\n return max || null;\r\n }\r\n /**\r\n * Find the item with minimum value of a specified field.\r\n *\r\n * @param field - Name of the property that should be searched for min value.\r\n *\r\n * @returns Item containing min value, or null if no items.\r\n */\r\n min(field) {\r\n let min = null;\r\n let minField = null;\r\n for (const item of this._data.values()) {\r\n const itemField = item[field];\r\n if (typeof itemField === \"number\" &&\r\n (minField == null || itemField < minField)) {\r\n min = item;\r\n minField = itemField;\r\n }\r\n }\r\n return min || null;\r\n }\r\n /**\r\n * Find all distinct values of a specified field\r\n *\r\n * @param prop - The property name whose distinct values should be returned.\r\n *\r\n * @returns Unordered array containing all distinct values. Items without specified property are ignored.\r\n */\r\n distinct(prop) {\r\n const data = this._data;\r\n const itemIds = [...data.keys()];\r\n const values = [];\r\n let count = 0;\r\n for (let i = 0, len = itemIds.length; i < len; i++) {\r\n const id = itemIds[i];\r\n const item = data.get(id);\r\n const value = item[prop];\r\n let exists = false;\r\n for (let j = 0; j < count; j++) {\r\n if (values[j] == value) {\r\n exists = true;\r\n break;\r\n }\r\n }\r\n if (!exists && value !== undefined) {\r\n values[count] = value;\r\n count++;\r\n }\r\n }\r\n return values;\r\n }\r\n /**\r\n * Add a single item. Will fail when an item with the same id already exists.\r\n *\r\n * @param item - A new item to be added.\r\n *\r\n * @returns Added item's id. An id is generated when it is not present in the item.\r\n */\r\n _addItem(item) {\r\n const fullItem = ensureFullItem(item, this._idProp);\r\n const id = fullItem[this._idProp];\r\n // check whether this id is already taken\r\n if (this._data.has(id)) {\r\n // item already exists\r\n throw new Error(\"Cannot add item: item with id \" + id + \" already exists\");\r\n }\r\n this._data.set(id, fullItem);\r\n ++this.length;\r\n return id;\r\n }\r\n /**\r\n * Update a single item: merge with existing item.\r\n * Will fail when the item has no id, or when there does not exist an item with the same id.\r\n *\r\n * @param update - The new item\r\n *\r\n * @returns The id of the updated item.\r\n */\r\n _updateItem(update) {\r\n const id = update[this._idProp];\r\n if (id == null) {\r\n throw new Error(\"Cannot update item: item has no id (item: \" +\r\n JSON.stringify(update) +\r\n \")\");\r\n }\r\n const item = this._data.get(id);\r\n if (!item) {\r\n // item doesn't exist\r\n throw new Error(\"Cannot update item: no item with id \" + id + \" found\");\r\n }\r\n this._data.set(id, { ...item, ...update });\r\n return id;\r\n }\r\n /** @inheritDoc */\r\n stream(ids) {\r\n if (ids) {\r\n const data = this._data;\r\n return new DataStream({\r\n *[Symbol.iterator]() {\r\n for (const id of ids) {\r\n const item = data.get(id);\r\n if (item != null) {\r\n yield [id, item];\r\n }\r\n }\r\n },\r\n });\r\n }\r\n else {\r\n return new DataStream({\r\n [Symbol.iterator]: this._data.entries.bind(this._data),\r\n });\r\n }\r\n }\r\n}\n\n/**\r\n * DataView\r\n *\r\n * A DataView offers a filtered and/or formatted view on a DataSet. One can subscribe to changes in a DataView, and easily get filtered or formatted data without having to specify filters and field types all the time.\r\n *\r\n * ## Example\r\n * ```javascript\r\n * // create a DataSet\r\n * var data = new vis.DataSet();\r\n * data.add([\r\n * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},\r\n * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},\r\n * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},\r\n * {id: 4, text: 'item 4'}\r\n * ]);\r\n *\r\n * // create a DataView\r\n * // the view will only contain items having a property group with value 1,\r\n * // and will only output fields id, text, and date.\r\n * var view = new vis.DataView(data, {\r\n * filter: function (item) {\r\n * return (item.group == 1);\r\n * },\r\n * fields: ['id', 'text', 'date']\r\n * });\r\n *\r\n * // subscribe to any change in the DataView\r\n * view.on('*', function (event, properties, senderId) {\r\n * console.log('event', event, properties);\r\n * });\r\n *\r\n * // update an item in the data set\r\n * data.update({id: 2, group: 1});\r\n *\r\n * // get all ids in the view\r\n * var ids = view.getIds();\r\n * console.log('ids', ids); // will output [1, 2]\r\n *\r\n * // get all items in the view\r\n * var items = view.get();\r\n * ```\r\n *\r\n * @typeParam Item - Item type that may or may not have an id.\r\n * @typeParam IdProp - Name of the property that contains the id.\r\n */\r\nclass DataView extends DataSetPart {\r\n /**\r\n * Create a DataView.\r\n *\r\n * @param data - The instance containing data (directly or indirectly).\r\n * @param options - Options to configure this data view.\r\n */\r\n constructor(data, options) {\r\n super();\r\n /** @inheritDoc */\r\n this.length = 0;\r\n this._ids = new Set(); // ids of the items currently in memory (just contains a boolean true)\r\n this._options = options || {};\r\n this._listener = this._onEvent.bind(this);\r\n this.setData(data);\r\n }\r\n /** @inheritDoc */\r\n get idProp() {\r\n return this.getDataSet().idProp;\r\n }\r\n // TODO: implement a function .config() to dynamically update things like configured filter\r\n // and trigger changes accordingly\r\n /**\r\n * Set a data source for the view.\r\n *\r\n * @param data - The instance containing data (directly or indirectly).\r\n *\r\n * @remarks\r\n * Note that when the data view is bound to a data set it won't be garbage\r\n * collected unless the data set is too. Use `dataView.setData(null)` or\r\n * `dataView.dispose()` to enable garbage collection before you lose the last\r\n * reference.\r\n */\r\n setData(data) {\r\n if (this._data) {\r\n // unsubscribe from current dataset\r\n if (this._data.off) {\r\n this._data.off(\"*\", this._listener);\r\n }\r\n // trigger a remove of all items in memory\r\n const ids = this._data.getIds({ filter: this._options.filter });\r\n const items = this._data.get(ids);\r\n this._ids.clear();\r\n this.length = 0;\r\n this._trigger(\"remove\", { items: ids, oldData: items });\r\n }\r\n if (data != null) {\r\n this._data = data;\r\n // trigger an add of all added items\r\n const ids = this._data.getIds({ filter: this._options.filter });\r\n for (let i = 0, len = ids.length; i < len; i++) {\r\n const id = ids[i];\r\n this._ids.add(id);\r\n }\r\n this.length = ids.length;\r\n this._trigger(\"add\", { items: ids });\r\n }\r\n else {\r\n this._data = new DataSet();\r\n }\r\n // subscribe to new dataset\r\n if (this._data.on) {\r\n this._data.on(\"*\", this._listener);\r\n }\r\n }\r\n /**\r\n * Refresh the DataView.\r\n * Useful when the DataView has a filter function containing a variable parameter.\r\n */\r\n refresh() {\r\n const ids = this._data.getIds({\r\n filter: this._options.filter,\r\n });\r\n const oldIds = [...this._ids];\r\n const newIds = {};\r\n const addedIds = [];\r\n const removedIds = [];\r\n const removedItems = [];\r\n // check for additions\r\n for (let i = 0, len = ids.length; i < len; i++) {\r\n const id = ids[i];\r\n newIds[id] = true;\r\n if (!this._ids.has(id)) {\r\n addedIds.push(id);\r\n this._ids.add(id);\r\n }\r\n }\r\n // check for removals\r\n for (let i = 0, len = oldIds.length; i < len; i++) {\r\n const id = oldIds[i];\r\n const item = this._data.get(id);\r\n if (item == null) {\r\n // @TODO: Investigate.\r\n // Doesn't happen during tests or examples.\r\n // Is it really impossible or could it eventually happen?\r\n // How to handle it if it does? The types guarantee non-nullable items.\r\n console.error(\"If you see this, report it please.\");\r\n }\r\n else if (!newIds[id]) {\r\n removedIds.push(id);\r\n removedItems.push(item);\r\n this._ids.delete(id);\r\n }\r\n }\r\n this.length += addedIds.length - removedIds.length;\r\n // trigger events\r\n if (addedIds.length) {\r\n this._trigger(\"add\", { items: addedIds });\r\n }\r\n if (removedIds.length) {\r\n this._trigger(\"remove\", { items: removedIds, oldData: removedItems });\r\n }\r\n }\r\n /** @inheritDoc */\r\n get(first, second) {\r\n if (this._data == null) {\r\n return null;\r\n }\r\n // parse the arguments\r\n let ids = null;\r\n let options;\r\n if (isId(first) || Array.isArray(first)) {\r\n ids = first;\r\n options = second;\r\n }\r\n else {\r\n options = first;\r\n }\r\n // extend the options with the default options and provided options\r\n const viewOptions = Object.assign({}, this._options, options);\r\n // create a combined filter method when needed\r\n const thisFilter = this._options.filter;\r\n const optionsFilter = options && options.filter;\r\n if (thisFilter && optionsFilter) {\r\n viewOptions.filter = (item) => {\r\n return thisFilter(item) && optionsFilter(item);\r\n };\r\n }\r\n if (ids == null) {\r\n return this._data.get(viewOptions);\r\n }\r\n else {\r\n return this._data.get(ids, viewOptions);\r\n }\r\n }\r\n /** @inheritDoc */\r\n getIds(options) {\r\n if (this._data.length) {\r\n const defaultFilter = this._options.filter;\r\n const optionsFilter = options != null ? options.filter : null;\r\n let filter;\r\n if (optionsFilter) {\r\n if (defaultFilter) {\r\n filter = (item) => {\r\n return defaultFilter(item) && optionsFilter(item);\r\n };\r\n }\r\n else {\r\n filter = optionsFilter;\r\n }\r\n }\r\n else {\r\n filter = defaultFilter;\r\n }\r\n return this._data.getIds({\r\n filter: filter,\r\n order: options && options.order,\r\n });\r\n }\r\n else {\r\n return [];\r\n }\r\n }\r\n /** @inheritDoc */\r\n forEach(callback, options) {\r\n if (this._data) {\r\n const defaultFilter = this._options.filter;\r\n const optionsFilter = options && options.filter;\r\n let filter;\r\n if (optionsFilter) {\r\n if (defaultFilter) {\r\n filter = function (item) {\r\n return defaultFilter(item) && optionsFilter(item);\r\n };\r\n }\r\n else {\r\n filter = optionsFilter;\r\n }\r\n }\r\n else {\r\n filter = defaultFilter;\r\n }\r\n this._data.forEach(callback, {\r\n filter: filter,\r\n order: options && options.order,\r\n });\r\n }\r\n }\r\n /** @inheritDoc */\r\n map(callback, options) {\r\n if (this._data) {\r\n const defaultFilter = this._options.filter;\r\n const optionsFilter = options && options.filter;\r\n let filter;\r\n if (optionsFilter) {\r\n if (defaultFilter) {\r\n filter = (item) => {\r\n return defaultFilter(item) && optionsFilter(item);\r\n };\r\n }\r\n else {\r\n filter = optionsFilter;\r\n }\r\n }\r\n else {\r\n filter = defaultFilter;\r\n }\r\n return this._data.map(callback, {\r\n filter: filter,\r\n order: options && options.order,\r\n });\r\n }\r\n else {\r\n return [];\r\n }\r\n }\r\n /** @inheritDoc */\r\n getDataSet() {\r\n return this._data.getDataSet();\r\n }\r\n /** @inheritDoc */\r\n stream(ids) {\r\n return this._data.stream(ids || {\r\n [Symbol.iterator]: this._ids.keys.bind(this._ids),\r\n });\r\n }\r\n /**\r\n * Render the instance unusable prior to garbage collection.\r\n *\r\n * @remarks\r\n * The intention of this method is to help discover scenarios where the data\r\n * view is being used when the programmer thinks it has been garbage collected\r\n * already. It's stricter version of `dataView.setData(null)`.\r\n */\r\n dispose() {\r\n if (this._data?.off) {\r\n this._data.off(\"*\", this._listener);\r\n }\r\n const message = \"This data view has already been disposed of.\";\r\n const replacement = {\r\n get: () => {\r\n throw new Error(message);\r\n },\r\n set: () => {\r\n throw new Error(message);\r\n },\r\n configurable: false,\r\n };\r\n for (const key of Reflect.ownKeys(DataView.prototype)) {\r\n Object.defineProperty(this, key, replacement);\r\n }\r\n }\r\n /**\r\n * Event listener. Will propagate all events from the connected data set to the subscribers of the DataView, but will filter the items and only trigger when there are changes in the filtered data set.\r\n *\r\n * @param event - The name of the event.\r\n * @param params - Parameters of the event.\r\n * @param senderId - Id supplied by the sender.\r\n */\r\n _onEvent(event, params, senderId) {\r\n if (!params || !params.items || !this._data) {\r\n return;\r\n }\r\n const ids = params.items;\r\n const addedIds = [];\r\n const updatedIds = [];\r\n const removedIds = [];\r\n const oldItems = [];\r\n const updatedItems = [];\r\n const removedItems = [];\r\n switch (event) {\r\n case \"add\":\r\n // filter the ids of the added items\r\n for (let i = 0, len = ids.length; i < len; i++) {\r\n const id = ids[i];\r\n const item = this.get(id);\r\n if (item) {\r\n this._ids.add(id);\r\n addedIds.push(id);\r\n }\r\n }\r\n break;\r\n case \"update\":\r\n // determine the event from the views viewpoint: an updated\r\n // item can be added, updated, or removed from this view.\r\n for (let i = 0, len = ids.length; i < len; i++) {\r\n const id = ids[i];\r\n const item = this.get(id);\r\n if (item) {\r\n if (this._ids.has(id)) {\r\n updatedIds.push(id);\r\n updatedItems.push(params.data[i]);\r\n oldItems.push(params.oldData[i]);\r\n }\r\n else {\r\n this._ids.add(id);\r\n addedIds.push(id);\r\n }\r\n }\r\n else {\r\n if (this._ids.has(id)) {\r\n this._ids.delete(id);\r\n removedIds.push(id);\r\n removedItems.push(params.oldData[i]);\r\n }\r\n }\r\n }\r\n break;\r\n case \"remove\":\r\n // filter the ids of the removed items\r\n for (let i = 0, len = ids.length; i < len; i++) {\r\n const id = ids[i];\r\n if (this._ids.has(id)) {\r\n this._ids.delete(id);\r\n removedIds.push(id);\r\n removedItems.push(params.oldData[i]);\r\n }\r\n }\r\n break;\r\n }\r\n this.length += addedIds.length - removedIds.length;\r\n if (addedIds.length) {\r\n this._trigger(\"add\", { items: addedIds }, senderId);\r\n }\r\n if (updatedIds.length) {\r\n this._trigger(\"update\", { items: updatedIds, oldData: oldItems, data: updatedItems }, senderId);\r\n }\r\n if (removedIds.length) {\r\n this._trigger(\"remove\", { items: removedIds, oldData: removedItems }, senderId);\r\n }\r\n }\r\n}\n\n/**\r\n * Check that given value is compatible with Vis Data Set interface.\r\n *\r\n * @param idProp - The expected property to contain item id.\r\n * @param v - The value to be tested.\r\n *\r\n * @returns True if all expected values and methods match, false otherwise.\r\n */\r\nfunction isDataSetLike(idProp, v) {\r\n return (typeof v === \"object\" &&\r\n v !== null &&\r\n idProp === v.idProp &&\r\n typeof v.add === \"function\" &&\r\n typeof v.clear === \"function\" &&\r\n typeof v.distinct === \"function\" &&\r\n typeof v.forEach === \"function\" &&\r\n typeof v.get === \"function\" &&\r\n typeof v.getDataSet === \"function\" &&\r\n typeof v.getIds === \"function\" &&\r\n typeof v.length === \"number\" &&\r\n typeof v.map === \"function\" &&\r\n typeof v.max === \"function\" &&\r\n typeof v.min === \"function\" &&\r\n typeof v.off === \"function\" &&\r\n typeof v.on === \"function\" &&\r\n typeof v.remove === \"function\" &&\r\n typeof v.setOptions === \"function\" &&\r\n typeof v.stream === \"function\" &&\r\n typeof v.update === \"function\" &&\r\n typeof v.updateOnly === \"function\");\r\n}\n\n/**\r\n * Check that given value is compatible with Vis Data View interface.\r\n *\r\n * @param idProp - The expected property to contain item id.\r\n * @param v - The value to be tested.\r\n *\r\n * @returns True if all expected values and methods match, false otherwise.\r\n */\r\nfunction isDataViewLike(idProp, v) {\r\n return (typeof v === \"object\" &&\r\n v !== null &&\r\n idProp === v.idProp &&\r\n typeof v.forEach === \"function\" &&\r\n typeof v.get === \"function\" &&\r\n typeof v.getDataSet === \"function\" &&\r\n typeof v.getIds === \"function\" &&\r\n typeof v.length === \"number\" &&\r\n typeof v.map === \"function\" &&\r\n typeof v.off === \"function\" &&\r\n typeof v.on === \"function\" &&\r\n typeof v.stream === \"function\" &&\r\n isDataSetLike(idProp, v.getDataSet()));\r\n}\n\nexport { DataSet, DataStream, DataView, Queue, createNewDataPipeFrom, isDataSetLike, isDataViewLike };\n//# sourceMappingURL=vis-data.js.map\n","var global = require('../internals/global');\nvar toString = require('../internals/to-string');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar $parseFloat = global.parseFloat;\nvar FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\nmodule.exports = FORCED ? function parseFloat(string) {\n var trimmedString = trim(toString(string));\n var result = $parseFloat(trimmedString);\n return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;\n} : $parseFloat;\n","var $ = require('../internals/export');\nvar parseFloatImplementation = require('../internals/number-parse-float');\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\n$({ global: true, forced: parseFloat != parseFloatImplementation }, {\n parseFloat: parseFloatImplementation\n});\n","require('../modules/es.parse-float');\nvar path = require('../internals/path');\n\nmodule.exports = path.parseFloat;\n","var $ = require('../internals/export');\n\n// `Number.isNaN` method\n// https://tc39.es/ecma262/#sec-number.isnan\n$({ target: 'Number', stat: true }, {\n isNaN: function isNaN(number) {\n // eslint-disable-next-line no-self-compare -- NaN check\n return number != number;\n }\n});\n","require('../../modules/es.number.is-nan');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Number.isNaN;\n","/**\n * @prototype Point3d\n * @param {number} [x]\n * @param {number} [y]\n * @param {number} [z]\n */\nfunction Point3d(x, y, z) {\n this.x = x !== undefined ? x : 0;\n this.y = y !== undefined ? y : 0;\n this.z = z !== undefined ? z : 0;\n}\n\n/**\n * Subtract the two provided points, returns a-b\n * @param {Point3d} a\n * @param {Point3d} b\n * @return {Point3d} a-b\n */\nPoint3d.subtract = function(a, b) {\n var sub = new Point3d();\n sub.x = a.x - b.x;\n sub.y = a.y - b.y;\n sub.z = a.z - b.z;\n return sub;\n};\n\n/**\n * Add the two provided points, returns a+b\n * @param {Point3d} a\n * @param {Point3d} b\n * @return {Point3d} a+b\n */\nPoint3d.add = function(a, b) {\n var sum = new Point3d();\n sum.x = a.x + b.x;\n sum.y = a.y + b.y;\n sum.z = a.z + b.z;\n return sum;\n};\n\n/**\n * Calculate the average of two 3d points\n * @param {Point3d} a\n * @param {Point3d} b\n * @return {Point3d} The average, (a+b)/2\n */\nPoint3d.avg = function(a, b) {\n return new Point3d(\n (a.x + b.x) / 2,\n (a.y + b.y) / 2,\n (a.z + b.z) / 2\n );\n};\n\n/**\n * Scale the provided point by a scalar, returns p*c\n * @param {Point3d} p\n * @param {number} c\n * @return {Point3d} p*c\n */\nPoint3d.scalarProduct = function(p, c) {\n return new Point3d(p.x * c, p.y * c, p.z * c);\n};\n\n/**\n * Calculate the dot product of the two provided points, returns a.b\n * Documentation: http://en.wikipedia.org/wiki/Dot_product\n * @param {Point3d} a\n * @param {Point3d} b\n * @return {Point3d} dot product a.b\n */\nPoint3d.dotProduct = function(a, b) {\n return a.x * b.x + a.y * b.y + a.z * b.z;\n};\n\n/**\n * Calculate the cross product of the two provided points, returns axb\n * Documentation: http://en.wikipedia.org/wiki/Cross_product\n * @param {Point3d} a\n * @param {Point3d} b\n * @return {Point3d} cross product axb\n */\nPoint3d.crossProduct = function(a, b) {\n var crossproduct = new Point3d();\n\n crossproduct.x = a.y * b.z - a.z * b.y;\n crossproduct.y = a.z * b.x - a.x * b.z;\n crossproduct.z = a.x * b.y - a.y * b.x;\n\n return crossproduct;\n};\n\n\n/**\n * Retrieve the length of the vector (or the distance from this point to the origin\n * @return {number} length\n */\nPoint3d.prototype.length = function() {\n return Math.sqrt(\n this.x * this.x +\n this.y * this.y +\n this.z * this.z\n );\n};\n\n\n/**\n * Return a normalized vector pointing in the same direction.\n * @return {Point3d} normalized\n */\nPoint3d.prototype.normalize = function() {\n return Point3d.scalarProduct(this, 1/this.length());\n};\n\n\nmodule.exports = Point3d;\n","/**\n * @prototype Point2d\n * @param {number} [x]\n * @param {number} [y]\n */\nfunction Point2d (x, y) {\n this.x = x !== undefined ? x : 0;\n this.y = y !== undefined ? y : 0;\n}\n\nmodule.exports = Point2d;\n","import * as util from \"vis-util/esnext\";\n\n/**\n * An html slider control with start/stop/prev/next buttons\n *\n * @constructor Slider\n * @param {Element} container The element where the slider will be created\n * @param {Object} options Available options:\n * {boolean} visible If true (default) the\n * slider is visible.\n */\nfunction Slider(container, options) {\n if (container === undefined) {\n throw new Error('No container element defined');\n }\n this.container = container;\n this.visible = (options && options.visible != undefined) ? options.visible : true;\n\n if (this.visible) {\n this.frame = document.createElement('DIV');\n //this.frame.style.backgroundColor = '#E5E5E5';\n this.frame.style.width = '100%';\n this.frame.style.position = 'relative';\n this.container.appendChild(this.frame);\n\n this.frame.prev = document.createElement('INPUT');\n this.frame.prev.type = 'BUTTON';\n this.frame.prev.value = 'Prev';\n this.frame.appendChild(this.frame.prev);\n\n this.frame.play = document.createElement('INPUT');\n this.frame.play.type = 'BUTTON';\n this.frame.play.value = 'Play';\n this.frame.appendChild(this.frame.play);\n\n this.frame.next = document.createElement('INPUT');\n this.frame.next.type = 'BUTTON';\n this.frame.next.value = 'Next';\n this.frame.appendChild(this.frame.next);\n\n this.frame.bar = document.createElement('INPUT');\n this.frame.bar.type = 'BUTTON';\n this.frame.bar.style.position = 'absolute';\n this.frame.bar.style.border = '1px solid red';\n this.frame.bar.style.width = '100px';\n this.frame.bar.style.height = '6px';\n this.frame.bar.style.borderRadius = '2px';\n this.frame.bar.style.MozBorderRadius = '2px';\n this.frame.bar.style.border = '1px solid #7F7F7F';\n this.frame.bar.style.backgroundColor = '#E5E5E5';\n this.frame.appendChild(this.frame.bar);\n\n this.frame.slide = document.createElement('INPUT');\n this.frame.slide.type = 'BUTTON';\n this.frame.slide.style.margin = '0px';\n this.frame.slide.value = ' ';\n this.frame.slide.style.position = 'relative';\n this.frame.slide.style.left = '-100px';\n this.frame.appendChild(this.frame.slide);\n\n // create events\n var me = this;\n this.frame.slide.onmousedown = function (event) {me._onMouseDown(event);};\n this.frame.prev.onclick = function (event) {me.prev(event);};\n this.frame.play.onclick = function (event) {me.togglePlay(event);};\n this.frame.next.onclick = function (event) {me.next(event);};\n }\n\n this.onChangeCallback = undefined;\n\n this.values = [];\n this.index = undefined;\n\n this.playTimeout = undefined;\n this.playInterval = 1000; // milliseconds\n this.playLoop = true;\n}\n\n/**\n * Select the previous index\n */\nSlider.prototype.prev = function() {\n var index = this.getIndex();\n if (index > 0) {\n index--;\n this.setIndex(index);\n }\n};\n\n/**\n * Select the next index\n */\nSlider.prototype.next = function() {\n var index = this.getIndex();\n if (index < this.values.length - 1) {\n index++;\n this.setIndex(index);\n }\n};\n\n/**\n * Select the next index\n */\nSlider.prototype.playNext = function() {\n var start = new Date();\n\n var index = this.getIndex();\n if (index < this.values.length - 1) {\n index++;\n this.setIndex(index);\n }\n else if (this.playLoop) {\n // jump to the start\n index = 0;\n this.setIndex(index);\n }\n\n var end = new Date();\n var diff = (end - start);\n\n // calculate how much time it to to set the index and to execute the callback\n // function.\n var interval = Math.max(this.playInterval - diff, 0);\n // document.title = diff // TODO: cleanup\n\n var me = this;\n this.playTimeout = setTimeout(function() {me.playNext();}, interval);\n};\n\n/**\n * Toggle start or stop playing\n */\nSlider.prototype.togglePlay = function() {\n if (this.playTimeout === undefined) {\n this.play();\n } else {\n this.stop();\n }\n};\n\n/**\n * Start playing\n */\nSlider.prototype.play = function() {\n // Test whether already playing\n if (this.playTimeout) return;\n\n this.playNext();\n\n if (this.frame) {\n this.frame.play.value = 'Stop';\n }\n};\n\n/**\n * Stop playing\n */\nSlider.prototype.stop = function() {\n clearInterval(this.playTimeout);\n this.playTimeout = undefined;\n\n if (this.frame) {\n this.frame.play.value = 'Play';\n }\n};\n\n/**\n * Set a callback function which will be triggered when the value of the\n * slider bar has changed.\n *\n * @param {function} callback\n */\nSlider.prototype.setOnChangeCallback = function(callback) {\n this.onChangeCallback = callback;\n};\n\n/**\n * Set the interval for playing the list\n * @param {number} interval The interval in milliseconds\n */\nSlider.prototype.setPlayInterval = function(interval) {\n this.playInterval = interval;\n};\n\n/**\n * Retrieve the current play interval\n * @return {number} interval The interval in milliseconds\n */\nSlider.prototype.getPlayInterval = function() {\n return this.playInterval;\n};\n\n/**\n * Set looping on or off\n * @param {boolean} doLoop If true, the slider will jump to the start when\n * the end is passed, and will jump to the end\n * when the start is passed.\n *\n */\nSlider.prototype.setPlayLoop = function(doLoop) {\n this.playLoop = doLoop;\n};\n\n\n/**\n * Execute the onchange callback function\n */\nSlider.prototype.onChange = function() {\n if (this.onChangeCallback !== undefined) {\n this.onChangeCallback();\n }\n};\n\n/**\n * redraw the slider on the correct place\n */\nSlider.prototype.redraw = function() {\n if (this.frame) {\n // resize the bar\n this.frame.bar.style.top = (this.frame.clientHeight/2 -\n this.frame.bar.offsetHeight/2) + 'px';\n this.frame.bar.style.width = (this.frame.clientWidth -\n this.frame.prev.clientWidth -\n this.frame.play.clientWidth -\n this.frame.next.clientWidth - 30) + 'px';\n\n // position the slider button\n var left = this.indexToLeft(this.index);\n this.frame.slide.style.left = (left) + 'px';\n }\n};\n\n\n/**\n * Set the list with values for the slider\n * @param {Array} values A javascript array with values (any type)\n */\nSlider.prototype.setValues = function(values) {\n this.values = values;\n\n if (this.values.length > 0)\n this.setIndex(0);\n else\n this.index = undefined;\n};\n\n/**\n * Select a value by its index\n * @param {number} index\n */\nSlider.prototype.setIndex = function(index) {\n if (index < this.values.length) {\n this.index = index;\n\n this.redraw();\n this.onChange();\n }\n else {\n throw new Error('Index out of range');\n }\n};\n\n/**\n * retrieve the index of the currently selected vaue\n * @return {number} index\n */\nSlider.prototype.getIndex = function() {\n return this.index;\n};\n\n\n/**\n * retrieve the currently selected value\n * @return {*} value\n */\nSlider.prototype.get = function() {\n return this.values[this.index];\n};\n\n\nSlider.prototype._onMouseDown = function(event) {\n // only react on left mouse button down\n var leftButtonDown = event.which ? (event.which === 1) : (event.button === 1);\n if (!leftButtonDown) return;\n\n this.startClientX = event.clientX;\n this.startSlideX = parseFloat(this.frame.slide.style.left);\n\n this.frame.style.cursor = 'move';\n\n // add event listeners to handle moving the contents\n // we store the function onmousemove and onmouseup in the graph, so we can\n // remove the eventlisteners lateron in the function mouseUp()\n var me = this;\n this.onmousemove = function (event) {me._onMouseMove(event);};\n this.onmouseup = function (event) {me._onMouseUp(event);};\n util.addEventListener(document, 'mousemove', this.onmousemove);\n util.addEventListener(document, 'mouseup', this.onmouseup);\n util.preventDefault(event);\n};\n\n\nSlider.prototype.leftToIndex = function (left) {\n var width = parseFloat(this.frame.bar.style.width) -\n this.frame.slide.clientWidth - 10;\n var x = left - 3;\n\n var index = Math.round(x / width * (this.values.length-1));\n if (index < 0) index = 0;\n if (index > this.values.length-1) index = this.values.length-1;\n\n return index;\n};\n\nSlider.prototype.indexToLeft = function (index) {\n var width = parseFloat(this.frame.bar.style.width) -\n this.frame.slide.clientWidth - 10;\n\n var x = index / (this.values.length-1) * width;\n var left = x + 3;\n\n return left;\n};\n\n\n\nSlider.prototype._onMouseMove = function (event) {\n var diff = event.clientX - this.startClientX;\n var x = this.startSlideX + diff;\n\n var index = this.leftToIndex(x);\n\n this.setIndex(index);\n\n util.preventDefault();\n};\n\n\nSlider.prototype._onMouseUp = function (event) { // eslint-disable-line no-unused-vars\n this.frame.style.cursor = 'auto';\n\n // remove event listeners\n util.removeEventListener(document, 'mousemove', this.onmousemove);\n util.removeEventListener(document, 'mouseup', this.onmouseup);\n\n util.preventDefault();\n};\n\nexport default Slider;\n","/**\n * @prototype StepNumber\n * The class StepNumber is an iterator for Numbers. You provide a start and end\n * value, and a best step size. StepNumber itself rounds to fixed values and\n * a finds the step that best fits the provided step.\n *\n * If prettyStep is true, the step size is chosen as close as possible to the\n * provided step, but being a round value like 1, 2, 5, 10, 20, 50, ....\n *\n * Example usage:\n * var step = new StepNumber(0, 10, 2.5, true);\n * step.start();\n * while (!step.end()) {\n * alert(step.getCurrent());\n * step.next();\n * }\n *\n * Version: 1.0\n *\n * @param {number} start The start value\n * @param {number} end The end value\n * @param {number} step Optional. Step size. Must be a positive value.\n * @param {boolean} prettyStep Optional. If true, the step size is rounded\n * To a pretty step size (like 1, 2, 5, 10, 20, 50, ...)\n */\nfunction StepNumber(start, end, step, prettyStep) {\n // set default values\n this._start = 0;\n this._end = 0;\n this._step = 1;\n this.prettyStep = true;\n this.precision = 5;\n\n this._current = 0;\n this.setRange(start, end, step, prettyStep);\n}\n\n\n/**\n * Check for input values, to prevent disasters from happening\n *\n * Source: http://stackoverflow.com/a/1830844\n *\n * @param {string} n\n * @returns {boolean}\n */\nStepNumber.prototype.isNumeric = function(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n};\n\n\n/**\n * Set a new range: start, end and step.\n *\n * @param {number} start The start value\n * @param {number} end The end value\n * @param {number} step Optional. Step size. Must be a positive value.\n * @param {boolean} prettyStep Optional. If true, the step size is rounded\n * To a pretty step size (like 1, 2, 5, 10, 20, 50, ...)\n */\nStepNumber.prototype.setRange = function(start, end, step, prettyStep) {\n if (!this.isNumeric(start)) {\n throw new Error('Parameter \\'start\\' is not numeric; value: ' + start);\n }\n if (!this.isNumeric(end)) {\n throw new Error('Parameter \\'end\\' is not numeric; value: ' + start);\n }\n if (!this.isNumeric(step)) {\n throw new Error('Parameter \\'step\\' is not numeric; value: ' + start);\n }\n\n this._start = start ? start : 0;\n this._end = end ? end : 0;\n\n this.setStep(step, prettyStep);\n};\n\n/**\n * Set a new step size\n * @param {number} step New step size. Must be a positive value\n * @param {boolean} prettyStep Optional. If true, the provided step is rounded\n * to a pretty step size (like 1, 2, 5, 10, 20, 50, ...)\n */\nStepNumber.prototype.setStep = function(step, prettyStep) {\n if (step === undefined || step <= 0)\n return;\n\n if (prettyStep !== undefined)\n this.prettyStep = prettyStep;\n\n if (this.prettyStep === true)\n this._step = StepNumber.calculatePrettyStep(step);\n else\n this._step = step;\n};\n\n/**\n * Calculate a nice step size, closest to the desired step size.\n * Returns a value in one of the ranges 1*10^n, 2*10^n, or 5*10^n, where n is an\n * integer Number. For example 1, 2, 5, 10, 20, 50, etc...\n * @param {number} step Desired step size\n * @return {number} Nice step size\n */\nStepNumber.calculatePrettyStep = function (step) {\n var log10 = function (x) {return Math.log(x) / Math.LN10;};\n\n // try three steps (multiple of 1, 2, or 5\n var step1 = Math.pow(10, Math.round(log10(step))),\n step2 = 2 * Math.pow(10, Math.round(log10(step / 2))),\n step5 = 5 * Math.pow(10, Math.round(log10(step / 5)));\n\n // choose the best step (closest to minimum step)\n var prettyStep = step1;\n if (Math.abs(step2 - step) <= Math.abs(prettyStep - step)) prettyStep = step2;\n if (Math.abs(step5 - step) <= Math.abs(prettyStep - step)) prettyStep = step5;\n\n // for safety\n if (prettyStep <= 0) {\n prettyStep = 1;\n }\n\n return prettyStep;\n};\n\n/**\n * returns the current value of the step\n * @return {number} current value\n */\nStepNumber.prototype.getCurrent = function () {\n return parseFloat(this._current.toPrecision(this.precision));\n};\n\n/**\n * returns the current step size\n * @return {number} current step size\n */\nStepNumber.prototype.getStep = function () {\n return this._step;\n};\n\n/**\n * Set the current to its starting value.\n *\n * By default, this will be the largest value smaller than start, which\n * is a multiple of the step size.\n *\n * Parameters checkFirst is optional, default false.\n * If set to true, move the current value one step if smaller than start.\n *\n * @param {boolean} [checkFirst=false]\n */\nStepNumber.prototype.start = function(checkFirst) {\n if (checkFirst === undefined) {\n checkFirst = false;\n }\n\n this._current = this._start - this._start % this._step;\n\n if (checkFirst) {\n if (this.getCurrent() < this._start) {\n this.next();\n }\n }\n};\n\n\n/**\n * Do a step, add the step size to the current value\n */\nStepNumber.prototype.next = function () {\n this._current += this._step;\n};\n\n/**\n * Returns true whether the end is reached\n * @return {boolean} True if the current value has passed the end value.\n */\nStepNumber.prototype.end = function () {\n return (this._current > this._end);\n};\n\nmodule.exports = StepNumber;\n","// `Math.sign` method implementation\n// https://tc39.es/ecma262/#sec-math.sign\n// eslint-disable-next-line es/no-math-sign -- safe\nmodule.exports = Math.sign || function sign(x) {\n // eslint-disable-next-line no-self-compare -- NaN check\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n};\n","var $ = require('../internals/export');\nvar sign = require('../internals/math-sign');\n\n// `Math.sign` method\n// https://tc39.es/ecma262/#sec-math.sign\n$({ target: 'Math', stat: true }, {\n sign: sign\n});\n","require('../../modules/es.math.sign');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Math.sign;\n","import Point3d from \"./Point3d\";\n\n/**\n * The camera is mounted on a (virtual) camera arm. The camera arm can rotate\n * The camera is always looking in the direction of the origin of the arm.\n * This way, the camera always rotates around one fixed point, the location\n * of the camera arm.\n *\n * Documentation:\n * http://en.wikipedia.org/wiki/3D_projection\n * @class Camera\n */\nfunction Camera() {\n this.armLocation = new Point3d();\n this.armRotation = {};\n this.armRotation.horizontal = 0;\n this.armRotation.vertical = 0;\n this.armLength = 1.7;\n this.cameraOffset = new Point3d();\n this.offsetMultiplier = 0.6;\n\n this.cameraLocation = new Point3d();\n this.cameraRotation = new Point3d(0.5*Math.PI, 0, 0);\n\n this.calculateCameraOrientation();\n}\n\n/**\n * Set offset camera in camera coordinates\n * @param {number} x offset by camera horisontal\n * @param {number} y offset by camera vertical\n */\nCamera.prototype.setOffset = function(x, y) {\n var abs = Math.abs,\n sign = Math.sign,\n mul = this.offsetMultiplier,\n border = this.armLength * mul;\n\n if (abs(x) > border) {\n x = sign(x) * border;\n }\n if (abs(y) > border) {\n y = sign(y) * border;\n }\n this.cameraOffset.x = x;\n this.cameraOffset.y = y;\n this.calculateCameraOrientation();\n};\n\n\n/**\n * Get camera offset by horizontal and vertical\n * @returns {number}\n */\nCamera.prototype.getOffset = function() {\n return this.cameraOffset;\n};\n\n/**\n * Set the location (origin) of the arm\n * @param {number} x Normalized value of x\n * @param {number} y Normalized value of y\n * @param {number} z Normalized value of z\n */\nCamera.prototype.setArmLocation = function(x, y, z) {\n this.armLocation.x = x;\n this.armLocation.y = y;\n this.armLocation.z = z;\n\n this.calculateCameraOrientation();\n};\n\n/**\n * Set the rotation of the camera arm\n * @param {number} horizontal The horizontal rotation, between 0 and 2*PI.\n * Optional, can be left undefined.\n * @param {number} vertical The vertical rotation, between 0 and 0.5*PI\n * if vertical=0.5*PI, the graph is shown from the\n * top. Optional, can be left undefined.\n */\nCamera.prototype.setArmRotation = function(horizontal, vertical) {\n if (horizontal !== undefined) {\n this.armRotation.horizontal = horizontal;\n }\n\n if (vertical !== undefined) {\n this.armRotation.vertical = vertical;\n if (this.armRotation.vertical < 0) this.armRotation.vertical = 0;\n if (this.armRotation.vertical > 0.5*Math.PI) this.armRotation.vertical = 0.5*Math.PI;\n }\n\n if (horizontal !== undefined || vertical !== undefined) {\n this.calculateCameraOrientation();\n }\n};\n\n/**\n * Retrieve the current arm rotation\n * @return {object} An object with parameters horizontal and vertical\n */\nCamera.prototype.getArmRotation = function() {\n var rot = {};\n rot.horizontal = this.armRotation.horizontal;\n rot.vertical = this.armRotation.vertical;\n\n return rot;\n};\n\n/**\n * Set the (normalized) length of the camera arm.\n * @param {number} length A length between 0.71 and 5.0\n */\nCamera.prototype.setArmLength = function(length) {\n if (length === undefined)\n return;\n\n this.armLength = length;\n\n // Radius must be larger than the corner of the graph,\n // which has a distance of sqrt(0.5^2+0.5^2) = 0.71 from the center of the\n // graph\n if (this.armLength < 0.71) this.armLength = 0.71;\n if (this.armLength > 5.0) this.armLength = 5.0;\n\n this.setOffset(this.cameraOffset.x, this.cameraOffset.y);\n this.calculateCameraOrientation();\n};\n\n/**\n * Retrieve the arm length\n * @return {number} length\n */\nCamera.prototype.getArmLength = function() {\n return this.armLength;\n};\n\n/**\n * Retrieve the camera location\n * @return {Point3d} cameraLocation\n */\nCamera.prototype.getCameraLocation = function() {\n return this.cameraLocation;\n};\n\n/**\n * Retrieve the camera rotation\n * @return {Point3d} cameraRotation\n */\nCamera.prototype.getCameraRotation = function() {\n return this.cameraRotation;\n};\n\n/**\n * Calculate the location and rotation of the camera based on the\n * position and orientation of the camera arm\n */\nCamera.prototype.calculateCameraOrientation = function() {\n // calculate location of the camera\n this.cameraLocation.x = this.armLocation.x - this.armLength * Math.sin(this.armRotation.horizontal) * Math.cos(this.armRotation.vertical);\n this.cameraLocation.y = this.armLocation.y - this.armLength * Math.cos(this.armRotation.horizontal) * Math.cos(this.armRotation.vertical);\n this.cameraLocation.z = this.armLocation.z + this.armLength * Math.sin(this.armRotation.vertical);\n\n // calculate rotation of the camera\n this.cameraRotation.x = Math.PI/2 - this.armRotation.vertical;\n this.cameraRotation.y = 0;\n this.cameraRotation.z = -this.armRotation.horizontal;\n\n var xa = this.cameraRotation.x;\n var za = this.cameraRotation.z;\n var dx = this.cameraOffset.x;\n var dy = this.cameraOffset.y;\n var sin = Math.sin, cos = Math.cos;\n\n this.cameraLocation.x = this.cameraLocation.x + dx * cos(za) + dy * - sin(za) * cos(xa);\n this.cameraLocation.y = this.cameraLocation.y + dx * sin(za) + dy * cos(za) * cos(xa);\n this.cameraLocation.z = this.cameraLocation.z + dy * sin(xa);\n};\n\nexport default Camera;\n","////////////////////////////////////////////////////////////////////////////////\n// This modules handles the options for Graph3d.\n//\n////////////////////////////////////////////////////////////////////////////////\nimport * as util from \"vis-util/esnext\";\nimport Camera from \"./Camera\";\nimport Point3d from \"./Point3d\";\n\n\n// enumerate the available styles\nvar STYLE = {\n BAR : 0,\n BARCOLOR: 1,\n BARSIZE : 2,\n DOT : 3,\n DOTLINE : 4,\n DOTCOLOR: 5,\n DOTSIZE : 6,\n GRID : 7,\n LINE : 8,\n SURFACE : 9\n};\n\n\n// The string representations of the styles\nvar STYLENAME = {\n 'dot' : STYLE.DOT,\n 'dot-line' : STYLE.DOTLINE,\n 'dot-color': STYLE.DOTCOLOR,\n 'dot-size' : STYLE.DOTSIZE,\n 'line' : STYLE.LINE,\n 'grid' : STYLE.GRID,\n 'surface' : STYLE.SURFACE,\n 'bar' : STYLE.BAR,\n 'bar-color': STYLE.BARCOLOR,\n 'bar-size' : STYLE.BARSIZE\n};\n\n\n/**\n * Field names in the options hash which are of relevance to the user.\n *\n * Specifically, these are the fields which require no special handling,\n * and can be directly copied over.\n */\nvar OPTIONKEYS = [\n 'width',\n 'height',\n 'filterLabel',\n 'legendLabel',\n 'xLabel',\n 'yLabel',\n 'zLabel',\n 'xValueLabel',\n 'yValueLabel',\n 'zValueLabel',\n 'showXAxis',\n 'showYAxis',\n 'showZAxis',\n 'showGrayBottom',\n 'showGrid',\n 'showPerspective',\n 'showShadow',\n 'showSurfaceGrid',\n 'keepAspectRatio',\n 'rotateAxisLabels',\n 'verticalRatio',\n 'dotSizeRatio',\n 'dotSizeMinFraction',\n 'dotSizeMaxFraction',\n 'showAnimationControls',\n 'animationInterval',\n 'animationPreload',\n 'animationAutoStart',\n 'axisColor',\n 'axisFontSize',\n 'axisFontType',\n 'gridColor',\n 'xCenter',\n 'yCenter',\n 'zoomable',\n 'tooltipDelay',\n 'ctrlToZoom'\n];\n\n\n/**\n * Field names in the options hash which are of relevance to the user.\n *\n * Same as OPTIONKEYS, but internally these fields are stored with \n * prefix 'default' in the name.\n */\nvar PREFIXEDOPTIONKEYS = [\n 'xBarWidth',\n 'yBarWidth',\n 'valueMin',\n 'valueMax',\n 'xMin',\n 'xMax',\n 'xStep',\n 'yMin',\n 'yMax',\n 'yStep',\n 'zMin',\n 'zMax',\n 'zStep'\n];\n\n\n// Placeholder for DEFAULTS reference\nvar DEFAULTS = undefined; \n\n\n/**\n * Check if given hash is empty.\n *\n * Source: http://stackoverflow.com/a/679937\n *\n * @param {object} obj\n * @returns {boolean}\n */\nfunction isEmpty(obj) {\n for(var prop in obj) {\n if (obj.hasOwnProperty(prop))\n return false;\n }\n\n return true;\n}\n\n\n/**\n * Make first letter of parameter upper case.\n *\n * Source: http://stackoverflow.com/a/1026087\n *\n * @param {string} str\n * @returns {string}\n */\nfunction capitalize(str) {\n if (str === undefined || str === \"\" || typeof str != \"string\") {\n return str;\n }\n\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\n\n\n/**\n * Add a prefix to a field name, taking style guide into account\n *\n * @param {string} prefix\n * @param {string} fieldName\n * @returns {string}\n */\nfunction prefixFieldName(prefix, fieldName) {\n if (prefix === undefined || prefix === \"\") {\n return fieldName;\n }\n\n return prefix + capitalize(fieldName);\n}\n\n\n/**\n * Forcibly copy fields from src to dst in a controlled manner.\n *\n * A given field in dst will always be overwitten. If this field\n * is undefined or not present in src, the field in dst will \n * be explicitly set to undefined.\n * \n * The intention here is to be able to reset all option fields.\n * \n * Only the fields mentioned in array 'fields' will be handled.\n *\n * @param {object} src\n * @param {object} dst\n * @param {array<string>} fields array with names of fields to copy\n * @param {string} [prefix] prefix to use for the target fields.\n */\nfunction forceCopy(src, dst, fields, prefix) {\n var srcKey;\n var dstKey;\n\n for (var i = 0; i < fields.length; ++i) {\n srcKey = fields[i];\n dstKey = prefixFieldName(prefix, srcKey);\n\n dst[dstKey] = src[srcKey];\n }\n}\n\n\n/**\n * Copy fields from src to dst in a safe and controlled manner.\n *\n * Only the fields mentioned in array 'fields' will be copied over,\n * and only if these are actually defined.\n *\n * @param {object} src\n * @param {object} dst\n * @param {array<string>} fields array with names of fields to copy\n * @param {string} [prefix] prefix to use for the target fields.\n */\nfunction safeCopy(src, dst, fields, prefix) {\n var srcKey;\n var dstKey;\n\n for (var i = 0; i < fields.length; ++i) {\n srcKey = fields[i];\n if (src[srcKey] === undefined) continue;\n\n dstKey = prefixFieldName(prefix, srcKey);\n\n dst[dstKey] = src[srcKey];\n }\n}\n\n\n/**\n * Initialize dst with the values in src.\n *\n * src is the hash with the default values. \n * A reference DEFAULTS to this hash is stored locally for \n * further handling.\n *\n * For now, dst is assumed to be a Graph3d instance.\n * @param {object} src\n * @param {object} dst\n */\nfunction setDefaults(src, dst) {\n if (src === undefined || isEmpty(src)) {\n throw new Error('No DEFAULTS passed');\n }\n if (dst === undefined) {\n throw new Error('No dst passed');\n }\n\n // Remember defaults for future reference\n DEFAULTS = src;\n\n // Handle the defaults which can be simply copied over\n forceCopy(src, dst, OPTIONKEYS);\n forceCopy(src, dst, PREFIXEDOPTIONKEYS, 'default');\n\n // Handle the more complex ('special') fields\n setSpecialSettings(src, dst);\n\n // Following are internal fields, not part of the user settings\n dst.margin = 10; // px\n dst.showTooltip = false;\n dst.onclick_callback = null;\n dst.eye = new Point3d(0, 0, -1); // TODO: set eye.z about 3/4 of the width of the window?\n}\n\n/**\n *\n * @param {object} options\n * @param {object} dst\n */\nfunction setOptions(options, dst) {\n if (options === undefined) {\n return;\n }\n if (dst === undefined) {\n throw new Error('No dst passed');\n }\n\n if (DEFAULTS === undefined || isEmpty(DEFAULTS)) {\n throw new Error('DEFAULTS not set for module Settings');\n }\n\n // Handle the parameters which can be simply copied over\n safeCopy(options, dst, OPTIONKEYS);\n safeCopy(options, dst, PREFIXEDOPTIONKEYS, 'default');\n\n // Handle the more complex ('special') fields\n setSpecialSettings(options, dst);\n}\n\n/**\n * Special handling for certain parameters\n *\n * 'Special' here means: setting requires more than a simple copy\n *\n * @param {object} src\n * @param {object} dst\n */\nfunction setSpecialSettings(src, dst) {\n if (src.backgroundColor !== undefined) {\n setBackgroundColor(src.backgroundColor, dst);\n }\n\n setDataColor(src.dataColor, dst);\n setStyle(src.style, dst);\n if (src.surfaceColors !== undefined) {\n console.warn(\n '`options.surfaceColors` is deprecated and may be removed in a future ' +\n 'version. Please use `options.colormap` instead. Note that the `colormap` ' +\n 'option uses the inverse array ordering (running from vMin to vMax).')\n if (src.colormap !== undefined) {\n throw new Error('The `colormap` and `surfaceColors` options are mutually exclusive.');\n }\n if (dst.style !== 'surface') {\n console.warn(\n 'Ignoring `surfaceColors` in graph style `' + dst.style + '` for ' +\n 'backward compatibility (only effective in `surface` plots).');\n }\n else {\n setSurfaceColor(src.surfaceColors, dst);\n }\n }\n else {\n setColormap(src.colormap, dst);\n }\n setShowLegend(src.showLegend, dst);\n setCameraPosition(src.cameraPosition, dst);\n\n // As special fields go, this is an easy one; just a translation of the name.\n // Can't use this.tooltip directly, because that field exists internally\n if (src.tooltip !== undefined) {\n dst.showTooltip = src.tooltip;\n }\n if (src.onclick != undefined) {\n dst.onclick_callback = src.onclick;\n console.warn(\n \"`options.onclick` is deprecated and may be removed in a future version.\" +\n \" Please use `Graph3d.on('click', handler)` instead.\");\n }\n\n if (src.tooltipStyle !== undefined) {\n util.selectiveDeepExtend(['tooltipStyle'], dst, src);\n }\n}\n\n\n/**\n * Set the value of setting 'showLegend'\n *\n * This depends on the value of the style fields, so it must be called\n * after the style field has been initialized.\n *\n * @param {boolean} showLegend\n * @param {object} dst\n */\nfunction setShowLegend(showLegend, dst) {\n if (showLegend === undefined) {\n // If the default was auto, make a choice for this field\n var isAutoByDefault = (DEFAULTS.showLegend === undefined);\n\n if (isAutoByDefault) {\n // these styles default to having legends\n var isLegendGraphStyle = dst.style === STYLE.DOTCOLOR\n || dst.style === STYLE.DOTSIZE;\n\n dst.showLegend = isLegendGraphStyle;\n } else {\n // Leave current value as is\n }\n } else {\n dst.showLegend = showLegend;\n }\n}\n\n\n/**\n * Retrieve the style index from given styleName\n * @param {string} styleName Style name such as 'dot', 'grid', 'dot-line'\n * @return {number} styleNumber Enumeration value representing the style, or -1\n * when not found\n */\nfunction getStyleNumberByName(styleName) {\n var number = STYLENAME[styleName];\n\n if (number === undefined) {\n return -1;\n }\n\n return number;\n}\n\n\n/**\n * Check if given number is a valid style number.\n *\n * @param {string | number} style\n * @return {boolean} true if valid, false otherwise\n */\nfunction checkStyleNumber(style) {\n var valid = false;\n\n for (var n in STYLE) {\n if (STYLE[n] === style) {\n valid = true;\n break;\n }\n }\n\n return valid;\n}\n\n/**\n *\n * @param {string | number} style\n * @param {Object} dst\n */\nfunction setStyle(style, dst) {\n if (style === undefined) {\n return; // Nothing to do\n }\n\n var styleNumber;\n\n if (typeof style === 'string') {\n styleNumber = getStyleNumberByName(style);\n\n if (styleNumber === -1 ) {\n throw new Error('Style \\'' + style + '\\' is invalid');\n }\n } else {\n // Do a pedantic check on style number value\n if (!checkStyleNumber(style)) {\n throw new Error('Style \\'' + style + '\\' is invalid');\n }\n\n styleNumber = style;\n }\n\n dst.style = styleNumber;\n}\n\n\n/**\n * Set the background styling for the graph\n * @param {string | {fill: string, stroke: string, strokeWidth: string}} backgroundColor\n * @param {Object} dst\n */\nfunction setBackgroundColor(backgroundColor, dst) {\n var fill = 'white';\n var stroke = 'gray';\n var strokeWidth = 1;\n\n if (typeof(backgroundColor) === 'string') {\n fill = backgroundColor;\n stroke = 'none';\n strokeWidth = 0;\n }\n else if (typeof(backgroundColor) === 'object') {\n if (backgroundColor.fill !== undefined) fill = backgroundColor.fill;\n if (backgroundColor.stroke !== undefined) stroke = backgroundColor.stroke;\n if (backgroundColor.strokeWidth !== undefined) strokeWidth = backgroundColor.strokeWidth;\n }\n else {\n throw new Error('Unsupported type of backgroundColor');\n }\n\n dst.frame.style.backgroundColor = fill;\n dst.frame.style.borderColor = stroke;\n dst.frame.style.borderWidth = strokeWidth + 'px';\n dst.frame.style.borderStyle = 'solid';\n}\n\n/**\n *\n * @param {string | Object} dataColor\n * @param {Object} dst\n */\nfunction setDataColor(dataColor, dst) {\n if (dataColor === undefined) {\n return; // Nothing to do\n }\n\n if (dst.dataColor === undefined) {\n dst.dataColor = {};\n }\n\n if (typeof dataColor === 'string') {\n dst.dataColor.fill = dataColor;\n dst.dataColor.stroke = dataColor;\n }\n else {\n if (dataColor.fill) {\n dst.dataColor.fill = dataColor.fill;\n }\n if (dataColor.stroke) {\n dst.dataColor.stroke = dataColor.stroke;\n }\n if (dataColor.strokeWidth !== undefined) {\n dst.dataColor.strokeWidth = dataColor.strokeWidth;\n }\n }\n}\n\n/**\n * \n * @param {Object | Array<string>} surfaceColors Either an object that describes the HUE, or an array of HTML hex color codes\n * @param {Object} dst \n */\nfunction setSurfaceColor(surfaceColors, dst) {\n if(surfaceColors === undefined || surfaceColors === true) {\n return; // Nothing to do\n }\n if (surfaceColors === false) {\n dst.surfaceColors = undefined;\n return;\n }\n\n if (dst.surfaceColors === undefined) {\n dst.surfaceColors = {};\n }\n\n let rgbColors;\n if (Array.isArray(surfaceColors)) {\n rgbColors = parseColorArray(surfaceColors);\n } else if (typeof surfaceColors === 'object') {\n rgbColors = parseColorObject(surfaceColors.hue);\n } else {\n throw new Error('Unsupported type of surfaceColors');\n }\n // for some reason surfaceColors goes from vMax to vMin:\n rgbColors.reverse();\n dst.colormap = rgbColors;\n}\n\n\n/**\n *\n * @param {Object | Array<string>} colormap Either an object that describes the HUE, or an array of HTML hex color codes\n * @param {Object} dst\n */\nfunction setColormap(colormap, dst) {\n if (colormap === undefined) {\n return;\n }\n\n let rgbColors;\n if (Array.isArray(colormap)) {\n rgbColors = parseColorArray(colormap);\n } else if (typeof colormap === 'object') {\n rgbColors = parseColorObject(colormap.hue);\n } else if (typeof colormap === 'function') {\n rgbColors = colormap;\n } else {\n throw new Error('Unsupported type of colormap');\n }\n dst.colormap = rgbColors;\n}\n\n\n/**\n *\n * @param {Array} colormap\n */\nfunction parseColorArray(colormap) {\n if(colormap.length < 2) {\n throw new Error('Colormap array length must be 2 or above.');\n }\n return colormap.map(function(colorCode){\n if(!util.isValidHex(colorCode)) {\n throw new Error(`Invalid hex color code supplied to colormap.`);\n }\n return util.hexToRGB(colorCode);\n });\n}\n\n\n/**\n * Converts an object to a certain amount of hex color stops. At which point:\n * the HTML hex color codes is converted into an RGB color object.\n *\n * @param {Object} hues\n */\nfunction parseColorObject(hues) {\n if (hues === undefined) {\n throw new Error('Unsupported type of colormap');\n }\n if (!(hues.saturation >= 0 && hues.saturation <= 100)) {\n throw new Error('Saturation is out of bounds. Expected range is 0-100.');\n }\n if (!(hues.brightness >= 0 && hues.brightness <= 100)) {\n throw new Error('Brightness is out of bounds. Expected range is 0-100.');\n }\n if (!(hues.colorStops >= 2)) {\n throw new Error('colorStops is out of bounds. Expected 2 or above.');\n }\n\n const hueStep = (hues.end - hues.start) / (hues.colorStops - 1);\n\n let rgbColors = [];\n for (let i = 0; i < hues.colorStops; ++i) {\n let hue = (hues.start + hueStep * i) % 360 / 360;\n rgbColors.push(\n util.HSVToRGB(\n hue < 0 ? hue + 1 : hue,\n hues.saturation/100,\n hues.brightness/100\n )\n );\n }\n return rgbColors;\n}\n\n\n/**\n *\n * @param {Object} cameraPosition\n * @param {Object} dst\n */\nfunction setCameraPosition(cameraPosition, dst) {\n var camPos = cameraPosition;\n if (camPos === undefined) {\n return;\n }\n\n if (dst.camera === undefined) {\n dst.camera = new Camera();\n }\n\n dst.camera.setArmRotation(camPos.horizontal, camPos.vertical);\n dst.camera.setArmLength(camPos.distance);\n}\n\n\nexport { STYLE, setCameraPosition, setDefaults, setOptions };\n","/**\n * This object contains all possible options. It will check if the types are correct, if required if the option is one\n * of the allowed values.\n *\n * __any__ means that the name of the property does not matter.\n * __type__ is a required field for all objects and contains the allowed types of all objects\n */\nlet string = 'string';\nlet bool = 'boolean';\nlet number = 'number';\nlet object = 'object'; // should only be in a __type__ property\nlet array = 'array';\n// Following not used here, but useful for reference\n//let dom = 'dom';\n//let any = 'any';\n\n\nlet colorOptions = {\n fill : { string },\n stroke : { string },\n strokeWidth: { number },\n __type__ : { string, object, 'undefined': 'undefined' }\n};\n\nlet surfaceColorsOptions = {\n hue: {\n start : { number },\n end : { number },\n saturation : { number },\n brightness : { number },\n colorStops : { number },\n __type__ : { object },\n },\n __type__ : { boolean: bool, array, object, 'undefined': 'undefined' },\n};\n\nlet colormapOptions = {\n hue: {\n start : { number },\n end : { number },\n saturation : { number },\n brightness : { number },\n colorStops : { number },\n __type__ : { object },\n },\n __type__ : { array, object, 'function': 'function', 'undefined': 'undefined' },\n};\n\n/**\n * Order attempted to be alphabetical.\n * - x/y/z-prefixes ignored in sorting\n * - __type__ always at end\n * - globals at end\n */\nlet allOptions = {\n animationAutoStart: { boolean: bool, 'undefined': 'undefined' },\n animationInterval : { number },\n animationPreload : { boolean: bool },\n axisColor : { string },\n axisFontSize : { number: number},\n axisFontType : { string: string},\n backgroundColor : colorOptions,\n xBarWidth : { number, 'undefined': 'undefined' },\n yBarWidth : { number, 'undefined': 'undefined' },\n cameraPosition : {\n distance : { number },\n horizontal: { number },\n vertical : { number },\n __type__ : { object }\n },\n zoomable : { boolean: bool },\n ctrlToZoom : { boolean: bool },\n xCenter : { string },\n yCenter : { string },\n colormap : colormapOptions,\n dataColor : colorOptions,\n dotSizeMinFraction: { number },\n dotSizeMaxFraction: { number },\n dotSizeRatio : { number },\n filterLabel : { string },\n gridColor : { string },\n onclick : { 'function': 'function' },\n keepAspectRatio : { boolean: bool },\n xLabel : { string },\n yLabel : { string },\n zLabel : { string },\n legendLabel : { string },\n xMin : { number, 'undefined': 'undefined' },\n yMin : { number, 'undefined': 'undefined' },\n zMin : { number, 'undefined': 'undefined' },\n xMax : { number, 'undefined': 'undefined' },\n yMax : { number, 'undefined': 'undefined' },\n zMax : { number, 'undefined': 'undefined' },\n showAnimationControls: { boolean: bool, 'undefined': 'undefined' },\n showGrayBottom : { boolean: bool },\n showGrid : { boolean: bool },\n showLegend : { boolean: bool, 'undefined': 'undefined' },\n showPerspective : { boolean: bool },\n showShadow : { boolean: bool },\n showSurfaceGrid : { boolean: bool },\n showXAxis : { boolean: bool },\n showYAxis : { boolean: bool },\n showZAxis : { boolean: bool },\n rotateAxisLabels : { boolean: bool },\n surfaceColors : surfaceColorsOptions,\n xStep : { number, 'undefined': 'undefined' },\n yStep : { number, 'undefined': 'undefined' },\n zStep : { number, 'undefined': 'undefined' },\n style: {\n number, // TODO: either Graph3d.DEFAULT has string, or number allowed in documentation\n string: [\n 'bar',\n 'bar-color',\n 'bar-size',\n 'dot',\n 'dot-line',\n 'dot-color',\n 'dot-size',\n 'line',\n 'grid',\n 'surface'\n ]\n },\n tooltip : { boolean: bool, 'function': 'function' },\n tooltipDelay : { number: number },\n tooltipStyle : {\n content: {\n color : { string },\n background : { string },\n border : { string },\n borderRadius: { string },\n boxShadow : { string },\n padding : { string },\n __type__ : { object }\n },\n line: {\n borderLeft : { string },\n height : { string },\n width : { string },\n pointerEvents: { string },\n __type__ : { object }\n },\n dot: {\n border : { string },\n borderRadius : { string },\n height : { string },\n width : { string },\n pointerEvents: { string },\n __type__ : { object}\n },\n __type__: { object}\n },\n xValueLabel : { 'function': 'function' },\n yValueLabel : { 'function': 'function' },\n zValueLabel : { 'function': 'function' },\n valueMax : { number, 'undefined': 'undefined' },\n valueMin : { number, 'undefined': 'undefined' },\n verticalRatio : { number },\n\n //globals :\n height: { string },\n width: { string },\n __type__: { object }\n};\n\n\nexport {allOptions};\n","/**\n * @prototype Range\n *\n * Helper class to make working with related min and max values easier.\n *\n * The range is inclusive; a given value is considered part of the range if:\n *\n * this.min <= value <= this.max\n */\nfunction Range() {\n this.min = undefined;\n this.max = undefined;\n}\n\n\n/**\n * Adjust the range so that the passed value fits in it.\n *\n * If the value is outside of the current extremes, adjust\n * the min or max so that the value is within the range.\n *\n * @param {number} value Numeric value to fit in range\n */\nRange.prototype.adjust = function(value) {\n if (value === undefined) return;\n\n if (this.min === undefined || this.min > value ) {\n this.min = value;\n }\n\n if (this.max === undefined || this.max < value) {\n this.max = value;\n }\n};\n\n\n/**\n * Adjust the current range so that the passed range fits in it.\n *\n * @param {Range} range Range instance to fit in current instance\n */\nRange.prototype.combine = function(range) {\n this.add(range.min);\n this.add(range.max);\n};\n\n\n/**\n * Expand the range by the given value\n *\n * min will be lowered by given value;\n * max will be raised by given value\n *\n * Shrinking by passing a negative value is allowed.\n *\n * @param {number} val Amount by which to expand or shrink current range with\n */\nRange.prototype.expand = function(val) {\n if (val === undefined) {\n return;\n }\n\n var newMin = this.min - val;\n var newMax = this.max + val;\n\n // Note that following allows newMin === newMax.\n // This should be OK, since method expand() allows this also.\n if (newMin > newMax) {\n throw new Error('Passed expansion value makes range invalid');\n }\n\n this.min = newMin;\n this.max = newMax;\n};\n\n\n/**\n * Determine the full range width of current instance.\n *\n * @returns {num} The calculated width of this range\n */\nRange.prototype.range = function() {\n return this.max - this.min;\n};\n\n\n/**\n * Determine the central point of current instance.\n *\n * @returns {number} the value in the middle of min and max\n */\nRange.prototype.center = function() {\n return (this.min + this.max) / 2;\n};\n\n\nmodule.exports = Range;\n","import { DataView } from 'vis-data/esnext';\n\n/**\n * @class Filter\n *\n * @param {DataGroup} dataGroup the data group \n * @param {number} column The index of the column to be filtered\n * @param {Graph3d} graph The graph\n */\nfunction Filter (dataGroup, column, graph) {\n this.dataGroup = dataGroup;\n this.column = column;\n this.graph = graph; // the parent graph\n\n this.index = undefined;\n this.value = undefined;\n\n // read all distinct values and select the first one\n this.values = dataGroup.getDistinctValues(this.column);\n\n if (this.values.length > 0) {\n this.selectValue(0);\n }\n\n // create an array with the filtered datapoints. this will be loaded afterwards\n this.dataPoints = [];\n\n this.loaded = false;\n this.onLoadCallback = undefined;\n\n if (graph.animationPreload) {\n this.loaded = false;\n this.loadInBackground();\n }\n else {\n this.loaded = true;\n }\n}\n\n\n/**\n * Return the label\n * @return {string} label\n */\nFilter.prototype.isLoaded = function() {\n return this.loaded;\n};\n\n\n/**\n * Return the loaded progress\n * @return {number} percentage between 0 and 100\n */\nFilter.prototype.getLoadedProgress = function() {\n var len = this.values.length;\n\n var i = 0;\n while (this.dataPoints[i]) {\n i++;\n }\n\n return Math.round(i / len * 100);\n};\n\n\n/**\n * Return the label\n * @return {string} label\n */\nFilter.prototype.getLabel = function() {\n return this.graph.filterLabel;\n};\n\n\n/**\n * Return the columnIndex of the filter\n * @return {number} columnIndex\n */\nFilter.prototype.getColumn = function() {\n return this.column;\n};\n\n/**\n * Return the currently selected value. Returns undefined if there is no selection\n * @return {*} value\n */\nFilter.prototype.getSelectedValue = function() {\n if (this.index === undefined)\n return undefined;\n\n return this.values[this.index];\n};\n\n/**\n * Retrieve all values of the filter\n * @return {Array} values\n */\nFilter.prototype.getValues = function() {\n return this.values;\n};\n\n/**\n * Retrieve one value of the filter\n * @param {number} index\n * @return {*} value\n */\nFilter.prototype.getValue = function(index) {\n if (index >= this.values.length)\n throw new Error('Index out of range');\n\n return this.values[index];\n};\n\n\n/**\n * Retrieve the (filtered) dataPoints for the currently selected filter index\n * @param {number} [index] (optional)\n * @return {Array} dataPoints\n */\nFilter.prototype._getDataPoints = function(index) {\n if (index === undefined)\n index = this.index;\n\n if (index === undefined)\n return [];\n\n var dataPoints;\n if (this.dataPoints[index]) {\n dataPoints = this.dataPoints[index];\n }\n else {\n var f = {};\n f.column = this.column;\n f.value = this.values[index];\n\n var dataView = new DataView(this.dataGroup.getDataSet(), {filter: function (item) {return (item[f.column] == f.value);}}).get();\n dataPoints = this.dataGroup._getDataPoints(dataView);\n\n this.dataPoints[index] = dataPoints;\n }\n\n return dataPoints;\n};\n\n\n\n/**\n * Set a callback function when the filter is fully loaded.\n *\n * @param {function} callback\n */\nFilter.prototype.setOnLoadCallback = function(callback) {\n this.onLoadCallback = callback;\n};\n\n\n/**\n * Add a value to the list with available values for this filter\n * No double entries will be created.\n * @param {number} index\n */\nFilter.prototype.selectValue = function(index) {\n if (index >= this.values.length)\n throw new Error('Index out of range');\n\n this.index = index;\n this.value = this.values[index];\n};\n\n/**\n * Load all filtered rows in the background one by one\n * Start this method without providing an index!\n *\n * @param {number} [index=0]\n */\nFilter.prototype.loadInBackground = function(index) {\n if (index === undefined)\n index = 0;\n\n var frame = this.graph.frame;\n\n if (index < this.values.length) {\n // create a progress box\n if (frame.progress === undefined) {\n frame.progress = document.createElement('DIV');\n frame.progress.style.position = 'absolute';\n frame.progress.style.color = 'gray';\n frame.appendChild(frame.progress);\n }\n var progress = this.getLoadedProgress();\n frame.progress.innerHTML = 'Loading animation... ' + progress + '%';\n // TODO: this is no nice solution...\n frame.progress.style.bottom = 60 + 'px'; // TODO: use height of slider\n frame.progress.style.left = 10 + 'px';\n\n var me = this;\n setTimeout(function() {me.loadInBackground(index+1);}, 10);\n this.loaded = false;\n }\n else {\n this.loaded = true;\n\n // remove the progress box\n if (frame.progress !== undefined) {\n frame.removeChild(frame.progress);\n frame.progress = undefined;\n }\n\n if (this.onLoadCallback)\n this.onLoadCallback();\n }\n};\n\nexport default Filter;\n","import { DataSet } from \"vis-data/esnext\";\nimport { DataView } from \"vis-data/esnext\";\nimport Range from \"./Range\";\nimport Filter from \"./Filter\";\nimport { STYLE } from \"./Settings\";\nimport Point3d from \"./Point3d\";\n\n\n/**\n * Creates a container for all data of one specific 3D-graph.\n *\n * On construction, the container is totally empty; the data\n * needs to be initialized with method initializeData().\n * Failure to do so will result in the following exception begin thrown\n * on instantiation of Graph3D:\n *\n * Error: Array, DataSet, or DataView expected\n *\n * @constructor DataGroup\n */\nfunction DataGroup() {\n this.dataTable = null; // The original data table\n}\n\n\n/**\n * Initializes the instance from the passed data.\n *\n * Calculates minimum and maximum values and column index values.\n *\n * The graph3d instance is used internally to access the settings for\n * the given instance.\n * TODO: Pass settings only instead.\n *\n * @param {vis.Graph3d} graph3d Reference to the calling Graph3D instance.\n * @param {Array | DataSet | DataView} rawData The data containing the items for\n * the Graph.\n * @param {number} style Style Number\n * @returns {Array.<Object>}\n */\nDataGroup.prototype.initializeData = function(graph3d, rawData, style) {\n if (rawData === undefined) return;\n\n if (Array.isArray(rawData)) {\n rawData = new DataSet(rawData);\n }\n\n var data;\n if (rawData instanceof DataSet || rawData instanceof DataView) {\n data = rawData.get();\n }\n else {\n throw new Error('Array, DataSet, or DataView expected');\n }\n\n if (data.length == 0) return;\n\n this.style = style;\n\n // unsubscribe from the dataTable\n if (this.dataSet) {\n this.dataSet.off('*', this._onChange);\n }\n\n this.dataSet = rawData;\n this.dataTable = data;\n\n // subscribe to changes in the dataset\n var me = this;\n this._onChange = function () {\n graph3d.setData(me.dataSet);\n };\n this.dataSet.on('*', this._onChange);\n\n // determine the location of x,y,z,value,filter columns\n this.colX = 'x';\n this.colY = 'y';\n this.colZ = 'z';\n\n\n var withBars = graph3d.hasBars(style);\n\n // determine barWidth from data\n if (withBars) {\n if (graph3d.defaultXBarWidth !== undefined) {\n this.xBarWidth = graph3d.defaultXBarWidth;\n }\n else {\n this.xBarWidth = this.getSmallestDifference(data, this.colX) || 1;\n }\n\n if (graph3d.defaultYBarWidth !== undefined) {\n this.yBarWidth = graph3d.defaultYBarWidth;\n }\n else {\n this.yBarWidth = this.getSmallestDifference(data, this.colY) || 1;\n }\n }\n\n // calculate minima and maxima\n this._initializeRange(data, this.colX, graph3d, withBars);\n this._initializeRange(data, this.colY, graph3d, withBars);\n this._initializeRange(data, this.colZ, graph3d, false);\n\n if (data[0].hasOwnProperty('style')) {\n this.colValue = 'style';\n var valueRange = this.getColumnRange(data, this.colValue);\n this._setRangeDefaults(valueRange, graph3d.defaultValueMin, graph3d.defaultValueMax);\n this.valueRange = valueRange;\n }\n else {\n this.colValue = 'z';\n this.valueRange = this.zRange;\n }\n\n // Initialize data filter if a filter column is provided\n var table = this.getDataTable();\n if (table[0].hasOwnProperty('filter')) {\n if (this.dataFilter === undefined) {\n this.dataFilter = new Filter(this, 'filter', graph3d);\n this.dataFilter.setOnLoadCallback(function() { graph3d.redraw(); });\n }\n }\n\n\n var dataPoints;\n if (this.dataFilter) {\n // apply filtering\n dataPoints = this.dataFilter._getDataPoints();\n }\n else {\n // no filtering. load all data\n dataPoints = this._getDataPoints(this.getDataTable());\n }\n return dataPoints;\n};\n\n\n/**\n * Collect the range settings for the given data column.\n *\n * This internal method is intended to make the range \n * initalization more generic.\n *\n * TODO: if/when combined settings per axis defined, get rid of this.\n *\n * @private\n *\n * @param {'x'|'y'|'z'} column The data column to process\n * @param {vis.Graph3d} graph3d Reference to the calling Graph3D instance;\n * required for access to settings\n * @returns {Object}\n */\nDataGroup.prototype._collectRangeSettings = function(column, graph3d) {\n var index = ['x', 'y', 'z'].indexOf(column);\n\n if (index == -1) {\n throw new Error('Column \\'' + column + '\\' invalid');\n }\n\n var upper = column.toUpperCase();\n\n return {\n barWidth : this[column + 'BarWidth'],\n min : graph3d['default' + upper + 'Min'],\n max : graph3d['default' + upper + 'Max'],\n step : graph3d['default' + upper + 'Step'],\n range_label: column + 'Range', // Name of instance field to write to\n step_label : column + 'Step' // Name of instance field to write to\n };\n};\n\n\n/**\n * Initializes the settings per given column.\n *\n * TODO: if/when combined settings per axis defined, rewrite this.\n *\n * @private\n *\n * @param {DataSet | DataView} data The data containing the items for the Graph\n * @param {'x'|'y'|'z'} column The data column to process\n * @param {vis.Graph3d} graph3d Reference to the calling Graph3D instance;\n * required for access to settings\n * @param {boolean} withBars True if initializing for bar graph\n */\nDataGroup.prototype._initializeRange = function(data, column, graph3d, withBars) {\n var NUMSTEPS = 5;\n var settings = this._collectRangeSettings(column, graph3d);\n\n var range = this.getColumnRange(data, column);\n if (withBars && column != 'z') { // Safeguard for 'z'; it doesn't have a bar width\n range.expand(settings.barWidth / 2);\n }\n\n this._setRangeDefaults(range, settings.min, settings.max);\n this[settings.range_label] = range;\n this[settings.step_label ] = (settings.step !== undefined) ? settings.step : range.range()/NUMSTEPS;\n}\n\n\n/**\n * Creates a list with all the different values in the data for the given column.\n *\n * If no data passed, use the internal data of this instance.\n *\n * @param {'x'|'y'|'z'} column The data column to process\n * @param {DataSet|DataView|undefined} data The data containing the items for the Graph\n *\n * @returns {Array} All distinct values in the given column data, sorted ascending.\n */\nDataGroup.prototype.getDistinctValues = function(column, data) {\n if (data === undefined) {\n data = this.dataTable;\n }\n\n var values = [];\n\n for (var i = 0; i < data.length; i++) {\n var value = data[i][column] || 0;\n if (values.indexOf(value) === -1) {\n values.push(value);\n }\n }\n\n return values.sort(function(a,b) { return a - b; });\n};\n\n\n/**\n * Determine the smallest difference between the values for given\n * column in the passed data set.\n *\n * @param {DataSet|DataView|undefined} data The data containing the items for the Graph\n * @param {'x'|'y'|'z'} column The data column to process\n *\n * @returns {number|null} Smallest difference value or\n * null, if it can't be determined.\n */\nDataGroup.prototype.getSmallestDifference = function(data, column) {\n var values = this.getDistinctValues(data, column);\n\n // Get all the distinct diffs\n // Array values is assumed to be sorted here\n var smallest_diff = null;\n\n for (var i = 1; i < values.length; i++) {\n var diff = values[i] - values[i - 1];\n\n if (smallest_diff == null || smallest_diff > diff ) {\n smallest_diff = diff;\n }\n }\n\n return smallest_diff;\n}\n\n\n/**\n * Get the absolute min/max values for the passed data column.\n *\n * @param {DataSet|DataView|undefined} data The data containing the items for the Graph\n * @param {'x'|'y'|'z'} column The data column to process\n *\n * @returns {Range} A Range instance with min/max members properly set.\n */\nDataGroup.prototype.getColumnRange = function(data, column) {\n var range = new Range();\n\n // Adjust the range so that it covers all values in the passed data elements.\n for (var i = 0; i < data.length; i++) {\n var item = data[i][column];\n range.adjust(item);\n }\n\n return range;\n};\n\n\n/**\n * Determines the number of rows in the current data.\n *\n * @returns {number}\n */\nDataGroup.prototype.getNumberOfRows = function() {\n return this.dataTable.length;\n};\n\n\n/**\n * Set default values for range\n *\n * The default values override the range values, if defined.\n *\n * Because it's possible that only defaultMin or defaultMax is set, it's better\n * to pass in a range already set with the min/max set from the data. Otherwise,\n * it's quite hard to process the min/max properly.\n *\n * @param {vis.Range} range\n * @param {number} [defaultMin=range.min]\n * @param {number} [defaultMax=range.max]\n * @private\n */\nDataGroup.prototype._setRangeDefaults = function (range, defaultMin, defaultMax) {\n if (defaultMin !== undefined) {\n range.min = defaultMin;\n }\n\n if (defaultMax !== undefined) {\n range.max = defaultMax;\n }\n\n // This is the original way that the default min/max values were adjusted.\n // TODO: Perhaps it's better if an error is thrown if the values do not agree.\n // But this will change the behaviour.\n if (range.max <= range.min) range.max = range.min + 1;\n};\n\n\nDataGroup.prototype.getDataTable = function() {\n return this.dataTable;\n};\n\n\nDataGroup.prototype.getDataSet = function() {\n return this.dataSet;\n};\n\n\n/**\n * Return all data values as a list of Point3d objects\n * @param {Array.<Object>} data\n * @returns {Array.<Object>}\n */\nDataGroup.prototype.getDataPoints = function(data) {\n var dataPoints = [];\n\n for (var i = 0; i < data.length; i++) {\n var point = new Point3d();\n point.x = data[i][this.colX] || 0;\n point.y = data[i][this.colY] || 0;\n point.z = data[i][this.colZ] || 0;\n point.data = data[i];\n point.value = data[i][this.colValue] || 0;\n\n var obj = {};\n obj.point = point;\n obj.bottom = new Point3d(point.x, point.y, this.zRange.min);\n obj.trans = undefined;\n obj.screen = undefined;\n\n dataPoints.push(obj);\n }\n\n return dataPoints;\n};\n\n\n/**\n * Copy all values from the data table to a matrix.\n *\n * The provided values are supposed to form a grid of (x,y) positions.\n * @param {Array.<Object>} data\n * @returns {Array.<Object>}\n * @private\n */\nDataGroup.prototype.initDataAsMatrix = function(data) {\n // TODO: store the created matrix dataPoints in the filters instead of\n // reloading each time.\n var x, y, i, obj;\n\n // create two lists with all present x and y values\n var dataX = this.getDistinctValues(this.colX, data);\n var dataY = this.getDistinctValues(this.colY, data);\n\n var dataPoints = this.getDataPoints(data);\n\n // create a grid, a 2d matrix, with all values.\n var dataMatrix = []; // temporary data matrix\n for (i = 0; i < dataPoints.length; i++) {\n obj = dataPoints[i];\n\n // TODO: implement Array().indexOf() for Internet Explorer\n var xIndex = dataX.indexOf(obj.point.x);\n var yIndex = dataY.indexOf(obj.point.y);\n\n if (dataMatrix[xIndex] === undefined) {\n dataMatrix[xIndex] = [];\n }\n\n dataMatrix[xIndex][yIndex] = obj;\n }\n\n // fill in the pointers to the neighbors.\n for (x = 0; x < dataMatrix.length; x++) {\n for (y = 0; y < dataMatrix[x].length; y++) {\n if (dataMatrix[x][y]) {\n dataMatrix[x][y].pointRight = (x < dataMatrix.length-1) ? dataMatrix[x+1][y] : undefined;\n dataMatrix[x][y].pointTop = (y < dataMatrix[x].length-1) ? dataMatrix[x][y+1] : undefined;\n dataMatrix[x][y].pointCross =\n (x < dataMatrix.length-1 && y < dataMatrix[x].length-1) ?\n dataMatrix[x+1][y+1] :\n undefined;\n }\n }\n }\n\n return dataPoints;\n};\n\n\n/**\n * Return common information, if present\n *\n * @returns {string}\n */\nDataGroup.prototype.getInfo = function() {\n var dataFilter = this.dataFilter;\n if (!dataFilter) return undefined;\n\n return dataFilter.getLabel() + ': ' + dataFilter.getSelectedValue();\n};\n\n\n/**\n * Reload the data\n */\nDataGroup.prototype.reload = function() {\n if (this.dataTable) {\n this.setData(this.dataTable);\n }\n};\n\n\n/**\n * Filter the data based on the current filter\n *\n * @param {Array} data\n * @returns {Array} dataPoints Array with point objects which can be drawn on\n * screen\n */\nDataGroup.prototype._getDataPoints = function (data) {\n var dataPoints = [];\n\n if (this.style === STYLE.GRID || this.style === STYLE.SURFACE) {\n dataPoints = this.initDataAsMatrix(data);\n }\n else { // 'dot', 'dot-line', etc.\n dataPoints = this.getDataPoints(data);\n\n if (this.style === STYLE.LINE) {\n // Add next member points for line drawing\n for (var i = 0; i < dataPoints.length; i++) {\n if (i > 0) {\n dataPoints[i - 1].pointNext = dataPoints[i];\n }\n }\n }\n }\n\n return dataPoints;\n};\n\nexport default DataGroup;\n","import Emitter from \"component-emitter\";\nimport * as util from \"vis-util/esnext\";\nimport Point3d from \"./Point3d\";\nimport Point2d from \"./Point2d\";\nimport Slider from \"./Slider\";\nimport StepNumber from \"./StepNumber\";\nimport { STYLE, setCameraPosition, setDefaults, setOptions } from \"./Settings\";\nimport { VALIDATOR_PRINT_STYLE, Validator } from \"vis-util/esnext\";\nimport { allOptions } from \"./options.js\";\nimport DataGroup from \"./DataGroup\";\n\n\n/// enumerate the available styles\nGraph3d.STYLE = STYLE;\n\n\n/**\n * Following label is used in the settings to describe values which should be\n * determined by the code while running, from the current data and graph style.\n *\n * Using 'undefined' directly achieves the same thing, but this is more\n * descriptive by describing the intent.\n */\nvar autoByDefault = undefined;\n\n/**\n * Default values for option settings.\n *\n * These are the values used when a Graph3d instance is initialized without\n * custom settings.\n *\n * If a field is not in this list, a default value of 'autoByDefault' is assumed,\n * which is just an alias for 'undefined'.\n */\nGraph3d.DEFAULTS = {\n width : '400px',\n height : '400px',\n filterLabel : 'time',\n legendLabel : 'value',\n xLabel : 'x',\n yLabel : 'y',\n zLabel : 'z',\n xValueLabel : function(v) { return v; },\n yValueLabel : function(v) { return v; },\n zValueLabel : function(v) { return v; },\n showXAxis : true,\n showYAxis : true,\n showZAxis : true,\n showGrayBottom : false,\n showGrid : true,\n showPerspective : true,\n showShadow : false,\n showSurfaceGrid : true,\n keepAspectRatio : true,\n rotateAxisLabels : true,\n verticalRatio : 0.5, // 0.1 to 1.0, where 1.0 results in a 'cube'\n\n dotSizeRatio : 0.02, // size of the dots as a fraction of the graph width\n dotSizeMinFraction: 0.5,\t // size of min-value dot as a fraction of dotSizeRatio\t\n dotSizeMaxFraction: 2.5,\t // size of max-value dot as a fraction of dotSizeRatio\t\n\n showAnimationControls: autoByDefault,\n animationInterval : 1000, // milliseconds\n animationPreload : false,\n animationAutoStart : autoByDefault,\n\n axisFontSize : 14,\n axisFontType : 'arial',\n axisColor : '#4D4D4D',\n gridColor : '#D3D3D3',\n xCenter : '55%',\n yCenter : '50%',\n\n style : Graph3d.STYLE.DOT,\n tooltip : false,\n tooltipDelay : 300, // milliseconds\n\n tooltipStyle : {\n content : {\n padding : '10px',\n border : '1px solid #4d4d4d',\n color : '#1a1a1a',\n background : 'rgba(255,255,255,0.7)',\n borderRadius : '2px',\n boxShadow : '5px 5px 10px rgba(128,128,128,0.5)'\n },\n line : {\n height : '40px',\n width : '0',\n borderLeft : '1px solid #4d4d4d',\n pointerEvents : 'none'\n },\n dot : {\n height : '0',\n width : '0',\n border : '5px solid #4d4d4d',\n borderRadius : '5px',\n pointerEvents : 'none'\n }\n },\n\n dataColor : {\n fill : '#7DC1FF',\n stroke : '#3267D2',\n strokeWidth: 1 // px\n },\n\n surfaceColors: autoByDefault,\n colormap : autoByDefault,\n\n cameraPosition : {\n horizontal: 1.0,\n vertical : 0.5,\n distance : 1.7\n },\n \n zoomable : true,\n ctrlToZoom: false,\n\n/*\n The following fields are 'auto by default', see above.\n */\n showLegend : autoByDefault, // determined by graph style\n backgroundColor : autoByDefault,\n\n xBarWidth : autoByDefault,\n yBarWidth : autoByDefault,\n valueMin : autoByDefault,\n valueMax : autoByDefault,\n xMin : autoByDefault,\n xMax : autoByDefault,\n xStep : autoByDefault,\n yMin : autoByDefault,\n yMax : autoByDefault,\n yStep : autoByDefault,\n zMin : autoByDefault,\n zMax : autoByDefault,\n zStep : autoByDefault\n};\n\n\n// -----------------------------------------------------------------------------\n// Class Graph3d\n// -----------------------------------------------------------------------------\n\n\n/**\n * Graph3d displays data in 3d.\n *\n * Graph3d is developed in javascript as a Google Visualization Chart.\n *\n * @constructor Graph3d\n * @param {Element} container The DOM element in which the Graph3d will\n * be created. Normally a div element.\n * @param {DataSet | DataView | Array} [data]\n * @param {Object} [options]\n */\nfunction Graph3d(container, data, options) {\n if (!(this instanceof Graph3d)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n // create variables and set default values\n this.containerElement = container;\n\n this.dataGroup = new DataGroup();\n this.dataPoints = null; // The table with point objects\n\n // create a frame and canvas\n this.create();\n\n setDefaults(Graph3d.DEFAULTS, this);\n\n // the column indexes\n this.colX = undefined;\n this.colY = undefined;\n this.colZ = undefined;\n this.colValue = undefined;\n\n // TODO: customize axis range\n\n // apply options (also when undefined)\n this.setOptions(options);\n\n // apply data\n this.setData(data);\n}\n\n// Extend Graph3d with an Emitter mixin\nEmitter(Graph3d.prototype);\n\n/**\n * Calculate the scaling values, dependent on the range in x, y, and z direction\n */\nGraph3d.prototype._setScale = function() {\n this.scale = new Point3d(\n 1 / this.xRange.range(),\n 1 / this.yRange.range(),\n 1 / this.zRange.range()\n );\n\n // keep aspect ration between x and y scale if desired\n if (this.keepAspectRatio) {\n if (this.scale.x < this.scale.y) {\n //noinspection JSSuspiciousNameCombination\n this.scale.y = this.scale.x;\n }\n else {\n //noinspection JSSuspiciousNameCombination\n this.scale.x = this.scale.y;\n }\n }\n\n // scale the vertical axis\n this.scale.z *= this.verticalRatio;\n // TODO: can this be automated? verticalRatio?\n\n // determine scale for (optional) value\n if (this.valueRange !== undefined) {\n this.scale.value = 1 / this.valueRange.range();\n }\n\n // position the camera arm\n var xCenter = this.xRange.center() * this.scale.x;\n var yCenter = this.yRange.center() * this.scale.y;\n var zCenter = this.zRange.center() * this.scale.z;\n this.camera.setArmLocation(xCenter, yCenter, zCenter);\n};\n\n\n/**\n * Convert a 3D location to a 2D location on screen\n * Source: ttp://en.wikipedia.org/wiki/3D_projection\n *\n * @param {Point3d} point3d A 3D point with parameters x, y, z\n * @returns {Point2d} point2d A 2D point with parameters x, y\n */\nGraph3d.prototype._convert3Dto2D = function(point3d) {\n var translation = this._convertPointToTranslation(point3d);\n return this._convertTranslationToScreen(translation);\n};\n\n/**\n * Convert a 3D location its translation seen from the camera\n * Source: http://en.wikipedia.org/wiki/3D_projection\n *\n * @param {Point3d} point3d A 3D point with parameters x, y, z\n * @returns {Point3d} translation A 3D point with parameters x, y, z This is\n * the translation of the point, seen from the\n * camera.\n */\nGraph3d.prototype._convertPointToTranslation = function(point3d) {\n var cameraLocation = this.camera.getCameraLocation(),\n cameraRotation = this.camera.getCameraRotation(),\n ax = point3d.x * this.scale.x,\n ay = point3d.y * this.scale.y,\n az = point3d.z * this.scale.z,\n\n cx = cameraLocation.x,\n cy = cameraLocation.y,\n cz = cameraLocation.z,\n\n // calculate angles\n sinTx = Math.sin(cameraRotation.x),\n cosTx = Math.cos(cameraRotation.x),\n sinTy = Math.sin(cameraRotation.y),\n cosTy = Math.cos(cameraRotation.y),\n sinTz = Math.sin(cameraRotation.z),\n cosTz = Math.cos(cameraRotation.z),\n\n // calculate translation\n dx = cosTy * (sinTz * (ay - cy) + cosTz * (ax - cx)) - sinTy * (az - cz),\n dy = sinTx * (cosTy * (az - cz) + sinTy * (sinTz * (ay - cy) + cosTz * (ax - cx))) + cosTx * (cosTz * (ay - cy) - sinTz * (ax-cx)),\n dz = cosTx * (cosTy * (az - cz) + sinTy * (sinTz * (ay - cy) + cosTz * (ax - cx))) - sinTx * (cosTz * (ay - cy) - sinTz * (ax-cx));\n\n return new Point3d(dx, dy, dz);\n};\n\n/**\n * Convert a translation point to a point on the screen\n *\n * @param {Point3d} translation A 3D point with parameters x, y, z This is\n * the translation of the point, seen from the\n * camera.\n * @returns {Point2d} point2d A 2D point with parameters x, y\n */\nGraph3d.prototype._convertTranslationToScreen = function(translation) {\n var ex = this.eye.x,\n ey = this.eye.y,\n ez = this.eye.z,\n dx = translation.x,\n dy = translation.y,\n dz = translation.z;\n\n // calculate position on screen from translation\n var bx;\n var by;\n if (this.showPerspective) {\n bx = (dx - ex) * (ez / dz);\n by = (dy - ey) * (ez / dz);\n }\n else {\n bx = dx * -(ez / this.camera.getArmLength());\n by = dy * -(ez / this.camera.getArmLength());\n }\n\n // shift and scale the point to the center of the screen\n // use the width of the graph to scale both horizontally and vertically.\n return new Point2d(\n this.currentXCenter + bx * this.frame.canvas.clientWidth,\n this.currentYCenter - by * this.frame.canvas.clientWidth);\n};\n\n\n/**\n * Calculate the translations and screen positions of all points\n *\n * @param {Array.<Point3d>} points\n * @private\n */\nGraph3d.prototype._calcTranslations = function(points) {\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n point.trans = this._convertPointToTranslation(point.point);\n point.screen = this._convertTranslationToScreen(point.trans);\n\n // calculate the translation of the point at the bottom (needed for sorting)\n var transBottom = this._convertPointToTranslation(point.bottom);\n point.dist = this.showPerspective ? transBottom.length() : -transBottom.z;\n }\n\n // sort the points on depth of their (x,y) position (not on z)\n var sortDepth = function (a, b) {\n return b.dist - a.dist;\n };\n points.sort(sortDepth);\n};\n\n\n/**\n * Transfer min/max values to the Graph3d instance.\n */\nGraph3d.prototype._initializeRanges = function() {\n // TODO: later on, all min/maxes of all datagroups will be combined here\n var dg = this.dataGroup;\n this.xRange = dg.xRange;\n this.yRange = dg.yRange;\n this.zRange = dg.zRange;\n this.valueRange = dg.valueRange;\n\n // Values currently needed but which need to be sorted out for\n // the multiple graph case.\n this.xStep = dg.xStep;\n this.yStep = dg.yStep;\n this.zStep = dg.zStep;\n this.xBarWidth = dg.xBarWidth;\n this.yBarWidth = dg.yBarWidth;\n this.colX = dg.colX;\n this.colY = dg.colY;\n this.colZ = dg.colZ;\n this.colValue = dg.colValue;\n\n \n // set the scale dependent on the ranges.\n this._setScale();\n};\n\n\n/**\n * Return all data values as a list of Point3d objects\n *\n * @param {vis.DataSet} data\n * @returns {Array.<Object>}\n */\nGraph3d.prototype.getDataPoints = function(data) {\n var dataPoints = [];\n\n for (var i = 0; i < data.length; i++) {\n var point = new Point3d();\n point.x = data[i][this.colX] || 0;\n point.y = data[i][this.colY] || 0;\n point.z = data[i][this.colZ] || 0;\n point.data = data[i];\n point.value = data[i][this.colValue] || 0;\n\n var obj = {};\n obj.point = point;\n obj.bottom = new Point3d(point.x, point.y, this.zRange.min);\n obj.trans = undefined;\n obj.screen = undefined;\n\n dataPoints.push(obj);\n }\n\n return dataPoints;\n};\n\n\n/**\n * Filter the data based on the current filter\n *\n * @param {Array} data\n * @returns {Array} dataPoints Array with point objects which can be drawn on\n * screen\n */\nGraph3d.prototype._getDataPoints = function (data) {\n // TODO: store the created matrix dataPoints in the filters instead of\n // reloading each time.\n var x, y, i, obj;\n\n var dataPoints = [];\n\n if (this.style === Graph3d.STYLE.GRID ||\n this.style === Graph3d.STYLE.SURFACE) {\n // copy all values from the data table to a matrix\n // the provided values are supposed to form a grid of (x,y) positions\n\n // create two lists with all present x and y values\n var dataX = this.dataGroup.getDistinctValues(this.colX, data);\n var dataY = this.dataGroup.getDistinctValues(this.colY, data);\n\n dataPoints = this.getDataPoints(data);\n\n // create a grid, a 2d matrix, with all values.\n var dataMatrix = []; // temporary data matrix\n for (i = 0; i < dataPoints.length; i++) {\n obj = dataPoints[i];\n\n // TODO: implement Array().indexOf() for Internet Explorer\n var xIndex = dataX.indexOf(obj.point.x);\n var yIndex = dataY.indexOf(obj.point.y);\n\n if (dataMatrix[xIndex] === undefined) {\n dataMatrix[xIndex] = [];\n }\n\n dataMatrix[xIndex][yIndex] = obj;\n }\n\n // fill in the pointers to the neighbors.\n for (x = 0; x < dataMatrix.length; x++) {\n for (y = 0; y < dataMatrix[x].length; y++) {\n if (dataMatrix[x][y]) {\n dataMatrix[x][y].pointRight = (x < dataMatrix.length-1) ? dataMatrix[x+1][y] : undefined;\n dataMatrix[x][y].pointTop = (y < dataMatrix[x].length-1) ? dataMatrix[x][y+1] : undefined;\n dataMatrix[x][y].pointCross =\n (x < dataMatrix.length-1 && y < dataMatrix[x].length-1) ?\n dataMatrix[x+1][y+1] :\n undefined;\n }\n }\n }\n }\n else { // 'dot', 'dot-line', etc.\n dataPoints = this.getDataPoints(data);\n\n if (this.style === Graph3d.STYLE.LINE) {\n // Add next member points for line drawing\n for (i = 0; i < dataPoints.length; i++) {\n if (i > 0) {\n dataPoints[i - 1].pointNext = dataPoints[i];\n }\n }\n }\n }\n\n return dataPoints;\n};\n\n\n/**\n * Create the main frame for the Graph3d.\n *\n * This function is executed once when a Graph3d object is created. The frame\n * contains a canvas, and this canvas contains all objects like the axis and\n * nodes.\n */\nGraph3d.prototype.create = function () {\n // remove all elements from the container element.\n while (this.containerElement.hasChildNodes()) {\n this.containerElement.removeChild(this.containerElement.firstChild);\n }\n\n this.frame = document.createElement('div');\n this.frame.style.position = 'relative';\n this.frame.style.overflow = 'hidden';\n\n // create the graph canvas (HTML canvas element)\n this.frame.canvas = document.createElement( 'canvas' );\n this.frame.canvas.style.position = 'relative';\n this.frame.appendChild(this.frame.canvas);\n //if (!this.frame.canvas.getContext) {\n {\n var noCanvas = document.createElement( 'DIV' );\n noCanvas.style.color = 'red';\n noCanvas.style.fontWeight = 'bold' ;\n noCanvas.style.padding = '10px';\n noCanvas.innerHTML = 'Error: your browser does not support HTML canvas';\n this.frame.canvas.appendChild(noCanvas);\n }\n\n this.frame.filter = document.createElement( 'div' );\n this.frame.filter.style.position = 'absolute';\n this.frame.filter.style.bottom = '0px';\n this.frame.filter.style.left = '0px';\n this.frame.filter.style.width = '100%';\n this.frame.appendChild(this.frame.filter);\n\n // add event listeners to handle moving and zooming the contents\n var me = this;\n var onmousedown = function (event) {me._onMouseDown(event);};\n var ontouchstart = function (event) {me._onTouchStart(event);};\n var onmousewheel = function (event) {me._onWheel(event);};\n var ontooltip = function (event) {me._onTooltip(event);};\n var onclick = function(event) {me._onClick(event);};\n // TODO: these events are never cleaned up... can give a 'memory leakage'\n\n util.addEventListener(this.frame.canvas, 'mousedown', onmousedown);\n util.addEventListener(this.frame.canvas, 'touchstart', ontouchstart);\n util.addEventListener(this.frame.canvas, 'mousewheel', onmousewheel);\n util.addEventListener(this.frame.canvas, 'mousemove', ontooltip);\n util.addEventListener(this.frame.canvas, 'click', onclick);\n\n // add the new graph to the container element\n this.containerElement.appendChild(this.frame);\n};\n\n\n/**\n * Set a new size for the graph\n *\n * @param {number} width\n * @param {number} height\n * @private\n */\nGraph3d.prototype._setSize = function(width, height) {\n this.frame.style.width = width;\n this.frame.style.height = height;\n\n this._resizeCanvas();\n};\n\n\n/**\n * Resize the canvas to the current size of the frame\n */\nGraph3d.prototype._resizeCanvas = function() {\n this.frame.canvas.style.width = '100%';\n this.frame.canvas.style.height = '100%';\n\n this.frame.canvas.width = this.frame.canvas.clientWidth;\n this.frame.canvas.height = this.frame.canvas.clientHeight;\n\n // adjust with for margin\n this.frame.filter.style.width = (this.frame.canvas.clientWidth - 2 * 10) + 'px';\n};\n\n\n/**\n * Start playing the animation, if requested and filter present. Only applicable\n * when animation data is available.\n */\nGraph3d.prototype.animationStart = function() {\n // start animation when option is true\n if (!this.animationAutoStart || !this.dataGroup.dataFilter) return;\n\n if (!this.frame.filter || !this.frame.filter.slider)\n throw new Error('No animation available');\n\n this.frame.filter.slider.play();\n};\n\n\n/**\n * Stop animation\n */\nGraph3d.prototype.animationStop = function() {\n if (!this.frame.filter || !this.frame.filter.slider) return;\n\n this.frame.filter.slider.stop();\n};\n\n\n/**\n * Resize the center position based on the current values in this.xCenter\n * and this.yCenter (which are strings with a percentage or a value\n * in pixels). The center positions are the variables this.currentXCenter\n * and this.currentYCenter\n */\nGraph3d.prototype._resizeCenter = function() {\n // calculate the horizontal center position\n if (this.xCenter.charAt(this.xCenter.length-1) === '%') {\n this.currentXCenter =\n parseFloat(this.xCenter) / 100 *\n this.frame.canvas.clientWidth;\n }\n else {\n this.currentXCenter = parseFloat(this.xCenter); // supposed to be in px\n }\n\n // calculate the vertical center position\n if (this.yCenter.charAt(this.yCenter.length-1) === '%') {\n this.currentYCenter =\n parseFloat(this.yCenter) / 100 *\n (this.frame.canvas.clientHeight - this.frame.filter.clientHeight);\n }\n else {\n this.currentYCenter = parseFloat(this.yCenter); // supposed to be in px\n }\n};\n\n\n\n/**\n * Retrieve the current camera rotation\n *\n * @returns {object} An object with parameters horizontal, vertical, and\n * distance\n */\nGraph3d.prototype.getCameraPosition = function() {\n var pos = this.camera.getArmRotation();\n pos.distance = this.camera.getArmLength();\n return pos;\n};\n\n/**\n * Load data into the 3D Graph\n *\n * @param {vis.DataSet} data\n * @private\n */\nGraph3d.prototype._readData = function(data) {\n // read the data\n this.dataPoints = this.dataGroup.initializeData(this, data, this.style);\n\n this._initializeRanges();\n this._redrawFilter();\n};\n\n/**\n * Replace the dataset of the Graph3d\n *\n * @param {Array | DataSet | DataView} data\n */\nGraph3d.prototype.setData = function (data) {\n if (data === undefined || data === null) return;\n\n this._readData(data);\n this.redraw();\n this.animationStart();\n};\n\n/**\n * Update the options. Options will be merged with current options\n *\n * @param {Object} options\n */\nGraph3d.prototype.setOptions = function (options) {\n if (options === undefined) return;\n\n let errorFound = Validator.validate(options, allOptions);\n if (errorFound === true) {\n console.log(\n \"%cErrors have been found in the supplied options object.\",\n VALIDATOR_PRINT_STYLE\n );\n }\n\n this.animationStop();\n\n setOptions(options, this);\n this.setPointDrawingMethod();\n this._setSize(this.width, this.height);\n this.setAxisLabelMethod();\n\n this.setData(this.dataGroup.getDataTable());\n this.animationStart();\n};\n\n\n/**\n * Determine which point drawing method to use for the current graph style.\n */\nGraph3d.prototype.setPointDrawingMethod = function() {\n var method = undefined;\n\n switch (this.style) {\n case Graph3d.STYLE.BAR:\n method = this._redrawBarGraphPoint;\n break;\n case Graph3d.STYLE.BARCOLOR:\n method = this._redrawBarColorGraphPoint;\n break;\n case Graph3d.STYLE.BARSIZE:\n method = this._redrawBarSizeGraphPoint;\n break;\n case Graph3d.STYLE.DOT:\n method = this._redrawDotGraphPoint;\n break;\n case Graph3d.STYLE.DOTLINE:\n method = this._redrawDotLineGraphPoint;\n break;\n case Graph3d.STYLE.DOTCOLOR:\n method = this._redrawDotColorGraphPoint;\n break;\n case Graph3d.STYLE.DOTSIZE:\n method = this._redrawDotSizeGraphPoint;\n break;\n case Graph3d.STYLE.SURFACE:\n method = this._redrawSurfaceGraphPoint;\n break;\n case Graph3d.STYLE.GRID:\n method = this._redrawGridGraphPoint;\n break;\n case Graph3d.STYLE.LINE:\n method = this._redrawLineGraphPoint;\n break;\n default:\n throw new Error('Can not determine point drawing method '\n + 'for graph style \\'' + this.style + '\\'');\n }\n\n this._pointDrawingMethod = method;\n};\n\n/**\n * Determine which functions to use to draw axis labels.\n */\nGraph3d.prototype.setAxisLabelMethod = function () {\n if (this.rotateAxisLabels) {\n this._drawAxisLabelX = this.drawAxisLabelXRotate;\n this._drawAxisLabelY = this.drawAxisLabelYRotate;\n this._drawAxisLabelZ = this.drawAxisLabelZRotate;\n } else {\n this._drawAxisLabelX = this.drawAxisLabelX;\n this._drawAxisLabelY = this.drawAxisLabelY;\n this._drawAxisLabelZ = this.drawAxisLabelZ;\n }\n};\n\n/**\n * Redraw the Graph.\n */\nGraph3d.prototype.redraw = function() {\n if (this.dataPoints === undefined) {\n throw new Error('Graph data not initialized');\n }\n\n this._resizeCanvas();\n this._resizeCenter();\n this._redrawSlider();\n this._redrawClear();\n this._redrawAxis();\n\n this._redrawDataGraph();\n\n this._redrawInfo();\n this._redrawLegend();\n};\n\n\n/**\n * Get drawing context without exposing canvas\n *\n * @returns {CanvasRenderingContext2D}\n * @private\n */\nGraph3d.prototype._getContext = function() {\n var canvas = this.frame.canvas;\n var ctx = canvas.getContext('2d');\n\n ctx.lineJoin = 'round';\n ctx.lineCap = 'round';\n\n return ctx;\n};\n\n\n/**\n * Clear the canvas before redrawing\n */\nGraph3d.prototype._redrawClear = function() {\n var canvas = this.frame.canvas;\n var ctx = canvas.getContext('2d');\n\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n};\n\n\nGraph3d.prototype._dotSize = function() {\n return this.frame.clientWidth * this.dotSizeRatio;\n};\n\n\n/**\n * Get legend width\n *\n * @returns {*}\n * @private\n */\nGraph3d.prototype._getLegendWidth = function() {\n var width;\n\n if (this.style === Graph3d.STYLE.DOTSIZE) {\n var dotSize = this._dotSize();\n //width = dotSize / 2 + dotSize * 2;\n width = dotSize * this.dotSizeMaxFraction;\n } else if (this.style === Graph3d.STYLE.BARSIZE) {\n width = this.xBarWidth ;\n } else {\n width = 20;\n }\n return width;\n};\n\n\n/**\n * Redraw the legend based on size, dot color, or surface height\n */\nGraph3d.prototype._redrawLegend = function() {\n\n //Return without drawing anything, if no legend is specified\n if (this.showLegend !== true) {\n return;\n }\n\n // Do not draw legend when graph style does not support\n if (this.style === Graph3d.STYLE.LINE\n || this.style === Graph3d.STYLE.BARSIZE //TODO add legend support for BARSIZE\n ){\n return;\n }\n\n // Legend types - size and color. Determine if size legend.\n var isSizeLegend = (this.style === Graph3d.STYLE.BARSIZE\n || this.style === Graph3d.STYLE.DOTSIZE) ;\n\n // Legend is either tracking z values or style values. This flag if false means use z values.\n var isValueLegend = (this.style === Graph3d.STYLE.DOTSIZE\n || this.style === Graph3d.STYLE.DOTCOLOR\n || this.style === Graph3d.STYLE.SURFACE\n || this.style === Graph3d.STYLE.BARCOLOR);\n\n var height = Math.max(this.frame.clientHeight * 0.25, 100);\n var top = this.margin;\n var width = this._getLegendWidth() ; // px - overwritten by size legend\n var right = this.frame.clientWidth - this.margin;\n var left = right - width;\n var bottom = top + height;\n\n var ctx = this._getContext();\n ctx.lineWidth = 1;\n ctx.font = '14px arial'; // TODO: put in options\n\n if (isSizeLegend === false) {\n // draw the color bar\n var ymin = 0;\n var ymax = height; // Todo: make height customizable\n var y;\n\n for (y = ymin; y < ymax; y++) {\n // Need (1 - x) because y runs from top to bottom:\n const f = 1 - (y - ymin) / (ymax - ymin);\n const color = this._colormap(f, 1);\n\n ctx.strokeStyle = color;\n ctx.beginPath();\n ctx.moveTo(left, top + y);\n ctx.lineTo(right, top + y);\n ctx.stroke();\n }\n ctx.strokeStyle = this.axisColor;\n ctx.strokeRect(left, top, width, height);\n\n } else {\n\n // draw the size legend box\n var widthMin;\n if (this.style === Graph3d.STYLE.DOTSIZE) {\n // Get the proportion to max and min right\n widthMin = width * (this.dotSizeMinFraction / this.dotSizeMaxFraction);\n } else if (this.style === Graph3d.STYLE.BARSIZE) {\n //widthMin = this.xBarWidth * 0.2 this is wrong - barwidth measures in terms of xvalues\n }\n ctx.strokeStyle = this.axisColor;\n ctx.fillStyle = this.dataColor.fill;\n ctx.beginPath();\n ctx.moveTo(left, top);\n ctx.lineTo(right, top);\n ctx.lineTo(left + widthMin, bottom);\n ctx.lineTo(left, bottom);\n ctx.closePath();\n ctx.fill();\n ctx.stroke();\n }\n\n // print value text along the legend edge\n var gridLineLen = 5; // px\n\n var legendMin = isValueLegend ? this.valueRange.min : this.zRange.min;\n var legendMax = isValueLegend ? this.valueRange.max : this.zRange.max;\n var step = new StepNumber(legendMin, legendMax, (legendMax-legendMin)/5, true);\n step.start(true);\n\n var from;\n var to;\n while (!step.end()) {\n y = bottom - (step.getCurrent() - legendMin) / (legendMax - legendMin) * height;\n from = new Point2d(left - gridLineLen, y);\n to = new Point2d(left, y);\n this._line(ctx, from, to);\n\n ctx.textAlign = 'right';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = this.axisColor;\n ctx.fillText(step.getCurrent(), left - 2 * gridLineLen, y);\n\n step.next();\n }\n\n ctx.textAlign = 'right';\n ctx.textBaseline = 'top';\n var label = this.legendLabel;\n ctx.fillText(label, right, bottom + this.margin);\n};\n\n\n/**\n * Redraw the filter\n */\nGraph3d.prototype._redrawFilter = function() {\n var dataFilter = this.dataGroup.dataFilter;\n var filter = this.frame.filter;\n filter.innerHTML = '';\n\n if (!dataFilter) {\n filter.slider = undefined;\n return;\n }\n\n var options = {\n 'visible': this.showAnimationControls\n };\n var slider = new Slider(filter, options);\n filter.slider = slider;\n\n // TODO: css here is not nice here...\n filter.style.padding = '10px';\n //this.frame.filter.style.backgroundColor = '#EFEFEF';\n\n slider.setValues(dataFilter.values);\n slider.setPlayInterval(this.animationInterval);\n\n // create an event handler\n var me = this;\n var onchange = function () {\n var dataFilter = me.dataGroup.dataFilter;\n var index = slider.getIndex();\n\n dataFilter.selectValue(index);\n me.dataPoints = dataFilter._getDataPoints();\n\n me.redraw();\n };\n\n slider.setOnChangeCallback(onchange);\n};\n\n\n/**\n * Redraw the slider\n */\nGraph3d.prototype._redrawSlider = function() {\n if ( this.frame.filter.slider !== undefined) {\n this.frame.filter.slider.redraw();\n }\n};\n\n\n/**\n * Redraw common information\n */\nGraph3d.prototype._redrawInfo = function() {\n var info = this.dataGroup.getInfo();\n if (info === undefined) return;\n\n var ctx = this._getContext();\n\n ctx.font = '14px arial'; // TODO: put in options\n ctx.lineStyle = 'gray';\n ctx.fillStyle = 'gray';\n ctx.textAlign = 'left';\n ctx.textBaseline = 'top';\n\n var x = this.margin;\n var y = this.margin;\n ctx.fillText(info, x, y);\n};\n\n\n/**\n * Draw a line between 2d points 'from' and 'to'.\n *\n * If stroke style specified, set that as well.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {vis.Point2d} from\n * @param {vis.Point2d} to\n * @param {string} [strokeStyle]\n * @private\n */\nGraph3d.prototype._line = function(ctx, from, to, strokeStyle) {\n if (strokeStyle !== undefined) {\n ctx.strokeStyle = strokeStyle;\n }\n\n ctx.beginPath();\n ctx.moveTo(from.x, from.y);\n ctx.lineTo(to.x , to.y );\n ctx.stroke();\n};\n\n/**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {vis.Point3d} point3d\n * @param {string} text\n * @param {number} armAngle\n * @param {number} [yMargin=0]\n */\nGraph3d.prototype.drawAxisLabelX = function(ctx, point3d, text, armAngle, yMargin) {\n if (yMargin === undefined) {\n yMargin = 0;\n }\n\n var point2d = this._convert3Dto2D(point3d);\n\n if (Math.cos(armAngle * 2) > 0) {\n ctx.textAlign = 'center';\n ctx.textBaseline = 'top';\n point2d.y += yMargin;\n }\n else if (Math.sin(armAngle * 2) < 0){\n ctx.textAlign = 'right';\n ctx.textBaseline = 'middle';\n }\n else {\n ctx.textAlign = 'left';\n ctx.textBaseline = 'middle';\n }\n\n ctx.fillStyle = this.axisColor;\n ctx.fillText(text, point2d.x, point2d.y);\n};\n\n\n/**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {vis.Point3d} point3d\n * @param {string} text\n * @param {number} armAngle\n * @param {number} [yMargin=0]\n */\nGraph3d.prototype.drawAxisLabelY = function(ctx, point3d, text, armAngle, yMargin) {\n if (yMargin === undefined) {\n yMargin = 0;\n }\n\n var point2d = this._convert3Dto2D(point3d);\n\n if (Math.cos(armAngle * 2) < 0) {\n ctx.textAlign = 'center';\n ctx.textBaseline = 'top';\n point2d.y += yMargin;\n }\n else if (Math.sin(armAngle * 2) > 0){\n ctx.textAlign = 'right';\n ctx.textBaseline = 'middle';\n }\n else {\n ctx.textAlign = 'left';\n ctx.textBaseline = 'middle';\n }\n\n ctx.fillStyle = this.axisColor;\n ctx.fillText(text, point2d.x, point2d.y);\n};\n\n\n/**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {vis.Point3d} point3d\n * @param {string} text\n * @param {number} [offset=0]\n */\nGraph3d.prototype.drawAxisLabelZ = function(ctx, point3d, text, offset) {\n if (offset === undefined) {\n offset = 0;\n }\n\n var point2d = this._convert3Dto2D(point3d);\n ctx.textAlign = 'right';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = this.axisColor;\n ctx.fillText(text, point2d.x - offset, point2d.y);\n};\n\n/**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {vis.Point3d} point3d\n * @param {string} text\n * @param {number} armAngle\n * @param {number} [yMargin=0]\n */\nGraph3d.prototype.drawAxisLabelXRotate = function (ctx, point3d, text, armAngle, yMargin) {\n if (yMargin === undefined) {\n yMargin = 0;\n }\n\n var point2d = this._convert3Dto2D(point3d);\n if (Math.cos(armAngle * 2) > 0) {\n ctx.save();\n ctx.translate( point2d.x, point2d.y);\n ctx.rotate(-Math.PI / 2);\n ctx.textAlign = 'right';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = this.axisColor;\n ctx.fillText(text, 0, 0);\n ctx.restore();\n } else if (Math.sin(armAngle * 2) < 0) {\n ctx.textAlign = 'right';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = this.axisColor;\n ctx.fillText(text, point2d.x, point2d.y);\n } else {\n ctx.textAlign = 'left';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = this.axisColor;\n ctx.fillText(text, point2d.x, point2d.y);\n }\n};\n\n/**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {vis.Point3d} point3d\n * @param {string} text\n * @param {number} armAngle\n * @param {number} [yMargin=0]\n */\nGraph3d.prototype.drawAxisLabelYRotate = function (ctx, point3d, text, armAngle, yMargin) {\n if (yMargin === undefined) {\n yMargin = 0;\n }\n\n var point2d = this._convert3Dto2D(point3d);\n if (Math.cos(armAngle * 2) < 0 ) {\n ctx.save();\n ctx.translate( point2d.x, point2d.y);\n ctx.rotate(-Math.PI / 2);\n ctx.textAlign = 'right';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = this.axisColor;\n ctx.fillText(text, 0, 0);\n ctx.restore();\n } else if (Math.sin(armAngle * 2) > 0) {\n ctx.textAlign = 'right';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = this.axisColor;\n ctx.fillText(text, point2d.x, point2d.y);\n } else {\n ctx.textAlign = 'left';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = this.axisColor;\n ctx.fillText(text, point2d.x, point2d.y);\n }\n};\n\n/**\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {vis.Point3d} point3d\n * @param {string} text\n * @param {number} [offset=0]\n */\nGraph3d.prototype.drawAxisLabelZRotate = function (ctx, point3d, text, offset) {\n if (offset === undefined) {\n offset = 0;\n }\n\n var point2d = this._convert3Dto2D(point3d);\n ctx.textAlign = 'right';\n ctx.textBaseline = 'middle';\n ctx.fillStyle = this.axisColor;\n ctx.fillText(text, point2d.x - offset, point2d.y);\n};\n\n/**\n\n\n/**\n * Draw a line between 2d points 'from' and 'to'.\n *\n * If stroke style specified, set that as well.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {vis.Point2d} from\n * @param {vis.Point2d} to\n * @param {string} [strokeStyle]\n * @private\n */\nGraph3d.prototype._line3d = function(ctx, from, to, strokeStyle) {\n var from2d = this._convert3Dto2D(from);\n var to2d = this._convert3Dto2D(to);\n\n this._line(ctx, from2d, to2d, strokeStyle);\n};\n\n\n/**\n * Redraw the axis\n */\nGraph3d.prototype._redrawAxis = function() {\n var ctx = this._getContext(),\n from, to, step, prettyStep,\n text, xText, yText, zText,\n offset, xOffset, yOffset;\n\n // TODO: get the actual rendered style of the containerElement\n //ctx.font = this.containerElement.style.font;\n //ctx.font = 24 / this.camera.getArmLength() + 'px arial';\n ctx.font = this.axisFontSize / this.camera.getArmLength() + 'px ' + this.axisFontType;\n\n // calculate the length for the short grid lines\n var gridLenX = 0.025 / this.scale.x;\n var gridLenY = 0.025 / this.scale.y;\n var textMargin = 5 / this.camera.getArmLength(); // px\n var armAngle = this.camera.getArmRotation().horizontal;\n var armVector = new Point2d(Math.cos(armAngle), Math.sin(armAngle));\n\n var xRange = this.xRange;\n var yRange = this.yRange;\n var zRange = this.zRange;\n var point3d;\n\n // draw x-grid lines\n ctx.lineWidth = 1;\n prettyStep = (this.defaultXStep === undefined);\n step = new StepNumber(xRange.min, xRange.max, this.xStep, prettyStep);\n step.start(true);\n\n while (!step.end()) {\n var x = step.getCurrent();\n\n if (this.showGrid) {\n from = new Point3d(x, yRange.min, zRange.min);\n to = new Point3d(x, yRange.max, zRange.min);\n this._line3d(ctx, from, to, this.gridColor);\n }\n else if (this.showXAxis) {\n from = new Point3d(x, yRange.min, zRange.min);\n to = new Point3d(x, yRange.min+gridLenX, zRange.min);\n this._line3d(ctx, from, to, this.axisColor);\n\n from = new Point3d(x, yRange.max, zRange.min);\n to = new Point3d(x, yRange.max-gridLenX, zRange.min);\n this._line3d(ctx, from, to, this.axisColor);\n }\n\n if (this.showXAxis) {\n yText = (armVector.x > 0) ? yRange.min : yRange.max;\n point3d = new Point3d(x, yText, zRange.min);\n let msg = ' ' + this.xValueLabel(x) + ' ';\n this._drawAxisLabelX.call(this, ctx, point3d, msg, armAngle, textMargin);\n }\n\n step.next();\n }\n\n // draw y-grid lines\n ctx.lineWidth = 1;\n prettyStep = (this.defaultYStep === undefined);\n step = new StepNumber(yRange.min, yRange.max, this.yStep, prettyStep);\n step.start(true);\n\n while (!step.end()) {\n var y = step.getCurrent();\n\n if (this.showGrid) {\n from = new Point3d(xRange.min, y, zRange.min);\n to = new Point3d(xRange.max, y, zRange.min);\n this._line3d(ctx, from, to, this.gridColor);\n }\n else if (this.showYAxis){\n from = new Point3d(xRange.min, y, zRange.min);\n to = new Point3d(xRange.min+gridLenY, y, zRange.min);\n this._line3d(ctx, from, to, this.axisColor);\n\n from = new Point3d(xRange.max, y, zRange.min);\n to = new Point3d(xRange.max-gridLenY, y, zRange.min);\n this._line3d(ctx, from, to, this.axisColor);\n }\n\n if (this.showYAxis) {\n xText = (armVector.y > 0) ? xRange.min : xRange.max;\n point3d = new Point3d(xText, y, zRange.min);\n let msg = ' ' + this.yValueLabel(y) + ' ';\n this._drawAxisLabelY.call(this, ctx, point3d, msg, armAngle, textMargin);\n }\n\n step.next();\n }\n\n // draw z-grid lines and axis\n if (this.showZAxis) {\n ctx.lineWidth = 1;\n prettyStep = (this.defaultZStep === undefined);\n step = new StepNumber(zRange.min, zRange.max, this.zStep, prettyStep);\n step.start(true);\n\n xText = (armVector.x > 0) ? xRange.min : xRange.max;\n yText = (armVector.y < 0) ? yRange.min : yRange.max;\n\n while (!step.end()) {\n var z = step.getCurrent();\n\n // TODO: make z-grid lines really 3d?\n var from3d = new Point3d(xText, yText, z);\n var from2d = this._convert3Dto2D(from3d);\n to = new Point2d(from2d.x - textMargin, from2d.y);\n this._line(ctx, from2d, to, this.axisColor);\n\n let msg = this.zValueLabel(z) + ' ';\n this._drawAxisLabelZ.call(this, ctx, from3d, msg, 5);\n\n step.next();\n }\n\n ctx.lineWidth = 1;\n from = new Point3d(xText, yText, zRange.min);\n to = new Point3d(xText, yText, zRange.max);\n this._line3d(ctx, from, to, this.axisColor);\n }\n\n // draw x-axis\n if (this.showXAxis) {\n var xMin2d;\n var xMax2d;\n ctx.lineWidth = 1;\n\n // line at yMin\n xMin2d = new Point3d(xRange.min, yRange.min, zRange.min);\n xMax2d = new Point3d(xRange.max, yRange.min, zRange.min);\n this._line3d(ctx, xMin2d, xMax2d, this.axisColor);\n // line at ymax\n xMin2d = new Point3d(xRange.min, yRange.max, zRange.min);\n xMax2d = new Point3d(xRange.max, yRange.max, zRange.min);\n this._line3d(ctx, xMin2d, xMax2d, this.axisColor);\n }\n\n // draw y-axis\n if (this.showYAxis) {\n ctx.lineWidth = 1;\n // line at xMin\n from = new Point3d(xRange.min, yRange.min, zRange.min);\n to = new Point3d(xRange.min, yRange.max, zRange.min);\n this._line3d(ctx, from, to, this.axisColor);\n // line at xMax\n from = new Point3d(xRange.max, yRange.min, zRange.min);\n to = new Point3d(xRange.max, yRange.max, zRange.min);\n this._line3d(ctx, from, to, this.axisColor);\n }\n\n // draw x-label\n var xLabel = this.xLabel;\n if (xLabel.length > 0 && this.showXAxis) {\n yOffset = 0.1 / this.scale.y;\n xText = (xRange.max + 3*xRange.min)/4;\n yText = (armVector.x > 0) ? yRange.min - yOffset: yRange.max + yOffset;\n text = new Point3d(xText, yText, zRange.min);\n this.drawAxisLabelX(ctx, text, xLabel, armAngle);\n }\n\n // draw y-label\n var yLabel = this.yLabel;\n if (yLabel.length > 0 && this.showYAxis) {\n xOffset = 0.1 / this.scale.x;\n xText = (armVector.y > 0) ? xRange.min - xOffset : xRange.max + xOffset;\n yText = (yRange.max + 3*yRange.min)/4;\n text = new Point3d(xText, yText, zRange.min);\n\n this.drawAxisLabelY(ctx, text, yLabel, armAngle);\n }\n\n // draw z-label\n var zLabel = this.zLabel;\n if (zLabel.length > 0 && this.showZAxis) {\n offset = 30; // pixels. // TODO: relate to the max width of the values on the z axis?\n xText = (armVector.x > 0) ? xRange.min : xRange.max;\n yText = (armVector.y < 0) ? yRange.min : yRange.max;\n zText = (zRange.max + 3*zRange.min)/4;\n text = new Point3d(xText, yText, zText);\n\n this.drawAxisLabelZ(ctx, text, zLabel, offset);\n }\n};\n\n\n/**\n *\n * @param {vis.Point3d} point\n * @returns {*}\n * @private\n */\nGraph3d.prototype._getStrokeWidth = function(point) {\n if (point !== undefined) {\n if (this.showPerspective) {\n return 1 / -point.trans.z * this.dataColor.strokeWidth;\n }\n else {\n return -(this.eye.z / this.camera.getArmLength()) * this.dataColor.strokeWidth;\n }\n }\n\n return this.dataColor.strokeWidth;\n};\n\n\n// -----------------------------------------------------------------------------\n// Drawing primitives for the graphs\n// -----------------------------------------------------------------------------\n\n\n/**\n * Draw a bar element in the view with the given properties.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} point\n * @param {number} xWidth\n * @param {number} yWidth\n * @param {string} color\n * @param {string} borderColor\n * @private\n */\nGraph3d.prototype._redrawBar = function(ctx, point, xWidth, yWidth, color, borderColor) {\n var surface;\n\n // calculate all corner points\n var me = this;\n var point3d = point.point;\n var zMin = this.zRange.min;\n var top = [\n {point: new Point3d(point3d.x - xWidth, point3d.y - yWidth, point3d.z)},\n {point: new Point3d(point3d.x + xWidth, point3d.y - yWidth, point3d.z)},\n {point: new Point3d(point3d.x + xWidth, point3d.y + yWidth, point3d.z)},\n {point: new Point3d(point3d.x - xWidth, point3d.y + yWidth, point3d.z)}\n ];\n var bottom = [\n {point: new Point3d(point3d.x - xWidth, point3d.y - yWidth, zMin)},\n {point: new Point3d(point3d.x + xWidth, point3d.y - yWidth, zMin)},\n {point: new Point3d(point3d.x + xWidth, point3d.y + yWidth, zMin)},\n {point: new Point3d(point3d.x - xWidth, point3d.y + yWidth, zMin)}\n ];\n\n // calculate screen location of the points\n top.forEach(function (obj) {\n obj.screen = me._convert3Dto2D(obj.point);\n });\n bottom.forEach(function (obj) {\n obj.screen = me._convert3Dto2D(obj.point);\n });\n\n // create five sides, calculate both corner points and center points\n var surfaces = [\n {corners: top, center: Point3d.avg(bottom[0].point, bottom[2].point)},\n {corners: [top[0], top[1], bottom[1], bottom[0]], center: Point3d.avg(bottom[1].point, bottom[0].point)},\n {corners: [top[1], top[2], bottom[2], bottom[1]], center: Point3d.avg(bottom[2].point, bottom[1].point)},\n {corners: [top[2], top[3], bottom[3], bottom[2]], center: Point3d.avg(bottom[3].point, bottom[2].point)},\n {corners: [top[3], top[0], bottom[0], bottom[3]], center: Point3d.avg(bottom[0].point, bottom[3].point)}\n ];\n point.surfaces = surfaces;\n\n // calculate the distance of each of the surface centers to the camera\n for (let j = 0; j < surfaces.length; j++) {\n surface = surfaces[j];\n var transCenter = this._convertPointToTranslation(surface.center);\n surface.dist = this.showPerspective ? transCenter.length() : -transCenter.z;\n // TODO: this dept calculation doesn't work 100% of the cases due to perspective,\n // but the current solution is fast/simple and works in 99.9% of all cases\n // the issue is visible in example 14, with graph.setCameraPosition({horizontal: 2.97, vertical: 0.5, distance: 0.9})\n }\n\n // order the surfaces by their (translated) depth\n surfaces.sort(function (a, b) {\n var diff = b.dist - a.dist;\n if (diff) return diff;\n\n // if equal depth, sort the top surface last\n if (a.corners === top) return 1;\n if (b.corners === top) return -1;\n\n // both are equal\n return 0;\n });\n\n // draw the ordered surfaces\n ctx.lineWidth = this._getStrokeWidth(point);\n ctx.strokeStyle = borderColor;\n ctx.fillStyle = color;\n // NOTE: we start at j=2 instead of j=0 as we don't need to draw the two surfaces at the backside\n for (let j = 2; j < surfaces.length; j++) {\n surface = surfaces[j];\n this._polygon(ctx, surface.corners);\n }\n};\n\n\n/**\n * Draw a polygon using the passed points and fill it with the passed style and stroke.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Array.<vis.Point3d>} points an array of points.\n * @param {string} [fillStyle] the fill style to set\n * @param {string} [strokeStyle] the stroke style to set\n */\nGraph3d.prototype._polygon = function(ctx, points, fillStyle, strokeStyle) {\n if (points.length < 2) {\n return;\n }\n\n if (fillStyle !== undefined) {\n ctx.fillStyle = fillStyle;\n }\n if (strokeStyle !== undefined) {\n ctx.strokeStyle = strokeStyle;\n }\n ctx.beginPath();\n ctx.moveTo(points[0].screen.x, points[0].screen.y);\n\n for (var i = 1; i < points.length; ++i) {\n var point = points[i];\n ctx.lineTo(point.screen.x, point.screen.y);\n }\n\n ctx.closePath();\n ctx.fill();\n ctx.stroke(); // TODO: only draw stroke when strokeWidth > 0\n};\n\n\n/**\n * @param {CanvasRenderingContext2D} ctx\n * @param {object} point\n * @param {string} color\n * @param {string} borderColor\n * @param {number} [size=this._dotSize()]\n * @private\n */\nGraph3d.prototype._drawCircle = function(ctx, point, color, borderColor, size) {\n var radius = this._calcRadius(point, size);\n\n ctx.lineWidth = this._getStrokeWidth(point);\n ctx.strokeStyle = borderColor;\n ctx.fillStyle = color;\n ctx.beginPath();\n ctx.arc(point.screen.x, point.screen.y, radius, 0, Math.PI*2, true);\n ctx.fill();\n ctx.stroke();\n};\n\n\n/**\n * Determine the colors for the 'regular' graph styles.\n *\n * @param {object} point\n * @returns {{fill, border}}\n * @private\n */\nGraph3d.prototype._getColorsRegular = function(point) {\n const f = (point.point.value - this.valueRange.min) * this.scale.value;\n const color = this._colormap(f, 1);\n const borderColor = this._colormap(f, 0.8);\n return {\n fill : color,\n border: borderColor\n };\n};\n\n\n/**\n * Get the colors for the 'color' graph styles.\n * These styles are currently: 'bar-color' and 'dot-color'\n * Color may be set as a string representation of HTML color, like #ff00ff,\n * or calculated from a number, for example, distance from this point\n * The first option is useful when we have some pre-given legend, to which we have to adjust ourselves\n * The second option is useful when we are interested in automatically setting the color, from some value,\n * using some color scale\n * @param {object} point\n * @returns {{fill: *, border: *}}\n * @private\n */\nGraph3d.prototype._getColorsColor = function(point) {\n // calculate the color based on the value\n var color, borderColor, pointStyle;\n if (point && point.point && point.point.data && point.point.data.style) {\n pointStyle = point.point.data.style;\n }\n if (pointStyle && typeof pointStyle === 'object' &&\n pointStyle.fill && pointStyle.stroke ) {\n return {\n fill: pointStyle.fill,\n border: pointStyle.stroke\n }\n }\n\n if (typeof point.point.value === \"string\") {\n color = point.point.value;\n borderColor = point.point.value;\n }\n else {\n const f = (point.point.value - this.valueRange.min) * this.scale.value;\n color = this._colormap(f, 1);\n borderColor = this._colormap(f, 0.8);\n }\n return {\n fill : color,\n border : borderColor\n };\n};\n\n\n/**\n * Get the colors for the 'size' graph styles.\n * These styles are currently: 'bar-size' and 'dot-size'\n *\n * @returns {{fill: *, border: (string|colorOptions.stroke|{string, undefined}|string|colorOptions.stroke|{string}|*)}}\n * @private\n */\nGraph3d.prototype._getColorsSize = function() {\n return {\n fill : this.dataColor.fill,\n border : this.dataColor.stroke\n };\n};\n\n\n/**\n * Determine the color corresponding to a given value on the color scale.\n *\n * @param {number} [x] the data value to be mapped running from 0 to 1\n * @param {number} [v] scale factor between 0 and 1 for the color brightness\n * @returns {string}\n * @private\n */\nGraph3d.prototype._colormap = function(x, v=1) {\n\n let r, g, b, a;\n const colormap = this.colormap;\n if (Array.isArray(colormap)) {\n const maxIndex = colormap.length - 1;\n const startIndex = Math.max(Math.floor(x * maxIndex), 0);\n const endIndex = Math.min(startIndex + 1, maxIndex);\n const innerRatio = x * maxIndex - startIndex;\n const min = colormap[startIndex];\n const max = colormap[endIndex];\n r = min.r + innerRatio*(max.r - min.r);\n g = min.g + innerRatio*(max.g - min.g);\n b = min.b + innerRatio*(max.b - min.b);\n } else if (typeof colormap === 'function') {\n ({r, g, b, a} = colormap(x));\n } else {\n const hue = (1 - x) * 240;\n ({r, g, b} = util.HSVToRGB(hue/360, 1, 1));\n }\n if (typeof a === 'number' && !Number.isNaN(a)) {\n return `RGBA(${Math.round(r*v)}, ${Math.round(g*v)}, ${Math.round(b*v)}, ${a})`;\n } else {\n return `RGB(${Math.round(r*v)}, ${Math.round(g*v)}, ${Math.round(b*v)})`;\n }\n};\n\n\n/**\n * Determine the size of a point on-screen, as determined by the\n * distance to the camera.\n *\n * @param {Object} point\n * @param {number} [size=this._dotSize()] the size that needs to be translated to screen coordinates.\n * optional; if not passed, use the default point size.\n * @returns {number}\n * @private\n */\nGraph3d.prototype._calcRadius = function(point, size) {\n if (size === undefined) {\n size = this._dotSize();\n }\n\n var radius;\n if (this.showPerspective) {\n radius = size / -point.trans.z;\n }\n else {\n radius = size * -(this.eye.z / this.camera.getArmLength());\n }\n if (radius < 0) {\n radius = 0;\n }\n\n return radius;\n};\n\n\n// -----------------------------------------------------------------------------\n// Methods for drawing points per graph style.\n// -----------------------------------------------------------------------------\n\n\n/**\n * Draw single datapoint for graph style 'bar'.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} point\n * @private\n */\nGraph3d.prototype._redrawBarGraphPoint = function(ctx, point) {\n var xWidth = this.xBarWidth / 2;\n var yWidth = this.yBarWidth / 2;\n var colors = this._getColorsRegular(point);\n\n this._redrawBar(ctx, point, xWidth, yWidth, colors.fill, colors.border);\n};\n\n\n/**\n * Draw single datapoint for graph style 'bar-color'.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} point\n * @private\n */\nGraph3d.prototype._redrawBarColorGraphPoint = function(ctx, point) {\n var xWidth = this.xBarWidth / 2;\n var yWidth = this.yBarWidth / 2;\n var colors = this._getColorsColor(point);\n\n this._redrawBar(ctx, point, xWidth, yWidth, colors.fill, colors.border);\n};\n\n\n/**\n * Draw single datapoint for graph style 'bar-size'.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} point\n * @private\n */\nGraph3d.prototype._redrawBarSizeGraphPoint = function(ctx, point) {\n // calculate size for the bar\n var fraction = (point.point.value - this.valueRange.min) / this.valueRange.range();\n var xWidth = (this.xBarWidth / 2) * (fraction * 0.8 + 0.2);\n var yWidth = (this.yBarWidth / 2) * (fraction * 0.8 + 0.2);\n\n var colors = this._getColorsSize();\n\n this._redrawBar(ctx, point, xWidth, yWidth, colors.fill, colors.border);\n};\n\n\n/**\n * Draw single datapoint for graph style 'dot'.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} point\n * @private\n */\nGraph3d.prototype._redrawDotGraphPoint = function(ctx, point) {\n var colors = this._getColorsRegular(point);\n\n this._drawCircle(ctx, point, colors.fill, colors.border);\n};\n\n\n/**\n * Draw single datapoint for graph style 'dot-line'.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} point\n * @private\n */\nGraph3d.prototype._redrawDotLineGraphPoint = function(ctx, point) {\n // draw a vertical line from the XY-plane to the graph value\n var from = this._convert3Dto2D(point.bottom);\n ctx.lineWidth = 1;\n this._line(ctx, from, point.screen, this.gridColor);\n\n this._redrawDotGraphPoint(ctx, point);\n};\n\n\n/**\n * Draw single datapoint for graph style 'dot-color'.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} point\n * @private\n */\nGraph3d.prototype._redrawDotColorGraphPoint = function(ctx, point) {\n var colors = this._getColorsColor(point);\n\n this._drawCircle(ctx, point, colors.fill, colors.border);\n};\n\n\n/**\n * Draw single datapoint for graph style 'dot-size'.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} point\n * @private\n */\nGraph3d.prototype._redrawDotSizeGraphPoint = function(ctx, point) {\n var dotSize = this._dotSize();\n var fraction = (point.point.value - this.valueRange.min) / this.valueRange.range();\n\n var sizeMin = dotSize*this.dotSizeMinFraction;\n var sizeRange = dotSize*this.dotSizeMaxFraction - sizeMin;\n var size = sizeMin + sizeRange*fraction;\n\n var colors = this._getColorsSize();\n\n this._drawCircle(ctx, point, colors.fill, colors.border, size);\n};\n\n\n/**\n * Draw single datapoint for graph style 'surface'.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} point\n * @private\n */\nGraph3d.prototype._redrawSurfaceGraphPoint = function(ctx, point) {\n var right = point.pointRight;\n var top = point.pointTop;\n var cross = point.pointCross;\n\n if (point === undefined || right === undefined || top === undefined || cross === undefined) {\n return;\n }\n\n var topSideVisible = true;\n var fillStyle;\n var strokeStyle;\n var cosViewAngle;\n\n if (this.showGrayBottom || this.showShadow) {\n // calculate the cross product of the two vectors from center\n // to left and right, in order to know whether we are looking at the\n // bottom or at the top side. We can also use the cross product\n // for calculating light intensity\n var aDiff = Point3d.subtract(cross.trans, point.trans);\n var bDiff = Point3d.subtract(top.trans, right.trans);\n var surfaceNormal = Point3d.crossProduct(aDiff, bDiff);\n\n if (this.showPerspective) {\n let surfacePosition = Point3d.avg(\n Point3d.avg(point.trans, cross.trans),\n Point3d.avg(right.trans, top.trans));\n // This corresponds to diffuse lighting with light source at (0, 0, 0).\n // More generally, we would need `surfacePosition - lightPosition`:\n cosViewAngle = -Point3d.dotProduct(\n surfaceNormal.normalize(),\n surfacePosition.normalize())\n }\n else {\n cosViewAngle = surfaceNormal.z / surfaceNormal.length();\n }\n topSideVisible = cosViewAngle > 0;\n }\n\n if (topSideVisible || !this.showGrayBottom) {\n const vAvg = (point.point.value + right.point.value + top.point.value + cross.point.value) / 4;\n const ratio = (vAvg - this.valueRange.min) * this.scale.value;\n // lighting factor. TODO: let user specify lighting model as function(?)\n const v = this.showShadow ? (1 + cosViewAngle) / 2 : 1;\n fillStyle = this._colormap(ratio, v);\n }\n else {\n fillStyle = 'gray';\n }\n\n if (this.showSurfaceGrid) {\n strokeStyle = this.axisColor; // TODO: should be customizable\n }\n else {\n strokeStyle = fillStyle;\n }\n\n ctx.lineWidth = this._getStrokeWidth(point);\n // TODO: only draw stroke when strokeWidth > 0\n\n var points = [point, right, cross, top];\n this._polygon(ctx, points, fillStyle, strokeStyle);\n};\n\n\n/**\n * Helper method for _redrawGridGraphPoint()\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} from\n * @param {Object} to\n * @private\n */\nGraph3d.prototype._drawGridLine = function(ctx, from, to) {\n if (from === undefined || to === undefined) {\n return;\n }\n\n const vAvg = (from.point.value + to.point.value) / 2;\n const f = (vAvg - this.valueRange.min) * this.scale.value;\n\n ctx.lineWidth = this._getStrokeWidth(from) * 2;\n ctx.strokeStyle = this._colormap(f, 1);\n this._line(ctx, from.screen, to.screen);\n};\n\n\n/**\n * Draw single datapoint for graph style 'Grid'.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} point\n * @private\n */\nGraph3d.prototype._redrawGridGraphPoint = function(ctx, point) {\n this._drawGridLine(ctx, point, point.pointRight);\n this._drawGridLine(ctx, point, point.pointTop);\n};\n\n\n/**\n * Draw single datapoint for graph style 'line'.\n *\n * @param {CanvasRenderingContext2D} ctx\n * @param {Object} point\n * @private\n */\nGraph3d.prototype._redrawLineGraphPoint = function(ctx, point) {\n if (point.pointNext === undefined) {\n return;\n }\n\n ctx.lineWidth = this._getStrokeWidth(point);\n ctx.strokeStyle = this.dataColor.stroke;\n\n this._line(ctx, point.screen, point.pointNext.screen);\n};\n\n\n/**\n * Draw all datapoints for currently selected graph style.\n *\n */\nGraph3d.prototype._redrawDataGraph = function() {\n var ctx = this._getContext();\n var i;\n\n if (this.dataPoints === undefined || this.dataPoints.length <= 0)\n return; // TODO: throw exception?\n\n this._calcTranslations(this.dataPoints);\n\n for (i = 0; i < this.dataPoints.length; i++) {\n var point = this.dataPoints[i];\n\n // Using call() ensures that the correct context is used\n this._pointDrawingMethod.call(this, ctx, point);\n }\n};\n\n\n// -----------------------------------------------------------------------------\n// End methods for drawing points per graph style.\n// -----------------------------------------------------------------------------\n\n/**\n * Store startX, startY and startOffset for mouse operations\n *\n * @param {Event} event The event that occurred\n */\nGraph3d.prototype._storeMousePosition = function(event) {\n // get mouse position (different code for IE and all other browsers)\n this.startMouseX = getMouseX(event);\n this.startMouseY = getMouseY(event);\n\n this._startCameraOffset = this.camera.getOffset();\n};\n\n\n/**\n * Start a moving operation inside the provided parent element\n * @param {Event} event The event that occurred (required for\n * retrieving the mouse position)\n */\nGraph3d.prototype._onMouseDown = function(event) {\n event = event || window.event;\n\n // check if mouse is still down (may be up when focus is lost for example\n // in an iframe)\n if (this.leftButtonDown) {\n this._onMouseUp(event);\n }\n\n // only react on left mouse button down\n this.leftButtonDown = event.which ? (event.which === 1) : (event.button === 1);\n if (!this.leftButtonDown && !this.touchDown) return;\n\n this._storeMousePosition(event);\n\n this.startStart = new Date(this.start);\n this.startEnd = new Date(this.end);\n this.startArmRotation = this.camera.getArmRotation();\n\n this.frame.style.cursor = 'move';\n\n // add event listeners to handle moving the contents\n // we store the function onmousemove and onmouseup in the graph, so we can\n // remove the eventlisteners lateron in the function mouseUp()\n var me = this;\n this.onmousemove = function (event) {me._onMouseMove(event);};\n this.onmouseup = function (event) {me._onMouseUp(event);};\n util.addEventListener(document, 'mousemove', me.onmousemove);\n util.addEventListener(document, 'mouseup', me.onmouseup);\n util.preventDefault(event);\n};\n\n\n/**\n * Perform moving operating.\n * This function activated from within the funcion Graph.mouseDown().\n * @param {Event} event Well, eehh, the event\n */\nGraph3d.prototype._onMouseMove = function (event) {\n this.moving = true;\n event = event || window.event;\n\n // calculate change in mouse position\n var diffX = parseFloat(getMouseX(event)) - this.startMouseX;\n var diffY = parseFloat(getMouseY(event)) - this.startMouseY;\n\n // move with ctrl or rotate by other\n if (event && event.ctrlKey === true) {\n // calculate change in mouse position\n var scaleX = this.frame.clientWidth * 0.5;\n var scaleY = this.frame.clientHeight * 0.5;\n\n var offXNew = (this._startCameraOffset.x || 0) - ((diffX / scaleX) * this.camera.armLength) * 0.8;\n var offYNew = (this._startCameraOffset.y || 0) + ((diffY / scaleY) * this.camera.armLength) * 0.8;\n\n this.camera.setOffset(offXNew, offYNew);\n this._storeMousePosition(event);\n } else {\n var horizontalNew = this.startArmRotation.horizontal + diffX / 200;\n var verticalNew = this.startArmRotation.vertical + diffY / 200;\n\n var snapAngle = 4; // degrees\n var snapValue = Math.sin(snapAngle / 360 * 2 * Math.PI);\n\n // snap horizontally to nice angles at 0pi, 0.5pi, 1pi, 1.5pi, etc...\n // the -0.001 is to take care that the vertical axis is always drawn at the left front corner\n if (Math.abs(Math.sin(horizontalNew)) < snapValue) {\n horizontalNew = Math.round(horizontalNew / Math.PI) * Math.PI - 0.001;\n }\n if (Math.abs(Math.cos(horizontalNew)) < snapValue) {\n horizontalNew = (Math.round(horizontalNew / Math.PI - 0.5) + 0.5) * Math.PI - 0.001;\n }\n\n // snap vertically to nice angles\n if (Math.abs(Math.sin(verticalNew)) < snapValue) {\n verticalNew = Math.round(verticalNew / Math.PI) * Math.PI;\n }\n if (Math.abs(Math.cos(verticalNew)) < snapValue) {\n verticalNew = (Math.round(verticalNew / Math.PI - 0.5) + 0.5) * Math.PI;\n }\n this.camera.setArmRotation(horizontalNew, verticalNew);\n }\n\n this.redraw();\n\n // fire a cameraPositionChange event\n var parameters = this.getCameraPosition();\n this.emit('cameraPositionChange', parameters);\n\n util.preventDefault(event);\n};\n\n\n/**\n * Stop moving operating.\n * This function activated from within the funcion Graph.mouseDown().\n * @param {Event} event The event\n */\nGraph3d.prototype._onMouseUp = function (event) {\n this.frame.style.cursor = 'auto';\n this.leftButtonDown = false;\n\n // remove event listeners here\n util.removeEventListener(document, 'mousemove', this.onmousemove);\n util.removeEventListener(document, 'mouseup', this.onmouseup);\n util.preventDefault(event);\n};\n\n/**\n * @param {Event} event The event\n */\nGraph3d.prototype._onClick = function (event) {\n // NOTE: onclick_callback is deprecated and may be removed in a future version.\n if (!this.onclick_callback && !this.hasListeners('click'))\n return;\n if (!this.moving) {\n var boundingRect = this.frame.getBoundingClientRect();\n var mouseX = getMouseX(event) - boundingRect.left;\n var mouseY = getMouseY(event) - boundingRect.top;\n var dataPoint = this._dataPointFromXY(mouseX, mouseY);\n if (dataPoint) {\n if (this.onclick_callback)\n this.onclick_callback(dataPoint.point.data);\n this.emit('click', dataPoint.point.data);\n }\n }\n else { // disable onclick callback, if it came immediately after rotate/pan\n this.moving = false;\n }\n util.preventDefault(event);\n};\n\n/**\n * After having moved the mouse, a tooltip should pop up when the mouse is resting on a data point\n * @param {Event} event A mouse move event\n */\nGraph3d.prototype._onTooltip = function (event) {\n var delay = this.tooltipDelay; // ms\n var boundingRect = this.frame.getBoundingClientRect();\n var mouseX = getMouseX(event) - boundingRect.left;\n var mouseY = getMouseY(event) - boundingRect.top;\n\n if (!this.showTooltip) {\n return;\n }\n\n if (this.tooltipTimeout) {\n clearTimeout(this.tooltipTimeout);\n }\n\n // (delayed) display of a tooltip only if no mouse button is down\n if (this.leftButtonDown) {\n this._hideTooltip();\n return;\n }\n\n if (this.tooltip && this.tooltip.dataPoint) {\n // tooltip is currently visible\n var dataPoint = this._dataPointFromXY(mouseX, mouseY);\n if (dataPoint !== this.tooltip.dataPoint) {\n // datapoint changed\n if (dataPoint) {\n this._showTooltip(dataPoint);\n }\n else {\n this._hideTooltip();\n }\n }\n }\n else {\n // tooltip is currently not visible\n var me = this;\n this.tooltipTimeout = setTimeout(function () {\n me.tooltipTimeout = null;\n\n // show a tooltip if we have a data point\n var dataPoint = me._dataPointFromXY(mouseX, mouseY);\n if (dataPoint) {\n me._showTooltip(dataPoint);\n }\n }, delay);\n }\n};\n\n/**\n * Event handler for touchstart event on mobile devices\n * @param {Event} event The event\n */\nGraph3d.prototype._onTouchStart = function(event) {\n this.touchDown = true;\n\n var me = this;\n this.ontouchmove = function (event) {me._onTouchMove(event);};\n this.ontouchend = function (event) {me._onTouchEnd(event);};\n util.addEventListener(document, 'touchmove', me.ontouchmove);\n util.addEventListener(document, 'touchend', me.ontouchend);\n\n this._onMouseDown(event);\n};\n\n/**\n * Event handler for touchmove event on mobile devices\n * @param {Event} event The event\n */\nGraph3d.prototype._onTouchMove = function(event) {\n this._onMouseMove(event);\n};\n\n/**\n * Event handler for touchend event on mobile devices\n * @param {Event} event The event\n */\nGraph3d.prototype._onTouchEnd = function(event) {\n this.touchDown = false;\n\n util.removeEventListener(document, 'touchmove', this.ontouchmove);\n util.removeEventListener(document, 'touchend', this.ontouchend);\n\n this._onMouseUp(event);\n};\n\n\n/**\n * Event handler for mouse wheel event, used to zoom the graph\n * Code from http://adomas.org/javascript-mouse-wheel/\n * @param {Event} event The event\n */\nGraph3d.prototype._onWheel = function(event) {\n if (!event) /* For IE. */\n event = window.event;\n if (this.zoomable && (!this.ctrlToZoom || event.ctrlKey)) {\n\n // retrieve delta\n var delta = 0;\n if (event.wheelDelta) { /* IE/Opera. */\n delta = event.wheelDelta/120;\n } else if (event.detail) { /* Mozilla case. */\n // In Mozilla, sign of delta is different than in IE.\n // Also, delta is multiple of 3.\n delta = -event.detail/3;\n }\n\n // If delta is nonzero, handle it.\n // Basically, delta is now positive if wheel was scrolled up,\n // and negative, if wheel was scrolled down.\n if (delta) {\n var oldLength = this.camera.getArmLength();\n var newLength = oldLength * (1 - delta / 10);\n\n this.camera.setArmLength(newLength);\n this.redraw();\n\n this._hideTooltip();\n }\n\n // fire a cameraPositionChange event\n var parameters = this.getCameraPosition();\n this.emit('cameraPositionChange', parameters);\n\n // Prevent default actions caused by mouse wheel.\n // That might be ugly, but we handle scrolls somehow\n // anyway, so don't bother here..\n util.preventDefault(event);\n }\n};\n\n/**\n * Test whether a point lies inside given 2D triangle\n *\n * @param {vis.Point2d} point\n * @param {vis.Point2d[]} triangle\n * @returns {boolean} true if given point lies inside or on the edge of the\n * triangle, false otherwise\n * @private\n */\nGraph3d.prototype._insideTriangle = function (point, triangle) {\n var a = triangle[0],\n b = triangle[1],\n c = triangle[2];\n\n /**\n *\n * @param {number} x\n * @returns {number}\n */\n function sign (x) {\n return x > 0 ? 1 : x < 0 ? -1 : 0;\n }\n\n var as = sign((b.x - a.x) * (point.y - a.y) - (b.y - a.y) * (point.x - a.x));\n var bs = sign((c.x - b.x) * (point.y - b.y) - (c.y - b.y) * (point.x - b.x));\n var cs = sign((a.x - c.x) * (point.y - c.y) - (a.y - c.y) * (point.x - c.x));\n\n // each of the three signs must be either equal to each other or zero\n return (as == 0 || bs == 0 || as == bs) &&\n (bs == 0 || cs == 0 || bs == cs) &&\n (as == 0 || cs == 0 || as == cs);\n};\n\n/**\n * Find a data point close to given screen position (x, y)\n *\n * @param {number} x\n * @param {number} y\n * @returns {Object | null} The closest data point or null if not close to any\n * data point\n * @private\n */\nGraph3d.prototype._dataPointFromXY = function (x, y) {\n var i,\n distMax = 100, // px\n dataPoint = null,\n closestDataPoint = null,\n closestDist = null,\n center = new Point2d(x, y);\n\n if (this.style === Graph3d.STYLE.BAR ||\n this.style === Graph3d.STYLE.BARCOLOR ||\n this.style === Graph3d.STYLE.BARSIZE) {\n // the data points are ordered from far away to closest\n for (i = this.dataPoints.length - 1; i >= 0; i--) {\n dataPoint = this.dataPoints[i];\n var surfaces = dataPoint.surfaces;\n if (surfaces) {\n for (var s = surfaces.length - 1; s >= 0; s--) {\n // split each surface in two triangles, and see if the center point is inside one of these\n var surface = surfaces[s];\n var corners = surface.corners;\n var triangle1 = [corners[0].screen, corners[1].screen, corners[2].screen];\n var triangle2 = [corners[2].screen, corners[3].screen, corners[0].screen];\n if (this._insideTriangle(center, triangle1) ||\n this._insideTriangle(center, triangle2)) {\n // return immediately at the first hit\n return dataPoint;\n }\n }\n }\n }\n }\n else {\n // find the closest data point, using distance to the center of the point on 2d screen\n for (i = 0; i < this.dataPoints.length; i++) {\n dataPoint = this.dataPoints[i];\n var point = dataPoint.screen;\n if (point) {\n var distX = Math.abs(x - point.x);\n var distY = Math.abs(y - point.y);\n var dist = Math.sqrt(distX * distX + distY * distY);\n\n if ((closestDist === null || dist < closestDist) && dist < distMax) {\n closestDist = dist;\n closestDataPoint = dataPoint;\n }\n }\n }\n }\n\n\n return closestDataPoint;\n};\n\n\n/**\n * Determine if the given style has bars\n *\n * @param {number} style the style to check\n * @returns {boolean} true if bar style, false otherwise\n */\nGraph3d.prototype.hasBars = function(style) {\n return style == Graph3d.STYLE.BAR ||\n style == Graph3d.STYLE.BARCOLOR ||\n style == Graph3d.STYLE.BARSIZE;\n};\n\n\n/**\n * Display a tooltip for given data point\n * @param {Object} dataPoint\n * @private\n */\nGraph3d.prototype._showTooltip = function (dataPoint) {\n var content, line, dot;\n\n if (!this.tooltip) {\n content = document.createElement('div');\n Object.assign(content.style, {}, this.tooltipStyle.content);\n content.style.position = 'absolute';\n \n line = document.createElement('div');\n Object.assign(line.style, {}, this.tooltipStyle.line);\n line.style.position = 'absolute';\n\n dot = document.createElement('div');\n Object.assign(dot.style, {}, this.tooltipStyle.dot);\n dot.style.position = 'absolute';\n\n this.tooltip = {\n dataPoint: null,\n dom: {\n content: content,\n line: line,\n dot: dot\n }\n };\n }\n else {\n content = this.tooltip.dom.content;\n line = this.tooltip.dom.line;\n dot = this.tooltip.dom.dot;\n }\n\n this._hideTooltip();\n\n this.tooltip.dataPoint = dataPoint;\n if (typeof this.showTooltip === 'function') {\n content.innerHTML = this.showTooltip(dataPoint.point);\n }\n else {\n content.innerHTML = '<table>' +\n '<tr><td>' + this.xLabel + ':</td><td>' + dataPoint.point.x + '</td></tr>' +\n '<tr><td>' + this.yLabel + ':</td><td>' + dataPoint.point.y + '</td></tr>' +\n '<tr><td>' + this.zLabel + ':</td><td>' + dataPoint.point.z + '</td></tr>' +\n '</table>';\n }\n\n content.style.left = '0';\n content.style.top = '0';\n this.frame.appendChild(content);\n this.frame.appendChild(line);\n this.frame.appendChild(dot);\n\n // calculate sizes\n var contentWidth = content.offsetWidth;\n var contentHeight = content.offsetHeight;\n var lineHeight = line.offsetHeight;\n var dotWidth = dot.offsetWidth;\n var dotHeight = dot.offsetHeight;\n\n var left = dataPoint.screen.x - contentWidth / 2;\n left = Math.min(Math.max(left, 10), this.frame.clientWidth - 10 - contentWidth);\n\n line.style.left = dataPoint.screen.x + 'px';\n line.style.top = (dataPoint.screen.y - lineHeight) + 'px';\n content.style.left = left + 'px';\n content.style.top = (dataPoint.screen.y - lineHeight - contentHeight) + 'px';\n dot.style.left = (dataPoint.screen.x - dotWidth / 2) + 'px';\n dot.style.top = (dataPoint.screen.y - dotHeight / 2) + 'px';\n};\n\n/**\n * Hide the tooltip when displayed\n * @private\n */\nGraph3d.prototype._hideTooltip = function () {\n if (this.tooltip) {\n this.tooltip.dataPoint = null;\n\n for (var prop in this.tooltip.dom) {\n if (this.tooltip.dom.hasOwnProperty(prop)) {\n var elem = this.tooltip.dom[prop];\n if (elem && elem.parentNode) {\n elem.parentNode.removeChild(elem);\n }\n }\n }\n }\n};\n\n/**--------------------------------------------------------------------------**/\n\n\n/**\n * Get the horizontal mouse position from a mouse event\n *\n * @param {Event} event\n * @returns {number} mouse x\n */\nfunction getMouseX (event) {\n if ('clientX' in event) return event.clientX;\n return event.targetTouches[0] && event.targetTouches[0].clientX || 0;\n}\n\n/**\n * Get the vertical mouse position from a mouse event\n *\n * @param {Event} event\n * @returns {number} mouse y\n */\nfunction getMouseY (event) {\n if ('clientY' in event) return event.clientY;\n return event.targetTouches[0] && event.targetTouches[0].clientY || 0;\n}\n\n\n// -----------------------------------------------------------------------------\n// Public methods for specific settings\n// -----------------------------------------------------------------------------\n\n/**\n * Set the rotation and distance of the camera\n *\n * @param {Object} pos An object with the camera position\n * @param {number} [pos.horizontal] The horizontal rotation, between 0 and 2*PI.\n * Optional, can be left undefined.\n * @param {number} [pos.vertical] The vertical rotation, between 0 and 0.5*PI.\n * if vertical=0.5*PI, the graph is shown from\n * the top. Optional, can be left undefined.\n * @param {number} [pos.distance] The (normalized) distance of the camera to the\n * center of the graph, a value between 0.71 and\n * 5.0. Optional, can be left undefined.\n */\nGraph3d.prototype.setCameraPosition = function(pos) {\n setCameraPosition(pos, this);\n this.redraw();\n};\n\n\n/**\n * Set a new size for the graph\n *\n * @param {string} width Width in pixels or percentage (for example '800px'\n * or '50%')\n * @param {string} height Height in pixels or percentage (for example '400px'\n * or '30%')\n */\nGraph3d.prototype.setSize = function(width, height) {\n\tthis._setSize(width, height);\n\tthis.redraw();\n};\n\n// -----------------------------------------------------------------------------\n// End public methods for specific settings\n// -----------------------------------------------------------------------------\n\n\nexport default Graph3d;\n","/**\r\n * Created by Alex on 11/6/2014.\r\n */\r\nexport default function keycharm(options) {\r\n var preventDefault = options && options.preventDefault || false;\r\n\r\n var container = options && options.container || window;\r\n\r\n var _exportFunctions = {};\r\n var _bound = {keydown:{}, keyup:{}};\r\n var _keys = {};\r\n var i;\r\n\r\n // a - z\r\n for (i = 97; i <= 122; i++) {_keys[String.fromCharCode(i)] = {code:65 + (i - 97), shift: false};}\r\n // A - Z\r\n for (i = 65; i <= 90; i++) {_keys[String.fromCharCode(i)] = {code:i, shift: true};}\r\n // 0 - 9\r\n for (i = 0; i <= 9; i++) {_keys['' + i] = {code:48 + i, shift: false};}\r\n // F1 - F12\r\n for (i = 1; i <= 12; i++) {_keys['F' + i] = {code:111 + i, shift: false};}\r\n // num0 - num9\r\n for (i = 0; i <= 9; i++) {_keys['num' + i] = {code:96 + i, shift: false};}\r\n\r\n // numpad misc\r\n _keys['num*'] = {code:106, shift: false};\r\n _keys['num+'] = {code:107, shift: false};\r\n _keys['num-'] = {code:109, shift: false};\r\n _keys['num/'] = {code:111, shift: false};\r\n _keys['num.'] = {code:110, shift: false};\r\n // arrows\r\n _keys['left'] = {code:37, shift: false};\r\n _keys['up'] = {code:38, shift: false};\r\n _keys['right'] = {code:39, shift: false};\r\n _keys['down'] = {code:40, shift: false};\r\n // extra keys\r\n _keys['space'] = {code:32, shift: false};\r\n _keys['enter'] = {code:13, shift: false};\r\n _keys['shift'] = {code:16, shift: undefined};\r\n _keys['esc'] = {code:27, shift: false};\r\n _keys['backspace'] = {code:8, shift: false};\r\n _keys['tab'] = {code:9, shift: false};\r\n _keys['ctrl'] = {code:17, shift: false};\r\n _keys['alt'] = {code:18, shift: false};\r\n _keys['delete'] = {code:46, shift: false};\r\n _keys['pageup'] = {code:33, shift: false};\r\n _keys['pagedown'] = {code:34, shift: false};\r\n // symbols\r\n _keys['='] = {code:187, shift: false};\r\n _keys['-'] = {code:189, shift: false};\r\n _keys[']'] = {code:221, shift: false};\r\n _keys['['] = {code:219, shift: false};\r\n\r\n\r\n\r\n var down = function(event) {handleEvent(event,'keydown');};\r\n var up = function(event) {handleEvent(event,'keyup');};\r\n\r\n // handle the actualy bound key with the event\r\n var handleEvent = function(event,type) {\r\n if (_bound[type][event.keyCode] !== undefined) {\r\n var bound = _bound[type][event.keyCode];\r\n for (var i = 0; i < bound.length; i++) {\r\n if (bound[i].shift === undefined) {\r\n bound[i].fn(event);\r\n }\r\n else if (bound[i].shift == true && event.shiftKey == true) {\r\n bound[i].fn(event);\r\n }\r\n else if (bound[i].shift == false && event.shiftKey == false) {\r\n bound[i].fn(event);\r\n }\r\n }\r\n\r\n if (preventDefault == true) {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n // bind a key to a callback\r\n _exportFunctions.bind = function(key, callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n if (_keys[key] === undefined) {\r\n throw new Error(\"unsupported key: \" + key);\r\n }\r\n if (_bound[type][_keys[key].code] === undefined) {\r\n _bound[type][_keys[key].code] = [];\r\n }\r\n _bound[type][_keys[key].code].push({fn:callback, shift:_keys[key].shift});\r\n };\r\n\r\n\r\n // bind all keys to a call back (demo purposes)\r\n _exportFunctions.bindAll = function(callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n for (var key in _keys) {\r\n if (_keys.hasOwnProperty(key)) {\r\n _exportFunctions.bind(key,callback,type);\r\n }\r\n }\r\n };\r\n\r\n // get the key label from an event\r\n _exportFunctions.getKey = function(event) {\r\n for (var key in _keys) {\r\n if (_keys.hasOwnProperty(key)) {\r\n if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) {\r\n return key;\r\n }\r\n else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) {\r\n return key;\r\n }\r\n else if (event.keyCode == _keys[key].code && key == 'shift') {\r\n return key;\r\n }\r\n }\r\n }\r\n return \"unknown key, currently not supported\";\r\n };\r\n\r\n // unbind either a specific callback from a key or all of them (by leaving callback undefined)\r\n _exportFunctions.unbind = function(key, callback, type) {\r\n if (type === undefined) {\r\n type = 'keydown';\r\n }\r\n if (_keys[key] === undefined) {\r\n throw new Error(\"unsupported key: \" + key);\r\n }\r\n if (callback !== undefined) {\r\n var newBindings = [];\r\n var bound = _bound[type][_keys[key].code];\r\n if (bound !== undefined) {\r\n for (var i = 0; i < bound.length; i++) {\r\n if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) {\r\n newBindings.push(_bound[type][_keys[key].code][i]);\r\n }\r\n }\r\n }\r\n _bound[type][_keys[key].code] = newBindings;\r\n }\r\n else {\r\n _bound[type][_keys[key].code] = [];\r\n }\r\n };\r\n\r\n // reset all bound variables.\r\n _exportFunctions.reset = function() {\r\n _bound = {keydown:{}, keyup:{}};\r\n };\r\n\r\n // unbind all listeners and reset all variables.\r\n _exportFunctions.destroy = function() {\r\n _bound = {keydown:{}, keyup:{}};\r\n container.removeEventListener('keydown', down, true);\r\n container.removeEventListener('keyup', up, true);\r\n };\r\n\r\n // create listeners.\r\n container.addEventListener('keydown',down,true);\r\n container.addEventListener('keyup',up,true);\r\n\r\n // return the public functions.\r\n return _exportFunctions;\r\n}\r\n","// utils\nvar util = require('vis-util/esnext');\nexports.util = util;\nexports.DOMutil = require('./lib/DOMutil');\n\n// data\nvar { DataSet, DataView, Queue } = require('vis-data/esnext');\nexports.DataSet = DataSet;\nexports.DataView = DataView;\nexports.Queue = Queue;\n\n// Graph3d\nexports.Graph3d = require('./lib/graph3d/Graph3d');\nexports.graph3d = {\n Camera: require('./lib/graph3d/Camera'),\n Filter: require('./lib/graph3d/Filter'),\n Point2d: require('./lib/graph3d/Point2d'),\n Point3d: require('./lib/graph3d/Point3d'),\n Slider: require('./lib/graph3d/Slider'),\n StepNumber: require('./lib/graph3d/StepNumber')\n};\n\n// bundled external libraries\nexports.Hammer = require('vis-util/esnext').Hammer;\nexports.keycharm = require('keycharm');\n"],"names":["ceil","Math","floor","argument","isNaN","match","version","check","it","globalThis","window","self","global","this","Function","aFunction","variable","undefined","namespace","method","arguments","length","path","getBuiltIn","process","Deno","versions","v8","split","userAgent","exec","error","Object","getOwnPropertySymbols","fails","symbol","Symbol","String","sham","V8_VERSION","NATIVE_SYMBOL","iterator","USE_SYMBOL_AS_UID","$Symbol","isSymbol","TypeError","createMethod","CONVERT_TO_STRING","$this","pos","first","second","S","toString","requireObjectCoercible","position","toInteger","size","charCodeAt","charAt","slice","codeAt","SHARED","key","value","defineProperty","configurable","writable","setGlobal","functionToString","store","inspectSource","call","set","get","has","WeakMap","test","document","EXISTS","isObject","createElement","DESCRIPTORS","a","module","push","mode","copyright","hasOwnProperty","hasOwn","toObject","id","postfix","random","WellKnownSymbolsStore","shared","createWellKnownSymbol","withoutSetter","uid","name","TO_PRIMITIVE","wellKnownSymbol","input","pref","result","exoticToPrim","fn","val","valueOf","ordinaryToPrimitive","toPrimitive","$defineProperty","O","P","Attributes","anObject","toPropertyKey","IE8_DOM_DEFINE","bitmap","enumerable","object","definePropertyModule","f","createPropertyDescriptor","keys","OBJECT_ALREADY_INITIALIZED","NATIVE_WEAK_MAP","state","wmget","wmhas","wmset","metadata","facade","STATE","sharedKey","hiddenKeys","objectHas","createNonEnumerableProperty","IteratorPrototype","PrototypeOfArrayIteratorPrototype","arrayIterator","enforce","getterFor","TYPE","type","$propertyIsEnumerable","propertyIsEnumerable","getOwnPropertyDescriptor","V","descriptor","classof","IndexedObject","$getOwnPropertyDescriptor","toIndexedObject","propertyIsEnumerableModule","replacement","isForced","feature","detection","data","normalize","POLYFILL","NATIVE","string","replace","toLowerCase","that","b","c","apply","require$$0","wrapConstructor","NativeConstructor","Wrapper","prototype","options","source","USE_NATIVE","VIRTUAL_PROTOTYPE","sourceProperty","targetProperty","nativeProperty","resultProperty","TARGET","target","GLOBAL","STATIC","stat","PROTO","proto","nativeSource","targetPrototype","forced","noTargetGet","bind","wrap","real","F","constructor","getPrototypeOf","IE_PROTO","ObjectPrototype","CORRECT_PROTOTYPE_GETTER","ITERATOR","BUGGY_SAFARI_ITERATORS","NEW_ITERATOR_PROTOTYPE","activeXDocument","min","max","index","integer","IS_INCLUDES","el","fromIndex","toLength","toAbsoluteIndex","includes","indexOf","names","i","internalObjectKeys","enumBugKeys","defineProperties","Properties","objectKeys","EmptyConstructor","scriptTag","content","LT","NullProtoObjectViaActiveX","write","close","temp","parentWindow","NullProtoObject","ActiveXObject","domain","iframeDocument","iframe","documentCreateElement","style","display","html","appendChild","src","contentWindow","open","NullProtoObjectViaIFrame","create","TO_STRING_TAG","CORRECT_ARGUMENTS","classofRaw","TO_STRING_TAG_SUPPORT","tag","tryGet","callee","TAG","SET_METHOD","returnThis","setPrototypeOf","setter","CORRECT_SETTER","Array","aPossiblePrototype","__proto__","IteratorsCore","KEYS","VALUES","ENTRIES","Iterable","NAME","IteratorConstructor","next","DEFAULT","IS_SET","FORCED","setToStringTag","Iterators","createIteratorConstructor","CurrentIteratorPrototype","methods","KEY","getIterationMethod","KIND","defaultIterator","IterablePrototype","INCORRECT_VALUES_NAME","nativeIterator","anyNativeIterator","entries","values","redefine","$","STRING_ITERATOR","setInternalState","InternalStateModule","getInternalState","defineIterator","iterated","point","done","returnMethod","iteratorClose","ArrayPrototype","propertyKey","SAFE_CLOSING","called","iteratorWithReturn","from","INCORRECT_ITERATION","SKIP_CLOSING","ITERATION_SUPPORT","checkCorrectnessOfIteration","iterable","arrayLike","step","C","argumentsLength","mapfn","mapping","iteratorMethod","getIteratorMethod","isArrayIteratorMethod","createProperty","callWithSafeIterationClosing","ARRAY_ITERATOR","kind","Arguments","COLLECTION_NAME","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","Collection","CollectionPrototype","parent","isArray","arg","concat","getOwnPropertyNames","$getOwnPropertyNames","windowNames","getWindowNames","wrappedWellKnownSymbolModule","SPECIES","originalArray","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","IS_FILTER_REJECT","NO_HOLES","callbackfn","specificCreate","boundFunction","arraySpeciesCreate","forEach","map","filter","some","every","find","findIndex","filterReject","$forEach","HIDDEN","SYMBOL","$stringify","nativeGetOwnPropertyDescriptor","getOwnPropertyDescriptorModule","nativeDefineProperty","nativeGetOwnPropertyNames","getOwnPropertyNamesExternal","nativePropertyIsEnumerable","AllSymbols","ObjectPrototypeSymbols","StringToSymbolRegistry","SymbolToStringRegistry","QObject","USE_SETTER","findChild","setSymbolDescriptor","nativeObjectCreate","ObjectPrototypeDescriptor","description","$defineProperties","properties","$getOwnPropertySymbols","IS_OBJECT_PROTOTYPE","$toString","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","defineWellKnownSymbol","keyFor","sym","useSetter","useSimple","FORCED_JSON_STRINGIFY","stringify","replacer","space","$replacer","args","FAILS_ON_PRIMITIVES","getOwnPropertyDescriptors","ownKeys","T","D","objectDefinePropertyModile","desc","instance","Constructor","exports","_defineProperties","props","_Object$defineProperty","protoProps","staticProps","obj","arr","_Array$isArray","METHOD_NAME","array","foo","Boolean","IS_CONCAT_SPREADABLE","MAX_SAFE_INTEGER","MAXIMUM_ALLOWED_INDEX_EXCEEDED","IS_CONCAT_SPREADABLE_SUPPORT","SPECIES_SUPPORT","arrayMethodHasSpeciesSupport","isConcatSpreadable","spreadable","k","len","E","A","n","JSON","_i","_Symbol","_getIteratorMethod","_s","_e","_arr","_n","_d","err","HAS_SPECIES_SUPPORT","nativeSlice","start","end","fin","CONSTRUCTOR","entryVirtual","own","arr2","o","minLen","_context","arrayLikeToArray","_sliceInstanceProperty","_Array$from","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","WrappedWellKnownSymbolModule","_typeof","_Symbol$iterator","iter","arrayWithoutHoles","iterableToArray","nonIterableSpread","Reflect","$map","nativeKeys","now","Date","getTime","factories","construct","argsLength","list","join","partArgs","FunctionPrototype","arrayMethodIsStrict","DOMIterables","nativeReverse","reverse","MAXIMUM_ALLOWED_LENGTH_EXCEEDED","splice","deleteCount","insertCount","actualDeleteCount","to","actualStart","$assign","assign","B","alphabet","chr","j","$includes","MATCH","isRegExp","regexp","error1","error2","correctIsRegExpLogic","searchString","notARegExp","StringPrototype","arrayIncludes","stringIncludes","nativeGetPrototypeOf","$filter","TO_ENTRIES","$values","whitespace","whitespaces","ltrim","RegExp","rtrim","trim","$parseInt","parseInt","hex","radix","parseIntImplementation","$indexOf","nativeIndexOf","NEGATIVE_ZERO","STRICT_METHOD","searchElement","$trim","re","low","hi","fix","offset","prev","core","MSIE","scheduler","handler","timeout","boundArgs","setTimeout","setInterval","fill","endPos","Emitter","mixin","on","addEventListener","event","_callbacks","once","off","removeListener","removeAllListeners","removeEventListener","cb","callbacks","emit","listeners","hasListeners","assign$1","output","nextKey","DELETE","pureDeepObjectAssign","base","updates","deepObjectAssign","merged","deepObjectAssignNonentry","stripDelete","_Reflect$ownKeys","prop","clone","_mapInstanceProperty","_Object$keys2","JSONcontainer","elementType","redundant","used","parentNode","removeChild","prepareElements","cleanupElements","svgContainer","element","shift","createElementNS","DOMContainer","insertBefore","x","y","groupTemplate","labelObj","getSVGElement","setAttributeNS","styles","className","label","xOffset","yOffset","textContent","width","height","rect","nativeConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","ReferenceError","_setPrototypeOf","p","_Object$setPrototypeOf","subClass","superClass","_Object$create","assertThisInitialized","_getPrototypeOf","_Object$getPrototypeOf","runtime","Op","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","GenStateSuspendedStart","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","GenStateSuspendedYield","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","getProto","NativeIteratorPrototype","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","resolve","reject","invoke","__await","then","unwrapped","info","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","displayName","isGeneratorFunction","genFun","ctor","mark","awrap","async","Promise","pop","skipTempReset","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","IS_RIGHT","memo","left","right","$reduce","IS_NODE","CHROME_VERSION","reduce","flattenIntoArray","original","sourceLen","depth","mapper","thisArg","targetIndex","sourceIndex","mapFn","flatMap","isExtensible","preventExtensions","REQUIRED","METADATA","setMetadata","objectID","weakData","meta","enable","getOwnPropertyNamesExternalModule","fastKey","getWeakData","onFreeze","FREEZING","Result","stopped","unboundFunction","iterFn","AS_ENTRIES","IS_ITERATOR","INTERRUPTED","condition","callFn","require$$1","internalStateGetterFor","CONSTRUCTOR_NAME","wrapper","common","IS_WEAK","ADDER","NativePrototype","exported","anInstance","collection","iterate","IS_ADDER","getConstructor","InternalMetadataModule","setStrong","unsafe","last","previous","getEntry","removed","redefineAll","clear","add","ITERATOR_NAME","getInternalCollectionState","getInternalIteratorState","setSpecies","init","collectionStrong","Map","Set","mergeSort","comparefn","middle","insertionSort","merge","llength","rlength","lindex","rindex","firefox","UA","webkit","nativeSort","sort","FAILS_ON_UNDEFINED","FAILS_ON_NULL","STABLE_SORT","V8","FF","IE_OR_EDGE","WEBKIT","code","fromCharCode","v","itemsLength","items","arrayLength","internalSort","getSortCompare","$some","getRandomValues","rnds8","Uint8Array","rng","crypto","msCrypto","validate","uuid","REGEX","byteToHex","substr","v4","buf","rnds","SimpleDataPipe","_source","_transformers","_target","_listeners","_bindInstanceProperty","_add","remove","_remove","update","_update","_transformItems","_reduceInstanceProperty","transform","_name","payload","oldData","DataPipeUnderConstruction","callback","_filterInstanceProperty","_flatMapInstanceProperty","$parseFloat","parseFloat","Infinity","trimmedString","parseFloatImplementation","number","Number","Point3d","z","subtract","sub","sum","avg","scalarProduct","dotProduct","crossProduct","crossproduct","sqrt","Slider","container","visible","frame","play","bar","border","borderRadius","MozBorderRadius","backgroundColor","slide","margin","me","onmousedown","_onMouseDown","onclick","togglePlay","onChangeCallback","playTimeout","playInterval","playLoop","getIndex","setIndex","_valuesInstanceProperty","playNext","diff","interval","_setTimeout","clearInterval","setOnChangeCallback","setPlayInterval","getPlayInterval","setPlayLoop","doLoop","onChange","redraw","top","clientHeight","offsetHeight","clientWidth","indexToLeft","setValues","which","button","startClientX","clientX","startSlideX","_parseFloat","cursor","onmousemove","_onMouseMove","onmouseup","_onMouseUp","util","leftToIndex","round","StepNumber","prettyStep","_start","_end","_step","precision","_current","setRange","isNumeric","isFinite","setStep","calculatePrettyStep","log10","log","LN10","step1","pow","step2","step5","abs","getCurrent","toPrecision","getStep","checkFirst","sign","Camera","armLocation","armRotation","horizontal","vertical","armLength","cameraOffset","offsetMultiplier","cameraLocation","cameraRotation","PI","calculateCameraOrientation","setOffset","mul","getOffset","setArmLocation","setArmRotation","getArmRotation","rot","setArmLength","getArmLength","getCameraLocation","getCameraRotation","sin","cos","xa","za","dx","dy","STYLE","BAR","BARCOLOR","BARSIZE","DOT","DOTLINE","DOTCOLOR","DOTSIZE","GRID","LINE","SURFACE","STYLENAME","OPTIONKEYS","PREFIXEDOPTIONKEYS","DEFAULTS","isEmpty","prefixFieldName","prefix","fieldName","str","toUpperCase","forceCopy","dst","fields","srcKey","safeCopy","setSpecialSettings","stroke","strokeWidth","_fillInstanceProperty","borderColor","borderWidth","borderStyle","setBackgroundColor","dataColor","setDataColor","styleNumber","styleName","getStyleNumberByName","valid","checkStyleNumber","setStyle","surfaceColors","console","warn","colormap","rgbColors","parseColorArray","parseColorObject","hue","setSurfaceColor","setColormap","showLegend","isLegendGraphStyle","setShowLegend","setCameraPosition","cameraPosition","tooltip","showTooltip","onclick_callback","tooltipStyle","colorCode","hues","saturation","brightness","colorStops","hueStep","camPos","camera","distance","bool","colorOptions","__type__","allOptions","animationAutoStart","boolean","animationInterval","animationPreload","axisColor","axisFontSize","axisFontType","xBarWidth","yBarWidth","zoomable","ctrlToZoom","xCenter","yCenter","dotSizeMinFraction","dotSizeMaxFraction","dotSizeRatio","filterLabel","gridColor","keepAspectRatio","xLabel","yLabel","zLabel","legendLabel","xMin","yMin","zMin","xMax","yMax","zMax","showAnimationControls","showGrayBottom","showGrid","showPerspective","showShadow","showSurfaceGrid","showXAxis","showYAxis","showZAxis","rotateAxisLabels","xStep","yStep","zStep","tooltipDelay","color","background","boxShadow","padding","line","borderLeft","pointerEvents","dot","xValueLabel","yValueLabel","zValueLabel","valueMax","valueMin","verticalRatio","Range","adjust","combine","range","expand","newMin","newMax","center","Filter","dataGroup","column","graph","getDistinctValues","selectValue","dataPoints","loaded","onLoadCallback","loadInBackground","isLoaded","getLoadedProgress","getLabel","getColumn","getSelectedValue","getValues","getValue","_getDataPoints","dataView","DataView","getDataSet","item","setOnLoadCallback","progress","innerHTML","bottom","DataGroup","dataTable","initializeData","graph3d","rawData","DataSet","dataSet","_onChange","setData","colX","colY","colZ","withBars","hasBars","defaultXBarWidth","getSmallestDifference","defaultYBarWidth","_initializeRange","colValue","valueRange","getColumnRange","_setRangeDefaults","defaultValueMin","defaultValueMax","zRange","getDataTable","dataFilter","_collectRangeSettings","_indexOfInstanceProperty","upper","barWidth","range_label","step_label","settings","_sortInstanceProperty","smallest_diff","getNumberOfRows","defaultMin","defaultMax","getDataPoints","trans","screen","initDataAsMatrix","dataX","dataY","dataMatrix","xIndex","yIndex","pointRight","pointTop","pointCross","getInfo","reload","pointNext","autoByDefault","Graph3d","SyntaxError","containerElement","eye","setDefaults","setOptions","getMouseX","targetTouches","getMouseY","clientY","_setScale","scale","xRange","yRange","zCenter","_convert3Dto2D","point3d","translation","_convertPointToTranslation","_convertTranslationToScreen","ax","ay","az","cx","cy","cz","sinTx","cosTx","sinTy","cosTy","sinTz","cosTz","bx","by","ex","ey","ez","dz","Point2d","currentXCenter","canvas","currentYCenter","_calcTranslations","points","transBottom","dist","_initializeRanges","dg","hasChildNodes","firstChild","overflow","noCanvas","fontWeight","_onTouchStart","_onWheel","_onTooltip","_onClick","_setSize","_resizeCanvas","animationStart","slider","animationStop","_resizeCenter","getCameraPosition","_readData","_redrawFilter","Validator","VALIDATOR_PRINT_STYLE","setPointDrawingMethod","setAxisLabelMethod","_redrawBarGraphPoint","_redrawBarColorGraphPoint","_redrawBarSizeGraphPoint","_redrawDotGraphPoint","_redrawDotLineGraphPoint","_redrawDotColorGraphPoint","_redrawDotSizeGraphPoint","_redrawSurfaceGraphPoint","_redrawGridGraphPoint","_redrawLineGraphPoint","_pointDrawingMethod","_drawAxisLabelX","drawAxisLabelXRotate","_drawAxisLabelY","drawAxisLabelYRotate","_drawAxisLabelZ","drawAxisLabelZRotate","drawAxisLabelX","drawAxisLabelY","drawAxisLabelZ","_redrawSlider","_redrawClear","_redrawAxis","_redrawDataGraph","_redrawInfo","_redrawLegend","_getContext","ctx","getContext","lineJoin","lineCap","clearRect","_dotSize","_getLegendWidth","isSizeLegend","isValueLegend","lineWidth","font","ymax","_colormap","strokeStyle","beginPath","moveTo","lineTo","strokeRect","widthMin","fillStyle","closePath","legendMin","legendMax","_line","textAlign","textBaseline","fillText","lineStyle","text","armAngle","yMargin","point2d","save","translate","rotate","restore","_line3d","from2d","to2d","xText","yText","zText","xMin2d","xMax2d","gridLenX","gridLenY","textMargin","armVector","defaultXStep","msg","defaultYStep","defaultZStep","from3d","_getStrokeWidth","_redrawBar","xWidth","yWidth","surface","surfaces","corners","transCenter","_polygon","_drawCircle","radius","_calcRadius","arc","_getColorsRegular","_getColorsColor","pointStyle","_getColorsSize","r","g","maxIndex","startIndex","endIndex","innerRatio","_Number$isNaN","colors","fraction","dotSize","sizeMin","cross","cosViewAngle","topSideVisible","aDiff","bDiff","surfaceNormal","surfacePosition","ratio","_drawGridLine","_storeMousePosition","startMouseX","startMouseY","_startCameraOffset","leftButtonDown","touchDown","startStart","startEnd","startArmRotation","moving","diffX","diffY","ctrlKey","scaleX","scaleY","offXNew","offYNew","horizontalNew","verticalNew","snapValue","parameters","boundingRect","getBoundingClientRect","mouseX","mouseY","dataPoint","_dataPointFromXY","delay","tooltipTimeout","clearTimeout","_hideTooltip","_showTooltip","ontouchmove","_onTouchMove","ontouchend","_onTouchEnd","delta","wheelDelta","detail","newLength","_insideTriangle","triangle","as","bs","cs","closestDataPoint","closestDist","s","triangle1","triangle2","distX","distY","dom","contentWidth","offsetWidth","contentHeight","lineHeight","dotWidth","dotHeight","elem","setSize","preventDefault","_exportFunctions","_bound","keydown","keyup","_keys","down","handleEvent","up","keyCode","bound","shiftKey","bindAll","getKey","unbind","newBindings","destroy","Queue","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","Hammer","require$$9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;kPAAA,IAAIA,EAAOC,KAAKD,KACZE,EAAQD,KAAKC,QAIA,SAAUC,UAClBC,MAAMD,GAAYA,GAAY,GAAKA,EAAW,EAAID,EAAQF,GAAMG,MCNxD,0VCAjB,ICOIE,EAAOC,EDPPC,EAAQ,SAAUC,UACbA,GAAMA,EAAGP,MAAQA,MAAQO,KAMhCD,EAA2B,iBAAdE,YAA0BA,aACvCF,EAAuB,iBAAVG,QAAsBA,SAEnCH,EAAqB,iBAARI,MAAoBA,OACjCJ,EAAuB,iBAAVK,GAAsBA,IAElC,kBAAqBC,KAArB,IAAmCC,SAAS,cAATA,GEVlCC,EAAY,SAAUC,SACE,mBAAZA,EAAyBA,OAAWC,KAGnC,SAAUC,EAAWC,UAC7BC,UAAUC,OAAS,EAAIN,EAAUO,EAAKJ,KAAeH,EAAUH,EAAOM,IACzEI,EAAKJ,IAAcI,EAAKJ,GAAWC,IAAWP,EAAOM,IAAcN,EAAOM,GAAWC,MCP1EI,EAAW,YAAa,cAAgB,GFCrDC,EAAUZ,EAAOY,QACjBC,EAAOb,EAAOa,KACdC,EAAWF,GAAWA,EAAQE,UAAYD,GAAQA,EAAKnB,QACvDqB,EAAKD,GAAYA,EAASC,GAG1BA,EAEFrB,GADAD,EAAQsB,EAAGC,MAAM,MACD,GAAK,EAAI,EAAIvB,EAAM,GAAKA,EAAM,GACrCwB,MACTxB,EAAQwB,EAAUxB,MAAM,iBACVA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