\";\n return div.innerHTML.indexOf('
') > 0;\n } // #3663: IE encodes newlines inside attribute values while other browsers don't\n\n\n var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false; // #6828: chrome encodes content in a[href]\n\n var shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false;\n /* */\n\n var idToTemplate = cached(function (id) {\n var el = query(id);\n return el && el.innerHTML;\n });\n var mount = Vue.prototype.$mount;\n\n Vue.prototype.$mount = function (el, hydrating) {\n el = el && query(el);\n /* istanbul ignore if */\n\n if (el === document.body || el === document.documentElement) {\n warn(\"Do not mount Vue to or - mount to normal elements instead.\");\n return this;\n }\n\n var options = this.$options; // resolve template/el and convert to render function\n\n if (!options.render) {\n var template = options.template;\n\n if (template) {\n if (typeof template === 'string') {\n if (template.charAt(0) === '#') {\n template = idToTemplate(template);\n /* istanbul ignore if */\n\n if (!template) {\n warn(\"Template element not found or is empty: \" + options.template, this);\n }\n }\n } else if (template.nodeType) {\n template = template.innerHTML;\n } else {\n {\n warn('invalid template option:' + template, this);\n }\n return this;\n }\n } else if (el) {\n template = getOuterHTML(el);\n }\n\n if (template) {\n /* istanbul ignore if */\n if (config.performance && mark) {\n mark('compile');\n }\n\n var ref = compileToFunctions(template, {\n outputSourceRange: \"development\" !== 'production',\n shouldDecodeNewlines: shouldDecodeNewlines,\n shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref,\n delimiters: options.delimiters,\n comments: options.comments\n }, this);\n var render = ref.render;\n var staticRenderFns = ref.staticRenderFns;\n options.render = render;\n options.staticRenderFns = staticRenderFns;\n /* istanbul ignore if */\n\n if (config.performance && mark) {\n mark('compile end');\n measure(\"vue \" + this._name + \" compile\", 'compile', 'compile end');\n }\n }\n }\n\n return mount.call(this, el, hydrating);\n };\n /**\n * Get outerHTML of elements, taking care\n * of SVG elements in IE as well.\n */\n\n\n function getOuterHTML(el) {\n if (el.outerHTML) {\n return el.outerHTML;\n } else {\n var container = document.createElement('div');\n container.appendChild(el.cloneNode(true));\n return container.innerHTML;\n }\n }\n\n Vue.compile = compileToFunctions;\n return Vue;\n});","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n/** `Object#toString` result references. */\n\n\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n } // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n\n\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;","var root = require('./_root');\n/** Built-in value references. */\n\n\nvar _Symbol = root.Symbol;\nmodule.exports = _Symbol;","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || value !== value && other !== other;\n}\n\nmodule.exports = eq;","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function (value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n\n\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n/** `Object#toString` result references. */\n\n\nvar symbolTag = '[object Symbol]';\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n\nfunction isSymbol(value) {\n return _typeof(value) == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;\n}\n\nmodule.exports = isSymbol;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar root = require('./_root'),\n stubFalse = require('./stubFalse');\n/** Detect free variable `exports`. */\n\n\nvar freeExports = (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;\n/** Detect free variable `module`. */\n\nvar freeModule = freeExports && (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) == 'object' && module && !module.nodeType && module;\n/** Detect the popular CommonJS extension `module.exports`. */\n\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n/** Built-in value references. */\n\nvar Buffer = moduleExports ? root.Buffer : undefined;\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n\nvar isBuffer = nativeIsBuffer || stubFalse;\nmodule.exports = isBuffer;","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n/** `Object#toString` result references. */\n\n\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\nvar dataViewTag = '[object DataView]';\n/** Used to detect maps, sets, and weakmaps. */\n\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n\nvar getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n\nif (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {\n getTag = function getTag(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString:\n return dataViewTag;\n\n case mapCtorString:\n return mapTag;\n\n case promiseCtorString:\n return promiseTag;\n\n case setCtorString:\n return setTag;\n\n case weakMapCtorString:\n return weakMapTag;\n }\n }\n\n return result;\n };\n}\n\nmodule.exports = getTag;","/* global window */\nvar lodash;\n\nif (typeof require === \"function\") {\n try {\n lodash = {\n defaults: require(\"lodash/defaults\"),\n each: require(\"lodash/each\"),\n isFunction: require(\"lodash/isFunction\"),\n isPlainObject: require(\"lodash/isPlainObject\"),\n pick: require(\"lodash/pick\"),\n has: require(\"lodash/has\"),\n range: require(\"lodash/range\"),\n uniqueId: require(\"lodash/uniqueId\")\n };\n } catch (e) {// continue regardless of error\n }\n}\n\nif (!lodash) {\n lodash = window._;\n}\n\nmodule.exports = lodash;","module.exports = require('./lib/axios');","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/** Built-in value references. */\n\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n\nvar isArguments = baseIsArguments(function () {\n return arguments;\n}()) ? baseIsArguments : function (value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\n};\nmodule.exports = isArguments;","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n\n\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n\n return object;\n}\n\nmodule.exports = copyObject;","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n/* Node.js helper references. */\n\n\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\nmodule.exports = isTypedArray;","var isSymbol = require('./isSymbol');\n/** Used as references for various `Number` constants. */\n\n\nvar INFINITY = 1 / 0;\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n\n var result = value + '';\n return result == '0' && 1 / value == -INFINITY ? '-0' : result;\n}\n\nmodule.exports = toKey;","\"use strict\";\n/* IMPORT */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _1 = require(\".\");\n/* REUSABLE */\n\n\nvar channels = new _1[\"default\"]({\n r: 0,\n g: 0,\n b: 0,\n a: 0\n}, 'transparent');\n/* EXPORT */\n\nexports[\"default\"] = channels;","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n\n\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n this.__data__ = new MapCache();\n\n while (++index < length) {\n this.add(values[index]);\n }\n} // Add methods to `SetCache`.\n\n\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\nmodule.exports = SetCache;","var getNative = require('./_getNative');\n/* Built-in method references that are verified to be native. */\n\n\nvar nativeCreate = getNative(Object, 'create');\nmodule.exports = nativeCreate;","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\n\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n this.clear();\n\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n} // Add methods to `ListCache`.\n\n\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\nmodule.exports = ListCache;","var eq = require('./eq');\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n\n\nfunction assocIndexOf(array, key) {\n var length = array.length;\n\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n\n return -1;\n}\n\nmodule.exports = assocIndexOf;","var isKeyable = require('./_isKeyable');\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n\n\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;\n}\n\nmodule.exports = getMapData;","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n\n\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n\n\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n\n return result;\n}\n\nmodule.exports = baseFlatten;","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\n\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n} // Add methods to `Stack`.\n\n\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\nmodule.exports = Stack;","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;","var defineProperty = require('./_defineProperty');\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n\n\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n/** Used to detect unsigned integer values. */\n\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n\nfunction isIndex(value, length) {\n var type = _typeof(value);\n\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;\n}\n\nmodule.exports = isIndex;","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;\n return value === proto;\n}\n\nmodule.exports = isPrototype;","var overArg = require('./_overArg');\n/** Built-in value references. */\n\n\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\nmodule.exports = getPrototype;","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n\n\nvar baseEach = createBaseEach(baseForOwn);\nmodule.exports = baseEach;","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n\n\nfunction baseGet(object, path) {\n path = castPath(path, object);\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n\n return index && index == length ? object : undefined;\n}\n\nmodule.exports = baseGet;","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n\n\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n\n\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n\n var type = _typeof(index);\n\n if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) {\n return eq(object[index], value);\n }\n\n return false;\n}\n\nmodule.exports = isIterateeCall;","\"use strict\";\n\nvar _ = require(\"../lodash\");\n\nmodule.exports = {\n longestPath: longestPath,\n slack: slack\n};\n/*\n * Initializes ranks for the input graph using the longest path algorithm. This\n * algorithm scales well and is fast in practice, it yields rather poor\n * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom\n * ranks wide and leaving edges longer than necessary. However, due to its\n * speed, this algorithm is good for getting an initial ranking that can be fed\n * into other algorithms.\n *\n * This algorithm does not normalize layers because it will be used by other\n * algorithms in most cases. If using this algorithm directly, be sure to\n * run normalize at the end.\n *\n * Pre-conditions:\n *\n * 1. Input graph is a DAG.\n * 2. Input graph node labels can be assigned properties.\n *\n * Post-conditions:\n *\n * 1. Each node will be assign an (unnormalized) \"rank\" property.\n */\n\nfunction longestPath(g) {\n var visited = {};\n\n function dfs(v) {\n var label = g.node(v);\n\n if (_.has(visited, v)) {\n return label.rank;\n }\n\n visited[v] = true;\n\n var rank = _.min(_.map(g.outEdges(v), function (e) {\n return dfs(e.w) - g.edge(e).minlen;\n }));\n\n if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3\n rank === undefined || // return value of _.map([]) for Lodash 4\n rank === null) {\n // return value of _.map([null])\n rank = 0;\n }\n\n return label.rank = rank;\n }\n\n _.forEach(g.sources(), dfs);\n}\n/*\n * Returns the amount of slack for the given edge. The slack is defined as the\n * difference between the length of the edge and its minimum length.\n */\n\n\nfunction slack(g, e) {\n return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen;\n}","\"use strict\";\n/* IMPORT */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar utils_1 = require(\"../utils\");\n\nvar reusable_1 = require(\"../channels/reusable\");\n\nvar color_1 = require(\"../color\");\n\nvar change_1 = require(\"./change\");\n\nfunction rgba(r, g, b, a) {\n if (b === void 0) {\n b = 0;\n }\n\n if (a === void 0) {\n a = 1;\n }\n\n if (typeof r !== 'number') return change_1[\"default\"](r, {\n a: g\n });\n var channels = reusable_1[\"default\"].set({\n r: utils_1[\"default\"].channel.clamp.r(r),\n g: utils_1[\"default\"].channel.clamp.g(g),\n b: utils_1[\"default\"].channel.clamp.b(b),\n a: utils_1[\"default\"].channel.clamp.a(a)\n });\n return color_1[\"default\"].stringify(channels);\n}\n/* EXPORT */\n\n\nexports[\"default\"] = rgba;","\"use strict\";\n/* IMPORT */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar utils_1 = require(\"../utils\");\n\nvar color_1 = require(\"../color\");\n/* CHANGE */\n\n\nfunction change(color, channels) {\n var ch = color_1[\"default\"].parse(color);\n\n for (var c in channels) {\n ch[c] = utils_1[\"default\"].channel.clamp[c](channels[c]);\n }\n\n return color_1[\"default\"].stringify(ch);\n}\n/* EXPORT */\n\n\nexports[\"default\"] = change;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/main/actionview/app/assets/javascripts\nReleased under the MIT license\n */\n;\n(function () {\n var context = this;\n (function () {\n (function () {\n this.Rails = {\n linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',\n buttonClickSelector: {\n selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',\n exclude: 'form button'\n },\n inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',\n formSubmitSelector: 'form',\n formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',\n formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',\n formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',\n fileInputSelector: 'input[name][type=file]:not([disabled])',\n linkDisableSelector: 'a[data-disable-with], a[data-disable]',\n buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'\n };\n }).call(this);\n }).call(context);\n var Rails = context.Rails;\n (function () {\n (function () {\n var nonce;\n nonce = null;\n\n Rails.loadCSPNonce = function () {\n var ref;\n return nonce = (ref = document.querySelector(\"meta[name=csp-nonce]\")) != null ? ref.content : void 0;\n };\n\n Rails.cspNonce = function () {\n return nonce != null ? nonce : Rails.loadCSPNonce();\n };\n }).call(this);\n (function () {\n var expando, m;\n m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\n Rails.matches = function (element, selector) {\n if (selector.exclude != null) {\n return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n } else {\n return m.call(element, selector);\n }\n };\n\n expando = '_ujsData';\n\n Rails.getData = function (element, key) {\n var ref;\n return (ref = element[expando]) != null ? ref[key] : void 0;\n };\n\n Rails.setData = function (element, key, value) {\n if (element[expando] == null) {\n element[expando] = {};\n }\n\n return element[expando][key] = value;\n };\n\n Rails.$ = function (selector) {\n return Array.prototype.slice.call(document.querySelectorAll(selector));\n };\n }).call(this);\n (function () {\n var $, csrfParam, csrfToken;\n $ = Rails.$;\n\n csrfToken = Rails.csrfToken = function () {\n var meta;\n meta = document.querySelector('meta[name=csrf-token]');\n return meta && meta.content;\n };\n\n csrfParam = Rails.csrfParam = function () {\n var meta;\n meta = document.querySelector('meta[name=csrf-param]');\n return meta && meta.content;\n };\n\n Rails.CSRFProtection = function (xhr) {\n var token;\n token = csrfToken();\n\n if (token != null) {\n return xhr.setRequestHeader('X-CSRF-Token', token);\n }\n };\n\n Rails.refreshCSRFTokens = function () {\n var param, token;\n token = csrfToken();\n param = csrfParam();\n\n if (token != null && param != null) {\n return $('form input[name=\"' + param + '\"]').forEach(function (input) {\n return input.value = token;\n });\n }\n };\n }).call(this);\n (function () {\n var CustomEvent, fire, matches, preventDefault;\n matches = Rails.matches;\n CustomEvent = window.CustomEvent;\n\n if (typeof CustomEvent !== 'function') {\n CustomEvent = function CustomEvent(event, params) {\n var evt;\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n CustomEvent.prototype = window.Event.prototype;\n preventDefault = CustomEvent.prototype.preventDefault;\n\n CustomEvent.prototype.preventDefault = function () {\n var result;\n result = preventDefault.call(this);\n\n if (this.cancelable && !this.defaultPrevented) {\n Object.defineProperty(this, 'defaultPrevented', {\n get: function get() {\n return true;\n }\n });\n }\n\n return result;\n };\n }\n\n fire = Rails.fire = function (obj, name, data) {\n var event;\n event = new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: data\n });\n obj.dispatchEvent(event);\n return !event.defaultPrevented;\n };\n\n Rails.stopEverything = function (e) {\n fire(e.target, 'ujs:everythingStopped');\n e.preventDefault();\n e.stopPropagation();\n return e.stopImmediatePropagation();\n };\n\n Rails.delegate = function (element, selector, eventType, handler) {\n return element.addEventListener(eventType, function (e) {\n var target;\n target = e.target;\n\n while (!(!(target instanceof Element) || matches(target, selector))) {\n target = target.parentNode;\n }\n\n if (target instanceof Element && handler.call(target, e) === false) {\n e.preventDefault();\n return e.stopPropagation();\n }\n });\n };\n }).call(this);\n (function () {\n var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;\n cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;\n AcceptHeaders = {\n '*': '*/*',\n text: 'text/plain',\n html: 'text/html',\n xml: 'application/xml, text/xml',\n json: 'application/json, text/javascript',\n script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'\n };\n\n Rails.ajax = function (options) {\n var xhr;\n options = prepareOptions(options);\n xhr = createXHR(options, function () {\n var ref, response;\n response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));\n\n if (Math.floor(xhr.status / 100) === 2) {\n if (typeof options.success === \"function\") {\n options.success(response, xhr.statusText, xhr);\n }\n } else {\n if (typeof options.error === \"function\") {\n options.error(response, xhr.statusText, xhr);\n }\n }\n\n return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : void 0;\n });\n\n if (options.beforeSend != null && !options.beforeSend(xhr, options)) {\n return false;\n }\n\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n return xhr.send(options.data);\n }\n };\n\n prepareOptions = function prepareOptions(options) {\n options.url = options.url || location.href;\n options.type = options.type.toUpperCase();\n\n if (options.type === 'GET' && options.data) {\n if (options.url.indexOf('?') < 0) {\n options.url += '?' + options.data;\n } else {\n options.url += '&' + options.data;\n }\n }\n\n if (AcceptHeaders[options.dataType] == null) {\n options.dataType = '*';\n }\n\n options.accept = AcceptHeaders[options.dataType];\n\n if (options.dataType !== '*') {\n options.accept += ', */*; q=0.01';\n }\n\n return options;\n };\n\n createXHR = function createXHR(options, done) {\n var xhr;\n xhr = new XMLHttpRequest();\n xhr.open(options.type, options.url, true);\n xhr.setRequestHeader('Accept', options.accept);\n\n if (typeof options.data === 'string') {\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n }\n\n if (!options.crossDomain) {\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n CSRFProtection(xhr);\n }\n\n xhr.withCredentials = !!options.withCredentials;\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n return done(xhr);\n }\n };\n\n return xhr;\n };\n\n processResponse = function processResponse(response, type) {\n var parser, script;\n\n if (typeof response === 'string' && typeof type === 'string') {\n if (type.match(/\\bjson\\b/)) {\n try {\n response = JSON.parse(response);\n } catch (error) {}\n } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n script = document.createElement('script');\n script.setAttribute('nonce', cspNonce());\n script.text = response;\n document.head.appendChild(script).parentNode.removeChild(script);\n } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n parser = new DOMParser();\n type = type.replace(/;.+/, '');\n\n try {\n response = parser.parseFromString(response, type);\n } catch (error) {}\n }\n }\n\n return response;\n };\n\n Rails.href = function (element) {\n return element.href;\n };\n\n Rails.isCrossDomain = function (url) {\n var e, originAnchor, urlAnchor;\n originAnchor = document.createElement('a');\n originAnchor.href = location.href;\n urlAnchor = document.createElement('a');\n\n try {\n urlAnchor.href = url;\n return !((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host || originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host);\n } catch (error) {\n e = error;\n return true;\n }\n };\n }).call(this);\n (function () {\n var matches, toArray;\n matches = Rails.matches;\n\n toArray = function toArray(e) {\n return Array.prototype.slice.call(e);\n };\n\n Rails.serializeElement = function (element, additionalParam) {\n var inputs, params;\n inputs = [element];\n\n if (matches(element, 'form')) {\n inputs = toArray(element.elements);\n }\n\n params = [];\n inputs.forEach(function (input) {\n if (!input.name || input.disabled) {\n return;\n }\n\n if (matches(input, 'fieldset[disabled] *')) {\n return;\n }\n\n if (matches(input, 'select')) {\n return toArray(input.options).forEach(function (option) {\n if (option.selected) {\n return params.push({\n name: input.name,\n value: option.value\n });\n }\n });\n } else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {\n return params.push({\n name: input.name,\n value: input.value\n });\n }\n });\n\n if (additionalParam) {\n params.push(additionalParam);\n }\n\n return params.map(function (param) {\n if (param.name != null) {\n return encodeURIComponent(param.name) + \"=\" + encodeURIComponent(param.value);\n } else {\n return param;\n }\n }).join('&');\n };\n\n Rails.formElements = function (form, selector) {\n if (matches(form, 'form')) {\n return toArray(form.elements).filter(function (el) {\n return matches(el, selector);\n });\n } else {\n return toArray(form.querySelectorAll(selector));\n }\n };\n }).call(this);\n (function () {\n var allowAction, fire, stopEverything;\n fire = Rails.fire, stopEverything = Rails.stopEverything;\n\n Rails.handleConfirm = function (e) {\n if (!allowAction(this)) {\n return stopEverything(e);\n }\n };\n\n Rails.confirm = function (message, element) {\n return confirm(message);\n };\n\n allowAction = function allowAction(element) {\n var answer, callback, message;\n message = element.getAttribute('data-confirm');\n\n if (!message) {\n return true;\n }\n\n answer = false;\n\n if (fire(element, 'confirm')) {\n try {\n answer = Rails.confirm(message, element);\n } catch (error) {}\n\n callback = fire(element, 'confirm:complete', [answer]);\n }\n\n return answer && callback;\n };\n }).call(this);\n (function () {\n var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, isXhrRedirect, matches, setData, stopEverything;\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;\n\n Rails.handleDisabledElement = function (e) {\n var element;\n element = this;\n\n if (element.disabled) {\n return stopEverything(e);\n }\n };\n\n Rails.enableElement = function (e) {\n var element;\n\n if (e instanceof Event) {\n if (isXhrRedirect(e)) {\n return;\n }\n\n element = e.target;\n } else {\n element = e;\n }\n\n if (matches(element, Rails.linkDisableSelector)) {\n return enableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {\n return enableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return enableFormElements(element);\n }\n };\n\n Rails.disableElement = function (e) {\n var element;\n element = e instanceof Event ? e.target : e;\n\n if (matches(element, Rails.linkDisableSelector)) {\n return disableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {\n return disableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return disableFormElements(element);\n }\n };\n\n disableLinkElement = function disableLinkElement(element) {\n var replacement;\n\n if (getData(element, 'ujs:disabled')) {\n return;\n }\n\n replacement = element.getAttribute('data-disable-with');\n\n if (replacement != null) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n }\n\n element.addEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', true);\n };\n\n enableLinkElement = function enableLinkElement(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n\n if (originalText != null) {\n element.innerHTML = originalText;\n setData(element, 'ujs:enable-with', null);\n }\n\n element.removeEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', null);\n };\n\n disableFormElements = function disableFormElements(form) {\n return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);\n };\n\n disableFormElement = function disableFormElement(element) {\n var replacement;\n\n if (getData(element, 'ujs:disabled')) {\n return;\n }\n\n replacement = element.getAttribute('data-disable-with');\n\n if (replacement != null) {\n if (matches(element, 'button')) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n } else {\n setData(element, 'ujs:enable-with', element.value);\n element.value = replacement;\n }\n }\n\n element.disabled = true;\n return setData(element, 'ujs:disabled', true);\n };\n\n enableFormElements = function enableFormElements(form) {\n return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);\n };\n\n enableFormElement = function enableFormElement(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n\n if (originalText != null) {\n if (matches(element, 'button')) {\n element.innerHTML = originalText;\n } else {\n element.value = originalText;\n }\n\n setData(element, 'ujs:enable-with', null);\n }\n\n element.disabled = false;\n return setData(element, 'ujs:disabled', null);\n };\n\n isXhrRedirect = function isXhrRedirect(event) {\n var ref, xhr;\n xhr = (ref = event.detail) != null ? ref[0] : void 0;\n return (xhr != null ? xhr.getResponseHeader(\"X-Xhr-Redirect\") : void 0) != null;\n };\n }).call(this);\n (function () {\n var stopEverything;\n stopEverything = Rails.stopEverything;\n\n Rails.handleMethod = function (e) {\n var csrfParam, csrfToken, form, formContent, href, link, method;\n link = this;\n method = link.getAttribute('data-method');\n\n if (!method) {\n return;\n }\n\n href = Rails.href(link);\n csrfToken = Rails.csrfToken();\n csrfParam = Rails.csrfParam();\n form = document.createElement('form');\n formContent = \"
\";\n\n if (csrfParam != null && csrfToken != null && !Rails.isCrossDomain(href)) {\n formContent += \"
\";\n }\n\n formContent += '
';\n form.method = 'post';\n form.action = href;\n form.target = link.target;\n form.innerHTML = formContent;\n form.style.display = 'none';\n document.body.appendChild(form);\n form.querySelector('[type=\"submit\"]').click();\n return stopEverything(e);\n };\n }).call(this);\n (function () {\n var ajax,\n fire,\n getData,\n isCrossDomain,\n isRemote,\n matches,\n serializeElement,\n setData,\n stopEverything,\n slice = [].slice;\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement;\n\n isRemote = function isRemote(element) {\n var value;\n value = element.getAttribute('data-remote');\n return value != null && value !== 'false';\n };\n\n Rails.handleRemote = function (e) {\n var button, data, dataType, element, method, url, withCredentials;\n element = this;\n\n if (!isRemote(element)) {\n return true;\n }\n\n if (!fire(element, 'ajax:before')) {\n fire(element, 'ajax:stopped');\n return false;\n }\n\n withCredentials = element.getAttribute('data-with-credentials');\n dataType = element.getAttribute('data-type') || 'script';\n\n if (matches(element, Rails.formSubmitSelector)) {\n button = getData(element, 'ujs:submit-button');\n method = getData(element, 'ujs:submit-button-formmethod') || element.method;\n url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;\n\n if (method.toUpperCase() === 'GET') {\n url = url.replace(/\\?.*$/, '');\n }\n\n if (element.enctype === 'multipart/form-data') {\n data = new FormData(element);\n\n if (button != null) {\n data.append(button.name, button.value);\n }\n } else {\n data = serializeElement(element, button);\n }\n\n setData(element, 'ujs:submit-button', null);\n setData(element, 'ujs:submit-button-formmethod', null);\n setData(element, 'ujs:submit-button-formaction', null);\n } else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {\n method = element.getAttribute('data-method');\n url = element.getAttribute('data-url');\n data = serializeElement(element, element.getAttribute('data-params'));\n } else {\n method = element.getAttribute('data-method');\n url = Rails.href(element);\n data = element.getAttribute('data-params');\n }\n\n ajax({\n type: method || 'GET',\n url: url,\n data: data,\n dataType: dataType,\n beforeSend: function beforeSend(xhr, options) {\n if (fire(element, 'ajax:beforeSend', [xhr, options])) {\n return fire(element, 'ajax:send', [xhr]);\n } else {\n fire(element, 'ajax:stopped');\n return false;\n }\n },\n success: function success() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:success', args);\n },\n error: function error() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:error', args);\n },\n complete: function complete() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:complete', args);\n },\n crossDomain: isCrossDomain(url),\n withCredentials: withCredentials != null && withCredentials !== 'false'\n });\n return stopEverything(e);\n };\n\n Rails.formSubmitButtonClick = function (e) {\n var button, form;\n button = this;\n form = button.form;\n\n if (!form) {\n return;\n }\n\n if (button.name) {\n setData(form, 'ujs:submit-button', {\n name: button.name,\n value: button.value\n });\n }\n\n setData(form, 'ujs:formnovalidate-button', button.formNoValidate);\n setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));\n return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));\n };\n\n Rails.preventInsignificantClick = function (e) {\n var data, insignificantMetaClick, link, metaClick, method, nonPrimaryMouseClick;\n link = this;\n method = (link.getAttribute('data-method') || 'GET').toUpperCase();\n data = link.getAttribute('data-params');\n metaClick = e.metaKey || e.ctrlKey;\n insignificantMetaClick = metaClick && method === 'GET' && !data;\n nonPrimaryMouseClick = e.button != null && e.button !== 0;\n\n if (nonPrimaryMouseClick || insignificantMetaClick) {\n return e.stopImmediatePropagation();\n }\n };\n }).call(this);\n (function () {\n var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMethod, handleRemote, loadCSPNonce, preventInsignificantClick, refreshCSRFTokens;\n fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, loadCSPNonce = Rails.loadCSPNonce, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, preventInsignificantClick = Rails.preventInsignificantClick, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMethod = Rails.handleMethod;\n\n if (typeof jQuery !== \"undefined\" && jQuery !== null && jQuery.ajax != null) {\n if (jQuery.rails) {\n throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');\n }\n\n jQuery.rails = Rails;\n jQuery.ajaxPrefilter(function (options, originalOptions, xhr) {\n if (!options.crossDomain) {\n return CSRFProtection(xhr);\n }\n });\n }\n\n Rails.start = function () {\n if (window._rails_loaded) {\n throw new Error('rails-ujs has already been loaded!');\n }\n\n window.addEventListener('pageshow', function () {\n $(Rails.formEnableSelector).forEach(function (el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n return $(Rails.linkDisableSelector).forEach(function (el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n });\n delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.linkClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.linkClickSelector, 'click', handleConfirm);\n delegate(document, Rails.linkClickSelector, 'click', disableElement);\n delegate(document, Rails.linkClickSelector, 'click', handleRemote);\n delegate(document, Rails.linkClickSelector, 'click', handleMethod);\n delegate(document, Rails.buttonClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);\n delegate(document, Rails.buttonClickSelector, 'click', disableElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleRemote);\n delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);\n delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);\n delegate(document, Rails.inputChangeSelector, 'change', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);\n delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);\n delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', function (e) {\n return setTimeout(function () {\n return disableElement(e);\n }, 13);\n });\n delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);\n delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.formInputClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);\n delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);\n document.addEventListener('DOMContentLoaded', refreshCSRFTokens);\n document.addEventListener('DOMContentLoaded', loadCSPNonce);\n return window._rails_loaded = true;\n };\n\n if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {\n Rails.start();\n }\n }).call(this);\n }).call(this);\n\n if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === \"object\" && module.exports) {\n module.exports = Rails;\n } else if (typeof define === \"function\" && define.amd) {\n define(Rails);\n }\n}).call(this);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar navigator = {};\nnavigator.userAgent = false;\nvar window = {};\n/*\n * jsrsasign(all) 10.1.13 (2021-03-08) (c) 2010-2021 Kenji Urushima | kjur.github.com/jsrsasign/license\n */\n\n/*!\nCopyright (c) 2011, Yahoo! Inc. All rights reserved.\nCode licensed under the BSD License:\nhttp://developer.yahoo.com/yui/license.html\nversion: 2.9.0\n*/\n\nif (YAHOO === undefined) {\n var YAHOO = {};\n}\n\nYAHOO.lang = {\n extend: function extend(g, h, f) {\n if (!h || !g) {\n throw new Error(\"YAHOO.lang.extend failed, please check that all dependencies are included.\");\n }\n\n var d = function d() {};\n\n d.prototype = h.prototype;\n g.prototype = new d();\n g.prototype.constructor = g;\n g.superclass = h.prototype;\n\n if (h.prototype.constructor == Object.prototype.constructor) {\n h.prototype.constructor = h;\n }\n\n if (f) {\n var b;\n\n for (b in f) {\n g.prototype[b] = f[b];\n }\n\n var e = function e() {},\n c = [\"toString\", \"valueOf\"];\n\n try {\n if (/MSIE/.test(navigator.userAgent)) {\n e = function e(j, i) {\n for (b = 0; b < c.length; b = b + 1) {\n var l = c[b],\n k = i[l];\n\n if (typeof k === \"function\" && k != Object.prototype[l]) {\n j[l] = k;\n }\n }\n };\n }\n } catch (a) {}\n\n e(g.prototype, f);\n }\n }\n};\n/*! CryptoJS v3.1.2 core-fix.js\n * code.google.com/p/crypto-js\n * (c) 2009-2013 by Jeff Mott. All rights reserved.\n * code.google.com/p/crypto-js/wiki/License\n * THIS IS FIX of 'core.js' to fix Hmac issue.\n * https://code.google.com/p/crypto-js/issues/detail?id=84\n * https://crypto-js.googlecode.com/svn-history/r667/branches/3.x/src/core.js\n */\n\nvar CryptoJS = CryptoJS || function (e, g) {\n var a = {};\n var b = a.lib = {};\n\n var j = b.Base = function () {\n function n() {}\n\n return {\n extend: function extend(p) {\n n.prototype = this;\n var o = new n();\n\n if (p) {\n o.mixIn(p);\n }\n\n if (!o.hasOwnProperty(\"init\")) {\n o.init = function () {\n o.$super.init.apply(this, arguments);\n };\n }\n\n o.init.prototype = o;\n o.$super = this;\n return o;\n },\n create: function create() {\n var o = this.extend();\n o.init.apply(o, arguments);\n return o;\n },\n init: function init() {},\n mixIn: function mixIn(p) {\n for (var o in p) {\n if (p.hasOwnProperty(o)) {\n this[o] = p[o];\n }\n }\n\n if (p.hasOwnProperty(\"toString\")) {\n this.toString = p.toString;\n }\n },\n clone: function clone() {\n return this.init.prototype.extend(this);\n }\n };\n }();\n\n var l = b.WordArray = j.extend({\n init: function init(o, n) {\n o = this.words = o || [];\n\n if (n != g) {\n this.sigBytes = n;\n } else {\n this.sigBytes = o.length * 4;\n }\n },\n toString: function toString(n) {\n return (n || h).stringify(this);\n },\n concat: function concat(t) {\n var q = this.words;\n var p = t.words;\n var n = this.sigBytes;\n var s = t.sigBytes;\n this.clamp();\n\n if (n % 4) {\n for (var r = 0; r < s; r++) {\n var o = p[r >>> 2] >>> 24 - r % 4 * 8 & 255;\n q[n + r >>> 2] |= o << 24 - (n + r) % 4 * 8;\n }\n } else {\n for (var r = 0; r < s; r += 4) {\n q[n + r >>> 2] = p[r >>> 2];\n }\n }\n\n this.sigBytes += s;\n return this;\n },\n clamp: function clamp() {\n var o = this.words;\n var n = this.sigBytes;\n o[n >>> 2] &= 4294967295 << 32 - n % 4 * 8;\n o.length = e.ceil(n / 4);\n },\n clone: function clone() {\n var n = j.clone.call(this);\n n.words = this.words.slice(0);\n return n;\n },\n random: function random(p) {\n var o = [];\n\n for (var n = 0; n < p; n += 4) {\n o.push(e.random() * 4294967296 | 0);\n }\n\n return new l.init(o, p);\n }\n });\n var m = a.enc = {};\n var h = m.Hex = {\n stringify: function stringify(p) {\n var r = p.words;\n var o = p.sigBytes;\n var q = [];\n\n for (var n = 0; n < o; n++) {\n var s = r[n >>> 2] >>> 24 - n % 4 * 8 & 255;\n q.push((s >>> 4).toString(16));\n q.push((s & 15).toString(16));\n }\n\n return q.join(\"\");\n },\n parse: function parse(p) {\n var n = p.length;\n var q = [];\n\n for (var o = 0; o < n; o += 2) {\n q[o >>> 3] |= parseInt(p.substr(o, 2), 16) << 24 - o % 8 * 4;\n }\n\n return new l.init(q, n / 2);\n }\n };\n var d = m.Latin1 = {\n stringify: function stringify(q) {\n var r = q.words;\n var p = q.sigBytes;\n var n = [];\n\n for (var o = 0; o < p; o++) {\n var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255;\n n.push(String.fromCharCode(s));\n }\n\n return n.join(\"\");\n },\n parse: function parse(p) {\n var n = p.length;\n var q = [];\n\n for (var o = 0; o < n; o++) {\n q[o >>> 2] |= (p.charCodeAt(o) & 255) << 24 - o % 4 * 8;\n }\n\n return new l.init(q, n);\n }\n };\n var c = m.Utf8 = {\n stringify: function stringify(n) {\n try {\n return decodeURIComponent(escape(d.stringify(n)));\n } catch (o) {\n throw new Error(\"Malformed UTF-8 data\");\n }\n },\n parse: function parse(n) {\n return d.parse(unescape(encodeURIComponent(n)));\n }\n };\n var i = b.BufferedBlockAlgorithm = j.extend({\n reset: function reset() {\n this._data = new l.init();\n this._nDataBytes = 0;\n },\n _append: function _append(n) {\n if (typeof n == \"string\") {\n n = c.parse(n);\n }\n\n this._data.concat(n);\n\n this._nDataBytes += n.sigBytes;\n },\n _process: function _process(w) {\n var q = this._data;\n var x = q.words;\n var n = q.sigBytes;\n var t = this.blockSize;\n var v = t * 4;\n var u = n / v;\n\n if (w) {\n u = e.ceil(u);\n } else {\n u = e.max((u | 0) - this._minBufferSize, 0);\n }\n\n var s = u * t;\n var r = e.min(s * 4, n);\n\n if (s) {\n for (var p = 0; p < s; p += t) {\n this._doProcessBlock(x, p);\n }\n\n var o = x.splice(0, s);\n q.sigBytes -= r;\n }\n\n return new l.init(o, r);\n },\n clone: function clone() {\n var n = j.clone.call(this);\n n._data = this._data.clone();\n return n;\n },\n _minBufferSize: 0\n });\n var f = b.Hasher = i.extend({\n cfg: j.extend(),\n init: function init(n) {\n this.cfg = this.cfg.extend(n);\n this.reset();\n },\n reset: function reset() {\n i.reset.call(this);\n\n this._doReset();\n },\n update: function update(n) {\n this._append(n);\n\n this._process();\n\n return this;\n },\n finalize: function finalize(n) {\n if (n) {\n this._append(n);\n }\n\n var o = this._doFinalize();\n\n return o;\n },\n blockSize: 512 / 32,\n _createHelper: function _createHelper(n) {\n return function (p, o) {\n return new n.init(o).finalize(p);\n };\n },\n _createHmacHelper: function _createHmacHelper(n) {\n return function (p, o) {\n return new k.HMAC.init(n, o).finalize(p);\n };\n }\n });\n var k = a.algo = {};\n return a;\n}(Math);\n/*\nCryptoJS v3.1.2 x64-core-min.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n\n(function (g) {\n var a = CryptoJS,\n f = a.lib,\n e = f.Base,\n h = f.WordArray,\n a = a.x64 = {};\n a.Word = e.extend({\n init: function init(b, c) {\n this.high = b;\n this.low = c;\n }\n });\n a.WordArray = e.extend({\n init: function init(b, c) {\n b = this.words = b || [];\n this.sigBytes = c != g ? c : 8 * b.length;\n },\n toX32: function toX32() {\n for (var b = this.words, c = b.length, a = [], d = 0; d < c; d++) {\n var e = b[d];\n a.push(e.high);\n a.push(e.low);\n }\n\n return h.create(a, this.sigBytes);\n },\n clone: function clone() {\n for (var b = e.clone.call(this), c = b.words = this.words.slice(0), a = c.length, d = 0; d < a; d++) {\n c[d] = c[d].clone();\n }\n\n return b;\n }\n });\n})();\n/*\nCryptoJS v3.1.2 cipher-core.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n\nCryptoJS.lib.Cipher || function (u) {\n var g = CryptoJS,\n f = g.lib,\n k = f.Base,\n l = f.WordArray,\n q = f.BufferedBlockAlgorithm,\n r = g.enc.Base64,\n v = g.algo.EvpKDF,\n n = f.Cipher = q.extend({\n cfg: k.extend(),\n createEncryptor: function createEncryptor(a, b) {\n return this.create(this._ENC_XFORM_MODE, a, b);\n },\n createDecryptor: function createDecryptor(a, b) {\n return this.create(this._DEC_XFORM_MODE, a, b);\n },\n init: function init(a, b, c) {\n this.cfg = this.cfg.extend(c);\n this._xformMode = a;\n this._key = b;\n this.reset();\n },\n reset: function reset() {\n q.reset.call(this);\n\n this._doReset();\n },\n process: function process(a) {\n this._append(a);\n\n return this._process();\n },\n finalize: function finalize(a) {\n a && this._append(a);\n return this._doFinalize();\n },\n keySize: 4,\n ivSize: 4,\n _ENC_XFORM_MODE: 1,\n _DEC_XFORM_MODE: 2,\n _createHelper: function _createHelper(a) {\n return {\n encrypt: function encrypt(b, c, d) {\n return (\"string\" == typeof c ? s : j).encrypt(a, b, c, d);\n },\n decrypt: function decrypt(b, c, d) {\n return (\"string\" == typeof c ? s : j).decrypt(a, b, c, d);\n }\n };\n }\n });\n f.StreamCipher = n.extend({\n _doFinalize: function _doFinalize() {\n return this._process(!0);\n },\n blockSize: 1\n });\n\n var m = g.mode = {},\n t = function t(a, b, c) {\n var d = this._iv;\n d ? this._iv = u : d = this._prevBlock;\n\n for (var e = 0; e < c; e++) {\n a[b + e] ^= d[e];\n }\n },\n h = (f.BlockCipherMode = k.extend({\n createEncryptor: function createEncryptor(a, b) {\n return this.Encryptor.create(a, b);\n },\n createDecryptor: function createDecryptor(a, b) {\n return this.Decryptor.create(a, b);\n },\n init: function init(a, b) {\n this._cipher = a;\n this._iv = b;\n }\n })).extend();\n\n h.Encryptor = h.extend({\n processBlock: function processBlock(a, b) {\n var c = this._cipher,\n d = c.blockSize;\n t.call(this, a, b, d);\n c.encryptBlock(a, b);\n this._prevBlock = a.slice(b, b + d);\n }\n });\n h.Decryptor = h.extend({\n processBlock: function processBlock(a, b) {\n var c = this._cipher,\n d = c.blockSize,\n e = a.slice(b, b + d);\n c.decryptBlock(a, b);\n t.call(this, a, b, d);\n this._prevBlock = e;\n }\n });\n m = m.CBC = h;\n h = (g.pad = {}).Pkcs7 = {\n pad: function pad(a, b) {\n for (var c = 4 * b, c = c - a.sigBytes % c, d = c << 24 | c << 16 | c << 8 | c, e = [], f = 0; f < c; f += 4) {\n e.push(d);\n }\n\n c = l.create(e, c);\n a.concat(c);\n },\n unpad: function unpad(a) {\n a.sigBytes -= a.words[a.sigBytes - 1 >>> 2] & 255;\n }\n };\n f.BlockCipher = n.extend({\n cfg: n.cfg.extend({\n mode: m,\n padding: h\n }),\n reset: function reset() {\n n.reset.call(this);\n var a = this.cfg,\n b = a.iv,\n a = a.mode;\n if (this._xformMode == this._ENC_XFORM_MODE) var c = a.createEncryptor;else c = a.createDecryptor, this._minBufferSize = 1;\n this._mode = c.call(a, this, b && b.words);\n },\n _doProcessBlock: function _doProcessBlock(a, b) {\n this._mode.processBlock(a, b);\n },\n _doFinalize: function _doFinalize() {\n var a = this.cfg.padding;\n\n if (this._xformMode == this._ENC_XFORM_MODE) {\n a.pad(this._data, this.blockSize);\n\n var b = this._process(!0);\n } else b = this._process(!0), a.unpad(b);\n\n return b;\n },\n blockSize: 4\n });\n var p = f.CipherParams = k.extend({\n init: function init(a) {\n this.mixIn(a);\n },\n toString: function toString(a) {\n return (a || this.formatter).stringify(this);\n }\n }),\n m = (g.format = {}).OpenSSL = {\n stringify: function stringify(a) {\n var b = a.ciphertext;\n a = a.salt;\n return (a ? l.create([1398893684, 1701076831]).concat(a).concat(b) : b).toString(r);\n },\n parse: function parse(a) {\n a = r.parse(a);\n var b = a.words;\n\n if (1398893684 == b[0] && 1701076831 == b[1]) {\n var c = l.create(b.slice(2, 4));\n b.splice(0, 4);\n a.sigBytes -= 16;\n }\n\n return p.create({\n ciphertext: a,\n salt: c\n });\n }\n },\n j = f.SerializableCipher = k.extend({\n cfg: k.extend({\n format: m\n }),\n encrypt: function encrypt(a, b, c, d) {\n d = this.cfg.extend(d);\n var e = a.createEncryptor(c, d);\n b = e.finalize(b);\n e = e.cfg;\n return p.create({\n ciphertext: b,\n key: c,\n iv: e.iv,\n algorithm: a,\n mode: e.mode,\n padding: e.padding,\n blockSize: a.blockSize,\n formatter: d.format\n });\n },\n decrypt: function decrypt(a, b, c, d) {\n d = this.cfg.extend(d);\n b = this._parse(b, d.format);\n return a.createDecryptor(c, d).finalize(b.ciphertext);\n },\n _parse: function _parse(a, b) {\n return \"string\" == typeof a ? b.parse(a, this) : a;\n }\n }),\n g = (g.kdf = {}).OpenSSL = {\n execute: function execute(a, b, c, d) {\n d || (d = l.random(8));\n a = v.create({\n keySize: b + c\n }).compute(a, d);\n c = l.create(a.words.slice(b), 4 * c);\n a.sigBytes = 4 * b;\n return p.create({\n key: a,\n iv: c,\n salt: d\n });\n }\n },\n s = f.PasswordBasedCipher = j.extend({\n cfg: j.cfg.extend({\n kdf: g\n }),\n encrypt: function encrypt(a, b, c, d) {\n d = this.cfg.extend(d);\n c = d.kdf.execute(c, a.keySize, a.ivSize);\n d.iv = c.iv;\n a = j.encrypt.call(this, a, b, c.key, d);\n a.mixIn(c);\n return a;\n },\n decrypt: function decrypt(a, b, c, d) {\n d = this.cfg.extend(d);\n b = this._parse(b, d.format);\n c = d.kdf.execute(c, a.keySize, a.ivSize, b.salt);\n d.iv = c.iv;\n return j.decrypt.call(this, a, b, c.key, d);\n }\n });\n}();\n/*\nCryptoJS v3.1.2 aes.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n(function () {\n for (var q = CryptoJS, x = q.lib.BlockCipher, r = q.algo, j = [], y = [], z = [], A = [], B = [], C = [], s = [], u = [], v = [], w = [], g = [], k = 0; 256 > k; k++) {\n g[k] = 128 > k ? k << 1 : k << 1 ^ 283;\n }\n\n for (var n = 0, l = 0, k = 0; 256 > k; k++) {\n var f = l ^ l << 1 ^ l << 2 ^ l << 3 ^ l << 4,\n f = f >>> 8 ^ f & 255 ^ 99;\n j[n] = f;\n y[f] = n;\n var t = g[n],\n D = g[t],\n E = g[D],\n b = 257 * g[f] ^ 16843008 * f;\n z[n] = b << 24 | b >>> 8;\n A[n] = b << 16 | b >>> 16;\n B[n] = b << 8 | b >>> 24;\n C[n] = b;\n b = 16843009 * E ^ 65537 * D ^ 257 * t ^ 16843008 * n;\n s[f] = b << 24 | b >>> 8;\n u[f] = b << 16 | b >>> 16;\n v[f] = b << 8 | b >>> 24;\n w[f] = b;\n n ? (n = t ^ g[g[g[E ^ t]]], l ^= g[g[l]]) : n = l = 1;\n }\n\n var F = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54],\n r = r.AES = x.extend({\n _doReset: function _doReset() {\n for (var c = this._key, e = c.words, a = c.sigBytes / 4, c = 4 * ((this._nRounds = a + 6) + 1), b = this._keySchedule = [], h = 0; h < c; h++) {\n if (h < a) b[h] = e[h];else {\n var d = b[h - 1];\n h % a ? 6 < a && 4 == h % a && (d = j[d >>> 24] << 24 | j[d >>> 16 & 255] << 16 | j[d >>> 8 & 255] << 8 | j[d & 255]) : (d = d << 8 | d >>> 24, d = j[d >>> 24] << 24 | j[d >>> 16 & 255] << 16 | j[d >>> 8 & 255] << 8 | j[d & 255], d ^= F[h / a | 0] << 24);\n b[h] = b[h - a] ^ d;\n }\n }\n\n e = this._invKeySchedule = [];\n\n for (a = 0; a < c; a++) {\n h = c - a, d = a % 4 ? b[h] : b[h - 4], e[a] = 4 > a || 4 >= h ? d : s[j[d >>> 24]] ^ u[j[d >>> 16 & 255]] ^ v[j[d >>> 8 & 255]] ^ w[j[d & 255]];\n }\n },\n encryptBlock: function encryptBlock(c, e) {\n this._doCryptBlock(c, e, this._keySchedule, z, A, B, C, j);\n },\n decryptBlock: function decryptBlock(c, e) {\n var a = c[e + 1];\n c[e + 1] = c[e + 3];\n c[e + 3] = a;\n\n this._doCryptBlock(c, e, this._invKeySchedule, s, u, v, w, y);\n\n a = c[e + 1];\n c[e + 1] = c[e + 3];\n c[e + 3] = a;\n },\n _doCryptBlock: function _doCryptBlock(c, e, a, b, h, d, j, m) {\n for (var n = this._nRounds, f = c[e] ^ a[0], g = c[e + 1] ^ a[1], k = c[e + 2] ^ a[2], p = c[e + 3] ^ a[3], l = 4, t = 1; t < n; t++) {\n var q = b[f >>> 24] ^ h[g >>> 16 & 255] ^ d[k >>> 8 & 255] ^ j[p & 255] ^ a[l++],\n r = b[g >>> 24] ^ h[k >>> 16 & 255] ^ d[p >>> 8 & 255] ^ j[f & 255] ^ a[l++],\n s = b[k >>> 24] ^ h[p >>> 16 & 255] ^ d[f >>> 8 & 255] ^ j[g & 255] ^ a[l++],\n p = b[p >>> 24] ^ h[f >>> 16 & 255] ^ d[g >>> 8 & 255] ^ j[k & 255] ^ a[l++],\n f = q,\n g = r,\n k = s;\n }\n\n q = (m[f >>> 24] << 24 | m[g >>> 16 & 255] << 16 | m[k >>> 8 & 255] << 8 | m[p & 255]) ^ a[l++];\n r = (m[g >>> 24] << 24 | m[k >>> 16 & 255] << 16 | m[p >>> 8 & 255] << 8 | m[f & 255]) ^ a[l++];\n s = (m[k >>> 24] << 24 | m[p >>> 16 & 255] << 16 | m[f >>> 8 & 255] << 8 | m[g & 255]) ^ a[l++];\n p = (m[p >>> 24] << 24 | m[f >>> 16 & 255] << 16 | m[g >>> 8 & 255] << 8 | m[k & 255]) ^ a[l++];\n c[e] = q;\n c[e + 1] = r;\n c[e + 2] = s;\n c[e + 3] = p;\n },\n keySize: 8\n });\n q.AES = x._createHelper(r);\n})();\n/*\nCryptoJS v3.1.2 tripledes-min.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n\n(function () {\n function j(b, c) {\n var a = (this._lBlock >>> b ^ this._rBlock) & c;\n this._rBlock ^= a;\n this._lBlock ^= a << b;\n }\n\n function l(b, c) {\n var a = (this._rBlock >>> b ^ this._lBlock) & c;\n this._lBlock ^= a;\n this._rBlock ^= a << b;\n }\n\n var h = CryptoJS,\n e = h.lib,\n n = e.WordArray,\n e = e.BlockCipher,\n g = h.algo,\n q = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4],\n p = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32],\n r = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28],\n s = [{\n \"0\": 8421888,\n 268435456: 32768,\n 536870912: 8421378,\n 805306368: 2,\n 1073741824: 512,\n 1342177280: 8421890,\n 1610612736: 8389122,\n 1879048192: 8388608,\n 2147483648: 514,\n 2415919104: 8389120,\n 2684354560: 33280,\n 2952790016: 8421376,\n 3221225472: 32770,\n 3489660928: 8388610,\n 3758096384: 0,\n 4026531840: 33282,\n 134217728: 0,\n 402653184: 8421890,\n 671088640: 33282,\n 939524096: 32768,\n 1207959552: 8421888,\n 1476395008: 512,\n 1744830464: 8421378,\n 2013265920: 2,\n 2281701376: 8389120,\n 2550136832: 33280,\n 2818572288: 8421376,\n 3087007744: 8389122,\n 3355443200: 8388610,\n 3623878656: 32770,\n 3892314112: 514,\n 4160749568: 8388608,\n 1: 32768,\n 268435457: 2,\n 536870913: 8421888,\n 805306369: 8388608,\n 1073741825: 8421378,\n 1342177281: 33280,\n 1610612737: 512,\n 1879048193: 8389122,\n 2147483649: 8421890,\n 2415919105: 8421376,\n 2684354561: 8388610,\n 2952790017: 33282,\n 3221225473: 514,\n 3489660929: 8389120,\n 3758096385: 32770,\n 4026531841: 0,\n 134217729: 8421890,\n 402653185: 8421376,\n 671088641: 8388608,\n 939524097: 512,\n 1207959553: 32768,\n 1476395009: 8388610,\n 1744830465: 2,\n 2013265921: 33282,\n 2281701377: 32770,\n 2550136833: 8389122,\n 2818572289: 514,\n 3087007745: 8421888,\n 3355443201: 8389120,\n 3623878657: 0,\n 3892314113: 33280,\n 4160749569: 8421378\n }, {\n \"0\": 1074282512,\n 16777216: 16384,\n 33554432: 524288,\n 50331648: 1074266128,\n 67108864: 1073741840,\n 83886080: 1074282496,\n 100663296: 1073758208,\n 117440512: 16,\n 134217728: 540672,\n 150994944: 1073758224,\n 167772160: 1073741824,\n 184549376: 540688,\n 201326592: 524304,\n 218103808: 0,\n 234881024: 16400,\n 251658240: 1074266112,\n 8388608: 1073758208,\n 25165824: 540688,\n 41943040: 16,\n 58720256: 1073758224,\n 75497472: 1074282512,\n 92274688: 1073741824,\n 109051904: 524288,\n 125829120: 1074266128,\n 142606336: 524304,\n 159383552: 0,\n 176160768: 16384,\n 192937984: 1074266112,\n 209715200: 1073741840,\n 226492416: 540672,\n 243269632: 1074282496,\n 260046848: 16400,\n 268435456: 0,\n 285212672: 1074266128,\n 301989888: 1073758224,\n 318767104: 1074282496,\n 335544320: 1074266112,\n 352321536: 16,\n 369098752: 540688,\n 385875968: 16384,\n 402653184: 16400,\n 419430400: 524288,\n 436207616: 524304,\n 452984832: 1073741840,\n 469762048: 540672,\n 486539264: 1073758208,\n 503316480: 1073741824,\n 520093696: 1074282512,\n 276824064: 540688,\n 293601280: 524288,\n 310378496: 1074266112,\n 327155712: 16384,\n 343932928: 1073758208,\n 360710144: 1074282512,\n 377487360: 16,\n 394264576: 1073741824,\n 411041792: 1074282496,\n 427819008: 1073741840,\n 444596224: 1073758224,\n 461373440: 524304,\n 478150656: 0,\n 494927872: 16400,\n 511705088: 1074266128,\n 528482304: 540672\n }, {\n \"0\": 260,\n 1048576: 0,\n 2097152: 67109120,\n 3145728: 65796,\n 4194304: 65540,\n 5242880: 67108868,\n 6291456: 67174660,\n 7340032: 67174400,\n 8388608: 67108864,\n 9437184: 67174656,\n 10485760: 65792,\n 11534336: 67174404,\n 12582912: 67109124,\n 13631488: 65536,\n 14680064: 4,\n 15728640: 256,\n 524288: 67174656,\n 1572864: 67174404,\n 2621440: 0,\n 3670016: 67109120,\n 4718592: 67108868,\n 5767168: 65536,\n 6815744: 65540,\n 7864320: 260,\n 8912896: 4,\n 9961472: 256,\n 11010048: 67174400,\n 12058624: 65796,\n 13107200: 65792,\n 14155776: 67109124,\n 15204352: 67174660,\n 16252928: 67108864,\n 16777216: 67174656,\n 17825792: 65540,\n 18874368: 65536,\n 19922944: 67109120,\n 20971520: 256,\n 22020096: 67174660,\n 23068672: 67108868,\n 24117248: 0,\n 25165824: 67109124,\n 26214400: 67108864,\n 27262976: 4,\n 28311552: 65792,\n 29360128: 67174400,\n 30408704: 260,\n 31457280: 65796,\n 32505856: 67174404,\n 17301504: 67108864,\n 18350080: 260,\n 19398656: 67174656,\n 20447232: 0,\n 21495808: 65540,\n 22544384: 67109120,\n 23592960: 256,\n 24641536: 67174404,\n 25690112: 65536,\n 26738688: 67174660,\n 27787264: 65796,\n 28835840: 67108868,\n 29884416: 67109124,\n 30932992: 67174400,\n 31981568: 4,\n 33030144: 65792\n }, {\n \"0\": 2151682048,\n 65536: 2147487808,\n 131072: 4198464,\n 196608: 2151677952,\n 262144: 0,\n 327680: 4198400,\n 393216: 2147483712,\n 458752: 4194368,\n 524288: 2147483648,\n 589824: 4194304,\n 655360: 64,\n 720896: 2147487744,\n 786432: 2151678016,\n 851968: 4160,\n 917504: 4096,\n 983040: 2151682112,\n 32768: 2147487808,\n 98304: 64,\n 163840: 2151678016,\n 229376: 2147487744,\n 294912: 4198400,\n 360448: 2151682112,\n 425984: 0,\n 491520: 2151677952,\n 557056: 4096,\n 622592: 2151682048,\n 688128: 4194304,\n 753664: 4160,\n 819200: 2147483648,\n 884736: 4194368,\n 950272: 4198464,\n 1015808: 2147483712,\n 1048576: 4194368,\n 1114112: 4198400,\n 1179648: 2147483712,\n 1245184: 0,\n 1310720: 4160,\n 1376256: 2151678016,\n 1441792: 2151682048,\n 1507328: 2147487808,\n 1572864: 2151682112,\n 1638400: 2147483648,\n 1703936: 2151677952,\n 1769472: 4198464,\n 1835008: 2147487744,\n 1900544: 4194304,\n 1966080: 64,\n 2031616: 4096,\n 1081344: 2151677952,\n 1146880: 2151682112,\n 1212416: 0,\n 1277952: 4198400,\n 1343488: 4194368,\n 1409024: 2147483648,\n 1474560: 2147487808,\n 1540096: 64,\n 1605632: 2147483712,\n 1671168: 4096,\n 1736704: 2147487744,\n 1802240: 2151678016,\n 1867776: 4160,\n 1933312: 2151682048,\n 1998848: 4194304,\n 2064384: 4198464\n }, {\n \"0\": 128,\n 4096: 17039360,\n 8192: 262144,\n 12288: 536870912,\n 16384: 537133184,\n 20480: 16777344,\n 24576: 553648256,\n 28672: 262272,\n 32768: 16777216,\n 36864: 537133056,\n 40960: 536871040,\n 45056: 553910400,\n 49152: 553910272,\n 53248: 0,\n 57344: 17039488,\n 61440: 553648128,\n 2048: 17039488,\n 6144: 553648256,\n 10240: 128,\n 14336: 17039360,\n 18432: 262144,\n 22528: 537133184,\n 26624: 553910272,\n 30720: 536870912,\n 34816: 537133056,\n 38912: 0,\n 43008: 553910400,\n 47104: 16777344,\n 51200: 536871040,\n 55296: 553648128,\n 59392: 16777216,\n 63488: 262272,\n 65536: 262144,\n 69632: 128,\n 73728: 536870912,\n 77824: 553648256,\n 81920: 16777344,\n 86016: 553910272,\n 90112: 537133184,\n 94208: 16777216,\n 98304: 553910400,\n 102400: 553648128,\n 106496: 17039360,\n 110592: 537133056,\n 114688: 262272,\n 118784: 536871040,\n 122880: 0,\n 126976: 17039488,\n 67584: 553648256,\n 71680: 16777216,\n 75776: 17039360,\n 79872: 537133184,\n 83968: 536870912,\n 88064: 17039488,\n 92160: 128,\n 96256: 553910272,\n 100352: 262272,\n 104448: 553910400,\n 108544: 0,\n 112640: 553648128,\n 116736: 16777344,\n 120832: 262144,\n 124928: 537133056,\n 129024: 536871040\n }, {\n \"0\": 268435464,\n 256: 8192,\n 512: 270532608,\n 768: 270540808,\n 1024: 268443648,\n 1280: 2097152,\n 1536: 2097160,\n 1792: 268435456,\n 2048: 0,\n 2304: 268443656,\n 2560: 2105344,\n 2816: 8,\n 3072: 270532616,\n 3328: 2105352,\n 3584: 8200,\n 3840: 270540800,\n 128: 270532608,\n 384: 270540808,\n 640: 8,\n 896: 2097152,\n 1152: 2105352,\n 1408: 268435464,\n 1664: 268443648,\n 1920: 8200,\n 2176: 2097160,\n 2432: 8192,\n 2688: 268443656,\n 2944: 270532616,\n 3200: 0,\n 3456: 270540800,\n 3712: 2105344,\n 3968: 268435456,\n 4096: 268443648,\n 4352: 270532616,\n 4608: 270540808,\n 4864: 8200,\n 5120: 2097152,\n 5376: 268435456,\n 5632: 268435464,\n 5888: 2105344,\n 6144: 2105352,\n 6400: 0,\n 6656: 8,\n 6912: 270532608,\n 7168: 8192,\n 7424: 268443656,\n 7680: 270540800,\n 7936: 2097160,\n 4224: 8,\n 4480: 2105344,\n 4736: 2097152,\n 4992: 268435464,\n 5248: 268443648,\n 5504: 8200,\n 5760: 270540808,\n 6016: 270532608,\n 6272: 270540800,\n 6528: 270532616,\n 6784: 8192,\n 7040: 2105352,\n 7296: 2097160,\n 7552: 0,\n 7808: 268435456,\n 8064: 268443656\n }, {\n \"0\": 1048576,\n 16: 33555457,\n 32: 1024,\n 48: 1049601,\n 64: 34604033,\n 80: 0,\n 96: 1,\n 112: 34603009,\n 128: 33555456,\n 144: 1048577,\n 160: 33554433,\n 176: 34604032,\n 192: 34603008,\n 208: 1025,\n 224: 1049600,\n 240: 33554432,\n 8: 34603009,\n 24: 0,\n 40: 33555457,\n 56: 34604032,\n 72: 1048576,\n 88: 33554433,\n 104: 33554432,\n 120: 1025,\n 136: 1049601,\n 152: 33555456,\n 168: 34603008,\n 184: 1048577,\n 200: 1024,\n 216: 34604033,\n 232: 1,\n 248: 1049600,\n 256: 33554432,\n 272: 1048576,\n 288: 33555457,\n 304: 34603009,\n 320: 1048577,\n 336: 33555456,\n 352: 34604032,\n 368: 1049601,\n 384: 1025,\n 400: 34604033,\n 416: 1049600,\n 432: 1,\n 448: 0,\n 464: 34603008,\n 480: 33554433,\n 496: 1024,\n 264: 1049600,\n 280: 33555457,\n 296: 34603009,\n 312: 1,\n 328: 33554432,\n 344: 1048576,\n 360: 1025,\n 376: 34604032,\n 392: 33554433,\n 408: 34603008,\n 424: 0,\n 440: 34604033,\n 456: 1049601,\n 472: 1024,\n 488: 33555456,\n 504: 1048577\n }, {\n \"0\": 134219808,\n 1: 131072,\n 2: 134217728,\n 3: 32,\n 4: 131104,\n 5: 134350880,\n 6: 134350848,\n 7: 2048,\n 8: 134348800,\n 9: 134219776,\n 10: 133120,\n 11: 134348832,\n 12: 2080,\n 13: 0,\n 14: 134217760,\n 15: 133152,\n 2147483648: 2048,\n 2147483649: 134350880,\n 2147483650: 134219808,\n 2147483651: 134217728,\n 2147483652: 134348800,\n 2147483653: 133120,\n 2147483654: 133152,\n 2147483655: 32,\n 2147483656: 134217760,\n 2147483657: 2080,\n 2147483658: 131104,\n 2147483659: 134350848,\n 2147483660: 0,\n 2147483661: 134348832,\n 2147483662: 134219776,\n 2147483663: 131072,\n 16: 133152,\n 17: 134350848,\n 18: 32,\n 19: 2048,\n 20: 134219776,\n 21: 134217760,\n 22: 134348832,\n 23: 131072,\n 24: 0,\n 25: 131104,\n 26: 134348800,\n 27: 134219808,\n 28: 134350880,\n 29: 133120,\n 30: 2080,\n 31: 134217728,\n 2147483664: 131072,\n 2147483665: 2048,\n 2147483666: 134348832,\n 2147483667: 133152,\n 2147483668: 32,\n 2147483669: 134348800,\n 2147483670: 134217728,\n 2147483671: 134219808,\n 2147483672: 134350880,\n 2147483673: 134217760,\n 2147483674: 134219776,\n 2147483675: 0,\n 2147483676: 133120,\n 2147483677: 2080,\n 2147483678: 131104,\n 2147483679: 134350848\n }],\n t = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679],\n m = g.DES = e.extend({\n _doReset: function _doReset() {\n for (var b = this._key.words, c = [], a = 0; 56 > a; a++) {\n var f = q[a] - 1;\n c[a] = b[f >>> 5] >>> 31 - f % 32 & 1;\n }\n\n b = this._subKeys = [];\n\n for (f = 0; 16 > f; f++) {\n for (var d = b[f] = [], e = r[f], a = 0; 24 > a; a++) {\n d[a / 6 | 0] |= c[(p[a] - 1 + e) % 28] << 31 - a % 6, d[4 + (a / 6 | 0)] |= c[28 + (p[a + 24] - 1 + e) % 28] << 31 - a % 6;\n }\n\n d[0] = d[0] << 1 | d[0] >>> 31;\n\n for (a = 1; 7 > a; a++) {\n d[a] >>>= 4 * (a - 1) + 3;\n }\n\n d[7] = d[7] << 5 | d[7] >>> 27;\n }\n\n c = this._invSubKeys = [];\n\n for (a = 0; 16 > a; a++) {\n c[a] = b[15 - a];\n }\n },\n encryptBlock: function encryptBlock(b, c) {\n this._doCryptBlock(b, c, this._subKeys);\n },\n decryptBlock: function decryptBlock(b, c) {\n this._doCryptBlock(b, c, this._invSubKeys);\n },\n _doCryptBlock: function _doCryptBlock(b, c, a) {\n this._lBlock = b[c];\n this._rBlock = b[c + 1];\n j.call(this, 4, 252645135);\n j.call(this, 16, 65535);\n l.call(this, 2, 858993459);\n l.call(this, 8, 16711935);\n j.call(this, 1, 1431655765);\n\n for (var f = 0; 16 > f; f++) {\n for (var d = a[f], e = this._lBlock, h = this._rBlock, g = 0, k = 0; 8 > k; k++) {\n g |= s[k][((h ^ d[k]) & t[k]) >>> 0];\n }\n\n this._lBlock = h;\n this._rBlock = e ^ g;\n }\n\n a = this._lBlock;\n this._lBlock = this._rBlock;\n this._rBlock = a;\n j.call(this, 1, 1431655765);\n l.call(this, 8, 16711935);\n l.call(this, 2, 858993459);\n j.call(this, 16, 65535);\n j.call(this, 4, 252645135);\n b[c] = this._lBlock;\n b[c + 1] = this._rBlock;\n },\n keySize: 2,\n ivSize: 2,\n blockSize: 2\n });\n h.DES = e._createHelper(m);\n g = g.TripleDES = e.extend({\n _doReset: function _doReset() {\n var b = this._key.words;\n this._des1 = m.createEncryptor(n.create(b.slice(0, 2)));\n this._des2 = m.createEncryptor(n.create(b.slice(2, 4)));\n this._des3 = m.createEncryptor(n.create(b.slice(4, 6)));\n },\n encryptBlock: function encryptBlock(b, c) {\n this._des1.encryptBlock(b, c);\n\n this._des2.decryptBlock(b, c);\n\n this._des3.encryptBlock(b, c);\n },\n decryptBlock: function decryptBlock(b, c) {\n this._des3.decryptBlock(b, c);\n\n this._des2.encryptBlock(b, c);\n\n this._des1.decryptBlock(b, c);\n },\n keySize: 6,\n ivSize: 2,\n blockSize: 2\n });\n h.TripleDES = e._createHelper(g);\n})();\n/*\nCryptoJS v3.1.2 enc-base64.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n\n(function () {\n var h = CryptoJS,\n j = h.lib.WordArray;\n h.enc.Base64 = {\n stringify: function stringify(b) {\n var e = b.words,\n f = b.sigBytes,\n c = this._map;\n b.clamp();\n b = [];\n\n for (var a = 0; a < f; a += 3) {\n for (var d = (e[a >>> 2] >>> 24 - 8 * (a % 4) & 255) << 16 | (e[a + 1 >>> 2] >>> 24 - 8 * ((a + 1) % 4) & 255) << 8 | e[a + 2 >>> 2] >>> 24 - 8 * ((a + 2) % 4) & 255, g = 0; 4 > g && a + 0.75 * g < f; g++) {\n b.push(c.charAt(d >>> 6 * (3 - g) & 63));\n }\n }\n\n if (e = c.charAt(64)) for (; b.length % 4;) {\n b.push(e);\n }\n return b.join(\"\");\n },\n parse: function parse(b) {\n var e = b.length,\n f = this._map,\n c = f.charAt(64);\n c && (c = b.indexOf(c), -1 != c && (e = c));\n\n for (var c = [], a = 0, d = 0; d < e; d++) {\n if (d % 4) {\n var g = f.indexOf(b.charAt(d - 1)) << 2 * (d % 4),\n h = f.indexOf(b.charAt(d)) >>> 6 - 2 * (d % 4);\n c[a >>> 2] |= (g | h) << 24 - 8 * (a % 4);\n a++;\n }\n }\n\n return j.create(c, a);\n },\n _map: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\"\n };\n})();\n/*\nCryptoJS v3.1.2 md5.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n\n(function (E) {\n function h(a, f, g, j, p, h, k) {\n a = a + (f & g | ~f & j) + p + k;\n return (a << h | a >>> 32 - h) + f;\n }\n\n function k(a, f, g, j, p, h, k) {\n a = a + (f & j | g & ~j) + p + k;\n return (a << h | a >>> 32 - h) + f;\n }\n\n function l(a, f, g, j, h, k, l) {\n a = a + (f ^ g ^ j) + h + l;\n return (a << k | a >>> 32 - k) + f;\n }\n\n function n(a, f, g, j, h, k, l) {\n a = a + (g ^ (f | ~j)) + h + l;\n return (a << k | a >>> 32 - k) + f;\n }\n\n for (var r = CryptoJS, q = r.lib, F = q.WordArray, s = q.Hasher, q = r.algo, a = [], t = 0; 64 > t; t++) {\n a[t] = 4294967296 * E.abs(E.sin(t + 1)) | 0;\n }\n\n q = q.MD5 = s.extend({\n _doReset: function _doReset() {\n this._hash = new F.init([1732584193, 4023233417, 2562383102, 271733878]);\n },\n _doProcessBlock: function _doProcessBlock(m, f) {\n for (var g = 0; 16 > g; g++) {\n var j = f + g,\n p = m[j];\n m[j] = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360;\n }\n\n var g = this._hash.words,\n j = m[f + 0],\n p = m[f + 1],\n q = m[f + 2],\n r = m[f + 3],\n s = m[f + 4],\n t = m[f + 5],\n u = m[f + 6],\n v = m[f + 7],\n w = m[f + 8],\n x = m[f + 9],\n y = m[f + 10],\n z = m[f + 11],\n A = m[f + 12],\n B = m[f + 13],\n C = m[f + 14],\n D = m[f + 15],\n b = g[0],\n c = g[1],\n d = g[2],\n e = g[3],\n b = h(b, c, d, e, j, 7, a[0]),\n e = h(e, b, c, d, p, 12, a[1]),\n d = h(d, e, b, c, q, 17, a[2]),\n c = h(c, d, e, b, r, 22, a[3]),\n b = h(b, c, d, e, s, 7, a[4]),\n e = h(e, b, c, d, t, 12, a[5]),\n d = h(d, e, b, c, u, 17, a[6]),\n c = h(c, d, e, b, v, 22, a[7]),\n b = h(b, c, d, e, w, 7, a[8]),\n e = h(e, b, c, d, x, 12, a[9]),\n d = h(d, e, b, c, y, 17, a[10]),\n c = h(c, d, e, b, z, 22, a[11]),\n b = h(b, c, d, e, A, 7, a[12]),\n e = h(e, b, c, d, B, 12, a[13]),\n d = h(d, e, b, c, C, 17, a[14]),\n c = h(c, d, e, b, D, 22, a[15]),\n b = k(b, c, d, e, p, 5, a[16]),\n e = k(e, b, c, d, u, 9, a[17]),\n d = k(d, e, b, c, z, 14, a[18]),\n c = k(c, d, e, b, j, 20, a[19]),\n b = k(b, c, d, e, t, 5, a[20]),\n e = k(e, b, c, d, y, 9, a[21]),\n d = k(d, e, b, c, D, 14, a[22]),\n c = k(c, d, e, b, s, 20, a[23]),\n b = k(b, c, d, e, x, 5, a[24]),\n e = k(e, b, c, d, C, 9, a[25]),\n d = k(d, e, b, c, r, 14, a[26]),\n c = k(c, d, e, b, w, 20, a[27]),\n b = k(b, c, d, e, B, 5, a[28]),\n e = k(e, b, c, d, q, 9, a[29]),\n d = k(d, e, b, c, v, 14, a[30]),\n c = k(c, d, e, b, A, 20, a[31]),\n b = l(b, c, d, e, t, 4, a[32]),\n e = l(e, b, c, d, w, 11, a[33]),\n d = l(d, e, b, c, z, 16, a[34]),\n c = l(c, d, e, b, C, 23, a[35]),\n b = l(b, c, d, e, p, 4, a[36]),\n e = l(e, b, c, d, s, 11, a[37]),\n d = l(d, e, b, c, v, 16, a[38]),\n c = l(c, d, e, b, y, 23, a[39]),\n b = l(b, c, d, e, B, 4, a[40]),\n e = l(e, b, c, d, j, 11, a[41]),\n d = l(d, e, b, c, r, 16, a[42]),\n c = l(c, d, e, b, u, 23, a[43]),\n b = l(b, c, d, e, x, 4, a[44]),\n e = l(e, b, c, d, A, 11, a[45]),\n d = l(d, e, b, c, D, 16, a[46]),\n c = l(c, d, e, b, q, 23, a[47]),\n b = n(b, c, d, e, j, 6, a[48]),\n e = n(e, b, c, d, v, 10, a[49]),\n d = n(d, e, b, c, C, 15, a[50]),\n c = n(c, d, e, b, t, 21, a[51]),\n b = n(b, c, d, e, A, 6, a[52]),\n e = n(e, b, c, d, r, 10, a[53]),\n d = n(d, e, b, c, y, 15, a[54]),\n c = n(c, d, e, b, p, 21, a[55]),\n b = n(b, c, d, e, w, 6, a[56]),\n e = n(e, b, c, d, D, 10, a[57]),\n d = n(d, e, b, c, u, 15, a[58]),\n c = n(c, d, e, b, B, 21, a[59]),\n b = n(b, c, d, e, s, 6, a[60]),\n e = n(e, b, c, d, z, 10, a[61]),\n d = n(d, e, b, c, q, 15, a[62]),\n c = n(c, d, e, b, x, 21, a[63]);\n g[0] = g[0] + b | 0;\n g[1] = g[1] + c | 0;\n g[2] = g[2] + d | 0;\n g[3] = g[3] + e | 0;\n },\n _doFinalize: function _doFinalize() {\n var a = this._data,\n f = a.words,\n g = 8 * this._nDataBytes,\n j = 8 * a.sigBytes;\n f[j >>> 5] |= 128 << 24 - j % 32;\n var h = E.floor(g / 4294967296);\n f[(j + 64 >>> 9 << 4) + 15] = (h << 8 | h >>> 24) & 16711935 | (h << 24 | h >>> 8) & 4278255360;\n f[(j + 64 >>> 9 << 4) + 14] = (g << 8 | g >>> 24) & 16711935 | (g << 24 | g >>> 8) & 4278255360;\n a.sigBytes = 4 * (f.length + 1);\n\n this._process();\n\n a = this._hash;\n f = a.words;\n\n for (g = 0; 4 > g; g++) {\n j = f[g], f[g] = (j << 8 | j >>> 24) & 16711935 | (j << 24 | j >>> 8) & 4278255360;\n }\n\n return a;\n },\n clone: function clone() {\n var a = s.clone.call(this);\n a._hash = this._hash.clone();\n return a;\n }\n });\n r.MD5 = s._createHelper(q);\n r.HmacMD5 = s._createHmacHelper(q);\n})(Math);\n/*\nCryptoJS v3.1.2 sha1-min.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n\n(function () {\n var k = CryptoJS,\n b = k.lib,\n m = b.WordArray,\n l = b.Hasher,\n d = [],\n b = k.algo.SHA1 = l.extend({\n _doReset: function _doReset() {\n this._hash = new m.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);\n },\n _doProcessBlock: function _doProcessBlock(n, p) {\n for (var a = this._hash.words, e = a[0], f = a[1], h = a[2], j = a[3], b = a[4], c = 0; 80 > c; c++) {\n if (16 > c) d[c] = n[p + c] | 0;else {\n var g = d[c - 3] ^ d[c - 8] ^ d[c - 14] ^ d[c - 16];\n d[c] = g << 1 | g >>> 31;\n }\n g = (e << 5 | e >>> 27) + b + d[c];\n g = 20 > c ? g + ((f & h | ~f & j) + 1518500249) : 40 > c ? g + ((f ^ h ^ j) + 1859775393) : 60 > c ? g + ((f & h | f & j | h & j) - 1894007588) : g + ((f ^ h ^ j) - 899497514);\n b = j;\n j = h;\n h = f << 30 | f >>> 2;\n f = e;\n e = g;\n }\n\n a[0] = a[0] + e | 0;\n a[1] = a[1] + f | 0;\n a[2] = a[2] + h | 0;\n a[3] = a[3] + j | 0;\n a[4] = a[4] + b | 0;\n },\n _doFinalize: function _doFinalize() {\n var b = this._data,\n d = b.words,\n a = 8 * this._nDataBytes,\n e = 8 * b.sigBytes;\n d[e >>> 5] |= 128 << 24 - e % 32;\n d[(e + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296);\n d[(e + 64 >>> 9 << 4) + 15] = a;\n b.sigBytes = 4 * d.length;\n\n this._process();\n\n return this._hash;\n },\n clone: function clone() {\n var b = l.clone.call(this);\n b._hash = this._hash.clone();\n return b;\n }\n });\n k.SHA1 = l._createHelper(b);\n k.HmacSHA1 = l._createHmacHelper(b);\n})();\n/*\nCryptoJS v3.1.2 sha256-min.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n\n(function (k) {\n for (var g = CryptoJS, h = g.lib, v = h.WordArray, j = h.Hasher, h = g.algo, s = [], t = [], u = function u(q) {\n return 4294967296 * (q - (q | 0)) | 0;\n }, l = 2, b = 0; 64 > b;) {\n var d;\n\n a: {\n d = l;\n\n for (var w = k.sqrt(d), r = 2; r <= w; r++) {\n if (!(d % r)) {\n d = !1;\n break a;\n }\n }\n\n d = !0;\n }\n\n d && (8 > b && (s[b] = u(k.pow(l, 0.5))), t[b] = u(k.pow(l, 1 / 3)), b++);\n l++;\n }\n\n var n = [],\n h = h.SHA256 = j.extend({\n _doReset: function _doReset() {\n this._hash = new v.init(s.slice(0));\n },\n _doProcessBlock: function _doProcessBlock(q, h) {\n for (var a = this._hash.words, c = a[0], d = a[1], b = a[2], k = a[3], f = a[4], g = a[5], j = a[6], l = a[7], e = 0; 64 > e; e++) {\n if (16 > e) n[e] = q[h + e] | 0;else {\n var m = n[e - 15],\n p = n[e - 2];\n n[e] = ((m << 25 | m >>> 7) ^ (m << 14 | m >>> 18) ^ m >>> 3) + n[e - 7] + ((p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10) + n[e - 16];\n }\n m = l + ((f << 26 | f >>> 6) ^ (f << 21 | f >>> 11) ^ (f << 7 | f >>> 25)) + (f & g ^ ~f & j) + t[e] + n[e];\n p = ((c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22)) + (c & d ^ c & b ^ d & b);\n l = j;\n j = g;\n g = f;\n f = k + m | 0;\n k = b;\n b = d;\n d = c;\n c = m + p | 0;\n }\n\n a[0] = a[0] + c | 0;\n a[1] = a[1] + d | 0;\n a[2] = a[2] + b | 0;\n a[3] = a[3] + k | 0;\n a[4] = a[4] + f | 0;\n a[5] = a[5] + g | 0;\n a[6] = a[6] + j | 0;\n a[7] = a[7] + l | 0;\n },\n _doFinalize: function _doFinalize() {\n var d = this._data,\n b = d.words,\n a = 8 * this._nDataBytes,\n c = 8 * d.sigBytes;\n b[c >>> 5] |= 128 << 24 - c % 32;\n b[(c + 64 >>> 9 << 4) + 14] = k.floor(a / 4294967296);\n b[(c + 64 >>> 9 << 4) + 15] = a;\n d.sigBytes = 4 * b.length;\n\n this._process();\n\n return this._hash;\n },\n clone: function clone() {\n var b = j.clone.call(this);\n b._hash = this._hash.clone();\n return b;\n }\n });\n g.SHA256 = j._createHelper(h);\n g.HmacSHA256 = j._createHmacHelper(h);\n})(Math);\n/*\nCryptoJS v3.1.2 sha224-min.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n\n(function () {\n var b = CryptoJS,\n d = b.lib.WordArray,\n a = b.algo,\n c = a.SHA256,\n a = a.SHA224 = c.extend({\n _doReset: function _doReset() {\n this._hash = new d.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]);\n },\n _doFinalize: function _doFinalize() {\n var a = c._doFinalize.call(this);\n\n a.sigBytes -= 4;\n return a;\n }\n });\n b.SHA224 = c._createHelper(a);\n b.HmacSHA224 = c._createHmacHelper(a);\n})();\n/*\nCryptoJS v3.1.2 sha512-min.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n\n(function () {\n function a() {\n return d.create.apply(d, arguments);\n }\n\n for (var n = CryptoJS, r = n.lib.Hasher, e = n.x64, d = e.Word, T = e.WordArray, e = n.algo, ea = [a(1116352408, 3609767458), a(1899447441, 602891725), a(3049323471, 3964484399), a(3921009573, 2173295548), a(961987163, 4081628472), a(1508970993, 3053834265), a(2453635748, 2937671579), a(2870763221, 3664609560), a(3624381080, 2734883394), a(310598401, 1164996542), a(607225278, 1323610764), a(1426881987, 3590304994), a(1925078388, 4068182383), a(2162078206, 991336113), a(2614888103, 633803317), a(3248222580, 3479774868), a(3835390401, 2666613458), a(4022224774, 944711139), a(264347078, 2341262773), a(604807628, 2007800933), a(770255983, 1495990901), a(1249150122, 1856431235), a(1555081692, 3175218132), a(1996064986, 2198950837), a(2554220882, 3999719339), a(2821834349, 766784016), a(2952996808, 2566594879), a(3210313671, 3203337956), a(3336571891, 1034457026), a(3584528711, 2466948901), a(113926993, 3758326383), a(338241895, 168717936), a(666307205, 1188179964), a(773529912, 1546045734), a(1294757372, 1522805485), a(1396182291, 2643833823), a(1695183700, 2343527390), a(1986661051, 1014477480), a(2177026350, 1206759142), a(2456956037, 344077627), a(2730485921, 1290863460), a(2820302411, 3158454273), a(3259730800, 3505952657), a(3345764771, 106217008), a(3516065817, 3606008344), a(3600352804, 1432725776), a(4094571909, 1467031594), a(275423344, 851169720), a(430227734, 3100823752), a(506948616, 1363258195), a(659060556, 3750685593), a(883997877, 3785050280), a(958139571, 3318307427), a(1322822218, 3812723403), a(1537002063, 2003034995), a(1747873779, 3602036899), a(1955562222, 1575990012), a(2024104815, 1125592928), a(2227730452, 2716904306), a(2361852424, 442776044), a(2428436474, 593698344), a(2756734187, 3733110249), a(3204031479, 2999351573), a(3329325298, 3815920427), a(3391569614, 3928383900), a(3515267271, 566280711), a(3940187606, 3454069534), a(4118630271, 4000239992), a(116418474, 1914138554), a(174292421, 2731055270), a(289380356, 3203993006), a(460393269, 320620315), a(685471733, 587496836), a(852142971, 1086792851), a(1017036298, 365543100), a(1126000580, 2618297676), a(1288033470, 3409855158), a(1501505948, 4234509866), a(1607167915, 987167468), a(1816402316, 1246189591)], v = [], w = 0; 80 > w; w++) {\n v[w] = a();\n }\n\n e = e.SHA512 = r.extend({\n _doReset: function _doReset() {\n this._hash = new T.init([new d.init(1779033703, 4089235720), new d.init(3144134277, 2227873595), new d.init(1013904242, 4271175723), new d.init(2773480762, 1595750129), new d.init(1359893119, 2917565137), new d.init(2600822924, 725511199), new d.init(528734635, 4215389547), new d.init(1541459225, 327033209)]);\n },\n _doProcessBlock: function _doProcessBlock(a, d) {\n for (var f = this._hash.words, F = f[0], e = f[1], n = f[2], r = f[3], G = f[4], H = f[5], I = f[6], f = f[7], w = F.high, J = F.low, X = e.high, K = e.low, Y = n.high, L = n.low, Z = r.high, M = r.low, $ = G.high, N = G.low, aa = H.high, O = H.low, ba = I.high, P = I.low, ca = f.high, Q = f.low, k = w, g = J, z = X, x = K, A = Y, y = L, U = Z, B = M, l = $, h = N, R = aa, C = O, S = ba, D = P, V = ca, E = Q, m = 0; 80 > m; m++) {\n var s = v[m];\n if (16 > m) var j = s.high = a[d + 2 * m] | 0,\n b = s.low = a[d + 2 * m + 1] | 0;else {\n var j = v[m - 15],\n b = j.high,\n p = j.low,\n j = (b >>> 1 | p << 31) ^ (b >>> 8 | p << 24) ^ b >>> 7,\n p = (p >>> 1 | b << 31) ^ (p >>> 8 | b << 24) ^ (p >>> 7 | b << 25),\n u = v[m - 2],\n b = u.high,\n c = u.low,\n u = (b >>> 19 | c << 13) ^ (b << 3 | c >>> 29) ^ b >>> 6,\n c = (c >>> 19 | b << 13) ^ (c << 3 | b >>> 29) ^ (c >>> 6 | b << 26),\n b = v[m - 7],\n W = b.high,\n t = v[m - 16],\n q = t.high,\n t = t.low,\n b = p + b.low,\n j = j + W + (b >>> 0 < p >>> 0 ? 1 : 0),\n b = b + c,\n j = j + u + (b >>> 0 < c >>> 0 ? 1 : 0),\n b = b + t,\n j = j + q + (b >>> 0 < t >>> 0 ? 1 : 0);\n s.high = j;\n s.low = b;\n }\n var W = l & R ^ ~l & S,\n t = h & C ^ ~h & D,\n s = k & z ^ k & A ^ z & A,\n T = g & x ^ g & y ^ x & y,\n p = (k >>> 28 | g << 4) ^ (k << 30 | g >>> 2) ^ (k << 25 | g >>> 7),\n u = (g >>> 28 | k << 4) ^ (g << 30 | k >>> 2) ^ (g << 25 | k >>> 7),\n c = ea[m],\n fa = c.high,\n da = c.low,\n c = E + ((h >>> 14 | l << 18) ^ (h >>> 18 | l << 14) ^ (h << 23 | l >>> 9)),\n q = V + ((l >>> 14 | h << 18) ^ (l >>> 18 | h << 14) ^ (l << 23 | h >>> 9)) + (c >>> 0 < E >>> 0 ? 1 : 0),\n c = c + t,\n q = q + W + (c >>> 0 < t >>> 0 ? 1 : 0),\n c = c + da,\n q = q + fa + (c >>> 0 < da >>> 0 ? 1 : 0),\n c = c + b,\n q = q + j + (c >>> 0 < b >>> 0 ? 1 : 0),\n b = u + T,\n s = p + s + (b >>> 0 < u >>> 0 ? 1 : 0),\n V = S,\n E = D,\n S = R,\n D = C,\n R = l,\n C = h,\n h = B + c | 0,\n l = U + q + (h >>> 0 < B >>> 0 ? 1 : 0) | 0,\n U = A,\n B = y,\n A = z,\n y = x,\n z = k,\n x = g,\n g = c + b | 0,\n k = q + s + (g >>> 0 < c >>> 0 ? 1 : 0) | 0;\n }\n\n J = F.low = J + g;\n F.high = w + k + (J >>> 0 < g >>> 0 ? 1 : 0);\n K = e.low = K + x;\n e.high = X + z + (K >>> 0 < x >>> 0 ? 1 : 0);\n L = n.low = L + y;\n n.high = Y + A + (L >>> 0 < y >>> 0 ? 1 : 0);\n M = r.low = M + B;\n r.high = Z + U + (M >>> 0 < B >>> 0 ? 1 : 0);\n N = G.low = N + h;\n G.high = $ + l + (N >>> 0 < h >>> 0 ? 1 : 0);\n O = H.low = O + C;\n H.high = aa + R + (O >>> 0 < C >>> 0 ? 1 : 0);\n P = I.low = P + D;\n I.high = ba + S + (P >>> 0 < D >>> 0 ? 1 : 0);\n Q = f.low = Q + E;\n f.high = ca + V + (Q >>> 0 < E >>> 0 ? 1 : 0);\n },\n _doFinalize: function _doFinalize() {\n var a = this._data,\n d = a.words,\n f = 8 * this._nDataBytes,\n e = 8 * a.sigBytes;\n d[e >>> 5] |= 128 << 24 - e % 32;\n d[(e + 128 >>> 10 << 5) + 30] = Math.floor(f / 4294967296);\n d[(e + 128 >>> 10 << 5) + 31] = f;\n a.sigBytes = 4 * d.length;\n\n this._process();\n\n return this._hash.toX32();\n },\n clone: function clone() {\n var a = r.clone.call(this);\n a._hash = this._hash.clone();\n return a;\n },\n blockSize: 32\n });\n n.SHA512 = r._createHelper(e);\n n.HmacSHA512 = r._createHmacHelper(e);\n})();\n/*\nCryptoJS v3.1.2 sha384-min.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n\n(function () {\n var c = CryptoJS,\n a = c.x64,\n b = a.Word,\n e = a.WordArray,\n a = c.algo,\n d = a.SHA512,\n a = a.SHA384 = d.extend({\n _doReset: function _doReset() {\n this._hash = new e.init([new b.init(3418070365, 3238371032), new b.init(1654270250, 914150663), new b.init(2438529370, 812702999), new b.init(355462360, 4144912697), new b.init(1731405415, 4290775857), new b.init(2394180231, 1750603025), new b.init(3675008525, 1694076839), new b.init(1203062813, 3204075428)]);\n },\n _doFinalize: function _doFinalize() {\n var a = d._doFinalize.call(this);\n\n a.sigBytes -= 16;\n return a;\n }\n });\n c.SHA384 = d._createHelper(a);\n c.HmacSHA384 = d._createHmacHelper(a);\n})();\n/*\nCryptoJS v3.1.2 ripemd160-min.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n/*\n\n(c) 2012 by Cedric Mesnil. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n\n(function () {\n var q = CryptoJS,\n d = q.lib,\n n = d.WordArray,\n p = d.Hasher,\n d = q.algo,\n x = n.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]),\n y = n.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]),\n z = n.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]),\n A = n.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]),\n B = n.create([0, 1518500249, 1859775393, 2400959708, 2840853838]),\n C = n.create([1352829926, 1548603684, 1836072691, 2053994217, 0]),\n d = d.RIPEMD160 = p.extend({\n _doReset: function _doReset() {\n this._hash = n.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);\n },\n _doProcessBlock: function _doProcessBlock(e, v) {\n for (var b = 0; 16 > b; b++) {\n var c = v + b,\n f = e[c];\n e[c] = (f << 8 | f >>> 24) & 16711935 | (f << 24 | f >>> 8) & 4278255360;\n }\n\n var c = this._hash.words,\n f = B.words,\n d = C.words,\n n = x.words,\n q = y.words,\n p = z.words,\n w = A.words,\n t,\n g,\n h,\n j,\n r,\n u,\n k,\n l,\n m,\n s;\n u = t = c[0];\n k = g = c[1];\n l = h = c[2];\n m = j = c[3];\n s = r = c[4];\n\n for (var a, b = 0; 80 > b; b += 1) {\n a = t + e[v + n[b]] | 0, a = 16 > b ? a + ((g ^ h ^ j) + f[0]) : 32 > b ? a + ((g & h | ~g & j) + f[1]) : 48 > b ? a + (((g | ~h) ^ j) + f[2]) : 64 > b ? a + ((g & j | h & ~j) + f[3]) : a + ((g ^ (h | ~j)) + f[4]), a |= 0, a = a << p[b] | a >>> 32 - p[b], a = a + r | 0, t = r, r = j, j = h << 10 | h >>> 22, h = g, g = a, a = u + e[v + q[b]] | 0, a = 16 > b ? a + ((k ^ (l | ~m)) + d[0]) : 32 > b ? a + ((k & m | l & ~m) + d[1]) : 48 > b ? a + (((k | ~l) ^ m) + d[2]) : 64 > b ? a + ((k & l | ~k & m) + d[3]) : a + ((k ^ l ^ m) + d[4]), a |= 0, a = a << w[b] | a >>> 32 - w[b], a = a + s | 0, u = s, s = m, m = l << 10 | l >>> 22, l = k, k = a;\n }\n\n a = c[1] + h + m | 0;\n c[1] = c[2] + j + s | 0;\n c[2] = c[3] + r + u | 0;\n c[3] = c[4] + t + k | 0;\n c[4] = c[0] + g + l | 0;\n c[0] = a;\n },\n _doFinalize: function _doFinalize() {\n var e = this._data,\n d = e.words,\n b = 8 * this._nDataBytes,\n c = 8 * e.sigBytes;\n d[c >>> 5] |= 128 << 24 - c % 32;\n d[(c + 64 >>> 9 << 4) + 14] = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360;\n e.sigBytes = 4 * (d.length + 1);\n\n this._process();\n\n e = this._hash;\n d = e.words;\n\n for (b = 0; 5 > b; b++) {\n c = d[b], d[b] = (c << 8 | c >>> 24) & 16711935 | (c << 24 | c >>> 8) & 4278255360;\n }\n\n return e;\n },\n clone: function clone() {\n var d = p.clone.call(this);\n d._hash = this._hash.clone();\n return d;\n }\n });\n q.RIPEMD160 = p._createHelper(d);\n q.HmacRIPEMD160 = p._createHmacHelper(d);\n})(Math);\n/*\nCryptoJS v3.1.2 hmac.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n\n(function () {\n var c = CryptoJS,\n k = c.enc.Utf8;\n c.algo.HMAC = c.lib.Base.extend({\n init: function init(a, b) {\n a = this._hasher = new a.init();\n \"string\" == typeof b && (b = k.parse(b));\n var c = a.blockSize,\n e = 4 * c;\n b.sigBytes > e && (b = a.finalize(b));\n b.clamp();\n\n for (var f = this._oKey = b.clone(), g = this._iKey = b.clone(), h = f.words, j = g.words, d = 0; d < c; d++) {\n h[d] ^= 1549556828, j[d] ^= 909522486;\n }\n\n f.sigBytes = g.sigBytes = e;\n this.reset();\n },\n reset: function reset() {\n var a = this._hasher;\n a.reset();\n a.update(this._iKey);\n },\n update: function update(a) {\n this._hasher.update(a);\n\n return this;\n },\n finalize: function finalize(a) {\n var b = this._hasher;\n a = b.finalize(a);\n b.reset();\n return b.finalize(this._oKey.clone().concat(a));\n }\n });\n})();\n/*\nCryptoJS v3.1.2 pbkdf2-min.js\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\n\n\n(function () {\n var b = CryptoJS,\n a = b.lib,\n d = a.Base,\n m = a.WordArray,\n a = b.algo,\n q = a.HMAC,\n l = a.PBKDF2 = d.extend({\n cfg: d.extend({\n keySize: 4,\n hasher: a.SHA1,\n iterations: 1\n }),\n init: function init(a) {\n this.cfg = this.cfg.extend(a);\n },\n compute: function compute(a, b) {\n for (var c = this.cfg, f = q.create(c.hasher, a), g = m.create(), d = m.create([1]), l = g.words, r = d.words, n = c.keySize, c = c.iterations; l.length < n;) {\n var h = f.update(b).finalize(d);\n f.reset();\n\n for (var j = h.words, s = j.length, k = h, p = 1; p < c; p++) {\n k = f.finalize(k);\n f.reset();\n\n for (var t = k.words, e = 0; e < s; e++) {\n j[e] ^= t[e];\n }\n }\n\n g.concat(h);\n r[0]++;\n }\n\n g.sigBytes = 4 * n;\n return g;\n }\n });\n\n b.PBKDF2 = function (a, b, c) {\n return l.create(c).compute(a, b);\n };\n})();\n/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/\n */\n\n\nvar b64map = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar b64pad = \"=\";\n\nfunction hex2b64(d) {\n var b;\n var e;\n var a = \"\";\n\n for (b = 0; b + 3 <= d.length; b += 3) {\n e = parseInt(d.substring(b, b + 3), 16);\n a += b64map.charAt(e >> 6) + b64map.charAt(e & 63);\n }\n\n if (b + 1 == d.length) {\n e = parseInt(d.substring(b, b + 1), 16);\n a += b64map.charAt(e << 2);\n } else {\n if (b + 2 == d.length) {\n e = parseInt(d.substring(b, b + 2), 16);\n a += b64map.charAt(e >> 2) + b64map.charAt((e & 3) << 4);\n }\n }\n\n if (b64pad) {\n while ((a.length & 3) > 0) {\n a += b64pad;\n }\n }\n\n return a;\n}\n\nfunction b64tohex(f) {\n var d = \"\";\n var e;\n var b = 0;\n var c;\n var a;\n\n for (e = 0; e < f.length; ++e) {\n if (f.charAt(e) == b64pad) {\n break;\n }\n\n a = b64map.indexOf(f.charAt(e));\n\n if (a < 0) {\n continue;\n }\n\n if (b == 0) {\n d += int2char(a >> 2);\n c = a & 3;\n b = 1;\n } else {\n if (b == 1) {\n d += int2char(c << 2 | a >> 4);\n c = a & 15;\n b = 2;\n } else {\n if (b == 2) {\n d += int2char(c);\n d += int2char(a >> 2);\n c = a & 3;\n b = 3;\n } else {\n d += int2char(c << 2 | a >> 4);\n d += int2char(a & 15);\n b = 0;\n }\n }\n }\n }\n\n if (b == 1) {\n d += int2char(c << 2);\n }\n\n return d;\n}\n\nfunction b64toBA(e) {\n var d = b64tohex(e);\n var c;\n var b = new Array();\n\n for (c = 0; 2 * c < d.length; ++c) {\n b[c] = parseInt(d.substring(2 * c, 2 * c + 2), 16);\n }\n\n return b;\n}\n\n;\n/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/\n */\n\nvar dbits;\nvar canary = 244837814094590;\nvar j_lm = (canary & 16777215) == 15715070;\n\nfunction BigInteger(e, d, f) {\n if (e != null) {\n if (\"number\" == typeof e) {\n this.fromNumber(e, d, f);\n } else {\n if (d == null && \"string\" != typeof e) {\n this.fromString(e, 256);\n } else {\n this.fromString(e, d);\n }\n }\n }\n}\n\nfunction nbi() {\n return new BigInteger(null);\n}\n\nfunction am1(f, a, b, e, h, g) {\n while (--g >= 0) {\n var d = a * this[f++] + b[e] + h;\n h = Math.floor(d / 67108864);\n b[e++] = d & 67108863;\n }\n\n return h;\n}\n\nfunction am2(f, q, r, e, o, a) {\n var k = q & 32767,\n p = q >> 15;\n\n while (--a >= 0) {\n var d = this[f] & 32767;\n var g = this[f++] >> 15;\n var b = p * d + g * k;\n d = k * d + ((b & 32767) << 15) + r[e] + (o & 1073741823);\n o = (d >>> 30) + (b >>> 15) + p * g + (o >>> 30);\n r[e++] = d & 1073741823;\n }\n\n return o;\n}\n\nfunction am3(f, q, r, e, o, a) {\n var k = q & 16383,\n p = q >> 14;\n\n while (--a >= 0) {\n var d = this[f] & 16383;\n var g = this[f++] >> 14;\n var b = p * d + g * k;\n d = k * d + ((b & 16383) << 14) + r[e] + o;\n o = (d >> 28) + (b >> 14) + p * g;\n r[e++] = d & 268435455;\n }\n\n return o;\n}\n\nif (j_lm && navigator.appName == \"Microsoft Internet Explorer\") {\n BigInteger.prototype.am = am2;\n dbits = 30;\n} else {\n if (j_lm && navigator.appName != \"Netscape\") {\n BigInteger.prototype.am = am1;\n dbits = 26;\n } else {\n BigInteger.prototype.am = am3;\n dbits = 28;\n }\n}\n\nBigInteger.prototype.DB = dbits;\nBigInteger.prototype.DM = (1 << dbits) - 1;\nBigInteger.prototype.DV = 1 << dbits;\nvar BI_FP = 52;\nBigInteger.prototype.FV = Math.pow(2, BI_FP);\nBigInteger.prototype.F1 = BI_FP - dbits;\nBigInteger.prototype.F2 = 2 * dbits - BI_FP;\nvar BI_RM = \"0123456789abcdefghijklmnopqrstuvwxyz\";\nvar BI_RC = new Array();\nvar rr, vv;\nrr = \"0\".charCodeAt(0);\n\nfor (vv = 0; vv <= 9; ++vv) {\n BI_RC[rr++] = vv;\n}\n\nrr = \"a\".charCodeAt(0);\n\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\n\nrr = \"A\".charCodeAt(0);\n\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\n\nfunction int2char(a) {\n return BI_RM.charAt(a);\n}\n\nfunction intAt(b, a) {\n var d = BI_RC[b.charCodeAt(a)];\n return d == null ? -1 : d;\n}\n\nfunction bnpCopyTo(b) {\n for (var a = this.t - 1; a >= 0; --a) {\n b[a] = this[a];\n }\n\n b.t = this.t;\n b.s = this.s;\n}\n\nfunction bnpFromInt(a) {\n this.t = 1;\n this.s = a < 0 ? -1 : 0;\n\n if (a > 0) {\n this[0] = a;\n } else {\n if (a < -1) {\n this[0] = a + this.DV;\n } else {\n this.t = 0;\n }\n }\n}\n\nfunction nbv(a) {\n var b = nbi();\n b.fromInt(a);\n return b;\n}\n\nfunction bnpFromString(h, c) {\n var e;\n\n if (c == 16) {\n e = 4;\n } else {\n if (c == 8) {\n e = 3;\n } else {\n if (c == 256) {\n e = 8;\n } else {\n if (c == 2) {\n e = 1;\n } else {\n if (c == 32) {\n e = 5;\n } else {\n if (c == 4) {\n e = 2;\n } else {\n this.fromRadix(h, c);\n return;\n }\n }\n }\n }\n }\n }\n\n this.t = 0;\n this.s = 0;\n var g = h.length,\n d = false,\n f = 0;\n\n while (--g >= 0) {\n var a = e == 8 ? h[g] & 255 : intAt(h, g);\n\n if (a < 0) {\n if (h.charAt(g) == \"-\") {\n d = true;\n }\n\n continue;\n }\n\n d = false;\n\n if (f == 0) {\n this[this.t++] = a;\n } else {\n if (f + e > this.DB) {\n this[this.t - 1] |= (a & (1 << this.DB - f) - 1) << f;\n this[this.t++] = a >> this.DB - f;\n } else {\n this[this.t - 1] |= a << f;\n }\n }\n\n f += e;\n\n if (f >= this.DB) {\n f -= this.DB;\n }\n }\n\n if (e == 8 && (h[0] & 128) != 0) {\n this.s = -1;\n\n if (f > 0) {\n this[this.t - 1] |= (1 << this.DB - f) - 1 << f;\n }\n }\n\n this.clamp();\n\n if (d) {\n BigInteger.ZERO.subTo(this, this);\n }\n}\n\nfunction bnpClamp() {\n var a = this.s & this.DM;\n\n while (this.t > 0 && this[this.t - 1] == a) {\n --this.t;\n }\n}\n\nfunction bnToString(c) {\n if (this.s < 0) {\n return \"-\" + this.negate().toString(c);\n }\n\n var e;\n\n if (c == 16) {\n e = 4;\n } else {\n if (c == 8) {\n e = 3;\n } else {\n if (c == 2) {\n e = 1;\n } else {\n if (c == 32) {\n e = 5;\n } else {\n if (c == 4) {\n e = 2;\n } else {\n return this.toRadix(c);\n }\n }\n }\n }\n }\n\n var g = (1 << e) - 1,\n l,\n a = false,\n h = \"\",\n f = this.t;\n var j = this.DB - f * this.DB % e;\n\n if (f-- > 0) {\n if (j < this.DB && (l = this[f] >> j) > 0) {\n a = true;\n h = int2char(l);\n }\n\n while (f >= 0) {\n if (j < e) {\n l = (this[f] & (1 << j) - 1) << e - j;\n l |= this[--f] >> (j += this.DB - e);\n } else {\n l = this[f] >> (j -= e) & g;\n\n if (j <= 0) {\n j += this.DB;\n --f;\n }\n }\n\n if (l > 0) {\n a = true;\n }\n\n if (a) {\n h += int2char(l);\n }\n }\n }\n\n return a ? h : \"0\";\n}\n\nfunction bnNegate() {\n var a = nbi();\n BigInteger.ZERO.subTo(this, a);\n return a;\n}\n\nfunction bnAbs() {\n return this.s < 0 ? this.negate() : this;\n}\n\nfunction bnCompareTo(b) {\n var d = this.s - b.s;\n\n if (d != 0) {\n return d;\n }\n\n var c = this.t;\n d = c - b.t;\n\n if (d != 0) {\n return this.s < 0 ? -d : d;\n }\n\n while (--c >= 0) {\n if ((d = this[c] - b[c]) != 0) {\n return d;\n }\n }\n\n return 0;\n}\n\nfunction nbits(a) {\n var c = 1,\n b;\n\n if ((b = a >>> 16) != 0) {\n a = b;\n c += 16;\n }\n\n if ((b = a >> 8) != 0) {\n a = b;\n c += 8;\n }\n\n if ((b = a >> 4) != 0) {\n a = b;\n c += 4;\n }\n\n if ((b = a >> 2) != 0) {\n a = b;\n c += 2;\n }\n\n if ((b = a >> 1) != 0) {\n a = b;\n c += 1;\n }\n\n return c;\n}\n\nfunction bnBitLength() {\n if (this.t <= 0) {\n return 0;\n }\n\n return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ this.s & this.DM);\n}\n\nfunction bnpDLShiftTo(c, b) {\n var a;\n\n for (a = this.t - 1; a >= 0; --a) {\n b[a + c] = this[a];\n }\n\n for (a = c - 1; a >= 0; --a) {\n b[a] = 0;\n }\n\n b.t = this.t + c;\n b.s = this.s;\n}\n\nfunction bnpDRShiftTo(c, b) {\n for (var a = c; a < this.t; ++a) {\n b[a - c] = this[a];\n }\n\n b.t = Math.max(this.t - c, 0);\n b.s = this.s;\n}\n\nfunction bnpLShiftTo(j, e) {\n var b = j % this.DB;\n var a = this.DB - b;\n var g = (1 << a) - 1;\n var f = Math.floor(j / this.DB),\n h = this.s << b & this.DM,\n d;\n\n for (d = this.t - 1; d >= 0; --d) {\n e[d + f + 1] = this[d] >> a | h;\n h = (this[d] & g) << b;\n }\n\n for (d = f - 1; d >= 0; --d) {\n e[d] = 0;\n }\n\n e[f] = h;\n e.t = this.t + f + 1;\n e.s = this.s;\n e.clamp();\n}\n\nfunction bnpRShiftTo(g, d) {\n d.s = this.s;\n var e = Math.floor(g / this.DB);\n\n if (e >= this.t) {\n d.t = 0;\n return;\n }\n\n var b = g % this.DB;\n var a = this.DB - b;\n var f = (1 << b) - 1;\n d[0] = this[e] >> b;\n\n for (var c = e + 1; c < this.t; ++c) {\n d[c - e - 1] |= (this[c] & f) << a;\n d[c - e] = this[c] >> b;\n }\n\n if (b > 0) {\n d[this.t - e - 1] |= (this.s & f) << a;\n }\n\n d.t = this.t - e;\n d.clamp();\n}\n\nfunction bnpSubTo(d, f) {\n var e = 0,\n g = 0,\n b = Math.min(d.t, this.t);\n\n while (e < b) {\n g += this[e] - d[e];\n f[e++] = g & this.DM;\n g >>= this.DB;\n }\n\n if (d.t < this.t) {\n g -= d.s;\n\n while (e < this.t) {\n g += this[e];\n f[e++] = g & this.DM;\n g >>= this.DB;\n }\n\n g += this.s;\n } else {\n g += this.s;\n\n while (e < d.t) {\n g -= d[e];\n f[e++] = g & this.DM;\n g >>= this.DB;\n }\n\n g -= d.s;\n }\n\n f.s = g < 0 ? -1 : 0;\n\n if (g < -1) {\n f[e++] = this.DV + g;\n } else {\n if (g > 0) {\n f[e++] = g;\n }\n }\n\n f.t = e;\n f.clamp();\n}\n\nfunction bnpMultiplyTo(c, e) {\n var b = this.abs(),\n f = c.abs();\n var d = b.t;\n e.t = d + f.t;\n\n while (--d >= 0) {\n e[d] = 0;\n }\n\n for (d = 0; d < f.t; ++d) {\n e[d + b.t] = b.am(0, f[d], e, d, 0, b.t);\n }\n\n e.s = 0;\n e.clamp();\n\n if (this.s != c.s) {\n BigInteger.ZERO.subTo(e, e);\n }\n}\n\nfunction bnpSquareTo(d) {\n var a = this.abs();\n var b = d.t = 2 * a.t;\n\n while (--b >= 0) {\n d[b] = 0;\n }\n\n for (b = 0; b < a.t - 1; ++b) {\n var e = a.am(b, a[b], d, 2 * b, 0, 1);\n\n if ((d[b + a.t] += a.am(b + 1, 2 * a[b], d, 2 * b + 1, e, a.t - b - 1)) >= a.DV) {\n d[b + a.t] -= a.DV;\n d[b + a.t + 1] = 1;\n }\n }\n\n if (d.t > 0) {\n d[d.t - 1] += a.am(b, a[b], d, 2 * b, 0, 1);\n }\n\n d.s = 0;\n d.clamp();\n}\n\nfunction bnpDivRemTo(n, h, g) {\n var w = n.abs();\n\n if (w.t <= 0) {\n return;\n }\n\n var k = this.abs();\n\n if (k.t < w.t) {\n if (h != null) {\n h.fromInt(0);\n }\n\n if (g != null) {\n this.copyTo(g);\n }\n\n return;\n }\n\n if (g == null) {\n g = nbi();\n }\n\n var d = nbi(),\n a = this.s,\n l = n.s;\n var v = this.DB - nbits(w[w.t - 1]);\n\n if (v > 0) {\n w.lShiftTo(v, d);\n k.lShiftTo(v, g);\n } else {\n w.copyTo(d);\n k.copyTo(g);\n }\n\n var p = d.t;\n var b = d[p - 1];\n\n if (b == 0) {\n return;\n }\n\n var o = b * (1 << this.F1) + (p > 1 ? d[p - 2] >> this.F2 : 0);\n var A = this.FV / o,\n z = (1 << this.F1) / o,\n x = 1 << this.F2;\n var u = g.t,\n s = u - p,\n f = h == null ? nbi() : h;\n d.dlShiftTo(s, f);\n\n if (g.compareTo(f) >= 0) {\n g[g.t++] = 1;\n g.subTo(f, g);\n }\n\n BigInteger.ONE.dlShiftTo(p, f);\n f.subTo(d, d);\n\n while (d.t < p) {\n d[d.t++] = 0;\n }\n\n while (--s >= 0) {\n var c = g[--u] == b ? this.DM : Math.floor(g[u] * A + (g[u - 1] + x) * z);\n\n if ((g[u] += d.am(0, c, g, s, 0, p)) < c) {\n d.dlShiftTo(s, f);\n g.subTo(f, g);\n\n while (g[u] < --c) {\n g.subTo(f, g);\n }\n }\n }\n\n if (h != null) {\n g.drShiftTo(p, h);\n\n if (a != l) {\n BigInteger.ZERO.subTo(h, h);\n }\n }\n\n g.t = p;\n g.clamp();\n\n if (v > 0) {\n g.rShiftTo(v, g);\n }\n\n if (a < 0) {\n BigInteger.ZERO.subTo(g, g);\n }\n}\n\nfunction bnMod(b) {\n var c = nbi();\n this.abs().divRemTo(b, null, c);\n\n if (this.s < 0 && c.compareTo(BigInteger.ZERO) > 0) {\n b.subTo(c, c);\n }\n\n return c;\n}\n\nfunction Classic(a) {\n this.m = a;\n}\n\nfunction cConvert(a) {\n if (a.s < 0 || a.compareTo(this.m) >= 0) {\n return a.mod(this.m);\n } else {\n return a;\n }\n}\n\nfunction cRevert(a) {\n return a;\n}\n\nfunction cReduce(a) {\n a.divRemTo(this.m, null, a);\n}\n\nfunction cMulTo(a, c, b) {\n a.multiplyTo(c, b);\n this.reduce(b);\n}\n\nfunction cSqrTo(a, b) {\n a.squareTo(b);\n this.reduce(b);\n}\n\nClassic.prototype.convert = cConvert;\nClassic.prototype.revert = cRevert;\nClassic.prototype.reduce = cReduce;\nClassic.prototype.mulTo = cMulTo;\nClassic.prototype.sqrTo = cSqrTo;\n\nfunction bnpInvDigit() {\n if (this.t < 1) {\n return 0;\n }\n\n var a = this[0];\n\n if ((a & 1) == 0) {\n return 0;\n }\n\n var b = a & 3;\n b = b * (2 - (a & 15) * b) & 15;\n b = b * (2 - (a & 255) * b) & 255;\n b = b * (2 - ((a & 65535) * b & 65535)) & 65535;\n b = b * (2 - a * b % this.DV) % this.DV;\n return b > 0 ? this.DV - b : -b;\n}\n\nfunction Montgomery(a) {\n this.m = a;\n this.mp = a.invDigit();\n this.mpl = this.mp & 32767;\n this.mph = this.mp >> 15;\n this.um = (1 << a.DB - 15) - 1;\n this.mt2 = 2 * a.t;\n}\n\nfunction montConvert(a) {\n var b = nbi();\n a.abs().dlShiftTo(this.m.t, b);\n b.divRemTo(this.m, null, b);\n\n if (a.s < 0 && b.compareTo(BigInteger.ZERO) > 0) {\n this.m.subTo(b, b);\n }\n\n return b;\n}\n\nfunction montRevert(a) {\n var b = nbi();\n a.copyTo(b);\n this.reduce(b);\n return b;\n}\n\nfunction montReduce(a) {\n while (a.t <= this.mt2) {\n a[a.t++] = 0;\n }\n\n for (var c = 0; c < this.m.t; ++c) {\n var b = a[c] & 32767;\n var d = b * this.mpl + ((b * this.mph + (a[c] >> 15) * this.mpl & this.um) << 15) & a.DM;\n b = c + this.m.t;\n a[b] += this.m.am(0, d, a, c, 0, this.m.t);\n\n while (a[b] >= a.DV) {\n a[b] -= a.DV;\n a[++b]++;\n }\n }\n\n a.clamp();\n a.drShiftTo(this.m.t, a);\n\n if (a.compareTo(this.m) >= 0) {\n a.subTo(this.m, a);\n }\n}\n\nfunction montSqrTo(a, b) {\n a.squareTo(b);\n this.reduce(b);\n}\n\nfunction montMulTo(a, c, b) {\n a.multiplyTo(c, b);\n this.reduce(b);\n}\n\nMontgomery.prototype.convert = montConvert;\nMontgomery.prototype.revert = montRevert;\nMontgomery.prototype.reduce = montReduce;\nMontgomery.prototype.mulTo = montMulTo;\nMontgomery.prototype.sqrTo = montSqrTo;\n\nfunction bnpIsEven() {\n return (this.t > 0 ? this[0] & 1 : this.s) == 0;\n}\n\nfunction bnpExp(h, j) {\n if (h > 4294967295 || h < 1) {\n return BigInteger.ONE;\n }\n\n var f = nbi(),\n a = nbi(),\n d = j.convert(this),\n c = nbits(h) - 1;\n d.copyTo(f);\n\n while (--c >= 0) {\n j.sqrTo(f, a);\n\n if ((h & 1 << c) > 0) {\n j.mulTo(a, d, f);\n } else {\n var b = f;\n f = a;\n a = b;\n }\n }\n\n return j.revert(f);\n}\n\nfunction bnModPowInt(b, a) {\n var c;\n\n if (b < 256 || a.isEven()) {\n c = new Classic(a);\n } else {\n c = new Montgomery(a);\n }\n\n return this.exp(b, c);\n}\n\nBigInteger.prototype.copyTo = bnpCopyTo;\nBigInteger.prototype.fromInt = bnpFromInt;\nBigInteger.prototype.fromString = bnpFromString;\nBigInteger.prototype.clamp = bnpClamp;\nBigInteger.prototype.dlShiftTo = bnpDLShiftTo;\nBigInteger.prototype.drShiftTo = bnpDRShiftTo;\nBigInteger.prototype.lShiftTo = bnpLShiftTo;\nBigInteger.prototype.rShiftTo = bnpRShiftTo;\nBigInteger.prototype.subTo = bnpSubTo;\nBigInteger.prototype.multiplyTo = bnpMultiplyTo;\nBigInteger.prototype.squareTo = bnpSquareTo;\nBigInteger.prototype.divRemTo = bnpDivRemTo;\nBigInteger.prototype.invDigit = bnpInvDigit;\nBigInteger.prototype.isEven = bnpIsEven;\nBigInteger.prototype.exp = bnpExp;\nBigInteger.prototype.toString = bnToString;\nBigInteger.prototype.negate = bnNegate;\nBigInteger.prototype.abs = bnAbs;\nBigInteger.prototype.compareTo = bnCompareTo;\nBigInteger.prototype.bitLength = bnBitLength;\nBigInteger.prototype.mod = bnMod;\nBigInteger.prototype.modPowInt = bnModPowInt;\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);\n/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/\n */\n\nfunction bnClone() {\n var a = nbi();\n this.copyTo(a);\n return a;\n}\n\nfunction bnIntValue() {\n if (this.s < 0) {\n if (this.t == 1) {\n return this[0] - this.DV;\n } else {\n if (this.t == 0) {\n return -1;\n }\n }\n } else {\n if (this.t == 1) {\n return this[0];\n } else {\n if (this.t == 0) {\n return 0;\n }\n }\n }\n\n return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];\n}\n\nfunction bnByteValue() {\n return this.t == 0 ? this.s : this[0] << 24 >> 24;\n}\n\nfunction bnShortValue() {\n return this.t == 0 ? this.s : this[0] << 16 >> 16;\n}\n\nfunction bnpChunkSize(a) {\n return Math.floor(Math.LN2 * this.DB / Math.log(a));\n}\n\nfunction bnSigNum() {\n if (this.s < 0) {\n return -1;\n } else {\n if (this.t <= 0 || this.t == 1 && this[0] <= 0) {\n return 0;\n } else {\n return 1;\n }\n }\n}\n\nfunction bnpToRadix(c) {\n if (c == null) {\n c = 10;\n }\n\n if (this.signum() == 0 || c < 2 || c > 36) {\n return \"0\";\n }\n\n var f = this.chunkSize(c);\n var e = Math.pow(c, f);\n var i = nbv(e),\n j = nbi(),\n h = nbi(),\n g = \"\";\n this.divRemTo(i, j, h);\n\n while (j.signum() > 0) {\n g = (e + h.intValue()).toString(c).substr(1) + g;\n j.divRemTo(i, j, h);\n }\n\n return h.intValue().toString(c) + g;\n}\n\nfunction bnpFromRadix(m, h) {\n this.fromInt(0);\n\n if (h == null) {\n h = 10;\n }\n\n var f = this.chunkSize(h);\n var g = Math.pow(h, f),\n e = false,\n a = 0,\n l = 0;\n\n for (var c = 0; c < m.length; ++c) {\n var k = intAt(m, c);\n\n if (k < 0) {\n if (m.charAt(c) == \"-\" && this.signum() == 0) {\n e = true;\n }\n\n continue;\n }\n\n l = h * l + k;\n\n if (++a >= f) {\n this.dMultiply(g);\n this.dAddOffset(l, 0);\n a = 0;\n l = 0;\n }\n }\n\n if (a > 0) {\n this.dMultiply(Math.pow(h, a));\n this.dAddOffset(l, 0);\n }\n\n if (e) {\n BigInteger.ZERO.subTo(this, this);\n }\n}\n\nfunction bnpFromNumber(f, e, h) {\n if (\"number\" == typeof e) {\n if (f < 2) {\n this.fromInt(1);\n } else {\n this.fromNumber(f, h);\n\n if (!this.testBit(f - 1)) {\n this.bitwiseTo(BigInteger.ONE.shiftLeft(f - 1), op_or, this);\n }\n\n if (this.isEven()) {\n this.dAddOffset(1, 0);\n }\n\n while (!this.isProbablePrime(e)) {\n this.dAddOffset(2, 0);\n\n if (this.bitLength() > f) {\n this.subTo(BigInteger.ONE.shiftLeft(f - 1), this);\n }\n }\n }\n } else {\n var d = new Array(),\n g = f & 7;\n d.length = (f >> 3) + 1;\n e.nextBytes(d);\n\n if (g > 0) {\n d[0] &= (1 << g) - 1;\n } else {\n d[0] = 0;\n }\n\n this.fromString(d, 256);\n }\n}\n\nfunction bnToByteArray() {\n var b = this.t,\n c = new Array();\n c[0] = this.s;\n var e = this.DB - b * this.DB % 8,\n f,\n a = 0;\n\n if (b-- > 0) {\n if (e < this.DB && (f = this[b] >> e) != (this.s & this.DM) >> e) {\n c[a++] = f | this.s << this.DB - e;\n }\n\n while (b >= 0) {\n if (e < 8) {\n f = (this[b] & (1 << e) - 1) << 8 - e;\n f |= this[--b] >> (e += this.DB - 8);\n } else {\n f = this[b] >> (e -= 8) & 255;\n\n if (e <= 0) {\n e += this.DB;\n --b;\n }\n }\n\n if ((f & 128) != 0) {\n f |= -256;\n }\n\n if (a == 0 && (this.s & 128) != (f & 128)) {\n ++a;\n }\n\n if (a > 0 || f != this.s) {\n c[a++] = f;\n }\n }\n }\n\n return c;\n}\n\nfunction bnEquals(b) {\n return this.compareTo(b) == 0;\n}\n\nfunction bnMin(b) {\n return this.compareTo(b) < 0 ? this : b;\n}\n\nfunction bnMax(b) {\n return this.compareTo(b) > 0 ? this : b;\n}\n\nfunction bnpBitwiseTo(c, h, e) {\n var d,\n g,\n b = Math.min(c.t, this.t);\n\n for (d = 0; d < b; ++d) {\n e[d] = h(this[d], c[d]);\n }\n\n if (c.t < this.t) {\n g = c.s & this.DM;\n\n for (d = b; d < this.t; ++d) {\n e[d] = h(this[d], g);\n }\n\n e.t = this.t;\n } else {\n g = this.s & this.DM;\n\n for (d = b; d < c.t; ++d) {\n e[d] = h(g, c[d]);\n }\n\n e.t = c.t;\n }\n\n e.s = h(this.s, c.s);\n e.clamp();\n}\n\nfunction op_and(a, b) {\n return a & b;\n}\n\nfunction bnAnd(b) {\n var c = nbi();\n this.bitwiseTo(b, op_and, c);\n return c;\n}\n\nfunction op_or(a, b) {\n return a | b;\n}\n\nfunction bnOr(b) {\n var c = nbi();\n this.bitwiseTo(b, op_or, c);\n return c;\n}\n\nfunction op_xor(a, b) {\n return a ^ b;\n}\n\nfunction bnXor(b) {\n var c = nbi();\n this.bitwiseTo(b, op_xor, c);\n return c;\n}\n\nfunction op_andnot(a, b) {\n return a & ~b;\n}\n\nfunction bnAndNot(b) {\n var c = nbi();\n this.bitwiseTo(b, op_andnot, c);\n return c;\n}\n\nfunction bnNot() {\n var b = nbi();\n\n for (var a = 0; a < this.t; ++a) {\n b[a] = this.DM & ~this[a];\n }\n\n b.t = this.t;\n b.s = ~this.s;\n return b;\n}\n\nfunction bnShiftLeft(b) {\n var a = nbi();\n\n if (b < 0) {\n this.rShiftTo(-b, a);\n } else {\n this.lShiftTo(b, a);\n }\n\n return a;\n}\n\nfunction bnShiftRight(b) {\n var a = nbi();\n\n if (b < 0) {\n this.lShiftTo(-b, a);\n } else {\n this.rShiftTo(b, a);\n }\n\n return a;\n}\n\nfunction lbit(a) {\n if (a == 0) {\n return -1;\n }\n\n var b = 0;\n\n if ((a & 65535) == 0) {\n a >>= 16;\n b += 16;\n }\n\n if ((a & 255) == 0) {\n a >>= 8;\n b += 8;\n }\n\n if ((a & 15) == 0) {\n a >>= 4;\n b += 4;\n }\n\n if ((a & 3) == 0) {\n a >>= 2;\n b += 2;\n }\n\n if ((a & 1) == 0) {\n ++b;\n }\n\n return b;\n}\n\nfunction bnGetLowestSetBit() {\n for (var a = 0; a < this.t; ++a) {\n if (this[a] != 0) {\n return a * this.DB + lbit(this[a]);\n }\n }\n\n if (this.s < 0) {\n return this.t * this.DB;\n }\n\n return -1;\n}\n\nfunction cbit(a) {\n var b = 0;\n\n while (a != 0) {\n a &= a - 1;\n ++b;\n }\n\n return b;\n}\n\nfunction bnBitCount() {\n var c = 0,\n a = this.s & this.DM;\n\n for (var b = 0; b < this.t; ++b) {\n c += cbit(this[b] ^ a);\n }\n\n return c;\n}\n\nfunction bnTestBit(b) {\n var a = Math.floor(b / this.DB);\n\n if (a >= this.t) {\n return this.s != 0;\n }\n\n return (this[a] & 1 << b % this.DB) != 0;\n}\n\nfunction bnpChangeBit(c, b) {\n var a = BigInteger.ONE.shiftLeft(c);\n this.bitwiseTo(a, b, a);\n return a;\n}\n\nfunction bnSetBit(a) {\n return this.changeBit(a, op_or);\n}\n\nfunction bnClearBit(a) {\n return this.changeBit(a, op_andnot);\n}\n\nfunction bnFlipBit(a) {\n return this.changeBit(a, op_xor);\n}\n\nfunction bnpAddTo(d, f) {\n var e = 0,\n g = 0,\n b = Math.min(d.t, this.t);\n\n while (e < b) {\n g += this[e] + d[e];\n f[e++] = g & this.DM;\n g >>= this.DB;\n }\n\n if (d.t < this.t) {\n g += d.s;\n\n while (e < this.t) {\n g += this[e];\n f[e++] = g & this.DM;\n g >>= this.DB;\n }\n\n g += this.s;\n } else {\n g += this.s;\n\n while (e < d.t) {\n g += d[e];\n f[e++] = g & this.DM;\n g >>= this.DB;\n }\n\n g += d.s;\n }\n\n f.s = g < 0 ? -1 : 0;\n\n if (g > 0) {\n f[e++] = g;\n } else {\n if (g < -1) {\n f[e++] = this.DV + g;\n }\n }\n\n f.t = e;\n f.clamp();\n}\n\nfunction bnAdd(b) {\n var c = nbi();\n this.addTo(b, c);\n return c;\n}\n\nfunction bnSubtract(b) {\n var c = nbi();\n this.subTo(b, c);\n return c;\n}\n\nfunction bnMultiply(b) {\n var c = nbi();\n this.multiplyTo(b, c);\n return c;\n}\n\nfunction bnSquare() {\n var a = nbi();\n this.squareTo(a);\n return a;\n}\n\nfunction bnDivide(b) {\n var c = nbi();\n this.divRemTo(b, c, null);\n return c;\n}\n\nfunction bnRemainder(b) {\n var c = nbi();\n this.divRemTo(b, null, c);\n return c;\n}\n\nfunction bnDivideAndRemainder(b) {\n var d = nbi(),\n c = nbi();\n this.divRemTo(b, d, c);\n return new Array(d, c);\n}\n\nfunction bnpDMultiply(a) {\n this[this.t] = this.am(0, a - 1, this, 0, 0, this.t);\n ++this.t;\n this.clamp();\n}\n\nfunction bnpDAddOffset(b, a) {\n if (b == 0) {\n return;\n }\n\n while (this.t <= a) {\n this[this.t++] = 0;\n }\n\n this[a] += b;\n\n while (this[a] >= this.DV) {\n this[a] -= this.DV;\n\n if (++a >= this.t) {\n this[this.t++] = 0;\n }\n\n ++this[a];\n }\n}\n\nfunction NullExp() {}\n\nfunction nNop(a) {\n return a;\n}\n\nfunction nMulTo(a, c, b) {\n a.multiplyTo(c, b);\n}\n\nfunction nSqrTo(a, b) {\n a.squareTo(b);\n}\n\nNullExp.prototype.convert = nNop;\nNullExp.prototype.revert = nNop;\nNullExp.prototype.mulTo = nMulTo;\nNullExp.prototype.sqrTo = nSqrTo;\n\nfunction bnPow(a) {\n return this.exp(a, new NullExp());\n}\n\nfunction bnpMultiplyLowerTo(b, f, e) {\n var d = Math.min(this.t + b.t, f);\n e.s = 0;\n e.t = d;\n\n while (d > 0) {\n e[--d] = 0;\n }\n\n var c;\n\n for (c = e.t - this.t; d < c; ++d) {\n e[d + this.t] = this.am(0, b[d], e, d, 0, this.t);\n }\n\n for (c = Math.min(b.t, f); d < c; ++d) {\n this.am(0, b[d], e, d, 0, f - d);\n }\n\n e.clamp();\n}\n\nfunction bnpMultiplyUpperTo(b, e, d) {\n --e;\n var c = d.t = this.t + b.t - e;\n d.s = 0;\n\n while (--c >= 0) {\n d[c] = 0;\n }\n\n for (c = Math.max(e - this.t, 0); c < b.t; ++c) {\n d[this.t + c - e] = this.am(e - c, b[c], d, 0, 0, this.t + c - e);\n }\n\n d.clamp();\n d.drShiftTo(1, d);\n}\n\nfunction Barrett(a) {\n this.r2 = nbi();\n this.q3 = nbi();\n BigInteger.ONE.dlShiftTo(2 * a.t, this.r2);\n this.mu = this.r2.divide(a);\n this.m = a;\n}\n\nfunction barrettConvert(a) {\n if (a.s < 0 || a.t > 2 * this.m.t) {\n return a.mod(this.m);\n } else {\n if (a.compareTo(this.m) < 0) {\n return a;\n } else {\n var b = nbi();\n a.copyTo(b);\n this.reduce(b);\n return b;\n }\n }\n}\n\nfunction barrettRevert(a) {\n return a;\n}\n\nfunction barrettReduce(a) {\n a.drShiftTo(this.m.t - 1, this.r2);\n\n if (a.t > this.m.t + 1) {\n a.t = this.m.t + 1;\n a.clamp();\n }\n\n this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3);\n this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);\n\n while (a.compareTo(this.r2) < 0) {\n a.dAddOffset(1, this.m.t + 1);\n }\n\n a.subTo(this.r2, a);\n\n while (a.compareTo(this.m) >= 0) {\n a.subTo(this.m, a);\n }\n}\n\nfunction barrettSqrTo(a, b) {\n a.squareTo(b);\n this.reduce(b);\n}\n\nfunction barrettMulTo(a, c, b) {\n a.multiplyTo(c, b);\n this.reduce(b);\n}\n\nBarrett.prototype.convert = barrettConvert;\nBarrett.prototype.revert = barrettRevert;\nBarrett.prototype.reduce = barrettReduce;\nBarrett.prototype.mulTo = barrettMulTo;\nBarrett.prototype.sqrTo = barrettSqrTo;\n\nfunction bnModPow(q, f) {\n var o = q.bitLength(),\n h,\n b = nbv(1),\n v;\n\n if (o <= 0) {\n return b;\n } else {\n if (o < 18) {\n h = 1;\n } else {\n if (o < 48) {\n h = 3;\n } else {\n if (o < 144) {\n h = 4;\n } else {\n if (o < 768) {\n h = 5;\n } else {\n h = 6;\n }\n }\n }\n }\n }\n\n if (o < 8) {\n v = new Classic(f);\n } else {\n if (f.isEven()) {\n v = new Barrett(f);\n } else {\n v = new Montgomery(f);\n }\n }\n\n var p = new Array(),\n d = 3,\n s = h - 1,\n a = (1 << h) - 1;\n p[1] = v.convert(this);\n\n if (h > 1) {\n var A = nbi();\n v.sqrTo(p[1], A);\n\n while (d <= a) {\n p[d] = nbi();\n v.mulTo(A, p[d - 2], p[d]);\n d += 2;\n }\n }\n\n var l = q.t - 1,\n x,\n u = true,\n c = nbi(),\n y;\n o = nbits(q[l]) - 1;\n\n while (l >= 0) {\n if (o >= s) {\n x = q[l] >> o - s & a;\n } else {\n x = (q[l] & (1 << o + 1) - 1) << s - o;\n\n if (l > 0) {\n x |= q[l - 1] >> this.DB + o - s;\n }\n }\n\n d = h;\n\n while ((x & 1) == 0) {\n x >>= 1;\n --d;\n }\n\n if ((o -= d) < 0) {\n o += this.DB;\n --l;\n }\n\n if (u) {\n p[x].copyTo(b);\n u = false;\n } else {\n while (d > 1) {\n v.sqrTo(b, c);\n v.sqrTo(c, b);\n d -= 2;\n }\n\n if (d > 0) {\n v.sqrTo(b, c);\n } else {\n y = b;\n b = c;\n c = y;\n }\n\n v.mulTo(c, p[x], b);\n }\n\n while (l >= 0 && (q[l] & 1 << o) == 0) {\n v.sqrTo(b, c);\n y = b;\n b = c;\n c = y;\n\n if (--o < 0) {\n o = this.DB - 1;\n --l;\n }\n }\n }\n\n return v.revert(b);\n}\n\nfunction bnGCD(c) {\n var b = this.s < 0 ? this.negate() : this.clone();\n var h = c.s < 0 ? c.negate() : c.clone();\n\n if (b.compareTo(h) < 0) {\n var e = b;\n b = h;\n h = e;\n }\n\n var d = b.getLowestSetBit(),\n f = h.getLowestSetBit();\n\n if (f < 0) {\n return b;\n }\n\n if (d < f) {\n f = d;\n }\n\n if (f > 0) {\n b.rShiftTo(f, b);\n h.rShiftTo(f, h);\n }\n\n while (b.signum() > 0) {\n if ((d = b.getLowestSetBit()) > 0) {\n b.rShiftTo(d, b);\n }\n\n if ((d = h.getLowestSetBit()) > 0) {\n h.rShiftTo(d, h);\n }\n\n if (b.compareTo(h) >= 0) {\n b.subTo(h, b);\n b.rShiftTo(1, b);\n } else {\n h.subTo(b, h);\n h.rShiftTo(1, h);\n }\n }\n\n if (f > 0) {\n h.lShiftTo(f, h);\n }\n\n return h;\n}\n\nfunction bnpModInt(e) {\n if (e <= 0) {\n return 0;\n }\n\n var c = this.DV % e,\n b = this.s < 0 ? e - 1 : 0;\n\n if (this.t > 0) {\n if (c == 0) {\n b = this[0] % e;\n } else {\n for (var a = this.t - 1; a >= 0; --a) {\n b = (c * b + this[a]) % e;\n }\n }\n }\n\n return b;\n}\n\nfunction bnModInverse(f) {\n var j = f.isEven();\n\n if (this.isEven() && j || f.signum() == 0) {\n return BigInteger.ZERO;\n }\n\n var i = f.clone(),\n h = this.clone();\n var g = nbv(1),\n e = nbv(0),\n l = nbv(0),\n k = nbv(1);\n\n while (i.signum() != 0) {\n while (i.isEven()) {\n i.rShiftTo(1, i);\n\n if (j) {\n if (!g.isEven() || !e.isEven()) {\n g.addTo(this, g);\n e.subTo(f, e);\n }\n\n g.rShiftTo(1, g);\n } else {\n if (!e.isEven()) {\n e.subTo(f, e);\n }\n }\n\n e.rShiftTo(1, e);\n }\n\n while (h.isEven()) {\n h.rShiftTo(1, h);\n\n if (j) {\n if (!l.isEven() || !k.isEven()) {\n l.addTo(this, l);\n k.subTo(f, k);\n }\n\n l.rShiftTo(1, l);\n } else {\n if (!k.isEven()) {\n k.subTo(f, k);\n }\n }\n\n k.rShiftTo(1, k);\n }\n\n if (i.compareTo(h) >= 0) {\n i.subTo(h, i);\n\n if (j) {\n g.subTo(l, g);\n }\n\n e.subTo(k, e);\n } else {\n h.subTo(i, h);\n\n if (j) {\n l.subTo(g, l);\n }\n\n k.subTo(e, k);\n }\n }\n\n if (h.compareTo(BigInteger.ONE) != 0) {\n return BigInteger.ZERO;\n }\n\n if (k.compareTo(f) >= 0) {\n return k.subtract(f);\n }\n\n if (k.signum() < 0) {\n k.addTo(f, k);\n } else {\n return k;\n }\n\n if (k.signum() < 0) {\n return k.add(f);\n } else {\n return k;\n }\n}\n\nvar lowprimes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997];\nvar lplim = (1 << 26) / lowprimes[lowprimes.length - 1];\n\nfunction bnIsProbablePrime(e) {\n var d,\n b = this.abs();\n\n if (b.t == 1 && b[0] <= lowprimes[lowprimes.length - 1]) {\n for (d = 0; d < lowprimes.length; ++d) {\n if (b[0] == lowprimes[d]) {\n return true;\n }\n }\n\n return false;\n }\n\n if (b.isEven()) {\n return false;\n }\n\n d = 1;\n\n while (d < lowprimes.length) {\n var a = lowprimes[d],\n c = d + 1;\n\n while (c < lowprimes.length && a < lplim) {\n a *= lowprimes[c++];\n }\n\n a = b.modInt(a);\n\n while (d < c) {\n if (a % lowprimes[d++] == 0) {\n return false;\n }\n }\n }\n\n return b.millerRabin(e);\n}\n\nfunction bnpMillerRabin(f) {\n var g = this.subtract(BigInteger.ONE);\n var c = g.getLowestSetBit();\n\n if (c <= 0) {\n return false;\n }\n\n var h = g.shiftRight(c);\n f = f + 1 >> 1;\n\n if (f > lowprimes.length) {\n f = lowprimes.length;\n }\n\n var b = nbi();\n\n for (var e = 0; e < f; ++e) {\n b.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]);\n var l = b.modPow(h, this);\n\n if (l.compareTo(BigInteger.ONE) != 0 && l.compareTo(g) != 0) {\n var d = 1;\n\n while (d++ < c && l.compareTo(g) != 0) {\n l = l.modPowInt(2, this);\n\n if (l.compareTo(BigInteger.ONE) == 0) {\n return false;\n }\n }\n\n if (l.compareTo(g) != 0) {\n return false;\n }\n }\n }\n\n return true;\n}\n\nBigInteger.prototype.chunkSize = bnpChunkSize;\nBigInteger.prototype.toRadix = bnpToRadix;\nBigInteger.prototype.fromRadix = bnpFromRadix;\nBigInteger.prototype.fromNumber = bnpFromNumber;\nBigInteger.prototype.bitwiseTo = bnpBitwiseTo;\nBigInteger.prototype.changeBit = bnpChangeBit;\nBigInteger.prototype.addTo = bnpAddTo;\nBigInteger.prototype.dMultiply = bnpDMultiply;\nBigInteger.prototype.dAddOffset = bnpDAddOffset;\nBigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\nBigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\nBigInteger.prototype.modInt = bnpModInt;\nBigInteger.prototype.millerRabin = bnpMillerRabin;\nBigInteger.prototype.clone = bnClone;\nBigInteger.prototype.intValue = bnIntValue;\nBigInteger.prototype.byteValue = bnByteValue;\nBigInteger.prototype.shortValue = bnShortValue;\nBigInteger.prototype.signum = bnSigNum;\nBigInteger.prototype.toByteArray = bnToByteArray;\nBigInteger.prototype.equals = bnEquals;\nBigInteger.prototype.min = bnMin;\nBigInteger.prototype.max = bnMax;\nBigInteger.prototype.and = bnAnd;\nBigInteger.prototype.or = bnOr;\nBigInteger.prototype.xor = bnXor;\nBigInteger.prototype.andNot = bnAndNot;\nBigInteger.prototype.not = bnNot;\nBigInteger.prototype.shiftLeft = bnShiftLeft;\nBigInteger.prototype.shiftRight = bnShiftRight;\nBigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\nBigInteger.prototype.bitCount = bnBitCount;\nBigInteger.prototype.testBit = bnTestBit;\nBigInteger.prototype.setBit = bnSetBit;\nBigInteger.prototype.clearBit = bnClearBit;\nBigInteger.prototype.flipBit = bnFlipBit;\nBigInteger.prototype.add = bnAdd;\nBigInteger.prototype.subtract = bnSubtract;\nBigInteger.prototype.multiply = bnMultiply;\nBigInteger.prototype.divide = bnDivide;\nBigInteger.prototype.remainder = bnRemainder;\nBigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;\nBigInteger.prototype.modPow = bnModPow;\nBigInteger.prototype.modInverse = bnModInverse;\nBigInteger.prototype.pow = bnPow;\nBigInteger.prototype.gcd = bnGCD;\nBigInteger.prototype.isProbablePrime = bnIsProbablePrime;\nBigInteger.prototype.square = bnSquare;\n/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/\n */\n\nfunction Arcfour() {\n this.i = 0;\n this.j = 0;\n this.S = new Array();\n}\n\nfunction ARC4init(d) {\n var c, a, b;\n\n for (c = 0; c < 256; ++c) {\n this.S[c] = c;\n }\n\n a = 0;\n\n for (c = 0; c < 256; ++c) {\n a = a + this.S[c] + d[c % d.length] & 255;\n b = this.S[c];\n this.S[c] = this.S[a];\n this.S[a] = b;\n }\n\n this.i = 0;\n this.j = 0;\n}\n\nfunction ARC4next() {\n var a;\n this.i = this.i + 1 & 255;\n this.j = this.j + this.S[this.i] & 255;\n a = this.S[this.i];\n this.S[this.i] = this.S[this.j];\n this.S[this.j] = a;\n return this.S[a + this.S[this.i] & 255];\n}\n\nArcfour.prototype.init = ARC4init;\nArcfour.prototype.next = ARC4next;\n\nfunction prng_newstate() {\n return new Arcfour();\n}\n\nvar rng_psize = 256;\n/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/\n */\n\nvar rng_state;\nvar rng_pool;\nvar rng_pptr;\n\nfunction rng_seed_int(a) {\n rng_pool[rng_pptr++] ^= a & 255;\n rng_pool[rng_pptr++] ^= a >> 8 & 255;\n rng_pool[rng_pptr++] ^= a >> 16 & 255;\n rng_pool[rng_pptr++] ^= a >> 24 & 255;\n\n if (rng_pptr >= rng_psize) {\n rng_pptr -= rng_psize;\n }\n}\n\nfunction rng_seed_time() {\n rng_seed_int(new Date().getTime());\n}\n\nif (rng_pool == null) {\n rng_pool = new Array();\n rng_pptr = 0;\n var t;\n\n if (window !== undefined && (window.crypto !== undefined || window.msCrypto !== undefined)) {\n var crypto = window.crypto || window.msCrypto;\n\n if (crypto.getRandomValues) {\n var ua = new Uint8Array(32);\n crypto.getRandomValues(ua);\n\n for (t = 0; t < 32; ++t) {\n rng_pool[rng_pptr++] = ua[t];\n }\n } else {\n if (navigator.appName == \"Netscape\" && navigator.appVersion < \"5\") {\n var z = window.crypto.random(32);\n\n for (t = 0; t < z.length; ++t) {\n rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;\n }\n }\n }\n }\n\n while (rng_pptr < rng_psize) {\n t = Math.floor(65536 * Math.random());\n rng_pool[rng_pptr++] = t >>> 8;\n rng_pool[rng_pptr++] = t & 255;\n }\n\n rng_pptr = 0;\n rng_seed_time();\n}\n\nfunction rng_get_byte() {\n if (rng_state == null) {\n rng_seed_time();\n rng_state = prng_newstate();\n rng_state.init(rng_pool);\n\n for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) {\n rng_pool[rng_pptr] = 0;\n }\n\n rng_pptr = 0;\n }\n\n return rng_state.next();\n}\n\nfunction rng_get_bytes(b) {\n var a;\n\n for (a = 0; a < b.length; ++a) {\n b[a] = rng_get_byte();\n }\n}\n\nfunction SecureRandom() {}\n\nSecureRandom.prototype.nextBytes = rng_get_bytes;\n/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/\n */\n\nfunction parseBigInt(b, a) {\n return new BigInteger(b, a);\n}\n\nfunction linebrk(c, d) {\n var a = \"\";\n var b = 0;\n\n while (b + d < c.length) {\n a += c.substring(b, b + d) + \"\\n\";\n b += d;\n }\n\n return a + c.substring(b, c.length);\n}\n\nfunction byte2Hex(a) {\n if (a < 16) {\n return \"0\" + a.toString(16);\n } else {\n return a.toString(16);\n }\n}\n\nfunction pkcs1pad2(e, h) {\n if (h < e.length + 11) {\n throw \"Message too long for RSA\";\n return null;\n }\n\n var g = new Array();\n var d = e.length - 1;\n\n while (d >= 0 && h > 0) {\n var f = e.charCodeAt(d--);\n\n if (f < 128) {\n g[--h] = f;\n } else {\n if (f > 127 && f < 2048) {\n g[--h] = f & 63 | 128;\n g[--h] = f >> 6 | 192;\n } else {\n g[--h] = f & 63 | 128;\n g[--h] = f >> 6 & 63 | 128;\n g[--h] = f >> 12 | 224;\n }\n }\n }\n\n g[--h] = 0;\n var b = new SecureRandom();\n var a = new Array();\n\n while (h > 2) {\n a[0] = 0;\n\n while (a[0] == 0) {\n b.nextBytes(a);\n }\n\n g[--h] = a[0];\n }\n\n g[--h] = 2;\n g[--h] = 0;\n return new BigInteger(g);\n}\n\nfunction oaep_mgf1_arr(c, a, e) {\n var b = \"\",\n d = 0;\n\n while (b.length < a) {\n b += e(String.fromCharCode.apply(String, c.concat([(d & 4278190080) >> 24, (d & 16711680) >> 16, (d & 65280) >> 8, d & 255])));\n d += 1;\n }\n\n return b;\n}\n\nfunction oaep_pad(q, a, f, l) {\n var c = KJUR.crypto.MessageDigest;\n var o = KJUR.crypto.Util;\n var b = null;\n\n if (!f) {\n f = \"sha1\";\n }\n\n if (typeof f === \"string\") {\n b = c.getCanonicalAlgName(f);\n l = c.getHashLength(b);\n\n f = function f(i) {\n return hextorstr(o.hashHex(rstrtohex(i), b));\n };\n }\n\n if (q.length + 2 * l + 2 > a) {\n throw \"Message too long for RSA\";\n }\n\n var k = \"\",\n e;\n\n for (e = 0; e < a - q.length - 2 * l - 2; e += 1) {\n k += \"\\x00\";\n }\n\n var h = f(\"\") + k + \"\\x01\" + q;\n var g = new Array(l);\n new SecureRandom().nextBytes(g);\n var j = oaep_mgf1_arr(g, h.length, f);\n var p = [];\n\n for (e = 0; e < h.length; e += 1) {\n p[e] = h.charCodeAt(e) ^ j.charCodeAt(e);\n }\n\n var m = oaep_mgf1_arr(p, g.length, f);\n var d = [0];\n\n for (e = 0; e < g.length; e += 1) {\n d[e + 1] = g[e] ^ m.charCodeAt(e);\n }\n\n return new BigInteger(d.concat(p));\n}\n\nfunction RSAKey() {\n this.n = null;\n this.e = 0;\n this.d = null;\n this.p = null;\n this.q = null;\n this.dmp1 = null;\n this.dmq1 = null;\n this.coeff = null;\n}\n\nfunction RSASetPublic(b, a) {\n this.isPublic = true;\n this.isPrivate = false;\n\n if (typeof b !== \"string\") {\n this.n = b;\n this.e = a;\n } else {\n if (b != null && a != null && b.length > 0 && a.length > 0) {\n this.n = parseBigInt(b, 16);\n this.e = parseInt(a, 16);\n } else {\n throw \"Invalid RSA public key\";\n }\n }\n}\n\nfunction RSADoPublic(a) {\n return a.modPowInt(this.e, this.n);\n}\n\nfunction RSAEncrypt(d) {\n var a = pkcs1pad2(d, this.n.bitLength() + 7 >> 3);\n\n if (a == null) {\n return null;\n }\n\n var e = this.doPublic(a);\n\n if (e == null) {\n return null;\n }\n\n var b = e.toString(16);\n\n if ((b.length & 1) == 0) {\n return b;\n } else {\n return \"0\" + b;\n }\n}\n\nfunction RSAEncryptOAEP(f, e, b) {\n var a = oaep_pad(f, this.n.bitLength() + 7 >> 3, e, b);\n\n if (a == null) {\n return null;\n }\n\n var g = this.doPublic(a);\n\n if (g == null) {\n return null;\n }\n\n var d = g.toString(16);\n\n if ((d.length & 1) == 0) {\n return d;\n } else {\n return \"0\" + d;\n }\n}\n\nRSAKey.prototype.doPublic = RSADoPublic;\nRSAKey.prototype.setPublic = RSASetPublic;\nRSAKey.prototype.encrypt = RSAEncrypt;\nRSAKey.prototype.encryptOAEP = RSAEncryptOAEP;\nRSAKey.prototype.type = \"RSA\";\n/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/\n */\n\nfunction pkcs1unpad2(g, j) {\n var a = g.toByteArray();\n var f = 0;\n\n while (f < a.length && a[f] == 0) {\n ++f;\n }\n\n if (a.length - f != j - 1 || a[f] != 2) {\n return null;\n }\n\n ++f;\n\n while (a[f] != 0) {\n if (++f >= a.length) {\n return null;\n }\n }\n\n var e = \"\";\n\n while (++f < a.length) {\n var h = a[f] & 255;\n\n if (h < 128) {\n e += String.fromCharCode(h);\n } else {\n if (h > 191 && h < 224) {\n e += String.fromCharCode((h & 31) << 6 | a[f + 1] & 63);\n ++f;\n } else {\n e += String.fromCharCode((h & 15) << 12 | (a[f + 1] & 63) << 6 | a[f + 2] & 63);\n f += 2;\n }\n }\n }\n\n return e;\n}\n\nfunction oaep_mgf1_str(c, a, e) {\n var b = \"\",\n d = 0;\n\n while (b.length < a) {\n b += e(c + String.fromCharCode.apply(String, [(d & 4278190080) >> 24, (d & 16711680) >> 16, (d & 65280) >> 8, d & 255]));\n d += 1;\n }\n\n return b;\n}\n\nfunction oaep_unpad(o, b, g, p) {\n var e = KJUR.crypto.MessageDigest;\n var r = KJUR.crypto.Util;\n var c = null;\n\n if (!g) {\n g = \"sha1\";\n }\n\n if (typeof g === \"string\") {\n c = e.getCanonicalAlgName(g);\n p = e.getHashLength(c);\n\n g = function g(d) {\n return hextorstr(r.hashHex(rstrtohex(d), c));\n };\n }\n\n o = o.toByteArray();\n var h;\n\n for (h = 0; h < o.length; h += 1) {\n o[h] &= 255;\n }\n\n while (o.length < b) {\n o.unshift(0);\n }\n\n o = String.fromCharCode.apply(String, o);\n\n if (o.length < 2 * p + 2) {\n throw \"Cipher too short\";\n }\n\n var f = o.substr(1, p);\n var s = o.substr(p + 1);\n var q = oaep_mgf1_str(s, p, g);\n var k = [],\n h;\n\n for (h = 0; h < f.length; h += 1) {\n k[h] = f.charCodeAt(h) ^ q.charCodeAt(h);\n }\n\n var l = oaep_mgf1_str(String.fromCharCode.apply(String, k), o.length - p, g);\n var j = [];\n\n for (h = 0; h < s.length; h += 1) {\n j[h] = s.charCodeAt(h) ^ l.charCodeAt(h);\n }\n\n j = String.fromCharCode.apply(String, j);\n\n if (j.substr(0, p) !== g(\"\")) {\n throw \"Hash mismatch\";\n }\n\n j = j.substr(p);\n var a = j.indexOf(\"\\x01\");\n var m = a != -1 ? j.substr(0, a).lastIndexOf(\"\\x00\") : -1;\n\n if (m + 1 != a) {\n throw \"Malformed data\";\n }\n\n return j.substr(a + 1);\n}\n\nfunction RSASetPrivate(c, a, b) {\n this.isPrivate = true;\n\n if (typeof c !== \"string\") {\n this.n = c;\n this.e = a;\n this.d = b;\n } else {\n if (c != null && a != null && c.length > 0 && a.length > 0) {\n this.n = parseBigInt(c, 16);\n this.e = parseInt(a, 16);\n this.d = parseBigInt(b, 16);\n } else {\n throw \"Invalid RSA private key\";\n }\n }\n}\n\nfunction RSASetPrivateEx(g, d, e, c, b, a, h, f) {\n this.isPrivate = true;\n this.isPublic = false;\n\n if (g == null) {\n throw \"RSASetPrivateEx N == null\";\n }\n\n if (d == null) {\n throw \"RSASetPrivateEx E == null\";\n }\n\n if (g.length == 0) {\n throw \"RSASetPrivateEx N.length == 0\";\n }\n\n if (d.length == 0) {\n throw \"RSASetPrivateEx E.length == 0\";\n }\n\n if (g != null && d != null && g.length > 0 && d.length > 0) {\n this.n = parseBigInt(g, 16);\n this.e = parseInt(d, 16);\n this.d = parseBigInt(e, 16);\n this.p = parseBigInt(c, 16);\n this.q = parseBigInt(b, 16);\n this.dmp1 = parseBigInt(a, 16);\n this.dmq1 = parseBigInt(h, 16);\n this.coeff = parseBigInt(f, 16);\n } else {\n throw \"Invalid RSA private key in RSASetPrivateEx\";\n }\n}\n\nfunction RSAGenerate(b, i) {\n var a = new SecureRandom();\n var f = b >> 1;\n this.e = parseInt(i, 16);\n var c = new BigInteger(i, 16);\n\n for (;;) {\n for (;;) {\n this.p = new BigInteger(b - f, 1, a);\n\n if (this.p.subtract(BigInteger.ONE).gcd(c).compareTo(BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) {\n break;\n }\n }\n\n for (;;) {\n this.q = new BigInteger(f, 1, a);\n\n if (this.q.subtract(BigInteger.ONE).gcd(c).compareTo(BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) {\n break;\n }\n }\n\n if (this.p.compareTo(this.q) <= 0) {\n var h = this.p;\n this.p = this.q;\n this.q = h;\n }\n\n var g = this.p.subtract(BigInteger.ONE);\n var d = this.q.subtract(BigInteger.ONE);\n var e = g.multiply(d);\n\n if (e.gcd(c).compareTo(BigInteger.ONE) == 0) {\n this.n = this.p.multiply(this.q);\n\n if (this.n.bitLength() == b) {\n this.d = c.modInverse(e);\n this.dmp1 = this.d.mod(g);\n this.dmq1 = this.d.mod(d);\n this.coeff = this.q.modInverse(this.p);\n break;\n }\n }\n }\n\n this.isPrivate = true;\n}\n\nfunction RSADoPrivate(a) {\n if (this.p == null || this.q == null) {\n return a.modPow(this.d, this.n);\n }\n\n var c = a.mod(this.p).modPow(this.dmp1, this.p);\n var b = a.mod(this.q).modPow(this.dmq1, this.q);\n\n while (c.compareTo(b) < 0) {\n c = c.add(this.p);\n }\n\n return c.subtract(b).multiply(this.coeff).mod(this.p).multiply(this.q).add(b);\n}\n\nfunction RSADecrypt(b) {\n if (b.length != Math.ceil(this.n.bitLength() / 4)) {\n throw new Error(\"wrong ctext length\");\n }\n\n var d = parseBigInt(b, 16);\n var a = this.doPrivate(d);\n\n if (a == null) {\n return null;\n }\n\n return pkcs1unpad2(a, this.n.bitLength() + 7 >> 3);\n}\n\nfunction RSADecryptOAEP(e, d, b) {\n if (e.length != Math.ceil(this.n.bitLength() / 4)) {\n throw new Error(\"wrong ctext length\");\n }\n\n var f = parseBigInt(e, 16);\n var a = this.doPrivate(f);\n\n if (a == null) {\n return null;\n }\n\n return oaep_unpad(a, this.n.bitLength() + 7 >> 3, d, b);\n}\n\nRSAKey.prototype.doPrivate = RSADoPrivate;\nRSAKey.prototype.setPrivate = RSASetPrivate;\nRSAKey.prototype.setPrivateEx = RSASetPrivateEx;\nRSAKey.prototype.generate = RSAGenerate;\nRSAKey.prototype.decrypt = RSADecrypt;\nRSAKey.prototype.decryptOAEP = RSADecryptOAEP;\n/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/\n */\n\nfunction ECFieldElementFp(b, a) {\n this.x = a;\n this.q = b;\n}\n\nfunction feFpEquals(a) {\n if (a == this) {\n return true;\n }\n\n return this.q.equals(a.q) && this.x.equals(a.x);\n}\n\nfunction feFpToBigInteger() {\n return this.x;\n}\n\nfunction feFpNegate() {\n return new ECFieldElementFp(this.q, this.x.negate().mod(this.q));\n}\n\nfunction feFpAdd(a) {\n return new ECFieldElementFp(this.q, this.x.add(a.toBigInteger()).mod(this.q));\n}\n\nfunction feFpSubtract(a) {\n return new ECFieldElementFp(this.q, this.x.subtract(a.toBigInteger()).mod(this.q));\n}\n\nfunction feFpMultiply(a) {\n return new ECFieldElementFp(this.q, this.x.multiply(a.toBigInteger()).mod(this.q));\n}\n\nfunction feFpSquare() {\n return new ECFieldElementFp(this.q, this.x.square().mod(this.q));\n}\n\nfunction feFpDivide(a) {\n return new ECFieldElementFp(this.q, this.x.multiply(a.toBigInteger().modInverse(this.q)).mod(this.q));\n}\n\nECFieldElementFp.prototype.equals = feFpEquals;\nECFieldElementFp.prototype.toBigInteger = feFpToBigInteger;\nECFieldElementFp.prototype.negate = feFpNegate;\nECFieldElementFp.prototype.add = feFpAdd;\nECFieldElementFp.prototype.subtract = feFpSubtract;\nECFieldElementFp.prototype.multiply = feFpMultiply;\nECFieldElementFp.prototype.square = feFpSquare;\nECFieldElementFp.prototype.divide = feFpDivide;\n\nfunction ECPointFp(c, a, d, b) {\n this.curve = c;\n this.x = a;\n this.y = d;\n\n if (b == null) {\n this.z = BigInteger.ONE;\n } else {\n this.z = b;\n }\n\n this.zinv = null;\n}\n\nfunction pointFpGetX() {\n if (this.zinv == null) {\n this.zinv = this.z.modInverse(this.curve.q);\n }\n\n return this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q));\n}\n\nfunction pointFpGetY() {\n if (this.zinv == null) {\n this.zinv = this.z.modInverse(this.curve.q);\n }\n\n return this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q));\n}\n\nfunction pointFpEquals(a) {\n if (a == this) {\n return true;\n }\n\n if (this.isInfinity()) {\n return a.isInfinity();\n }\n\n if (a.isInfinity()) {\n return this.isInfinity();\n }\n\n var c, b;\n c = a.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(a.z)).mod(this.curve.q);\n\n if (!c.equals(BigInteger.ZERO)) {\n return false;\n }\n\n b = a.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(a.z)).mod(this.curve.q);\n return b.equals(BigInteger.ZERO);\n}\n\nfunction pointFpIsInfinity() {\n if (this.x == null && this.y == null) {\n return true;\n }\n\n return this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO);\n}\n\nfunction pointFpNegate() {\n return new ECPointFp(this.curve, this.x, this.y.negate(), this.z);\n}\n\nfunction pointFpAdd(l) {\n if (this.isInfinity()) {\n return l;\n }\n\n if (l.isInfinity()) {\n return this;\n }\n\n var p = l.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(l.z)).mod(this.curve.q);\n var o = l.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(l.z)).mod(this.curve.q);\n\n if (BigInteger.ZERO.equals(o)) {\n if (BigInteger.ZERO.equals(p)) {\n return this.twice();\n }\n\n return this.curve.getInfinity();\n }\n\n var j = new BigInteger(\"3\");\n var e = this.x.toBigInteger();\n var n = this.y.toBigInteger();\n var c = l.x.toBigInteger();\n var k = l.y.toBigInteger();\n var m = o.square();\n var i = m.multiply(o);\n var d = e.multiply(m);\n var g = p.square().multiply(this.z);\n var a = g.subtract(d.shiftLeft(1)).multiply(l.z).subtract(i).multiply(o).mod(this.curve.q);\n var h = d.multiply(j).multiply(p).subtract(n.multiply(i)).subtract(g.multiply(p)).multiply(l.z).add(p.multiply(i)).mod(this.curve.q);\n var f = i.multiply(this.z).multiply(l.z).mod(this.curve.q);\n return new ECPointFp(this.curve, this.curve.fromBigInteger(a), this.curve.fromBigInteger(h), f);\n}\n\nfunction pointFpTwice() {\n if (this.isInfinity()) {\n return this;\n }\n\n if (this.y.toBigInteger().signum() == 0) {\n return this.curve.getInfinity();\n }\n\n var g = new BigInteger(\"3\");\n var c = this.x.toBigInteger();\n var h = this.y.toBigInteger();\n var e = h.multiply(this.z);\n var j = e.multiply(h).mod(this.curve.q);\n var i = this.curve.a.toBigInteger();\n var k = c.square().multiply(g);\n\n if (!BigInteger.ZERO.equals(i)) {\n k = k.add(this.z.square().multiply(i));\n }\n\n k = k.mod(this.curve.q);\n var b = k.square().subtract(c.shiftLeft(3).multiply(j)).shiftLeft(1).multiply(e).mod(this.curve.q);\n var f = k.multiply(g).multiply(c).subtract(j.shiftLeft(1)).shiftLeft(2).multiply(j).subtract(k.square().multiply(k)).mod(this.curve.q);\n var d = e.square().multiply(e).shiftLeft(3).mod(this.curve.q);\n return new ECPointFp(this.curve, this.curve.fromBigInteger(b), this.curve.fromBigInteger(f), d);\n}\n\nfunction pointFpMultiply(d) {\n if (this.isInfinity()) {\n return this;\n }\n\n if (d.signum() == 0) {\n return this.curve.getInfinity();\n }\n\n var m = d;\n var l = m.multiply(new BigInteger(\"3\"));\n var b = this.negate();\n var j = this;\n var q = this.curve.q.subtract(d);\n var o = q.multiply(new BigInteger(\"3\"));\n var c = new ECPointFp(this.curve, this.x, this.y);\n var a = c.negate();\n var g;\n\n for (g = l.bitLength() - 2; g > 0; --g) {\n j = j.twice();\n var n = l.testBit(g);\n var f = m.testBit(g);\n\n if (n != f) {\n j = j.add(n ? this : b);\n }\n }\n\n for (g = o.bitLength() - 2; g > 0; --g) {\n c = c.twice();\n var p = o.testBit(g);\n var r = q.testBit(g);\n\n if (p != r) {\n c = c.add(p ? c : a);\n }\n }\n\n return j;\n}\n\nfunction pointFpMultiplyTwo(c, a, b) {\n var d;\n\n if (c.bitLength() > b.bitLength()) {\n d = c.bitLength() - 1;\n } else {\n d = b.bitLength() - 1;\n }\n\n var f = this.curve.getInfinity();\n var e = this.add(a);\n\n while (d >= 0) {\n f = f.twice();\n\n if (c.testBit(d)) {\n if (b.testBit(d)) {\n f = f.add(e);\n } else {\n f = f.add(this);\n }\n } else {\n if (b.testBit(d)) {\n f = f.add(a);\n }\n }\n\n --d;\n }\n\n return f;\n}\n\nECPointFp.prototype.getX = pointFpGetX;\nECPointFp.prototype.getY = pointFpGetY;\nECPointFp.prototype.equals = pointFpEquals;\nECPointFp.prototype.isInfinity = pointFpIsInfinity;\nECPointFp.prototype.negate = pointFpNegate;\nECPointFp.prototype.add = pointFpAdd;\nECPointFp.prototype.twice = pointFpTwice;\nECPointFp.prototype.multiply = pointFpMultiply;\nECPointFp.prototype.multiplyTwo = pointFpMultiplyTwo;\n\nfunction ECCurveFp(e, d, c) {\n this.q = e;\n this.a = this.fromBigInteger(d);\n this.b = this.fromBigInteger(c);\n this.infinity = new ECPointFp(this, null, null);\n}\n\nfunction curveFpGetQ() {\n return this.q;\n}\n\nfunction curveFpGetA() {\n return this.a;\n}\n\nfunction curveFpGetB() {\n return this.b;\n}\n\nfunction curveFpEquals(a) {\n if (a == this) {\n return true;\n }\n\n return this.q.equals(a.q) && this.a.equals(a.a) && this.b.equals(a.b);\n}\n\nfunction curveFpGetInfinity() {\n return this.infinity;\n}\n\nfunction curveFpFromBigInteger(a) {\n return new ECFieldElementFp(this.q, a);\n}\n\nfunction curveFpDecodePointHex(d) {\n switch (parseInt(d.substr(0, 2), 16)) {\n case 0:\n return this.infinity;\n\n case 2:\n case 3:\n return null;\n\n case 4:\n case 6:\n case 7:\n var a = (d.length - 2) / 2;\n var c = d.substr(2, a);\n var b = d.substr(a + 2, a);\n return new ECPointFp(this, this.fromBigInteger(new BigInteger(c, 16)), this.fromBigInteger(new BigInteger(b, 16)));\n\n default:\n return null;\n }\n}\n\nECCurveFp.prototype.getQ = curveFpGetQ;\nECCurveFp.prototype.getA = curveFpGetA;\nECCurveFp.prototype.getB = curveFpGetB;\nECCurveFp.prototype.equals = curveFpEquals;\nECCurveFp.prototype.getInfinity = curveFpGetInfinity;\nECCurveFp.prototype.fromBigInteger = curveFpFromBigInteger;\nECCurveFp.prototype.decodePointHex = curveFpDecodePointHex;\n/*! (c) Stefan Thomas | https://github.com/bitcoinjs/bitcoinjs-lib\n */\n\nECFieldElementFp.prototype.getByteLength = function () {\n return Math.floor((this.toBigInteger().bitLength() + 7) / 8);\n};\n\nECPointFp.prototype.getEncoded = function (c) {\n var d = function d(h, f) {\n var g = h.toByteArrayUnsigned();\n\n if (f < g.length) {\n g = g.slice(g.length - f);\n } else {\n while (f > g.length) {\n g.unshift(0);\n }\n }\n\n return g;\n };\n\n var a = this.getX().toBigInteger();\n var e = this.getY().toBigInteger();\n var b = d(a, 32);\n\n if (c) {\n if (e.isEven()) {\n b.unshift(2);\n } else {\n b.unshift(3);\n }\n } else {\n b.unshift(4);\n b = b.concat(d(e, 32));\n }\n\n return b;\n};\n\nECPointFp.decodeFrom = function (g, c) {\n var f = c[0];\n var e = c.length - 1;\n var d = c.slice(1, 1 + e / 2);\n var b = c.slice(1 + e / 2, 1 + e);\n d.unshift(0);\n b.unshift(0);\n var a = new BigInteger(d);\n var h = new BigInteger(b);\n return new ECPointFp(g, g.fromBigInteger(a), g.fromBigInteger(h));\n};\n\nECPointFp.decodeFromHex = function (g, c) {\n var f = c.substr(0, 2);\n var e = c.length - 2;\n var d = c.substr(2, e / 2);\n var b = c.substr(2 + e / 2, e / 2);\n var a = new BigInteger(d, 16);\n var h = new BigInteger(b, 16);\n return new ECPointFp(g, g.fromBigInteger(a), g.fromBigInteger(h));\n};\n\nECPointFp.prototype.add2D = function (c) {\n if (this.isInfinity()) {\n return c;\n }\n\n if (c.isInfinity()) {\n return this;\n }\n\n if (this.x.equals(c.x)) {\n if (this.y.equals(c.y)) {\n return this.twice();\n }\n\n return this.curve.getInfinity();\n }\n\n var g = c.x.subtract(this.x);\n var e = c.y.subtract(this.y);\n var a = e.divide(g);\n var d = a.square().subtract(this.x).subtract(c.x);\n var f = a.multiply(this.x.subtract(d)).subtract(this.y);\n return new ECPointFp(this.curve, d, f);\n};\n\nECPointFp.prototype.twice2D = function () {\n if (this.isInfinity()) {\n return this;\n }\n\n if (this.y.toBigInteger().signum() == 0) {\n return this.curve.getInfinity();\n }\n\n var b = this.curve.fromBigInteger(BigInteger.valueOf(2));\n var e = this.curve.fromBigInteger(BigInteger.valueOf(3));\n var a = this.x.square().multiply(e).add(this.curve.a).divide(this.y.multiply(b));\n var c = a.square().subtract(this.x.multiply(b));\n var d = a.multiply(this.x.subtract(c)).subtract(this.y);\n return new ECPointFp(this.curve, c, d);\n};\n\nECPointFp.prototype.multiply2D = function (b) {\n if (this.isInfinity()) {\n return this;\n }\n\n if (b.signum() == 0) {\n return this.curve.getInfinity();\n }\n\n var g = b;\n var f = g.multiply(new BigInteger(\"3\"));\n var l = this.negate();\n var d = this;\n var c;\n\n for (c = f.bitLength() - 2; c > 0; --c) {\n d = d.twice();\n var a = f.testBit(c);\n var j = g.testBit(c);\n\n if (a != j) {\n d = d.add2D(a ? this : l);\n }\n }\n\n return d;\n};\n\nECPointFp.prototype.isOnCurve = function () {\n var d = this.getX().toBigInteger();\n var i = this.getY().toBigInteger();\n var f = this.curve.getA().toBigInteger();\n var c = this.curve.getB().toBigInteger();\n var h = this.curve.getQ();\n var e = i.multiply(i).mod(h);\n var g = d.multiply(d).multiply(d).add(f.multiply(d)).add(c).mod(h);\n return e.equals(g);\n};\n\nECPointFp.prototype.toString = function () {\n return \"(\" + this.getX().toBigInteger().toString() + \",\" + this.getY().toBigInteger().toString() + \")\";\n};\n\nECPointFp.prototype.validate = function () {\n var c = this.curve.getQ();\n\n if (this.isInfinity()) {\n throw new Error(\"Point is at infinity.\");\n }\n\n var a = this.getX().toBigInteger();\n var b = this.getY().toBigInteger();\n\n if (a.compareTo(BigInteger.ONE) < 0 || a.compareTo(c.subtract(BigInteger.ONE)) > 0) {\n throw new Error(\"x coordinate out of bounds\");\n }\n\n if (b.compareTo(BigInteger.ONE) < 0 || b.compareTo(c.subtract(BigInteger.ONE)) > 0) {\n throw new Error(\"y coordinate out of bounds\");\n }\n\n if (!this.isOnCurve()) {\n throw new Error(\"Point is not on the curve.\");\n }\n\n if (this.multiply(c).isInfinity()) {\n throw new Error(\"Point is not a scalar multiple of G.\");\n }\n\n return true;\n};\n/*! Mike Samuel (c) 2009 | code.google.com/p/json-sans-eval\n */\n\n\nvar jsonParse = function () {\n var e = \"(?:-?\\\\b(?:0|[1-9][0-9]*)(?:\\\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\\\b)\";\n var j = '(?:[^\\\\0-\\\\x08\\\\x0a-\\\\x1f\"\\\\\\\\]|\\\\\\\\(?:[\"/\\\\\\\\bfnrt]|u[0-9A-Fa-f]{4}))';\n var i = '(?:\"' + j + '*\")';\n var d = new RegExp(\"(?:false|true|null|[\\\\{\\\\}\\\\[\\\\]]|\" + e + \"|\" + i + \")\", \"g\");\n var k = new RegExp(\"\\\\\\\\(?:([^u])|u(.{4}))\", \"g\");\n var g = {\n '\"': '\"',\n \"/\": \"/\",\n \"\\\\\": \"\\\\\",\n b: \"\\b\",\n f: \"\\f\",\n n: \"\\n\",\n r: \"\\r\",\n t: \"\\t\"\n };\n\n function h(l, m, n) {\n return m ? g[m] : String.fromCharCode(parseInt(n, 16));\n }\n\n var c = new String(\"\");\n var a = \"\\\\\";\n var f = {\n \"{\": Object,\n \"[\": Array\n };\n var b = Object.hasOwnProperty;\n return function (u, q) {\n var p = u.match(d);\n var x;\n var v = p[0];\n var l = false;\n\n if (\"{\" === v) {\n x = {};\n } else {\n if (\"[\" === v) {\n x = [];\n } else {\n x = [];\n l = true;\n }\n }\n\n var t;\n var r = [x];\n\n for (var o = 1 - l, m = p.length; o < m; ++o) {\n v = p[o];\n var w;\n\n switch (v.charCodeAt(0)) {\n default:\n w = r[0];\n w[t || w.length] = +v;\n t = void 0;\n break;\n\n case 34:\n v = v.substring(1, v.length - 1);\n\n if (v.indexOf(a) !== -1) {\n v = v.replace(k, h);\n }\n\n w = r[0];\n\n if (!t) {\n if (w instanceof Array) {\n t = w.length;\n } else {\n t = v || c;\n break;\n }\n }\n\n w[t] = v;\n t = void 0;\n break;\n\n case 91:\n w = r[0];\n r.unshift(w[t || w.length] = []);\n t = void 0;\n break;\n\n case 93:\n r.shift();\n break;\n\n case 102:\n w = r[0];\n w[t || w.length] = false;\n t = void 0;\n break;\n\n case 110:\n w = r[0];\n w[t || w.length] = null;\n t = void 0;\n break;\n\n case 116:\n w = r[0];\n w[t || w.length] = true;\n t = void 0;\n break;\n\n case 123:\n w = r[0];\n r.unshift(w[t || w.length] = {});\n t = void 0;\n break;\n\n case 125:\n r.shift();\n break;\n }\n }\n\n if (l) {\n if (r.length !== 1) {\n throw new Error();\n }\n\n x = x[0];\n } else {\n if (r.length) {\n throw new Error();\n }\n }\n\n if (q) {\n var s = function s(C, B) {\n var D = C[B];\n\n if (D && _typeof(D) === \"object\") {\n var n = null;\n\n for (var z in D) {\n if (b.call(D, z) && D !== C) {\n var y = s(D, z);\n\n if (y !== void 0) {\n D[z] = y;\n } else {\n if (!n) {\n n = [];\n }\n\n n.push(z);\n }\n }\n }\n\n if (n) {\n for (var A = n.length; --A >= 0;) {\n delete D[n[A]];\n }\n }\n }\n\n return q.call(C, B, D);\n };\n\n x = s({\n \"\": x\n }, \"\");\n }\n\n return x;\n };\n}();\n\nif (typeof KJUR == \"undefined\" || !KJUR) {\n KJUR = {};\n}\n\nif (typeof KJUR.asn1 == \"undefined\" || !KJUR.asn1) {\n KJUR.asn1 = {};\n}\n\nKJUR.asn1.ASN1Util = new function () {\n this.integerToByteHex = function (a) {\n var b = a.toString(16);\n\n if (b.length % 2 == 1) {\n b = \"0\" + b;\n }\n\n return b;\n };\n\n this.bigIntToMinTwosComplementsHex = function (j) {\n var f = j.toString(16);\n\n if (f.substr(0, 1) != \"-\") {\n if (f.length % 2 == 1) {\n f = \"0\" + f;\n } else {\n if (!f.match(/^[0-7]/)) {\n f = \"00\" + f;\n }\n }\n } else {\n var a = f.substr(1);\n var e = a.length;\n\n if (e % 2 == 1) {\n e += 1;\n } else {\n if (!f.match(/^[0-7]/)) {\n e += 2;\n }\n }\n\n var g = \"\";\n\n for (var d = 0; d < e; d++) {\n g += \"f\";\n }\n\n var c = new BigInteger(g, 16);\n var b = c.xor(j).add(BigInteger.ONE);\n f = b.toString(16).replace(/^-/, \"\");\n }\n\n return f;\n };\n\n this.getPEMStringFromHex = function (a, b) {\n return hextopem(a, b);\n };\n\n this.newObject = function (k) {\n var F = KJUR,\n o = F.asn1,\n v = o.ASN1Object,\n B = o.DERBoolean,\n e = o.DERInteger,\n t = o.DERBitString,\n h = o.DEROctetString,\n x = o.DERNull,\n y = o.DERObjectIdentifier,\n m = o.DEREnumerated,\n g = o.DERUTF8String,\n f = o.DERNumericString,\n A = o.DERPrintableString,\n w = o.DERTeletexString,\n q = o.DERIA5String,\n E = o.DERUTCTime,\n j = o.DERGeneralizedTime,\n b = o.DERVisibleString,\n l = o.DERBMPString,\n n = o.DERSequence,\n c = o.DERSet,\n s = o.DERTaggedObject,\n p = o.ASN1Util.newObject;\n\n if (k instanceof o.ASN1Object) {\n return k;\n }\n\n var u = Object.keys(k);\n\n if (u.length != 1) {\n throw new Error(\"key of param shall be only one.\");\n }\n\n var H = u[0];\n\n if (\":asn1:bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:visstr:bmpstr:seq:set:tag:\".indexOf(\":\" + H + \":\") == -1) {\n throw new Error(\"undefined key: \" + H);\n }\n\n if (H == \"bool\") {\n return new B(k[H]);\n }\n\n if (H == \"int\") {\n return new e(k[H]);\n }\n\n if (H == \"bitstr\") {\n return new t(k[H]);\n }\n\n if (H == \"octstr\") {\n return new h(k[H]);\n }\n\n if (H == \"null\") {\n return new x(k[H]);\n }\n\n if (H == \"oid\") {\n return new y(k[H]);\n }\n\n if (H == \"enum\") {\n return new m(k[H]);\n }\n\n if (H == \"utf8str\") {\n return new g(k[H]);\n }\n\n if (H == \"numstr\") {\n return new f(k[H]);\n }\n\n if (H == \"prnstr\") {\n return new A(k[H]);\n }\n\n if (H == \"telstr\") {\n return new w(k[H]);\n }\n\n if (H == \"ia5str\") {\n return new q(k[H]);\n }\n\n if (H == \"utctime\") {\n return new E(k[H]);\n }\n\n if (H == \"gentime\") {\n return new j(k[H]);\n }\n\n if (H == \"visstr\") {\n return new b(k[H]);\n }\n\n if (H == \"bmpstr\") {\n return new l(k[H]);\n }\n\n if (H == \"asn1\") {\n return new v(k[H]);\n }\n\n if (H == \"seq\") {\n var d = k[H];\n var G = [];\n\n for (var z = 0; z < d.length; z++) {\n var D = p(d[z]);\n G.push(D);\n }\n\n return new n({\n array: G\n });\n }\n\n if (H == \"set\") {\n var d = k[H];\n var G = [];\n\n for (var z = 0; z < d.length; z++) {\n var D = p(d[z]);\n G.push(D);\n }\n\n return new c({\n array: G\n });\n }\n\n if (H == \"tag\") {\n var C = k[H];\n\n if (Object.prototype.toString.call(C) === \"[object Array]\" && C.length == 3) {\n var r = p(C[2]);\n return new s({\n tag: C[0],\n explicit: C[1],\n obj: r\n });\n } else {\n return new s(C);\n }\n }\n };\n\n this.jsonToASN1HEX = function (b) {\n var a = this.newObject(b);\n return a.getEncodedHex();\n };\n}();\n\nKJUR.asn1.ASN1Util.oidHexToInt = function (a) {\n var j = \"\";\n var k = parseInt(a.substr(0, 2), 16);\n var d = Math.floor(k / 40);\n var c = k % 40;\n var j = d + \".\" + c;\n var e = \"\";\n\n for (var f = 2; f < a.length; f += 2) {\n var g = parseInt(a.substr(f, 2), 16);\n var h = (\"00000000\" + g.toString(2)).slice(-8);\n e = e + h.substr(1, 7);\n\n if (h.substr(0, 1) == \"0\") {\n var b = new BigInteger(e, 2);\n j = j + \".\" + b.toString(10);\n e = \"\";\n }\n }\n\n return j;\n};\n\nKJUR.asn1.ASN1Util.oidIntToHex = function (f) {\n var e = function e(a) {\n var k = a.toString(16);\n\n if (k.length == 1) {\n k = \"0\" + k;\n }\n\n return k;\n };\n\n var d = function d(o) {\n var n = \"\";\n var k = new BigInteger(o, 10);\n var a = k.toString(2);\n var l = 7 - a.length % 7;\n\n if (l == 7) {\n l = 0;\n }\n\n var q = \"\";\n\n for (var m = 0; m < l; m++) {\n q += \"0\";\n }\n\n a = q + a;\n\n for (var m = 0; m < a.length - 1; m += 7) {\n var p = a.substr(m, 7);\n\n if (m != a.length - 7) {\n p = \"1\" + p;\n }\n\n n += e(parseInt(p, 2));\n }\n\n return n;\n };\n\n if (!f.match(/^[0-9.]+$/)) {\n throw \"malformed oid string: \" + f;\n }\n\n var g = \"\";\n var b = f.split(\".\");\n var j = parseInt(b[0]) * 40 + parseInt(b[1]);\n g += e(j);\n b.splice(0, 2);\n\n for (var c = 0; c < b.length; c++) {\n g += d(b[c]);\n }\n\n return g;\n};\n\nKJUR.asn1.ASN1Object = function (e) {\n var c = true;\n var b = null;\n var d = \"00\";\n var f = \"00\";\n var a = \"\";\n this.params = null;\n\n this.getLengthHexFromValue = function () {\n if (typeof this.hV == \"undefined\" || this.hV == null) {\n throw new Error(\"this.hV is null or undefined\");\n }\n\n if (this.hV.length % 2 == 1) {\n throw new Error(\"value hex must be even length: n=\" + a.length + \",v=\" + this.hV);\n }\n\n var j = this.hV.length / 2;\n var i = j.toString(16);\n\n if (i.length % 2 == 1) {\n i = \"0\" + i;\n }\n\n if (j < 128) {\n return i;\n } else {\n var h = i.length / 2;\n\n if (h > 15) {\n throw \"ASN.1 length too long to represent by 8x: n = \" + j.toString(16);\n }\n\n var g = 128 + h;\n return g.toString(16) + i;\n }\n };\n\n this.getEncodedHex = function () {\n if (this.hTLV == null || this.isModified) {\n this.hV = this.getFreshValueHex();\n this.hL = this.getLengthHexFromValue();\n this.hTLV = this.hT + this.hL + this.hV;\n this.isModified = false;\n }\n\n return this.hTLV;\n };\n\n this.getValueHex = function () {\n this.getEncodedHex();\n return this.hV;\n };\n\n this.getFreshValueHex = function () {\n return \"\";\n };\n\n this.setByParam = function (g) {\n this.params = g;\n };\n\n if (e != undefined) {\n if (e.tlv != undefined) {\n this.hTLV = e.tlv;\n this.isModified = false;\n }\n }\n};\n\nKJUR.asn1.DERAbstractString = function (c) {\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\n var b = null;\n var a = null;\n\n this.getString = function () {\n return this.s;\n };\n\n this.setString = function (d) {\n this.hTLV = null;\n this.isModified = true;\n this.s = d;\n this.hV = utf8tohex(this.s).toLowerCase();\n };\n\n this.setStringHex = function (d) {\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = d;\n };\n\n this.getFreshValueHex = function () {\n return this.hV;\n };\n\n if (typeof c != \"undefined\") {\n if (typeof c == \"string\") {\n this.setString(c);\n } else {\n if (typeof c.str != \"undefined\") {\n this.setString(c.str);\n } else {\n if (typeof c.hex != \"undefined\") {\n this.setStringHex(c.hex);\n }\n }\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.DERAbstractTime = function (c) {\n KJUR.asn1.DERAbstractTime.superclass.constructor.call(this);\n var b = null;\n var a = null;\n\n this.localDateToUTC = function (g) {\n var e = g.getTime() + g.getTimezoneOffset() * 60000;\n var f = new Date(e);\n return f;\n };\n\n this.formatDate = function (m, o, e) {\n var g = this.zeroPadding;\n var n = this.localDateToUTC(m);\n var p = String(n.getFullYear());\n\n if (o == \"utc\") {\n p = p.substr(2, 2);\n }\n\n var l = g(String(n.getMonth() + 1), 2);\n var q = g(String(n.getDate()), 2);\n var h = g(String(n.getHours()), 2);\n var i = g(String(n.getMinutes()), 2);\n var j = g(String(n.getSeconds()), 2);\n var r = p + l + q + h + i + j;\n\n if (e === true) {\n var f = n.getMilliseconds();\n\n if (f != 0) {\n var k = g(String(f), 3);\n k = k.replace(/[0]+$/, \"\");\n r = r + \".\" + k;\n }\n }\n\n return r + \"Z\";\n };\n\n this.zeroPadding = function (e, d) {\n if (e.length >= d) {\n return e;\n }\n\n return new Array(d - e.length + 1).join(\"0\") + e;\n };\n\n this.getString = function () {\n return this.s;\n };\n\n this.setString = function (d) {\n this.hTLV = null;\n this.isModified = true;\n this.s = d;\n this.hV = stohex(d);\n };\n\n this.setByDateValue = function (h, j, e, d, f, g) {\n var i = new Date(Date.UTC(h, j - 1, e, d, f, g, 0));\n this.setByDate(i);\n };\n\n this.getFreshValueHex = function () {\n return this.hV;\n };\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.DERAbstractStructured = function (b) {\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\n var a = null;\n\n this.setByASN1ObjectArray = function (c) {\n this.hTLV = null;\n this.isModified = true;\n this.asn1Array = c;\n };\n\n this.appendASN1Object = function (c) {\n this.hTLV = null;\n this.isModified = true;\n this.asn1Array.push(c);\n };\n\n this.asn1Array = new Array();\n\n if (typeof b != \"undefined\") {\n if (typeof b.array != \"undefined\") {\n this.asn1Array = b.array;\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.DERBoolean = function (a) {\n KJUR.asn1.DERBoolean.superclass.constructor.call(this);\n this.hT = \"01\";\n\n if (a == false) {\n this.hTLV = \"010100\";\n } else {\n this.hTLV = \"0101ff\";\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.DERInteger = function (a) {\n KJUR.asn1.DERInteger.superclass.constructor.call(this);\n this.hT = \"02\";\n\n this.setByBigInteger = function (b) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(b);\n };\n\n this.setByInteger = function (c) {\n var b = new BigInteger(String(c), 10);\n this.setByBigInteger(b);\n };\n\n this.setValueHex = function (b) {\n this.hV = b;\n };\n\n this.getFreshValueHex = function () {\n return this.hV;\n };\n\n if (typeof a != \"undefined\") {\n if (typeof a.bigint != \"undefined\") {\n this.setByBigInteger(a.bigint);\n } else {\n if (typeof a[\"int\"] != \"undefined\") {\n this.setByInteger(a[\"int\"]);\n } else {\n if (typeof a == \"number\") {\n this.setByInteger(a);\n } else {\n if (typeof a.hex != \"undefined\") {\n this.setValueHex(a.hex);\n }\n }\n }\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.DERBitString = function (b) {\n if (b !== undefined && typeof b.obj !== \"undefined\") {\n var a = KJUR.asn1.ASN1Util.newObject(b.obj);\n b.hex = \"00\" + a.getEncodedHex();\n }\n\n KJUR.asn1.DERBitString.superclass.constructor.call(this);\n this.hT = \"03\";\n\n this.setHexValueIncludingUnusedBits = function (c) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = c;\n };\n\n this.setUnusedBitsAndHexValue = function (c, e) {\n if (c < 0 || 7 < c) {\n throw \"unused bits shall be from 0 to 7: u = \" + c;\n }\n\n var d = \"0\" + c;\n this.hTLV = null;\n this.isModified = true;\n this.hV = d + e;\n };\n\n this.setByBinaryString = function (e) {\n e = e.replace(/0+$/, \"\");\n var f = 8 - e.length % 8;\n\n if (f == 8) {\n f = 0;\n }\n\n for (var g = 0; g <= f; g++) {\n e += \"0\";\n }\n\n var j = \"\";\n\n for (var g = 0; g < e.length - 1; g += 8) {\n var d = e.substr(g, 8);\n var c = parseInt(d, 2).toString(16);\n\n if (c.length == 1) {\n c = \"0\" + c;\n }\n\n j += c;\n }\n\n this.hTLV = null;\n this.isModified = true;\n this.hV = \"0\" + f + j;\n };\n\n this.setByBooleanArray = function (e) {\n var d = \"\";\n\n for (var c = 0; c < e.length; c++) {\n if (e[c] == true) {\n d += \"1\";\n } else {\n d += \"0\";\n }\n }\n\n this.setByBinaryString(d);\n };\n\n this.newFalseArray = function (e) {\n var c = new Array(e);\n\n for (var d = 0; d < e; d++) {\n c[d] = false;\n }\n\n return c;\n };\n\n this.getFreshValueHex = function () {\n return this.hV;\n };\n\n if (typeof b != \"undefined\") {\n if (typeof b == \"string\" && b.toLowerCase().match(/^[0-9a-f]+$/)) {\n this.setHexValueIncludingUnusedBits(b);\n } else {\n if (typeof b.hex != \"undefined\") {\n this.setHexValueIncludingUnusedBits(b.hex);\n } else {\n if (typeof b.bin != \"undefined\") {\n this.setByBinaryString(b.bin);\n } else {\n if (typeof b.array != \"undefined\") {\n this.setByBooleanArray(b.array);\n }\n }\n }\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.DEROctetString = function (b) {\n if (b !== undefined && typeof b.obj !== \"undefined\") {\n var a = KJUR.asn1.ASN1Util.newObject(b.obj);\n b.hex = a.getEncodedHex();\n }\n\n KJUR.asn1.DEROctetString.superclass.constructor.call(this, b);\n this.hT = \"04\";\n};\n\nYAHOO.lang.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString);\n\nKJUR.asn1.DERNull = function () {\n KJUR.asn1.DERNull.superclass.constructor.call(this);\n this.hT = \"05\";\n this.hTLV = \"0500\";\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.DERObjectIdentifier = function (a) {\n KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this);\n this.hT = \"06\";\n\n this.setValueHex = function (b) {\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = b;\n };\n\n this.setValueOidString = function (b) {\n var c = oidtohex(b);\n\n if (c == null) {\n throw new Error(\"malformed oid string: \" + b);\n }\n\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = c;\n };\n\n this.setValueName = function (c) {\n var b = KJUR.asn1.x509.OID.name2oid(c);\n\n if (b !== \"\") {\n this.setValueOidString(b);\n } else {\n throw new Error(\"DERObjectIdentifier oidName undefined: \" + c);\n }\n };\n\n this.setValueNameOrOid = function (b) {\n if (b.match(/^[0-2].[0-9.]+$/)) {\n this.setValueOidString(b);\n } else {\n this.setValueName(b);\n }\n };\n\n this.getFreshValueHex = function () {\n return this.hV;\n };\n\n this.setByParam = function (b) {\n if (typeof b === \"string\") {\n this.setValueNameOrOid(b);\n } else {\n if (b.oid !== undefined) {\n this.setValueNameOrOid(b.oid);\n } else {\n if (b.name !== undefined) {\n this.setValueNameOrOid(b.name);\n } else {\n if (b.hex !== undefined) {\n this.setValueHex(b.hex);\n }\n }\n }\n }\n };\n\n if (a !== undefined) {\n this.setByParam(a);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.DEREnumerated = function (a) {\n KJUR.asn1.DEREnumerated.superclass.constructor.call(this);\n this.hT = \"0a\";\n\n this.setByBigInteger = function (b) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(b);\n };\n\n this.setByInteger = function (c) {\n var b = new BigInteger(String(c), 10);\n this.setByBigInteger(b);\n };\n\n this.setValueHex = function (b) {\n this.hV = b;\n };\n\n this.getFreshValueHex = function () {\n return this.hV;\n };\n\n if (typeof a != \"undefined\") {\n if (typeof a[\"int\"] != \"undefined\") {\n this.setByInteger(a[\"int\"]);\n } else {\n if (typeof a == \"number\") {\n this.setByInteger(a);\n } else {\n if (typeof a.hex != \"undefined\") {\n this.setValueHex(a.hex);\n }\n }\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.DERUTF8String = function (a) {\n KJUR.asn1.DERUTF8String.superclass.constructor.call(this, a);\n this.hT = \"0c\";\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString);\n\nKJUR.asn1.DERNumericString = function (a) {\n KJUR.asn1.DERNumericString.superclass.constructor.call(this, a);\n this.hT = \"12\";\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString);\n\nKJUR.asn1.DERPrintableString = function (a) {\n KJUR.asn1.DERPrintableString.superclass.constructor.call(this, a);\n this.hT = \"13\";\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString);\n\nKJUR.asn1.DERTeletexString = function (a) {\n KJUR.asn1.DERTeletexString.superclass.constructor.call(this, a);\n this.hT = \"14\";\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString);\n\nKJUR.asn1.DERIA5String = function (a) {\n KJUR.asn1.DERIA5String.superclass.constructor.call(this, a);\n this.hT = \"16\";\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString);\n\nKJUR.asn1.DERVisibleString = function (a) {\n KJUR.asn1.DERIA5String.superclass.constructor.call(this, a);\n this.hT = \"1a\";\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERVisibleString, KJUR.asn1.DERAbstractString);\n\nKJUR.asn1.DERBMPString = function (a) {\n KJUR.asn1.DERBMPString.superclass.constructor.call(this, a);\n this.hT = \"1e\";\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERBMPString, KJUR.asn1.DERAbstractString);\n\nKJUR.asn1.DERUTCTime = function (a) {\n KJUR.asn1.DERUTCTime.superclass.constructor.call(this, a);\n this.hT = \"17\";\n\n this.setByDate = function (b) {\n this.hTLV = null;\n this.isModified = true;\n this.date = b;\n this.s = this.formatDate(this.date, \"utc\");\n this.hV = stohex(this.s);\n };\n\n this.getFreshValueHex = function () {\n if (typeof this.date == \"undefined\" && typeof this.s == \"undefined\") {\n this.date = new Date();\n this.s = this.formatDate(this.date, \"utc\");\n this.hV = stohex(this.s);\n }\n\n return this.hV;\n };\n\n if (a !== undefined) {\n if (a.str !== undefined) {\n this.setString(a.str);\n } else {\n if (typeof a == \"string\" && a.match(/^[0-9]{12}Z$/)) {\n this.setString(a);\n } else {\n if (a.hex !== undefined) {\n this.setStringHex(a.hex);\n } else {\n if (a.date !== undefined) {\n this.setByDate(a.date);\n }\n }\n }\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime);\n\nKJUR.asn1.DERGeneralizedTime = function (a) {\n KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, a);\n this.hT = \"18\";\n this.withMillis = false;\n\n this.setByDate = function (b) {\n this.hTLV = null;\n this.isModified = true;\n this.date = b;\n this.s = this.formatDate(this.date, \"gen\", this.withMillis);\n this.hV = stohex(this.s);\n };\n\n this.getFreshValueHex = function () {\n if (this.date === undefined && this.s === undefined) {\n this.date = new Date();\n this.s = this.formatDate(this.date, \"gen\", this.withMillis);\n this.hV = stohex(this.s);\n }\n\n return this.hV;\n };\n\n if (a !== undefined) {\n if (a.str !== undefined) {\n this.setString(a.str);\n } else {\n if (typeof a == \"string\" && a.match(/^[0-9]{14}Z$/)) {\n this.setString(a);\n } else {\n if (a.hex !== undefined) {\n this.setStringHex(a.hex);\n } else {\n if (a.date !== undefined) {\n this.setByDate(a.date);\n }\n }\n }\n }\n\n if (a.millis === true) {\n this.withMillis = true;\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime);\n\nKJUR.asn1.DERSequence = function (a) {\n KJUR.asn1.DERSequence.superclass.constructor.call(this, a);\n this.hT = \"30\";\n\n this.getFreshValueHex = function () {\n var c = \"\";\n\n for (var b = 0; b < this.asn1Array.length; b++) {\n var d = this.asn1Array[b];\n c += d.getEncodedHex();\n }\n\n this.hV = c;\n return this.hV;\n };\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured);\n\nKJUR.asn1.DERSet = function (a) {\n KJUR.asn1.DERSet.superclass.constructor.call(this, a);\n this.hT = \"31\";\n this.sortFlag = true;\n\n this.getFreshValueHex = function () {\n var b = new Array();\n\n for (var c = 0; c < this.asn1Array.length; c++) {\n var d = this.asn1Array[c];\n b.push(d.getEncodedHex());\n }\n\n if (this.sortFlag == true) {\n b.sort();\n }\n\n this.hV = b.join(\"\");\n return this.hV;\n };\n\n if (typeof a != \"undefined\") {\n if (typeof a.sortflag != \"undefined\" && a.sortflag == false) {\n this.sortFlag = false;\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured);\n\nKJUR.asn1.DERTaggedObject = function (b) {\n KJUR.asn1.DERTaggedObject.superclass.constructor.call(this);\n var a = KJUR.asn1;\n this.hT = \"a0\";\n this.hV = \"\";\n this.isExplicit = true;\n this.asn1Object = null;\n\n this.setASN1Object = function (c, d, e) {\n this.hT = d;\n this.isExplicit = c;\n this.asn1Object = e;\n\n if (this.isExplicit) {\n this.hV = this.asn1Object.getEncodedHex();\n this.hTLV = null;\n this.isModified = true;\n } else {\n this.hV = null;\n this.hTLV = e.getEncodedHex();\n this.hTLV = this.hTLV.replace(/^../, d);\n this.isModified = false;\n }\n };\n\n this.getFreshValueHex = function () {\n return this.hV;\n };\n\n this.setByParam = function (c) {\n if (c.tag != undefined) {\n this.hT = c.tag;\n }\n\n if (c.explicit != undefined) {\n this.isExplicit = c.explicit;\n }\n\n if (c.tage != undefined) {\n this.hT = c.tage;\n this.isExplicit = true;\n }\n\n if (c.tagi != undefined) {\n this.hT = c.tagi;\n this.isExplicit = false;\n }\n\n if (c.obj != undefined) {\n if (c.obj instanceof a.ASN1Object) {\n this.asn1Object = c.obj;\n this.setASN1Object(this.isExplicit, this.hT, this.asn1Object);\n } else {\n if (_typeof(c.obj) == \"object\") {\n this.asn1Object = a.ASN1Util.newObject(c.obj);\n this.setASN1Object(this.isExplicit, this.hT, this.asn1Object);\n }\n }\n }\n };\n\n if (b != undefined) {\n this.setByParam(b);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);\nvar ASN1HEX = new function () {}();\n\nASN1HEX.getLblen = function (c, a) {\n if (c.substr(a + 2, 1) != \"8\") {\n return 1;\n }\n\n var b = parseInt(c.substr(a + 3, 1));\n\n if (b == 0) {\n return -1;\n }\n\n if (0 < b && b < 10) {\n return b + 1;\n }\n\n return -2;\n};\n\nASN1HEX.getL = function (c, b) {\n var a = ASN1HEX.getLblen(c, b);\n\n if (a < 1) {\n return \"\";\n }\n\n return c.substr(b + 2, a * 2);\n};\n\nASN1HEX.getVblen = function (d, a) {\n var c, b;\n c = ASN1HEX.getL(d, a);\n\n if (c == \"\") {\n return -1;\n }\n\n if (c.substr(0, 1) === \"8\") {\n b = new BigInteger(c.substr(2), 16);\n } else {\n b = new BigInteger(c, 16);\n }\n\n return b.intValue();\n};\n\nASN1HEX.getVidx = function (c, b) {\n var a = ASN1HEX.getLblen(c, b);\n\n if (a < 0) {\n return a;\n }\n\n return b + (a + 1) * 2;\n};\n\nASN1HEX.getV = function (d, a) {\n var c = ASN1HEX.getVidx(d, a);\n var b = ASN1HEX.getVblen(d, a);\n return d.substr(c, b * 2);\n};\n\nASN1HEX.getTLV = function (b, a) {\n return b.substr(a, 2) + ASN1HEX.getL(b, a) + ASN1HEX.getV(b, a);\n};\n\nASN1HEX.getTLVblen = function (b, a) {\n return 2 + ASN1HEX.getLblen(b, a) * 2 + ASN1HEX.getVblen(b, a) * 2;\n};\n\nASN1HEX.getNextSiblingIdx = function (d, a) {\n var c = ASN1HEX.getVidx(d, a);\n var b = ASN1HEX.getVblen(d, a);\n return c + b * 2;\n};\n\nASN1HEX.getChildIdx = function (e, k) {\n var l = ASN1HEX;\n var j = [];\n var c, f, g;\n c = l.getVidx(e, k);\n f = l.getVblen(e, k) * 2;\n\n if (e.substr(k, 2) == \"03\") {\n c += 2;\n f -= 2;\n }\n\n g = 0;\n var d = c;\n\n while (g <= f) {\n var b = l.getTLVblen(e, d);\n g += b;\n\n if (g <= f) {\n j.push(d);\n }\n\n d += b;\n\n if (g >= f) {\n break;\n }\n }\n\n return j;\n};\n\nASN1HEX.getNthChildIdx = function (d, b, e) {\n var c = ASN1HEX.getChildIdx(d, b);\n return c[e];\n};\n\nASN1HEX.getIdxbyList = function (e, d, c, i) {\n var g = ASN1HEX;\n var f, b;\n\n if (c.length == 0) {\n if (i !== undefined) {\n if (e.substr(d, 2) !== i) {\n return -1;\n }\n }\n\n return d;\n }\n\n f = c.shift();\n b = g.getChildIdx(e, d);\n\n if (f >= b.length) {\n return -1;\n }\n\n return g.getIdxbyList(e, b[f], c, i);\n};\n\nASN1HEX.getIdxbyListEx = function (f, k, b, g) {\n var m = ASN1HEX;\n var d, l;\n\n if (b.length == 0) {\n if (g !== undefined) {\n if (f.substr(k, 2) !== g) {\n return -1;\n }\n }\n\n return k;\n }\n\n d = b.shift();\n l = m.getChildIdx(f, k);\n var j = 0;\n\n for (var e = 0; e < l.length; e++) {\n var c = f.substr(l[e], 2);\n\n if (typeof d == \"number\" && !m.isContextTag(c) && j == d || typeof d == \"string\" && m.isContextTag(c, d)) {\n return m.getIdxbyListEx(f, l[e], b, g);\n }\n\n if (!m.isContextTag(c)) {\n j++;\n }\n }\n\n return -1;\n};\n\nASN1HEX.getTLVbyList = function (d, c, b, f) {\n var e = ASN1HEX;\n var a = e.getIdxbyList(d, c, b, f);\n\n if (a == -1) {\n return null;\n }\n\n if (a >= d.length) {\n return null;\n }\n\n return e.getTLV(d, a);\n};\n\nASN1HEX.getTLVbyListEx = function (d, c, b, f) {\n var e = ASN1HEX;\n var a = e.getIdxbyListEx(d, c, b, f);\n\n if (a == -1) {\n return null;\n }\n\n return e.getTLV(d, a);\n};\n\nASN1HEX.getVbyList = function (e, c, b, g, i) {\n var f = ASN1HEX;\n var a, d;\n a = f.getIdxbyList(e, c, b, g);\n\n if (a == -1) {\n return null;\n }\n\n if (a >= e.length) {\n return null;\n }\n\n d = f.getV(e, a);\n\n if (i === true) {\n d = d.substr(2);\n }\n\n return d;\n};\n\nASN1HEX.getVbyListEx = function (b, e, a, d, f) {\n var j = ASN1HEX;\n var g, c, i;\n g = j.getIdxbyListEx(b, e, a, d);\n\n if (g == -1) {\n return null;\n }\n\n i = j.getV(b, g);\n\n if (b.substr(g, 2) == \"03\" && f !== false) {\n i = i.substr(2);\n }\n\n return i;\n};\n\nASN1HEX.getInt = function (e, b, f) {\n if (f == undefined) {\n f = -1;\n }\n\n try {\n var c = e.substr(b, 2);\n\n if (c != \"02\" && c != \"03\") {\n return f;\n }\n\n var a = ASN1HEX.getV(e, b);\n\n if (c == \"02\") {\n return parseInt(a, 16);\n } else {\n return bitstrtoint(a);\n }\n } catch (d) {\n return f;\n }\n};\n\nASN1HEX.getOID = function (c, a, d) {\n if (d == undefined) {\n d = null;\n }\n\n try {\n if (c.substr(a, 2) != \"06\") {\n return d;\n }\n\n var e = ASN1HEX.getV(c, a);\n return hextooid(e);\n } catch (b) {\n return d;\n }\n};\n\nASN1HEX.getOIDName = function (d, a, f) {\n if (f == undefined) {\n f = null;\n }\n\n try {\n var e = ASN1HEX.getOID(d, a, f);\n\n if (e == f) {\n return f;\n }\n\n var b = KJUR.asn1.x509.OID.oid2name(e);\n\n if (b == \"\") {\n return e;\n }\n\n return b;\n } catch (c) {\n return f;\n }\n};\n\nASN1HEX.getString = function (d, b, e) {\n if (e == undefined) {\n e = null;\n }\n\n try {\n var a = ASN1HEX.getV(d, b);\n return hextorstr(a);\n } catch (c) {\n return e;\n }\n};\n\nASN1HEX.hextooidstr = function (e) {\n var h = function h(b, a) {\n if (b.length >= a) {\n return b;\n }\n\n return new Array(a - b.length + 1).join(\"0\") + b;\n };\n\n var l = [];\n var o = e.substr(0, 2);\n var f = parseInt(o, 16);\n l[0] = new String(Math.floor(f / 40));\n l[1] = new String(f % 40);\n var m = e.substr(2);\n var k = [];\n\n for (var g = 0; g < m.length / 2; g++) {\n k.push(parseInt(m.substr(g * 2, 2), 16));\n }\n\n var j = [];\n var d = \"\";\n\n for (var g = 0; g < k.length; g++) {\n if (k[g] & 128) {\n d = d + h((k[g] & 127).toString(2), 7);\n } else {\n d = d + h((k[g] & 127).toString(2), 7);\n j.push(new String(parseInt(d, 2)));\n d = \"\";\n }\n }\n\n var n = l.join(\".\");\n\n if (j.length > 0) {\n n = n + \".\" + j.join(\".\");\n }\n\n return n;\n};\n\nASN1HEX.dump = function (t, c, l, g) {\n var p = ASN1HEX;\n var j = p.getV;\n var y = p.dump;\n var w = p.getChildIdx;\n var e = t;\n\n if (t instanceof KJUR.asn1.ASN1Object) {\n e = t.getEncodedHex();\n }\n\n var q = function q(A, i) {\n if (A.length <= i * 2) {\n return A;\n } else {\n var v = A.substr(0, i) + \"..(total \" + A.length / 2 + \"bytes)..\" + A.substr(A.length - i, i);\n return v;\n }\n };\n\n if (c === undefined) {\n c = {\n ommit_long_octet: 32\n };\n }\n\n if (l === undefined) {\n l = 0;\n }\n\n if (g === undefined) {\n g = \"\";\n }\n\n var x = c.ommit_long_octet;\n var z = e.substr(l, 2);\n\n if (z == \"01\") {\n var h = j(e, l);\n\n if (h == \"00\") {\n return g + \"BOOLEAN FALSE\\n\";\n } else {\n return g + \"BOOLEAN TRUE\\n\";\n }\n }\n\n if (z == \"02\") {\n var h = j(e, l);\n return g + \"INTEGER \" + q(h, x) + \"\\n\";\n }\n\n if (z == \"03\") {\n var h = j(e, l);\n\n if (p.isASN1HEX(h.substr(2))) {\n var k = g + \"BITSTRING, encapsulates\\n\";\n k = k + y(h.substr(2), c, 0, g + \" \");\n return k;\n } else {\n return g + \"BITSTRING \" + q(h, x) + \"\\n\";\n }\n }\n\n if (z == \"04\") {\n var h = j(e, l);\n\n if (p.isASN1HEX(h)) {\n var k = g + \"OCTETSTRING, encapsulates\\n\";\n k = k + y(h, c, 0, g + \" \");\n return k;\n } else {\n return g + \"OCTETSTRING \" + q(h, x) + \"\\n\";\n }\n }\n\n if (z == \"05\") {\n return g + \"NULL\\n\";\n }\n\n if (z == \"06\") {\n var m = j(e, l);\n var b = KJUR.asn1.ASN1Util.oidHexToInt(m);\n var o = KJUR.asn1.x509.OID.oid2name(b);\n var a = b.replace(/\\./g, \" \");\n\n if (o != \"\") {\n return g + \"ObjectIdentifier \" + o + \" (\" + a + \")\\n\";\n } else {\n return g + \"ObjectIdentifier (\" + a + \")\\n\";\n }\n }\n\n if (z == \"0a\") {\n return g + \"ENUMERATED \" + parseInt(j(e, l)) + \"\\n\";\n }\n\n if (z == \"0c\") {\n return g + \"UTF8String '\" + hextoutf8(j(e, l)) + \"'\\n\";\n }\n\n if (z == \"13\") {\n return g + \"PrintableString '\" + hextoutf8(j(e, l)) + \"'\\n\";\n }\n\n if (z == \"14\") {\n return g + \"TeletexString '\" + hextoutf8(j(e, l)) + \"'\\n\";\n }\n\n if (z == \"16\") {\n return g + \"IA5String '\" + hextoutf8(j(e, l)) + \"'\\n\";\n }\n\n if (z == \"17\") {\n return g + \"UTCTime \" + hextoutf8(j(e, l)) + \"\\n\";\n }\n\n if (z == \"18\") {\n return g + \"GeneralizedTime \" + hextoutf8(j(e, l)) + \"\\n\";\n }\n\n if (z == \"1a\") {\n return g + \"VisualString '\" + hextoutf8(j(e, l)) + \"'\\n\";\n }\n\n if (z == \"1e\") {\n return g + \"BMPString '\" + ucs2hextoutf8(j(e, l)) + \"'\\n\";\n }\n\n if (z == \"30\") {\n if (e.substr(l, 4) == \"3000\") {\n return g + \"SEQUENCE {}\\n\";\n }\n\n var k = g + \"SEQUENCE\\n\";\n var d = w(e, l);\n var f = c;\n\n if ((d.length == 2 || d.length == 3) && e.substr(d[0], 2) == \"06\" && e.substr(d[d.length - 1], 2) == \"04\") {\n var o = p.oidname(j(e, d[0]));\n var r = JSON.parse(JSON.stringify(c));\n r.x509ExtName = o;\n f = r;\n }\n\n for (var u = 0; u < d.length; u++) {\n k = k + y(e, f, d[u], g + \" \");\n }\n\n return k;\n }\n\n if (z == \"31\") {\n var k = g + \"SET\\n\";\n var d = w(e, l);\n\n for (var u = 0; u < d.length; u++) {\n k = k + y(e, c, d[u], g + \" \");\n }\n\n return k;\n }\n\n var z = parseInt(z, 16);\n\n if ((z & 128) != 0) {\n var n = z & 31;\n\n if ((z & 32) != 0) {\n var k = g + \"[\" + n + \"]\\n\";\n var d = w(e, l);\n\n for (var u = 0; u < d.length; u++) {\n k = k + y(e, c, d[u], g + \" \");\n }\n\n return k;\n } else {\n var h = j(e, l);\n\n if (ASN1HEX.isASN1HEX(h)) {\n var k = g + \"[\" + n + \"]\\n\";\n k = k + y(h, c, 0, g + \" \");\n return k;\n } else {\n if (h.substr(0, 8) == \"68747470\") {\n h = hextoutf8(h);\n } else {\n if (c.x509ExtName === \"subjectAltName\" && n == 2) {\n h = hextoutf8(h);\n }\n }\n }\n\n var k = g + \"[\" + n + \"] \" + h + \"\\n\";\n return k;\n }\n }\n\n return g + \"UNKNOWN(\" + z + \") \" + j(e, l) + \"\\n\";\n};\n\nASN1HEX.isContextTag = function (c, b) {\n c = c.toLowerCase();\n var f, e;\n\n try {\n f = parseInt(c, 16);\n } catch (d) {\n return -1;\n }\n\n if (b === undefined) {\n if ((f & 192) == 128) {\n return true;\n } else {\n return false;\n }\n }\n\n try {\n var a = b.match(/^\\[[0-9]+\\]$/);\n\n if (a == null) {\n return false;\n }\n\n e = parseInt(b.substr(1, b.length - 1), 10);\n\n if (e > 31) {\n return false;\n }\n\n if ((f & 192) == 128 && (f & 31) == e) {\n return true;\n }\n\n return false;\n } catch (d) {\n return false;\n }\n};\n\nASN1HEX.isASN1HEX = function (e) {\n var d = ASN1HEX;\n\n if (e.length % 2 == 1) {\n return false;\n }\n\n var c = d.getVblen(e, 0);\n var b = e.substr(0, 2);\n var f = d.getL(e, 0);\n var a = e.length - b.length - f.length;\n\n if (a == c * 2) {\n return true;\n }\n\n return false;\n};\n\nASN1HEX.checkStrictDER = function (g, o, d, c, r) {\n var s = ASN1HEX;\n\n if (d === undefined) {\n if (typeof g != \"string\") {\n throw new Error(\"not hex string\");\n }\n\n g = g.toLowerCase();\n\n if (!KJUR.lang.String.isHex(g)) {\n throw new Error(\"not hex string\");\n }\n\n d = g.length;\n c = g.length / 2;\n\n if (c < 128) {\n r = 1;\n } else {\n r = Math.ceil(c.toString(16)) + 1;\n }\n }\n\n var k = s.getL(g, o);\n\n if (k.length > r * 2) {\n throw new Error(\"L of TLV too long: idx=\" + o);\n }\n\n var n = s.getVblen(g, o);\n\n if (n > c) {\n throw new Error(\"value of L too long than hex: idx=\" + o);\n }\n\n var q = s.getTLV(g, o);\n var f = q.length - 2 - s.getL(g, o).length;\n\n if (f !== n * 2) {\n throw new Error(\"V string length and L's value not the same:\" + f + \"/\" + n * 2);\n }\n\n if (o === 0) {\n if (g.length != q.length) {\n throw new Error(\"total length and TLV length unmatch:\" + g.length + \"!=\" + q.length);\n }\n }\n\n var b = g.substr(o, 2);\n\n if (b === \"02\") {\n var a = s.getVidx(g, o);\n\n if (g.substr(a, 2) == \"00\" && g.charCodeAt(a + 2) < 56) {\n throw new Error(\"not least zeros for DER INTEGER\");\n }\n }\n\n if (parseInt(b, 16) & 32) {\n var p = s.getVblen(g, o);\n var m = 0;\n var l = s.getChildIdx(g, o);\n\n for (var e = 0; e < l.length; e++) {\n var j = s.getTLV(g, l[e]);\n m += j.length;\n s.checkStrictDER(g, l[e], d, c, r);\n }\n\n if (p * 2 != m) {\n throw new Error(\"sum of children's TLV length and L unmatch: \" + p * 2 + \"!=\" + m);\n }\n }\n};\n\nASN1HEX.oidname = function (a) {\n var c = KJUR.asn1;\n\n if (KJUR.lang.String.isHex(a)) {\n a = c.ASN1Util.oidHexToInt(a);\n }\n\n var b = c.x509.OID.oid2name(a);\n\n if (b === \"\") {\n b = a;\n }\n\n return b;\n};\n\nif (typeof KJUR == \"undefined\" || !KJUR) {\n KJUR = {};\n}\n\nif (typeof KJUR.asn1 == \"undefined\" || !KJUR.asn1) {\n KJUR.asn1 = {};\n}\n\nif (typeof KJUR.asn1.x509 == \"undefined\" || !KJUR.asn1.x509) {\n KJUR.asn1.x509 = {};\n}\n\nKJUR.asn1.x509.Certificate = function (h) {\n KJUR.asn1.x509.Certificate.superclass.constructor.call(this);\n var d = KJUR,\n c = d.asn1,\n f = c.DERBitString,\n b = c.DERSequence,\n g = c.x509,\n a = g.TBSCertificate,\n e = g.AlgorithmIdentifier;\n this.params = undefined;\n\n this.setByParam = function (i) {\n this.params = i;\n };\n\n this.sign = function () {\n var l = this.params;\n var k = l.sigalg;\n\n if (l.sigalg.name != undefined) {\n k = l.sigalg.name;\n }\n\n var i = l.tbsobj.getEncodedHex();\n var j = new KJUR.crypto.Signature({\n alg: k\n });\n j.init(l.cakey);\n j.updateHex(i);\n l.sighex = j.sign();\n };\n\n this.getPEM = function () {\n return hextopem(this.getEncodedHex(), \"CERTIFICATE\");\n };\n\n this.getEncodedHex = function () {\n var k = this.params;\n\n if (k.tbsobj == undefined || k.tbsobj == null) {\n k.tbsobj = new a(k);\n }\n\n if (k.sighex == undefined && k.cakey != undefined) {\n this.sign();\n }\n\n if (k.sighex == undefined) {\n throw new Error(\"sighex or cakey parameter not defined\");\n }\n\n var i = [];\n i.push(k.tbsobj);\n i.push(new e({\n name: k.sigalg\n }));\n i.push(new f({\n hex: \"00\" + k.sighex\n }));\n var j = new b({\n array: i\n });\n return j.getEncodedHex();\n };\n\n if (h != undefined) {\n this.params = h;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.Certificate, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.TBSCertificate = function (f) {\n KJUR.asn1.x509.TBSCertificate.superclass.constructor.call(this);\n var b = KJUR,\n i = b.asn1,\n d = i.x509,\n c = i.DERTaggedObject,\n h = i.DERInteger,\n g = i.DERSequence,\n l = d.AlgorithmIdentifier,\n e = d.Time,\n a = d.X500Name,\n j = d.Extensions,\n k = d.SubjectPublicKeyInfo;\n this.params = null;\n\n this.setByParam = function (m) {\n this.params = m;\n };\n\n this.getEncodedHex = function () {\n var n = [];\n var q = this.params;\n\n if (q.version != undefined || q.version != 1) {\n var m = 2;\n\n if (q.version != undefined) {\n m = q.version - 1;\n }\n\n var p = new c({\n obj: new h({\n \"int\": m\n })\n });\n n.push(p);\n }\n\n n.push(new h(q.serial));\n n.push(new l({\n name: q.sigalg\n }));\n n.push(new a(q.issuer));\n n.push(new g({\n array: [new e(q.notbefore), new e(q.notafter)]\n }));\n n.push(new a(q.subject));\n n.push(new k(KEYUTIL.getKey(q.sbjpubkey)));\n\n if (q.ext !== undefined && q.ext.length > 0) {\n n.push(new c({\n tag: \"a3\",\n obj: new j(q.ext)\n }));\n }\n\n var o = new KJUR.asn1.DERSequence({\n array: n\n });\n return o.getEncodedHex();\n };\n\n if (f !== undefined) {\n this.setByParam(f);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.TBSCertificate, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.Extensions = function (d) {\n KJUR.asn1.x509.Extensions.superclass.constructor.call(this);\n var c = KJUR,\n b = c.asn1,\n a = b.DERSequence,\n e = b.x509;\n this.aParam = [];\n\n this.setByParam = function (f) {\n this.aParam = f;\n };\n\n this.getEncodedHex = function () {\n var f = [];\n\n for (var h = 0; h < this.aParam.length; h++) {\n var l = this.aParam[h];\n var k = l.extname;\n var j = null;\n\n if (l.extn != undefined) {\n j = new e.PrivateExtension(l);\n } else {\n if (k == \"subjectKeyIdentifier\") {\n j = new e.SubjectKeyIdentifier(l);\n } else {\n if (k == \"keyUsage\") {\n j = new e.KeyUsage(l);\n } else {\n if (k == \"subjectAltName\") {\n j = new e.SubjectAltName(l);\n } else {\n if (k == \"issuerAltName\") {\n j = new e.IssuerAltName(l);\n } else {\n if (k == \"basicConstraints\") {\n j = new e.BasicConstraints(l);\n } else {\n if (k == \"cRLDistributionPoints\") {\n j = new e.CRLDistributionPoints(l);\n } else {\n if (k == \"certificatePolicies\") {\n j = new e.CertificatePolicies(l);\n } else {\n if (k == \"authorityKeyIdentifier\") {\n j = new e.AuthorityKeyIdentifier(l);\n } else {\n if (k == \"extKeyUsage\") {\n j = new e.ExtKeyUsage(l);\n } else {\n if (k == \"authorityInfoAccess\") {\n j = new e.AuthorityInfoAccess(l);\n } else {\n if (k == \"cRLNumber\") {\n j = new e.CRLNumber(l);\n } else {\n if (k == \"cRLReason\") {\n j = new e.CRLReason(l);\n } else {\n if (k == \"ocspNonce\") {\n j = new e.OCSPNonce(l);\n } else {\n if (k == \"ocspNoCheck\") {\n j = new e.OCSPNoCheck(l);\n } else {\n if (k == \"adobeTimeStamp\") {\n j = new e.AdobeTimeStamp(l);\n } else {\n if (k == \"subjectDirectoryAttributes\") {\n j = new e.SubjectDirectoryAttributes(l);\n } else {\n throw new Error(\"extension not supported:\" + JSON.stringify(l));\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n if (j != null) {\n f.push(j);\n }\n }\n\n var g = new a({\n array: f\n });\n return g.getEncodedHex();\n };\n\n if (d != undefined) {\n this.setByParam(d);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.Extensions, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.Extension = function (d) {\n KJUR.asn1.x509.Extension.superclass.constructor.call(this);\n var f = null,\n a = KJUR,\n e = a.asn1,\n h = e.DERObjectIdentifier,\n i = e.DEROctetString,\n b = e.DERBitString,\n g = e.DERBoolean,\n c = e.DERSequence;\n\n this.getEncodedHex = function () {\n var m = new h({\n oid: this.oid\n });\n var l = new i({\n hex: this.getExtnValueHex()\n });\n var k = new Array();\n k.push(m);\n\n if (this.critical) {\n k.push(new g());\n }\n\n k.push(l);\n var j = new c({\n array: k\n });\n return j.getEncodedHex();\n };\n\n this.critical = false;\n\n if (d !== undefined) {\n if (d.critical !== undefined) {\n this.critical = d.critical;\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.Extension, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.KeyUsage = function (f) {\n KJUR.asn1.x509.KeyUsage.superclass.constructor.call(this, f);\n var a = X509.KEYUSAGE_NAME;\n\n this.getExtnValueHex = function () {\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.oid = \"2.5.29.15\";\n\n if (f !== undefined) {\n if (f.bin !== undefined) {\n this.asn1ExtnValue = new KJUR.asn1.DERBitString(f);\n }\n\n if (f.names !== undefined && f.names.length !== undefined) {\n var e = f.names;\n var d = \"000000000\";\n\n for (var c = 0; c < e.length; c++) {\n for (var b = 0; b < a.length; b++) {\n if (e[c] === a[b]) {\n d = d.substring(0, b) + \"1\" + d.substring(b + 1, d.length);\n }\n }\n }\n\n this.asn1ExtnValue = new KJUR.asn1.DERBitString({\n bin: d\n });\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.KeyUsage, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.BasicConstraints = function (g) {\n KJUR.asn1.x509.BasicConstraints.superclass.constructor.call(this, g);\n var c = KJUR.asn1,\n e = c.DERBoolean,\n f = c.DERInteger,\n b = c.DERSequence;\n var a = false;\n var d = -1;\n\n this.getExtnValueHex = function () {\n var i = new Array();\n\n if (this.cA) {\n i.push(new e());\n }\n\n if (this.pathLen > -1) {\n i.push(new f({\n \"int\": this.pathLen\n }));\n }\n\n var h = new b({\n array: i\n });\n this.asn1ExtnValue = h;\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.oid = \"2.5.29.19\";\n this.cA = false;\n this.pathLen = -1;\n\n if (g !== undefined) {\n if (g.cA !== undefined) {\n this.cA = g.cA;\n }\n\n if (g.pathLen !== undefined) {\n this.pathLen = g.pathLen;\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.BasicConstraints, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.CRLDistributionPoints = function (d) {\n KJUR.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this, d);\n var b = KJUR,\n a = b.asn1,\n c = a.x509;\n\n this.getExtnValueHex = function () {\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.setByDPArray = function (e) {\n var f = [];\n\n for (var g = 0; g < e.length; g++) {\n if (e[g] instanceof KJUR.asn1.ASN1Object) {\n f.push(e[g]);\n } else {\n var h = new c.DistributionPoint(e[g]);\n f.push(h);\n }\n }\n\n this.asn1ExtnValue = new a.DERSequence({\n array: f\n });\n };\n\n this.setByOneURI = function (f) {\n var e = new c.DistributionPoint({\n fulluri: f\n });\n this.setByDPArray([e]);\n };\n\n this.oid = \"2.5.29.31\";\n\n if (d !== undefined) {\n if (d.array !== undefined) {\n this.setByDPArray(d.array);\n } else {\n if (d.uri !== undefined) {\n this.setByOneURI(d.uri);\n }\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.CRLDistributionPoints, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.DistributionPoint = function (e) {\n KJUR.asn1.x509.DistributionPoint.superclass.constructor.call(this);\n var a = null,\n c = KJUR,\n b = c.asn1,\n d = b.x509.DistributionPointName;\n\n this.getEncodedHex = function () {\n var f = new b.DERSequence();\n\n if (this.asn1DP != null) {\n var g = new b.DERTaggedObject({\n explicit: true,\n tag: \"a0\",\n obj: this.asn1DP\n });\n f.appendASN1Object(g);\n }\n\n this.hTLV = f.getEncodedHex();\n return this.hTLV;\n };\n\n if (e !== undefined) {\n if (e.dpobj !== undefined) {\n this.asn1DP = e.dpobj;\n } else {\n if (e.dpname !== undefined) {\n this.asn1DP = new d(e.dpname);\n } else {\n if (e.fulluri !== undefined) {\n this.asn1DP = new d({\n full: [{\n uri: e.fulluri\n }]\n });\n }\n }\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.DistributionPoint, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.DistributionPointName = function (h) {\n KJUR.asn1.x509.DistributionPointName.superclass.constructor.call(this);\n var g = null,\n d = null,\n a = null,\n f = null,\n c = KJUR,\n b = c.asn1,\n e = b.DERTaggedObject;\n\n this.getEncodedHex = function () {\n if (this.type != \"full\") {\n throw new Error(\"currently type shall be 'full': \" + this.type);\n }\n\n this.asn1Obj = new e({\n explicit: false,\n tag: this.tag,\n obj: this.asn1V\n });\n this.hTLV = this.asn1Obj.getEncodedHex();\n return this.hTLV;\n };\n\n if (h !== undefined) {\n if (b.x509.GeneralNames.prototype.isPrototypeOf(h)) {\n this.type = \"full\";\n this.tag = \"a0\";\n this.asn1V = h;\n } else {\n if (h.full !== undefined) {\n this.type = \"full\";\n this.tag = \"a0\";\n this.asn1V = new b.x509.GeneralNames(h.full);\n } else {\n throw new Error(\"This class supports GeneralNames only as argument\");\n }\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.DistributionPointName, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.CertificatePolicies = function (f) {\n KJUR.asn1.x509.CertificatePolicies.superclass.constructor.call(this, f);\n var c = KJUR,\n b = c.asn1,\n e = b.x509,\n a = b.DERSequence,\n d = e.PolicyInformation;\n this.params = null;\n\n this.getExtnValueHex = function () {\n var j = [];\n\n for (var h = 0; h < this.params.array.length; h++) {\n j.push(new d(this.params.array[h]));\n }\n\n var g = new a({\n array: j\n });\n this.asn1ExtnValue = g;\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.oid = \"2.5.29.32\";\n\n if (f !== undefined) {\n this.params = f;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.CertificatePolicies, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.PolicyInformation = function (d) {\n KJUR.asn1.x509.PolicyInformation.superclass.constructor.call(this, d);\n var c = KJUR.asn1,\n b = c.DERSequence,\n e = c.DERObjectIdentifier,\n a = c.x509.PolicyQualifierInfo;\n this.params = null;\n\n this.getEncodedHex = function () {\n if (this.params.policyoid === undefined && this.params.array === undefined) {\n throw new Error(\"parameter oid and array missing\");\n }\n\n var f = [new e(this.params.policyoid)];\n\n if (this.params.array !== undefined) {\n var j = [];\n\n for (var h = 0; h < this.params.array.length; h++) {\n j.push(new a(this.params.array[h]));\n }\n\n if (j.length > 0) {\n f.push(new b({\n array: j\n }));\n }\n }\n\n var g = new b({\n array: f\n });\n return g.getEncodedHex();\n };\n\n if (d !== undefined) {\n this.params = d;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.PolicyInformation, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.PolicyQualifierInfo = function (e) {\n KJUR.asn1.x509.PolicyQualifierInfo.superclass.constructor.call(this, e);\n var c = KJUR.asn1,\n b = c.DERSequence,\n d = c.DERIA5String,\n f = c.DERObjectIdentifier,\n a = c.x509.UserNotice;\n this.params = null;\n\n this.getEncodedHex = function () {\n if (this.params.cps !== undefined) {\n var g = new b({\n array: [new f({\n oid: \"1.3.6.1.5.5.7.2.1\"\n }), new d({\n str: this.params.cps\n })]\n });\n return g.getEncodedHex();\n }\n\n if (this.params.unotice != undefined) {\n var g = new b({\n array: [new f({\n oid: \"1.3.6.1.5.5.7.2.2\"\n }), new a(this.params.unotice)]\n });\n return g.getEncodedHex();\n }\n };\n\n if (e !== undefined) {\n this.params = e;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.PolicyQualifierInfo, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.UserNotice = function (e) {\n KJUR.asn1.x509.UserNotice.superclass.constructor.call(this, e);\n var a = KJUR.asn1.DERSequence,\n d = KJUR.asn1.DERInteger,\n c = KJUR.asn1.x509.DisplayText,\n b = KJUR.asn1.x509.NoticeReference;\n this.params = null;\n\n this.getEncodedHex = function () {\n var f = [];\n\n if (this.params.noticeref !== undefined) {\n f.push(new b(this.params.noticeref));\n }\n\n if (this.params.exptext !== undefined) {\n f.push(new c(this.params.exptext));\n }\n\n var g = new a({\n array: f\n });\n return g.getEncodedHex();\n };\n\n if (e !== undefined) {\n this.params = e;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.UserNotice, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.NoticeReference = function (d) {\n KJUR.asn1.x509.NoticeReference.superclass.constructor.call(this, d);\n var a = KJUR.asn1.DERSequence,\n c = KJUR.asn1.DERInteger,\n b = KJUR.asn1.x509.DisplayText;\n this.params = null;\n\n this.getEncodedHex = function () {\n var f = [];\n\n if (this.params.org !== undefined) {\n f.push(new b(this.params.org));\n }\n\n if (this.params.noticenum !== undefined) {\n var h = [];\n var e = this.params.noticenum;\n\n for (var j = 0; j < e.length; j++) {\n h.push(new c(e[j]));\n }\n\n f.push(new a({\n array: h\n }));\n }\n\n if (f.length == 0) {\n throw new Error(\"parameter is empty\");\n }\n\n var g = new a({\n array: f\n });\n return g.getEncodedHex();\n };\n\n if (d !== undefined) {\n this.params = d;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.NoticeReference, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.DisplayText = function (a) {\n KJUR.asn1.x509.DisplayText.superclass.constructor.call(this, a);\n this.hT = \"0c\";\n\n if (a !== undefined) {\n if (a.type === \"ia5\") {\n this.hT = \"16\";\n } else {\n if (a.type === \"vis\") {\n this.hT = \"1a\";\n } else {\n if (a.type === \"bmp\") {\n this.hT = \"1e\";\n }\n }\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.DisplayText, KJUR.asn1.DERAbstractString);\n\nKJUR.asn1.x509.ExtKeyUsage = function (c) {\n KJUR.asn1.x509.ExtKeyUsage.superclass.constructor.call(this, c);\n var b = KJUR,\n a = b.asn1;\n\n this.setPurposeArray = function (d) {\n this.asn1ExtnValue = new a.DERSequence();\n\n for (var e = 0; e < d.length; e++) {\n var f = new a.DERObjectIdentifier(d[e]);\n this.asn1ExtnValue.appendASN1Object(f);\n }\n };\n\n this.getExtnValueHex = function () {\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.oid = \"2.5.29.37\";\n\n if (c !== undefined) {\n if (c.array !== undefined) {\n this.setPurposeArray(c.array);\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.ExtKeyUsage, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.AuthorityKeyIdentifier = function (f) {\n KJUR.asn1.x509.AuthorityKeyIdentifier.superclass.constructor.call(this, f);\n var b = KJUR,\n a = b.asn1,\n d = a.DERTaggedObject,\n e = a.x509.GeneralNames,\n c = b.crypto.Util.isKey;\n this.asn1KID = null;\n this.asn1CertIssuer = null;\n this.asn1CertSN = null;\n\n this.getExtnValueHex = function () {\n var h = new Array();\n\n if (this.asn1KID) {\n h.push(new d({\n explicit: false,\n tag: \"80\",\n obj: this.asn1KID\n }));\n }\n\n if (this.asn1CertIssuer) {\n h.push(new d({\n explicit: false,\n tag: \"a1\",\n obj: new e([{\n dn: this.asn1CertIssuer\n }])\n }));\n }\n\n if (this.asn1CertSN) {\n h.push(new d({\n explicit: false,\n tag: \"82\",\n obj: this.asn1CertSN\n }));\n }\n\n var g = new a.DERSequence({\n array: h\n });\n this.asn1ExtnValue = g;\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.setKIDByParam = function (i) {\n if (i.str !== undefined || i.hex !== undefined) {\n this.asn1KID = new KJUR.asn1.DEROctetString(i);\n } else {\n if (_typeof(i) === \"object\" && KJUR.crypto.Util.isKey(i) || typeof i === \"string\" && i.indexOf(\"BEGIN \") != -1) {\n var h = i;\n\n if (typeof i === \"string\") {\n h = KEYUTIL.getKey(i);\n }\n\n var g = KEYUTIL.getKeyID(h);\n this.asn1KID = new KJUR.asn1.DEROctetString({\n hex: g\n });\n }\n }\n };\n\n this.setCertIssuerByParam = function (g) {\n if (g.str !== undefined || g.ldapstr !== undefined || g.hex !== undefined || g.certsubject !== undefined || g.certissuer !== undefined) {\n this.asn1CertIssuer = new KJUR.asn1.x509.X500Name(g);\n } else {\n if (typeof g === \"string\" && g.indexOf(\"BEGIN \") != -1 && g.indexOf(\"CERTIFICATE\") != -1) {\n this.asn1CertIssuer = new KJUR.asn1.x509.X500Name({\n certissuer: g\n });\n }\n }\n };\n\n this.setCertSNByParam = function (i) {\n if (i.str !== undefined || i.bigint !== undefined || i.hex !== undefined) {\n this.asn1CertSN = new KJUR.asn1.DERInteger(i);\n } else {\n if (typeof i === \"string\" && i.indexOf(\"BEGIN \") != -1 && i.indexOf(\"CERTIFICATE\")) {\n var g = new X509();\n g.readCertPEM(i);\n var h = g.getSerialNumberHex();\n this.asn1CertSN = new KJUR.asn1.DERInteger({\n hex: h\n });\n }\n }\n };\n\n this.oid = \"2.5.29.35\";\n\n if (f !== undefined) {\n if (f.kid !== undefined) {\n this.setKIDByParam(f.kid);\n }\n\n if (f.issuer !== undefined) {\n this.setCertIssuerByParam(f.issuer);\n }\n\n if (f.sn !== undefined) {\n this.setCertSNByParam(f.sn);\n }\n\n if (f.issuersn !== undefined && typeof f.issuersn === \"string\" && f.issuersn.indexOf(\"BEGIN \") != -1 && f.issuersn.indexOf(\"CERTIFICATE\")) {\n this.setCertSNByParam(f.issuersn);\n this.setCertIssuerByParam(f.issuersn);\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.AuthorityKeyIdentifier, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.SubjectKeyIdentifier = function (d) {\n KJUR.asn1.x509.SubjectKeyIdentifier.superclass.constructor.call(this, d);\n var b = KJUR,\n a = b.asn1,\n c = a.DEROctetString;\n this.asn1KID = null;\n\n this.getExtnValueHex = function () {\n this.asn1ExtnValue = this.asn1KID;\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.setKIDByParam = function (g) {\n if (g.str !== undefined || g.hex !== undefined) {\n this.asn1KID = new c(g);\n } else {\n if (_typeof(g) === \"object\" && KJUR.crypto.Util.isKey(g) || typeof g === \"string\" && g.indexOf(\"BEGIN\") != -1) {\n var f = g;\n\n if (typeof g === \"string\") {\n f = KEYUTIL.getKey(g);\n }\n\n var e = KEYUTIL.getKeyID(f);\n this.asn1KID = new KJUR.asn1.DEROctetString({\n hex: e\n });\n }\n }\n };\n\n this.oid = \"2.5.29.14\";\n\n if (d !== undefined) {\n if (d.kid !== undefined) {\n this.setKIDByParam(d.kid);\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.SubjectKeyIdentifier, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.AuthorityInfoAccess = function (a) {\n KJUR.asn1.x509.AuthorityInfoAccess.superclass.constructor.call(this, a);\n\n this.setAccessDescriptionArray = function (k) {\n var d = new Array(),\n b = KJUR,\n g = b.asn1,\n c = g.DERSequence,\n j = g.DERObjectIdentifier,\n l = g.x509.GeneralName;\n\n for (var f = 0; f < k.length; f++) {\n var e;\n var h = k[f];\n\n if (h.ocsp !== undefined) {\n e = new c({\n array: [new j({\n oid: \"1.3.6.1.5.5.7.48.1\"\n }), new l({\n uri: h.ocsp\n })]\n });\n } else {\n if (h.caissuer !== undefined) {\n e = new c({\n array: [new j({\n oid: \"1.3.6.1.5.5.7.48.2\"\n }), new l({\n uri: h.caissuer\n })]\n });\n } else {\n throw new Error(\"unknown AccessMethod parameter: \" + JSON.stringify(h));\n }\n }\n\n d.push(e);\n }\n\n this.asn1ExtnValue = new c({\n array: d\n });\n };\n\n this.getExtnValueHex = function () {\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.oid = \"1.3.6.1.5.5.7.1.1\";\n\n if (a !== undefined) {\n if (a.array !== undefined) {\n this.setAccessDescriptionArray(a.array);\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.AuthorityInfoAccess, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.SubjectAltName = function (a) {\n KJUR.asn1.x509.SubjectAltName.superclass.constructor.call(this, a);\n\n this.setNameArray = function (b) {\n this.asn1ExtnValue = new KJUR.asn1.x509.GeneralNames(b);\n };\n\n this.getExtnValueHex = function () {\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.oid = \"2.5.29.17\";\n\n if (a !== undefined) {\n if (a.array !== undefined) {\n this.setNameArray(a.array);\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.SubjectAltName, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.IssuerAltName = function (a) {\n KJUR.asn1.x509.IssuerAltName.superclass.constructor.call(this, a);\n\n this.setNameArray = function (b) {\n this.asn1ExtnValue = new KJUR.asn1.x509.GeneralNames(b);\n };\n\n this.getExtnValueHex = function () {\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.oid = \"2.5.29.18\";\n\n if (a !== undefined) {\n if (a.array !== undefined) {\n this.setNameArray(a.array);\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.IssuerAltName, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.SubjectDirectoryAttributes = function (e) {\n KJUR.asn1.x509.SubjectDirectoryAttributes.superclass.constructor.call(this, e);\n var c = KJUR.asn1,\n a = c.DERSequence,\n b = c.ASN1Util.newObject,\n d = c.x509.OID.name2oid;\n this.params = null;\n\n this.getExtnValueHex = function () {\n var f = [];\n\n for (var j = 0; j < this.params.array.length; j++) {\n var k = this.params.array[j];\n var h = {\n seq: [{\n oid: \"1.2.3.4\"\n }, {\n set: [{\n utf8str: \"DE\"\n }]\n }]\n };\n\n if (k.attr == \"dateOfBirth\") {\n h.seq[0].oid = d(k.attr);\n h.seq[1].set[0] = {\n gentime: k.str\n };\n } else {\n if (k.attr == \"placeOfBirth\") {\n h.seq[0].oid = d(k.attr);\n h.seq[1].set[0] = {\n utf8str: k.str\n };\n } else {\n if (k.attr == \"gender\") {\n h.seq[0].oid = d(k.attr);\n h.seq[1].set[0] = {\n prnstr: k.str\n };\n } else {\n if (k.attr == \"countryOfCitizenship\") {\n h.seq[0].oid = d(k.attr);\n h.seq[1].set[0] = {\n prnstr: k.str\n };\n } else {\n if (k.attr == \"countryOfResidence\") {\n h.seq[0].oid = d(k.attr);\n h.seq[1].set[0] = {\n prnstr: k.str\n };\n } else {\n throw new Error(\"unsupported attribute: \" + k.attr);\n }\n }\n }\n }\n }\n\n f.push(new b(h));\n }\n\n var g = new a({\n array: f\n });\n this.asn1ExtnValue = g;\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.oid = \"2.5.29.9\";\n\n if (e !== undefined) {\n this.params = e;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.SubjectDirectoryAttributes, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.PrivateExtension = function (f) {\n KJUR.asn1.x509.PrivateExtension.superclass.constructor.call(this, f);\n var c = KJUR,\n e = c.lang.String.isHex,\n b = c.asn1,\n d = b.x509.OID.name2oid,\n a = b.ASN1Util.newObject;\n this.params = null;\n\n this.setByParam = function (g) {\n this.oid = d(g.extname);\n this.params = g;\n };\n\n this.getExtnValueHex = function () {\n if (this.params.extname == undefined || this.params.extn == undefined) {\n throw new Error(\"extname or extnhex not specified\");\n }\n\n var h = this.params.extn;\n\n if (typeof h == \"string\" && e(h)) {\n return h;\n } else {\n if (_typeof(h) == \"object\") {\n try {\n return a(h).getEncodedHex();\n } catch (g) {}\n }\n }\n\n throw new Error(\"unsupported extn value\");\n };\n\n if (f != undefined) {\n this.setByParam(f);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.PrivateExtension, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.CRL = function (g) {\n KJUR.asn1.x509.CRL.superclass.constructor.call(this);\n var c = KJUR,\n b = c.asn1,\n a = b.DERSequence,\n e = b.DERBitString,\n f = b.x509,\n d = f.AlgorithmIdentifier,\n h = f.TBSCertList;\n this.params = undefined;\n\n this.setByParam = function (i) {\n this.params = i;\n };\n\n this.sign = function () {\n var j = new h(this.params).getEncodedHex();\n var k = new KJUR.crypto.Signature({\n alg: this.params.sigalg\n });\n k.init(this.params.cakey);\n k.updateHex(j);\n var i = k.sign();\n this.params.sighex = i;\n };\n\n this.getPEM = function () {\n return hextopem(this.getEncodedHex(), \"X509 CRL\");\n };\n\n this.getEncodedHex = function () {\n var k = this.params;\n\n if (k.tbsobj == undefined) {\n k.tbsobj = new h(k);\n }\n\n if (k.sighex == undefined && k.cakey != undefined) {\n this.sign();\n }\n\n if (k.sighex == undefined) {\n throw new Error(\"sighex or cakey parameter not defined\");\n }\n\n var i = [];\n i.push(k.tbsobj);\n i.push(new d({\n name: k.sigalg\n }));\n i.push(new e({\n hex: \"00\" + k.sighex\n }));\n var j = new a({\n array: i\n });\n return j.getEncodedHex();\n };\n\n if (g != undefined) {\n this.params = g;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.CRL, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.TBSCertList = function (f) {\n KJUR.asn1.x509.TBSCertList.superclass.constructor.call(this);\n var b = KJUR,\n i = b.asn1,\n h = i.DERInteger,\n g = i.DERSequence,\n c = i.DERTaggedObject,\n k = i.DERObjectIdentifier,\n d = i.x509,\n l = d.AlgorithmIdentifier,\n e = d.Time,\n j = d.Extensions,\n a = d.X500Name;\n this.params = null;\n\n this.setByParam = function (m) {\n this.params = m;\n };\n\n this.getRevCertSequence = function () {\n var m = [];\n var n = this.params.revcert;\n\n for (var o = 0; o < n.length; o++) {\n var p = [new h(n[o].sn), new e(n[o].date)];\n\n if (n[o].ext != undefined) {\n p.push(new j(n[o].ext));\n }\n\n m.push(new g({\n array: p\n }));\n }\n\n return new g({\n array: m\n });\n };\n\n this.getEncodedHex = function () {\n var n = [];\n var r = this.params;\n\n if (r.version != undefined) {\n var m = r.version - 1;\n var p = new h({\n \"int\": m\n });\n n.push(p);\n }\n\n n.push(new l({\n name: r.sigalg\n }));\n n.push(new a(r.issuer));\n n.push(new e(r.thisupdate));\n\n if (r.nextupdate != undefined) {\n n.push(new e(r.nextupdate));\n }\n\n if (r.revcert != undefined) {\n n.push(this.getRevCertSequence());\n }\n\n if (r.ext != undefined) {\n var q = new j(r.ext);\n n.push(new c({\n tag: \"a0\",\n explicit: true,\n obj: q\n }));\n }\n\n var o = new g({\n array: n\n });\n return o.getEncodedHex();\n };\n\n if (f !== undefined) {\n this.setByParam(f);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.TBSCertList, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.CRLEntry = function (e) {\n KJUR.asn1.x509.CRLEntry.superclass.constructor.call(this);\n var d = null,\n c = null,\n b = KJUR,\n a = b.asn1;\n\n this.setCertSerial = function (f) {\n this.sn = new a.DERInteger(f);\n };\n\n this.setRevocationDate = function (f) {\n this.time = new a.x509.Time(f);\n };\n\n this.getEncodedHex = function () {\n var f = new a.DERSequence({\n array: [this.sn, this.time]\n });\n this.TLV = f.getEncodedHex();\n return this.TLV;\n };\n\n if (e !== undefined) {\n if (e.time !== undefined) {\n this.setRevocationDate(e.time);\n }\n\n if (e.sn !== undefined) {\n this.setCertSerial(e.sn);\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.CRLEntry, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.CRLNumber = function (a) {\n KJUR.asn1.x509.CRLNumber.superclass.constructor.call(this, a);\n this.params = undefined;\n\n this.getExtnValueHex = function () {\n this.asn1ExtnValue = new KJUR.asn1.DERInteger(this.params.num);\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.oid = \"2.5.29.20\";\n\n if (a != undefined) {\n this.params = a;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.CRLNumber, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.CRLReason = function (a) {\n KJUR.asn1.x509.CRLReason.superclass.constructor.call(this, a);\n this.params = undefined;\n\n this.getExtnValueHex = function () {\n this.asn1ExtnValue = new KJUR.asn1.DEREnumerated(this.params.code);\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.oid = \"2.5.29.21\";\n\n if (a != undefined) {\n this.params = a;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.CRLReason, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.OCSPNonce = function (a) {\n KJUR.asn1.x509.OCSPNonce.superclass.constructor.call(this, a);\n this.params = undefined;\n\n this.getExtnValueHex = function () {\n this.asn1ExtnValue = new KJUR.asn1.DEROctetString(this.params);\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.oid = \"1.3.6.1.5.5.7.48.1.2\";\n\n if (a != undefined) {\n this.params = a;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.OCSPNonce, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.OCSPNoCheck = function (a) {\n KJUR.asn1.x509.OCSPNoCheck.superclass.constructor.call(this, a);\n this.params = undefined;\n\n this.getExtnValueHex = function () {\n this.asn1ExtnValue = new KJUR.asn1.DERNull();\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.oid = \"1.3.6.1.5.5.7.48.1.5\";\n\n if (a != undefined) {\n this.params = a;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.OCSPNoCheck, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.AdobeTimeStamp = function (g) {\n KJUR.asn1.x509.AdobeTimeStamp.superclass.constructor.call(this, g);\n var c = KJUR,\n b = c.asn1,\n f = b.DERInteger,\n d = b.DERBoolean,\n a = b.DERSequence,\n e = b.x509.GeneralName;\n this.params = null;\n\n this.getExtnValueHex = function () {\n var i = this.params;\n var h = [new f(1)];\n h.push(new e({\n uri: i.uri\n }));\n\n if (i.reqauth != undefined) {\n h.push(new d(i.reqauth));\n }\n\n this.asn1ExtnValue = new a({\n array: h\n });\n return this.asn1ExtnValue.getEncodedHex();\n };\n\n this.oid = \"1.2.840.113583.1.1.9.1\";\n\n if (g !== undefined) {\n this.setByParam(g);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.AdobeTimeStamp, KJUR.asn1.x509.Extension);\n\nKJUR.asn1.x509.X500Name = function (f) {\n KJUR.asn1.x509.X500Name.superclass.constructor.call(this);\n this.asn1Array = [];\n this.paramArray = [];\n this.sRule = \"utf8\";\n var c = KJUR,\n b = c.asn1,\n e = b.x509,\n d = e.RDN,\n a = pemtohex;\n\n this.setByString = function (g, l) {\n if (l !== undefined) {\n this.sRule = l;\n }\n\n var k = g.split(\"/\");\n k.shift();\n var j = [];\n\n for (var m = 0; m < k.length; m++) {\n if (k[m].match(/^[^=]+=.+$/)) {\n j.push(k[m]);\n } else {\n var h = j.length - 1;\n j[h] = j[h] + \"/\" + k[m];\n }\n }\n\n for (var m = 0; m < j.length; m++) {\n this.asn1Array.push(new d({\n str: j[m],\n rule: this.sRule\n }));\n }\n };\n\n this.setByLdapString = function (g, h) {\n if (h !== undefined) {\n this.sRule = h;\n }\n\n var i = e.X500Name.ldapToCompat(g);\n this.setByString(i, h);\n };\n\n this.setByObject = function (j, i) {\n if (i !== undefined) {\n this.sRule = i;\n }\n\n for (var g in j) {\n if (j.hasOwnProperty(g)) {\n var h = new d({\n str: g + \"=\" + j[g],\n rule: this.sRule\n });\n this.asn1Array ? this.asn1Array.push(h) : this.asn1Array = [h];\n }\n }\n };\n\n this.setByParam = function (h) {\n if (h.rule !== undefined) {\n this.sRule = h.rule;\n }\n\n if (h.array !== undefined) {\n this.paramArray = h.array;\n } else {\n if (h.str !== undefined) {\n this.setByString(h.str);\n } else {\n if (h.ldapstr !== undefined) {\n this.setByLdapString(h.ldapstr);\n } else {\n if (h.hex !== undefined) {\n this.hTLV = h.hex;\n } else {\n if (h.certissuer !== undefined) {\n var g = new X509();\n g.readCertPEM(h.certissuer);\n this.hTLV = g.getIssuerHex();\n } else {\n if (h.certsubject !== undefined) {\n var g = new X509();\n g.readCertPEM(h.certsubject);\n this.hTLV = g.getSubjectHex();\n } else {\n if (_typeof(h) === \"object\" && h.certsubject === undefined && h.certissuer === undefined) {\n this.setByObject(h);\n }\n }\n }\n }\n }\n }\n }\n };\n\n this.getEncodedHex = function () {\n if (typeof this.hTLV == \"string\") {\n return this.hTLV;\n }\n\n if (this.asn1Array.length == 0 && this.paramArray.length > 0) {\n for (var g = 0; g < this.paramArray.length; g++) {\n var k = {\n array: this.paramArray[g]\n };\n\n if (this.sRule != \"utf8\") {\n k.rule = this.sRule;\n }\n\n var h = new d(k);\n this.asn1Array.push(h);\n }\n }\n\n var j = new b.DERSequence({\n array: this.asn1Array\n });\n this.hTLV = j.getEncodedHex();\n return this.hTLV;\n };\n\n if (f !== undefined) {\n this.setByParam(f);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.X500Name, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.X500Name.compatToLDAP = function (d) {\n if (d.substr(0, 1) !== \"/\") {\n throw \"malformed input\";\n }\n\n var b = \"\";\n d = d.substr(1);\n var c = d.split(\"/\");\n c.reverse();\n c = c.map(function (a) {\n return a.replace(/,/, \"\\\\,\");\n });\n return c.join(\",\");\n};\n\nKJUR.asn1.x509.X500Name.onelineToLDAP = function (a) {\n return KJUR.asn1.x509.X500Name.compatToLDAP(a);\n};\n\nKJUR.asn1.x509.X500Name.ldapToCompat = function (g) {\n var c = g.split(\",\");\n var e = false;\n var b = [];\n\n for (var f = 0; c.length > 0; f++) {\n var h = c.shift();\n\n if (e === true) {\n var d = b.pop();\n var j = (d + \",\" + h).replace(/\\\\,/g, \",\");\n b.push(j);\n e = false;\n } else {\n b.push(h);\n }\n\n if (h.substr(-1, 1) === \"\\\\\") {\n e = true;\n }\n }\n\n b = b.map(function (a) {\n return a.replace(\"/\", \"\\\\/\");\n });\n b.reverse();\n return \"/\" + b.join(\"/\");\n};\n\nKJUR.asn1.x509.X500Name.ldapToOneline = function (a) {\n return KJUR.asn1.x509.X500Name.ldapToCompat(a);\n};\n\nKJUR.asn1.x509.RDN = function (b) {\n KJUR.asn1.x509.RDN.superclass.constructor.call(this);\n this.asn1Array = [];\n this.paramArray = [];\n this.sRule = \"utf8\";\n var a = KJUR.asn1.x509.AttributeTypeAndValue;\n\n this.setByParam = function (c) {\n if (c.rule !== undefined) {\n this.sRule = c.rule;\n }\n\n if (c.str !== undefined) {\n this.addByMultiValuedString(c.str);\n }\n\n if (c.array !== undefined) {\n this.paramArray = c.array;\n }\n };\n\n this.addByString = function (c) {\n this.asn1Array.push(new KJUR.asn1.x509.AttributeTypeAndValue({\n str: c,\n rule: this.sRule\n }));\n };\n\n this.addByMultiValuedString = function (e) {\n var c = KJUR.asn1.x509.RDN.parseString(e);\n\n for (var d = 0; d < c.length; d++) {\n this.addByString(c[d]);\n }\n };\n\n this.getEncodedHex = function () {\n if (this.asn1Array.length == 0 && this.paramArray.length > 0) {\n for (var d = 0; d < this.paramArray.length; d++) {\n var f = this.paramArray[d];\n\n if (f.rule !== undefined && this.sRule != \"utf8\") {\n f.rule = this.sRule;\n }\n\n var c = new a(f);\n this.asn1Array.push(c);\n }\n }\n\n var e = new KJUR.asn1.DERSet({\n array: this.asn1Array\n });\n this.TLV = e.getEncodedHex();\n return this.TLV;\n };\n\n if (b !== undefined) {\n this.setByParam(b);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.RDN, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.RDN.parseString = function (m) {\n var j = m.split(/\\+/);\n var h = false;\n var c = [];\n\n for (var g = 0; j.length > 0; g++) {\n var k = j.shift();\n\n if (h === true) {\n var f = c.pop();\n var d = (f + \"+\" + k).replace(/\\\\\\+/g, \"+\");\n c.push(d);\n h = false;\n } else {\n c.push(k);\n }\n\n if (k.substr(-1, 1) === \"\\\\\") {\n h = true;\n }\n }\n\n var l = false;\n var b = [];\n\n for (var g = 0; c.length > 0; g++) {\n var k = c.shift();\n\n if (l === true) {\n var e = b.pop();\n\n if (k.match(/\"$/)) {\n var d = (e + \"+\" + k).replace(/^([^=]+)=\"(.*)\"$/, \"$1=$2\");\n b.push(d);\n l = false;\n } else {\n b.push(e + \"+\" + k);\n }\n } else {\n b.push(k);\n }\n\n if (k.match(/^[^=]+=\"/)) {\n l = true;\n }\n }\n\n return b;\n};\n\nKJUR.asn1.x509.AttributeTypeAndValue = function (c) {\n KJUR.asn1.x509.AttributeTypeAndValue.superclass.constructor.call(this);\n this.sRule = \"utf8\";\n this.sType = null;\n this.sValue = null;\n this.dsType = null;\n var a = KJUR,\n g = a.asn1,\n d = g.DERSequence,\n l = g.DERUTF8String,\n i = g.DERPrintableString,\n h = g.DERTeletexString,\n b = g.DERIA5String,\n e = g.DERVisibleString,\n k = g.DERBMPString,\n f = a.lang.String.isMail,\n j = a.lang.String.isPrintable;\n\n this.setByParam = function (o) {\n if (o.rule !== undefined) {\n this.sRule = o.rule;\n }\n\n if (o.ds !== undefined) {\n this.dsType = o.ds;\n }\n\n if (o.value === undefined && o.str !== undefined) {\n var n = o.str;\n var m = n.match(/^([^=]+)=(.+)$/);\n\n if (m) {\n this.sType = m[1];\n this.sValue = m[2];\n } else {\n throw new Error(\"malformed attrTypeAndValueStr: \" + attrTypeAndValueStr);\n }\n } else {\n this.sType = o.type;\n this.sValue = o.value;\n }\n };\n\n this.setByString = function (n, o) {\n if (o !== undefined) {\n this.sRule = o;\n }\n\n var m = n.match(/^([^=]+)=(.+)$/);\n\n if (m) {\n this.setByAttrTypeAndValueStr(m[1], m[2]);\n } else {\n throw new Error(\"malformed attrTypeAndValueStr: \" + attrTypeAndValueStr);\n }\n };\n\n this._getDsType = function () {\n var o = this.sType;\n var n = this.sValue;\n var m = this.sRule;\n\n if (m === \"prn\") {\n if (o == \"CN\" && f(n)) {\n return \"ia5\";\n }\n\n if (j(n)) {\n return \"prn\";\n }\n\n return \"utf8\";\n } else {\n if (m === \"utf8\") {\n if (o == \"CN\" && f(n)) {\n return \"ia5\";\n }\n\n if (o == \"C\") {\n return \"prn\";\n }\n\n return \"utf8\";\n }\n }\n\n return \"utf8\";\n };\n\n this.setByAttrTypeAndValueStr = function (o, n, m) {\n if (m !== undefined) {\n this.sRule = m;\n }\n\n this.sType = o;\n this.sValue = n;\n };\n\n this.getValueObj = function (n, m) {\n if (n == \"utf8\") {\n return new l({\n str: m\n });\n }\n\n if (n == \"prn\") {\n return new i({\n str: m\n });\n }\n\n if (n == \"tel\") {\n return new h({\n str: m\n });\n }\n\n if (n == \"ia5\") {\n return new b({\n str: m\n });\n }\n\n if (n == \"vis\") {\n return new e({\n str: m\n });\n }\n\n if (n == \"bmp\") {\n return new k({\n str: m\n });\n }\n\n throw new Error(\"unsupported directory string type: type=\" + n + \" value=\" + m);\n };\n\n this.getEncodedHex = function () {\n if (this.dsType == null) {\n this.dsType = this._getDsType();\n }\n\n var n = KJUR.asn1.x509.OID.atype2obj(this.sType);\n var m = this.getValueObj(this.dsType, this.sValue);\n var p = new d({\n array: [n, m]\n });\n this.TLV = p.getEncodedHex();\n return this.TLV;\n };\n\n if (c !== undefined) {\n this.setByParam(c);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.AttributeTypeAndValue, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.SubjectPublicKeyInfo = function (f) {\n KJUR.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call(this);\n var l = null,\n k = null,\n a = KJUR,\n j = a.asn1,\n i = j.DERInteger,\n b = j.DERBitString,\n m = j.DERObjectIdentifier,\n e = j.DERSequence,\n h = j.ASN1Util.newObject,\n d = j.x509,\n o = d.AlgorithmIdentifier,\n g = a.crypto,\n n = g.ECDSA,\n c = g.DSA;\n\n this.getASN1Object = function () {\n if (this.asn1AlgId == null || this.asn1SubjPKey == null) {\n throw \"algId and/or subjPubKey not set\";\n }\n\n var p = new e({\n array: [this.asn1AlgId, this.asn1SubjPKey]\n });\n return p;\n };\n\n this.getEncodedHex = function () {\n var p = this.getASN1Object();\n this.hTLV = p.getEncodedHex();\n return this.hTLV;\n };\n\n this.setPubKey = function (q) {\n try {\n if (q instanceof RSAKey) {\n var u = h({\n seq: [{\n \"int\": {\n bigint: q.n\n }\n }, {\n \"int\": {\n \"int\": q.e\n }\n }]\n });\n var s = u.getEncodedHex();\n this.asn1AlgId = new o({\n name: \"rsaEncryption\"\n });\n this.asn1SubjPKey = new b({\n hex: \"00\" + s\n });\n }\n } catch (p) {}\n\n try {\n if (q instanceof KJUR.crypto.ECDSA) {\n var r = new m({\n name: q.curveName\n });\n this.asn1AlgId = new o({\n name: \"ecPublicKey\",\n asn1params: r\n });\n this.asn1SubjPKey = new b({\n hex: \"00\" + q.pubKeyHex\n });\n }\n } catch (p) {}\n\n try {\n if (q instanceof KJUR.crypto.DSA) {\n var r = new h({\n seq: [{\n \"int\": {\n bigint: q.p\n }\n }, {\n \"int\": {\n bigint: q.q\n }\n }, {\n \"int\": {\n bigint: q.g\n }\n }]\n });\n this.asn1AlgId = new o({\n name: \"dsa\",\n asn1params: r\n });\n var t = new i({\n bigint: q.y\n });\n this.asn1SubjPKey = new b({\n hex: \"00\" + t.getEncodedHex()\n });\n }\n } catch (p) {}\n };\n\n if (f !== undefined) {\n this.setPubKey(f);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.SubjectPublicKeyInfo, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.Time = function (f) {\n KJUR.asn1.x509.Time.superclass.constructor.call(this);\n var e = null,\n a = null,\n d = KJUR,\n c = d.asn1,\n b = c.DERUTCTime,\n g = c.DERGeneralizedTime;\n\n this.setTimeParams = function (h) {\n this.timeParams = h;\n };\n\n this.getEncodedHex = function () {\n var h = null;\n\n if (this.timeParams != null) {\n if (this.type == \"utc\") {\n h = new b(this.timeParams);\n } else {\n h = new g(this.timeParams);\n }\n } else {\n if (this.type == \"utc\") {\n h = new b();\n } else {\n h = new g();\n }\n }\n\n this.TLV = h.getEncodedHex();\n return this.TLV;\n };\n\n this.type = \"utc\";\n\n if (f !== undefined) {\n if (f.type !== undefined) {\n this.type = f.type;\n } else {\n if (f.str !== undefined) {\n if (f.str.match(/^[0-9]{12}Z$/)) {\n this.type = \"utc\";\n }\n\n if (f.str.match(/^[0-9]{14}Z$/)) {\n this.type = \"gen\";\n }\n }\n }\n\n this.timeParams = f;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.Time, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.AlgorithmIdentifier = function (e) {\n KJUR.asn1.x509.AlgorithmIdentifier.superclass.constructor.call(this);\n this.nameAlg = null;\n this.asn1Alg = null;\n this.asn1Params = null;\n this.paramEmpty = false;\n var b = KJUR,\n a = b.asn1,\n c = a.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV;\n\n this.getEncodedHex = function () {\n if (this.nameAlg === null && this.asn1Alg === null) {\n throw new Error(\"algorithm not specified\");\n }\n\n if (this.nameAlg !== null) {\n var f = null;\n\n for (var h in c) {\n if (h === this.nameAlg) {\n f = c[h];\n }\n }\n\n if (f !== null) {\n this.hTLV = f;\n return this.hTLV;\n }\n }\n\n if (this.nameAlg !== null && this.asn1Alg === null) {\n this.asn1Alg = a.x509.OID.name2obj(this.nameAlg);\n }\n\n var g = [this.asn1Alg];\n\n if (this.asn1Params !== null) {\n g.push(this.asn1Params);\n }\n\n var i = new a.DERSequence({\n array: g\n });\n this.hTLV = i.getEncodedHex();\n return this.hTLV;\n };\n\n if (e !== undefined) {\n if (e.name !== undefined) {\n this.nameAlg = e.name;\n }\n\n if (e.asn1params !== undefined) {\n this.asn1Params = e.asn1params;\n }\n\n if (e.paramempty !== undefined) {\n this.paramEmpty = e.paramempty;\n }\n }\n\n if (this.asn1Params === null && this.paramEmpty === false && this.nameAlg !== null) {\n if (this.nameAlg.name !== undefined) {\n this.nameAlg = this.nameAlg.name;\n }\n\n var d = this.nameAlg.toLowerCase();\n\n if (d.substr(-7, 7) !== \"withdsa\" && d.substr(-9, 9) !== \"withecdsa\") {\n this.asn1Params = new a.DERNull();\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.AlgorithmIdentifier, KJUR.asn1.ASN1Object);\nKJUR.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV = {\n SHAwithRSAandMGF1: \"300d06092a864886f70d01010a3000\",\n SHA256withRSAandMGF1: \"303d06092a864886f70d01010a3030a00d300b0609608648016503040201a11a301806092a864886f70d010108300b0609608648016503040201a203020120\",\n SHA384withRSAandMGF1: \"303d06092a864886f70d01010a3030a00d300b0609608648016503040202a11a301806092a864886f70d010108300b0609608648016503040202a203020130\",\n SHA512withRSAandMGF1: \"303d06092a864886f70d01010a3030a00d300b0609608648016503040203a11a301806092a864886f70d010108300b0609608648016503040203a203020140\"\n};\n\nKJUR.asn1.x509.GeneralName = function (e) {\n KJUR.asn1.x509.GeneralName.superclass.constructor.call(this);\n var m = null,\n i = null,\n k = {\n rfc822: \"81\",\n dns: \"82\",\n dn: \"a4\",\n uri: \"86\",\n ip: \"87\"\n },\n b = KJUR,\n g = b.asn1,\n f = g.DERSequence,\n j = g.DEROctetString,\n d = g.DERIA5String,\n c = g.DERTaggedObject,\n l = g.ASN1Object,\n a = g.x509.X500Name,\n h = pemtohex;\n this.explicit = false;\n\n this.setByParam = function (p) {\n var r = null;\n var u = null;\n\n if (p === undefined) {\n return;\n }\n\n if (p.rfc822 !== undefined) {\n this.type = \"rfc822\";\n u = new d({\n str: p[this.type]\n });\n }\n\n if (p.dns !== undefined) {\n this.type = \"dns\";\n u = new d({\n str: p[this.type]\n });\n }\n\n if (p.uri !== undefined) {\n this.type = \"uri\";\n u = new d({\n str: p[this.type]\n });\n }\n\n if (p.dn !== undefined) {\n this.type = \"dn\";\n this.explicit = true;\n\n if (typeof p.dn === \"string\") {\n u = new a({\n str: p.dn\n });\n } else {\n if (p.dn instanceof KJUR.asn1.x509.X500Name) {\n u = p.dn;\n } else {\n u = new a(p.dn);\n }\n }\n }\n\n if (p.ldapdn !== undefined) {\n this.type = \"dn\";\n this.explicit = true;\n u = new a({\n ldapstr: p.ldapdn\n });\n }\n\n if (p.certissuer !== undefined) {\n this.type = \"dn\";\n this.explicit = true;\n var o = p.certissuer;\n var w = null;\n\n if (o.match(/^[0-9A-Fa-f]+$/)) {\n w == o;\n }\n\n if (o.indexOf(\"-----BEGIN \") != -1) {\n w = h(o);\n }\n\n if (w == null) {\n throw \"certissuer param not cert\";\n }\n\n var t = new X509();\n t.hex = w;\n var y = t.getIssuerHex();\n u = new l();\n u.hTLV = y;\n }\n\n if (p.certsubj !== undefined) {\n this.type = \"dn\";\n this.explicit = true;\n var o = p.certsubj;\n var w = null;\n\n if (o.match(/^[0-9A-Fa-f]+$/)) {\n w == o;\n }\n\n if (o.indexOf(\"-----BEGIN \") != -1) {\n w = h(o);\n }\n\n if (w == null) {\n throw \"certsubj param not cert\";\n }\n\n var t = new X509();\n t.hex = w;\n var y = t.getSubjectHex();\n u = new l();\n u.hTLV = y;\n }\n\n if (p.ip !== undefined) {\n this.type = \"ip\";\n this.explicit = false;\n var q = p.ip;\n var s;\n var n = \"malformed IP address\";\n\n if (q.match(/^[0-9.]+[.][0-9.]+$/)) {\n s = intarystrtohex(\"[\" + q.split(\".\").join(\",\") + \"]\");\n\n if (s.length !== 8) {\n throw n;\n }\n } else {\n if (q.match(/^[0-9A-Fa-f:]+:[0-9A-Fa-f:]+$/)) {\n s = ipv6tohex(q);\n } else {\n if (q.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/)) {\n s = q;\n } else {\n throw n;\n }\n }\n }\n\n u = new j({\n hex: s\n });\n }\n\n if (this.type == null) {\n throw \"unsupported type in params=\" + p;\n }\n\n this.asn1Obj = new c({\n explicit: this.explicit,\n tag: k[this.type],\n obj: u\n });\n };\n\n this.getEncodedHex = function () {\n return this.asn1Obj.getEncodedHex();\n };\n\n if (e !== undefined) {\n this.setByParam(e);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.GeneralName, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.x509.GeneralNames = function (d) {\n KJUR.asn1.x509.GeneralNames.superclass.constructor.call(this);\n var a = null,\n c = KJUR,\n b = c.asn1;\n\n this.setByParamArray = function (g) {\n for (var e = 0; e < g.length; e++) {\n var f = new b.x509.GeneralName(g[e]);\n this.asn1Array.push(f);\n }\n };\n\n this.getEncodedHex = function () {\n var e = new b.DERSequence({\n array: this.asn1Array\n });\n return e.getEncodedHex();\n };\n\n this.asn1Array = new Array();\n\n if (typeof d != \"undefined\") {\n this.setByParamArray(d);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.x509.GeneralNames, KJUR.asn1.ASN1Object);\nKJUR.asn1.x509.OID = new function (a) {\n this.atype2oidList = {\n CN: \"2.5.4.3\",\n L: \"2.5.4.7\",\n ST: \"2.5.4.8\",\n O: \"2.5.4.10\",\n OU: \"2.5.4.11\",\n C: \"2.5.4.6\",\n STREET: \"2.5.4.9\",\n DC: \"0.9.2342.19200300.100.1.25\",\n UID: \"0.9.2342.19200300.100.1.1\",\n SN: \"2.5.4.4\",\n T: \"2.5.4.12\",\n DN: \"2.5.4.49\",\n E: \"1.2.840.113549.1.9.1\",\n description: \"2.5.4.13\",\n businessCategory: \"2.5.4.15\",\n postalCode: \"2.5.4.17\",\n serialNumber: \"2.5.4.5\",\n uniqueIdentifier: \"2.5.4.45\",\n organizationIdentifier: \"2.5.4.97\",\n jurisdictionOfIncorporationL: \"1.3.6.1.4.1.311.60.2.1.1\",\n jurisdictionOfIncorporationSP: \"1.3.6.1.4.1.311.60.2.1.2\",\n jurisdictionOfIncorporationC: \"1.3.6.1.4.1.311.60.2.1.3\"\n };\n this.name2oidList = {\n sha1: \"1.3.14.3.2.26\",\n sha256: \"2.16.840.1.101.3.4.2.1\",\n sha384: \"2.16.840.1.101.3.4.2.2\",\n sha512: \"2.16.840.1.101.3.4.2.3\",\n sha224: \"2.16.840.1.101.3.4.2.4\",\n md5: \"1.2.840.113549.2.5\",\n md2: \"1.3.14.7.2.2.1\",\n ripemd160: \"1.3.36.3.2.1\",\n MD2withRSA: \"1.2.840.113549.1.1.2\",\n MD4withRSA: \"1.2.840.113549.1.1.3\",\n MD5withRSA: \"1.2.840.113549.1.1.4\",\n SHA1withRSA: \"1.2.840.113549.1.1.5\",\n \"pkcs1-MGF\": \"1.2.840.113549.1.1.8\",\n rsaPSS: \"1.2.840.113549.1.1.10\",\n SHA224withRSA: \"1.2.840.113549.1.1.14\",\n SHA256withRSA: \"1.2.840.113549.1.1.11\",\n SHA384withRSA: \"1.2.840.113549.1.1.12\",\n SHA512withRSA: \"1.2.840.113549.1.1.13\",\n SHA1withECDSA: \"1.2.840.10045.4.1\",\n SHA224withECDSA: \"1.2.840.10045.4.3.1\",\n SHA256withECDSA: \"1.2.840.10045.4.3.2\",\n SHA384withECDSA: \"1.2.840.10045.4.3.3\",\n SHA512withECDSA: \"1.2.840.10045.4.3.4\",\n dsa: \"1.2.840.10040.4.1\",\n SHA1withDSA: \"1.2.840.10040.4.3\",\n SHA224withDSA: \"2.16.840.1.101.3.4.3.1\",\n SHA256withDSA: \"2.16.840.1.101.3.4.3.2\",\n rsaEncryption: \"1.2.840.113549.1.1.1\",\n commonName: \"2.5.4.3\",\n countryName: \"2.5.4.6\",\n localityName: \"2.5.4.7\",\n stateOrProvinceName: \"2.5.4.8\",\n streetAddress: \"2.5.4.9\",\n organizationName: \"2.5.4.10\",\n organizationalUnitName: \"2.5.4.11\",\n domainComponent: \"0.9.2342.19200300.100.1.25\",\n userId: \"0.9.2342.19200300.100.1.1\",\n surname: \"2.5.4.4\",\n givenName: \"2.5.4.42\",\n title: \"2.5.4.12\",\n distinguishedName: \"2.5.4.49\",\n emailAddress: \"1.2.840.113549.1.9.1\",\n description: \"2.5.4.13\",\n businessCategory: \"2.5.4.15\",\n postalCode: \"2.5.4.17\",\n uniqueIdentifier: \"2.5.4.45\",\n organizationIdentifier: \"2.5.4.97\",\n jurisdictionOfIncorporationL: \"1.3.6.1.4.1.311.60.2.1.1\",\n jurisdictionOfIncorporationSP: \"1.3.6.1.4.1.311.60.2.1.2\",\n jurisdictionOfIncorporationC: \"1.3.6.1.4.1.311.60.2.1.3\",\n subjectDirectoryAttributes: \"2.5.29.9\",\n subjectKeyIdentifier: \"2.5.29.14\",\n keyUsage: \"2.5.29.15\",\n subjectAltName: \"2.5.29.17\",\n issuerAltName: \"2.5.29.18\",\n basicConstraints: \"2.5.29.19\",\n cRLNumber: \"2.5.29.20\",\n cRLReason: \"2.5.29.21\",\n nameConstraints: \"2.5.29.30\",\n cRLDistributionPoints: \"2.5.29.31\",\n certificatePolicies: \"2.5.29.32\",\n anyPolicy: \"2.5.29.32.0\",\n authorityKeyIdentifier: \"2.5.29.35\",\n policyConstraints: \"2.5.29.36\",\n extKeyUsage: \"2.5.29.37\",\n authorityInfoAccess: \"1.3.6.1.5.5.7.1.1\",\n ocsp: \"1.3.6.1.5.5.7.48.1\",\n ocspBasic: \"1.3.6.1.5.5.7.48.1.1\",\n ocspNonce: \"1.3.6.1.5.5.7.48.1.2\",\n ocspNoCheck: \"1.3.6.1.5.5.7.48.1.5\",\n caIssuers: \"1.3.6.1.5.5.7.48.2\",\n anyExtendedKeyUsage: \"2.5.29.37.0\",\n serverAuth: \"1.3.6.1.5.5.7.3.1\",\n clientAuth: \"1.3.6.1.5.5.7.3.2\",\n codeSigning: \"1.3.6.1.5.5.7.3.3\",\n emailProtection: \"1.3.6.1.5.5.7.3.4\",\n timeStamping: \"1.3.6.1.5.5.7.3.8\",\n ocspSigning: \"1.3.6.1.5.5.7.3.9\",\n dateOfBirth: \"1.3.6.1.5.5.7.9.1\",\n placeOfBirth: \"1.3.6.1.5.5.7.9.2\",\n gender: \"1.3.6.1.5.5.7.9.3\",\n countryOfCitizenship: \"1.3.6.1.5.5.7.9.4\",\n countryOfResidence: \"1.3.6.1.5.5.7.9.5\",\n ecPublicKey: \"1.2.840.10045.2.1\",\n \"P-256\": \"1.2.840.10045.3.1.7\",\n secp256r1: \"1.2.840.10045.3.1.7\",\n secp256k1: \"1.3.132.0.10\",\n secp384r1: \"1.3.132.0.34\",\n pkcs5PBES2: \"1.2.840.113549.1.5.13\",\n pkcs5PBKDF2: \"1.2.840.113549.1.5.12\",\n \"des-EDE3-CBC\": \"1.2.840.113549.3.7\",\n data: \"1.2.840.113549.1.7.1\",\n \"signed-data\": \"1.2.840.113549.1.7.2\",\n \"enveloped-data\": \"1.2.840.113549.1.7.3\",\n \"digested-data\": \"1.2.840.113549.1.7.5\",\n \"encrypted-data\": \"1.2.840.113549.1.7.6\",\n \"authenticated-data\": \"1.2.840.113549.1.9.16.1.2\",\n tstinfo: \"1.2.840.113549.1.9.16.1.4\",\n signingCertificate: \"1.2.840.113549.1.9.16.2.12\",\n timeStampToken: \"1.2.840.113549.1.9.16.2.14\",\n signaturePolicyIdentifier: \"1.2.840.113549.1.9.16.2.15\",\n etsArchiveTimeStamp: \"1.2.840.113549.1.9.16.2.27\",\n signingCertificateV2: \"1.2.840.113549.1.9.16.2.47\",\n etsArchiveTimeStampV2: \"1.2.840.113549.1.9.16.2.48\",\n extensionRequest: \"1.2.840.113549.1.9.14\",\n contentType: \"1.2.840.113549.1.9.3\",\n messageDigest: \"1.2.840.113549.1.9.4\",\n signingTime: \"1.2.840.113549.1.9.5\",\n counterSignature: \"1.2.840.113549.1.9.6\",\n archiveTimeStampV3: \"0.4.0.1733.2.4\",\n pdfRevocationInfoArchival: \"1.2.840.113583.1.1.8\",\n adobeTimeStamp: \"1.2.840.113583.1.1.9.1\"\n };\n this.objCache = {};\n\n this.name2obj = function (b) {\n if (typeof this.objCache[b] != \"undefined\") {\n return this.objCache[b];\n }\n\n if (typeof this.name2oidList[b] == \"undefined\") {\n throw \"Name of ObjectIdentifier not defined: \" + b;\n }\n\n var c = this.name2oidList[b];\n var d = new KJUR.asn1.DERObjectIdentifier({\n oid: c\n });\n this.objCache[b] = d;\n return d;\n };\n\n this.atype2obj = function (b) {\n if (this.objCache[b] !== undefined) {\n return this.objCache[b];\n }\n\n var c;\n\n if (b.match(/^\\d+\\.\\d+\\.[0-9.]+$/)) {\n c = b;\n } else {\n if (this.atype2oidList[b] !== undefined) {\n c = this.atype2oidList[b];\n } else {\n if (this.name2oidList[b] !== undefined) {\n c = this.name2oidList[b];\n } else {\n throw \"AttributeType name undefined: \" + b;\n }\n }\n }\n\n var d = new KJUR.asn1.DERObjectIdentifier({\n oid: c\n });\n this.objCache[b] = d;\n return d;\n };\n}();\n\nKJUR.asn1.x509.OID.oid2name = function (b) {\n var c = KJUR.asn1.x509.OID.name2oidList;\n\n for (var a in c) {\n if (c[a] == b) {\n return a;\n }\n }\n\n return \"\";\n};\n\nKJUR.asn1.x509.OID.oid2atype = function (b) {\n var c = KJUR.asn1.x509.OID.atype2oidList;\n\n for (var a in c) {\n if (c[a] == b) {\n return a;\n }\n }\n\n return b;\n};\n\nKJUR.asn1.x509.OID.name2oid = function (a) {\n if (a.match(/^[0-9.]+$/)) {\n return a;\n }\n\n var b = KJUR.asn1.x509.OID.name2oidList;\n\n if (b[a] === undefined) {\n return \"\";\n }\n\n return b[a];\n};\n\nKJUR.asn1.x509.X509Util = {};\n\nKJUR.asn1.x509.X509Util.newCertPEM = function (e) {\n var d = KJUR.asn1.x509,\n b = d.TBSCertificate,\n a = d.Certificate;\n var c = new a(e);\n return c.getPEM();\n};\n\nif (typeof KJUR == \"undefined\" || !KJUR) {\n KJUR = {};\n}\n\nif (typeof KJUR.asn1 == \"undefined\" || !KJUR.asn1) {\n KJUR.asn1 = {};\n}\n\nif (typeof KJUR.asn1.cms == \"undefined\" || !KJUR.asn1.cms) {\n KJUR.asn1.cms = {};\n}\n\nKJUR.asn1.cms.Attribute = function (f) {\n var e = Error,\n d = KJUR,\n c = d.asn1,\n b = c.DERSequence,\n a = c.DERSet,\n g = c.DERObjectIdentifier;\n this.params = null;\n this.typeOid = null;\n\n this.setByParam = function (h) {\n this.params = h;\n };\n\n this.getValueArray = function () {\n throw new e(\"not yet implemented abstract\");\n };\n\n this.getEncodedHex = function () {\n var j = new g({\n oid: this.typeOid\n });\n var h = new a({\n array: this.getValueArray()\n });\n var i = new b({\n array: [j, h]\n });\n return i.getEncodedHex();\n };\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.Attribute, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.ContentType = function (c) {\n var b = KJUR,\n a = b.asn1;\n a.cms.ContentType.superclass.constructor.call(this);\n this.typeOid = \"1.2.840.113549.1.9.3\";\n\n this.getValueArray = function () {\n var d = new a.DERObjectIdentifier(this.params.type);\n return [d];\n };\n\n if (c != undefined) {\n this.setByParam(c);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.ContentType, KJUR.asn1.cms.Attribute);\n\nKJUR.asn1.cms.MessageDigest = function (e) {\n var b = KJUR,\n a = b.asn1,\n c = a.DEROctetString,\n d = a.cms;\n d.MessageDigest.superclass.constructor.call(this);\n this.typeOid = \"1.2.840.113549.1.9.4\";\n\n this.getValueArray = function () {\n var f = new c(this.params);\n return [f];\n };\n\n if (e != undefined) {\n this.setByParam(e);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.MessageDigest, KJUR.asn1.cms.Attribute);\n\nKJUR.asn1.cms.SigningTime = function (c) {\n var b = KJUR,\n a = b.asn1;\n a.cms.SigningTime.superclass.constructor.call(this);\n this.typeOid = \"1.2.840.113549.1.9.5\";\n\n this.getValueArray = function () {\n var d = new a.x509.Time(this.params);\n return [d];\n };\n\n if (c != undefined) {\n this.setByParam(c);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.SigningTime, KJUR.asn1.cms.Attribute);\n\nKJUR.asn1.cms.SigningCertificate = function (h) {\n var e = Error,\n d = KJUR,\n c = d.asn1,\n b = c.DERSequence,\n g = c.cms,\n a = g.ESSCertID,\n f = d.crypto;\n g.SigningCertificate.superclass.constructor.call(this);\n this.typeOid = \"1.2.840.113549.1.9.16.2.12\";\n\n this.getValueArray = function () {\n if (this.params == null || this.params == undefined || this.params.array == undefined) {\n throw new e(\"parameter 'array' not specified\");\n }\n\n var o = this.params.array;\n var k = [];\n\n for (var l = 0; l < o.length; l++) {\n var n = o[l];\n\n if (h.hasis == false && typeof n == \"string\" && (n.indexOf(\"-----BEGIN\") != -1 || ASN1HEX.isASN1HEX(n))) {\n n = {\n cert: n\n };\n }\n\n if (n.hasis != false && h.hasis == false) {\n n.hasis = false;\n }\n\n k.push(new a(n));\n }\n\n var j = new b({\n array: k\n });\n var m = new b({\n array: [j]\n });\n return [m];\n };\n\n if (h != undefined) {\n this.setByParam(h);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.SigningCertificate, KJUR.asn1.cms.Attribute);\n\nKJUR.asn1.cms.ESSCertID = function (g) {\n KJUR.asn1.cms.ESSCertID.superclass.constructor.call(this);\n var d = Error,\n c = KJUR,\n b = c.asn1,\n f = b.DEROctetString,\n a = b.DERSequence,\n e = b.cms.IssuerSerial;\n this.params = null;\n\n this.getCertHash = function (k, h) {\n if (k.hash != undefined) {\n return k.hash;\n }\n\n if (typeof k == \"string\" && k.indexOf(\"-----BEGIN\") == -1 && !ASN1HEX.isASN1HEX(k)) {\n return k;\n }\n\n var i;\n\n if (typeof k == \"string\") {\n i = k;\n } else {\n if (k.cert != undefined) {\n i = k.cert;\n } else {\n throw new d(\"hash nor cert unspecified\");\n }\n }\n\n var j;\n\n if (i.indexOf(\"-----BEGIN\") != -1) {\n j = pemtohex(i);\n } else {\n j = i;\n }\n\n if (typeof k == \"string\") {\n if (k.indexOf(\"-----BEGIN\") != -1) {\n j = pemtohex(k);\n } else {\n if (ASN1HEX.isASN1HEX(k)) {\n j = k;\n }\n }\n }\n\n var l;\n\n if (k.alg != undefined) {\n l = k.alg;\n } else {\n if (h != undefined) {\n l = h;\n } else {\n throw new d(\"hash alg unspecified\");\n }\n }\n\n return c.crypto.Util.hashHex(j, l);\n };\n\n this.getEncodedHex = function () {\n var k = this.params;\n var j = this.getCertHash(k, \"sha1\");\n var h = [];\n h.push(new f({\n hex: j\n }));\n\n if (typeof k == \"string\" && k.indexOf(\"-----BEGIN\") != -1 || k.cert != undefined && k.hasis != false || k.issuer != undefined && k.serial != undefined) {\n h.push(new e(k));\n }\n\n var i = new a({\n array: h\n });\n return i.getEncodedHex();\n };\n\n if (g != undefined) {\n this.setByParam(g);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.ESSCertID, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.SigningCertificateV2 = function (d) {\n var h = Error,\n a = KJUR,\n g = a.asn1,\n e = g.DERSequence,\n b = g.x509,\n i = g.cms,\n c = i.ESSCertIDv2,\n f = a.crypto;\n i.SigningCertificateV2.superclass.constructor.call(this);\n this.typeOid = \"1.2.840.113549.1.9.16.2.47\";\n\n this.getValueArray = function () {\n if (this.params == null || this.params == undefined || this.params.array == undefined) {\n throw new h(\"parameter 'array' not specified\");\n }\n\n var o = this.params.array;\n var l = [];\n\n for (var m = 0; m < o.length; m++) {\n var n = o[m];\n\n if ((d.alg != undefined || d.hasis == false) && typeof n == \"string\" && (n.indexOf(\"-----BEGIN\") != -1 || ASN1HEX.isASN1HEX(n))) {\n n = {\n cert: n\n };\n }\n\n if (n.alg == undefined && d.alg != undefined) {\n n.alg = d.alg;\n }\n\n if (n.hasis != false && d.hasis == false) {\n n.hasis = false;\n }\n\n l.push(new c(n));\n }\n\n var k = new e({\n array: l\n });\n var j = new e({\n array: [k]\n });\n return [j];\n };\n\n if (d != undefined) {\n this.setByParam(d);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.SigningCertificateV2, KJUR.asn1.cms.Attribute);\n\nKJUR.asn1.cms.ESSCertIDv2 = function (h) {\n KJUR.asn1.cms.ESSCertIDv2.superclass.constructor.call(this);\n var d = Error,\n c = KJUR,\n b = c.asn1,\n f = b.DEROctetString,\n a = b.DERSequence,\n e = b.cms.IssuerSerial,\n g = b.x509.AlgorithmIdentifier;\n this.params = null;\n\n this.getEncodedHex = function () {\n var l = this.params;\n var k = this.getCertHash(l, \"sha256\");\n var i = [];\n\n if (l.alg != undefined && l.alg != \"sha256\") {\n i.push(new g({\n name: l.alg\n }));\n }\n\n i.push(new f({\n hex: k\n }));\n\n if (typeof l == \"string\" && l.indexOf(\"-----BEGIN\") != -1 || l.cert != undefined && l.hasis != false || l.issuer != undefined && l.serial != undefined) {\n i.push(new e(l));\n }\n\n var j = new a({\n array: i\n });\n return j.getEncodedHex();\n };\n\n if (h != undefined) {\n this.setByParam(h);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.ESSCertIDv2, KJUR.asn1.cms.ESSCertID);\n\nKJUR.asn1.cms.IssuerSerial = function (e) {\n var i = Error,\n c = KJUR,\n h = c.asn1,\n g = h.DERInteger,\n f = h.DERSequence,\n j = h.cms,\n d = h.x509,\n a = d.GeneralNames,\n b = X509;\n j.IssuerSerial.superclass.constructor.call(this);\n\n this.setByParam = function (k) {\n this.params = k;\n };\n\n this.getEncodedHex = function () {\n var p = this.params;\n var l, r;\n\n if (typeof p == \"string\" && p.indexOf(\"-----BEGIN\") != -1 || p.cert != undefined) {\n var n;\n\n if (p.cert != undefined) {\n n = p.cert;\n } else {\n n = p;\n }\n\n var k = new b();\n k.readCertPEM(n);\n l = k.getIssuer();\n r = {\n hex: k.getSerialNumberHex()\n };\n } else {\n if (p.issuer != undefined && p.serial) {\n l = p.issuer;\n r = p.serial;\n } else {\n throw new i(\"cert or issuer and serial parameter not specified\");\n }\n }\n\n var q = new a([{\n dn: l\n }]);\n var o = new g(r);\n var m = new f({\n array: [q, o]\n });\n return m.getEncodedHex();\n };\n\n if (e != undefined) {\n this.setByParam(e);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.IssuerSerial, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.SignerIdentifier = function (f) {\n var c = KJUR,\n i = c.asn1,\n h = i.DERInteger,\n g = i.DERSequence,\n l = i.cms,\n k = l.IssuerAndSerialNumber,\n d = l.SubjectKeyIdentifier,\n e = i.x509,\n a = e.X500Name,\n b = X509,\n j = Error;\n l.SignerIdentifier.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var o = this.params;\n\n if (o.type == \"isssn\") {\n var m = new k(o);\n return m.getEncodedHex();\n } else {\n if (o.type == \"skid\") {\n var n = new d(o);\n return n.getEncodedHex();\n } else {\n throw new Error(\"wrong property for isssn or skid\");\n }\n }\n };\n\n if (f != undefined) {\n this.setByParam(f);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.SignerIdentifier, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.IssuerAndSerialNumber = function (e) {\n var c = KJUR,\n h = c.asn1,\n g = h.DERInteger,\n f = h.DERSequence,\n j = h.cms,\n d = h.x509,\n a = d.X500Name,\n b = X509,\n i = Error;\n j.IssuerAndSerialNumber.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var p = this.params;\n var l, r;\n\n if (typeof p == \"string\" && p.indexOf(\"-----BEGIN\") != -1 || p.cert != undefined) {\n var n;\n\n if (p.cert != undefined) {\n n = p.cert;\n } else {\n n = p;\n }\n\n var k = new b();\n k.readCertPEM(n);\n l = k.getIssuer();\n r = {\n hex: k.getSerialNumberHex()\n };\n } else {\n if (p.issuer != undefined && p.serial) {\n l = p.issuer;\n r = p.serial;\n } else {\n throw new i(\"cert or issuer and serial parameter not specified\");\n }\n }\n\n var q = new a(l);\n var o = new g(r);\n var m = new f({\n array: [q, o]\n });\n return m.getEncodedHex();\n };\n\n this.setByParam = function (k) {\n this.params = k;\n };\n\n if (e != undefined) {\n this.setByParam(e);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.IssuerAndSerialNumber, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.SubjectKeyIdentifier = function (g) {\n var d = KJUR,\n k = d.asn1,\n i = k.DERInteger,\n h = k.DERSequence,\n j = k.ASN1Util.newObject,\n m = k.cms,\n f = m.IssuerAndSerialName,\n c = m.SubjectKeyIdentifier,\n e = k.x509,\n a = e.X500Name,\n b = X509,\n l = Error;\n m.SubjectKeyIdentifier.superclass.constructor.call(this);\n\n this.getEncodedHex = function () {\n var r = this.params;\n\n if (r.cert == undefined && r.skid == undefined) {\n throw new l(\"property cert nor skid undefined\");\n }\n\n var q;\n\n if (r.cert != undefined) {\n var n = new b(r.cert);\n var o = n.getExtSubjectKeyIdentifier();\n q = o.kid.hex;\n } else {\n if (r.skid != undefined) {\n q = r.skid;\n }\n }\n\n var p = j({\n tag: {\n tage: \"a0\",\n obj: {\n octstr: {\n hex: q\n }\n }\n }\n });\n return p.getEncodedHex();\n };\n\n if (g != undefined) {\n this.setByParam(g);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.SubjectKeyIdentifier, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.AttributeList = function (f) {\n var d = Error,\n c = KJUR,\n b = c.asn1,\n a = b.DERSet,\n e = b.cms;\n e.AttributeList.superclass.constructor.call(this);\n this.params = null;\n this.hTLV = null;\n\n this.setByParam = function (g) {\n this.params = g;\n };\n\n this.getEncodedHex = function () {\n var o = this.params;\n\n if (this.hTLV != null) {\n return this.hTLV;\n }\n\n var m = true;\n\n if (o.sortflag != undefined) {\n m = o.sortflag;\n }\n\n var j = o.array;\n var g = [];\n\n for (var l = 0; l < j.length; l++) {\n var n = j[l];\n var k = n.attr;\n\n if (k == \"contentType\") {\n g.push(new e.ContentType(n));\n } else {\n if (k == \"messageDigest\") {\n g.push(new e.MessageDigest(n));\n } else {\n if (k == \"signingTime\") {\n g.push(new e.SigningTime(n));\n } else {\n if (k == \"signingCertificate\") {\n g.push(new e.SigningCertificate(n));\n } else {\n if (k == \"signingCertificateV2\") {\n g.push(new e.SigningCertificateV2(n));\n } else {\n if (k == \"signaturePolicyIdentifier\") {\n g.push(new KJUR.asn1.cades.SignaturePolicyIdentifier(n));\n } else {\n if (k == \"signatureTimeStamp\" || k == \"timeStampToken\") {\n g.push(new KJUR.asn1.cades.SignatureTimeStamp(n));\n } else {\n throw new d(\"unknown attr: \" + k);\n }\n }\n }\n }\n }\n }\n }\n }\n\n var h = new a({\n array: g,\n sortflag: m\n });\n this.hTLV = h.getEncodedHex();\n return this.hTLV;\n };\n\n if (f != undefined) {\n this.setByParam(f);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.AttributeList, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.SignerInfo = function (q) {\n var n = Error,\n r = KJUR,\n i = r.asn1,\n c = i.DERInteger,\n f = i.DEROctetString,\n h = i.DERSequence,\n m = i.DERTaggedObject,\n k = i.cms,\n p = k.SignerIdentifier,\n l = k.AttributeList,\n g = k.ContentType,\n e = k.EncapsulatedContentInfo,\n d = k.MessageDigest,\n j = k.SignedData,\n a = i.x509,\n s = a.AlgorithmIdentifier,\n b = r.crypto,\n o = KEYUTIL;\n k.SignerInfo.superclass.constructor.call(this);\n this.params = null;\n\n this.sign = function () {\n var y = this.params;\n var x = y.sigalg;\n var u = new l(y.sattrs).getEncodedHex();\n var v = o.getKey(y.signkey);\n var w = new b.Signature({\n alg: x\n });\n w.init(v);\n w.updateHex(u);\n var t = w.sign();\n y.sighex = t;\n };\n\n this.getEncodedHex = function () {\n var w = this.params;\n var t = [];\n t.push(new c({\n \"int\": w.version\n }));\n t.push(new p(w.id));\n t.push(new s({\n name: w.hashalg\n }));\n\n if (w.sattrs != undefined) {\n var x = new l(w.sattrs);\n\n try {\n t.push(new m({\n tag: \"a0\",\n explicit: false,\n obj: x\n }));\n } catch (v) {\n throw new n(\"si sattr error: \" + v);\n }\n }\n\n if (w.sigalgfield != undefined) {\n t.push(new s({\n name: w.sigalgfield\n }));\n } else {\n t.push(new s({\n name: w.sigalg\n }));\n }\n\n if (w.sighex == undefined && w.signkey != undefined) {\n this.sign();\n }\n\n t.push(new f({\n hex: w.sighex\n }));\n\n if (w.uattrs != undefined) {\n var x = new l(w.uattrs);\n\n try {\n t.push(new m({\n tag: \"a1\",\n explicit: false,\n obj: x\n }));\n } catch (v) {\n throw new n(\"si uattr error: \" + v);\n }\n }\n\n var u = new h({\n array: t\n });\n return u.getEncodedHex();\n };\n\n if (q != undefined) {\n this.setByParam(q);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.SignerInfo, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.EncapsulatedContentInfo = function (g) {\n var c = KJUR,\n b = c.asn1,\n e = b.DERTaggedObject,\n a = b.DERSequence,\n h = b.DERObjectIdentifier,\n d = b.DEROctetString,\n f = b.cms;\n f.EncapsulatedContentInfo.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var m = this.params;\n var i = [];\n i.push(new h(m.type));\n\n if (m.content != undefined && (m.content.hex != undefined || m.content.str != undefined) && m.isDetached != true) {\n var k = new d(m.content);\n var l = new e({\n tag: \"a0\",\n explicit: true,\n obj: k\n });\n i.push(l);\n }\n\n var j = new a({\n array: i\n });\n return j.getEncodedHex();\n };\n\n this.setByParam = function (i) {\n this.params = i;\n };\n\n if (g != undefined) {\n this.setByParam(g);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.EncapsulatedContentInfo, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.ContentInfo = function (g) {\n var c = KJUR,\n b = c.asn1,\n d = b.DERTaggedObject,\n a = b.DERSequence,\n h = b.DERObjectIdentifier,\n f = b.x509,\n e = f.OID.name2obj;\n KJUR.asn1.cms.ContentInfo.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var l = this.params;\n var i = [];\n i.push(new h(l.type));\n var k = new d({\n tag: \"a0\",\n explicit: true,\n obj: l.obj\n });\n i.push(k);\n var j = new a({\n array: i\n });\n return j.getEncodedHex();\n };\n\n this.setByParam = function (i) {\n this.params = i;\n };\n\n if (g != undefined) {\n this.setByParam(g);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.ContentInfo, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.SignedData = function (e) {\n var j = Error,\n a = KJUR,\n h = a.asn1,\n m = h.ASN1Object,\n g = h.DERInteger,\n p = h.DERSet,\n f = h.DERSequence,\n b = h.DERTaggedObject,\n o = h.cms,\n l = o.EncapsulatedContentInfo,\n d = o.SignerInfo,\n q = o.ContentInfo,\n k = o.CertificateSet,\n i = o.RevocationInfoChoices,\n c = h.x509,\n n = c.AlgorithmIdentifier;\n KJUR.asn1.cms.SignedData.superclass.constructor.call(this);\n this.params = null;\n\n this.checkAndFixParam = function () {\n var r = this.params;\n\n this._setDigestAlgs(r);\n\n this._setContentTypeByEContent(r);\n\n this._setMessageDigestByEContent(r);\n\n this._setSignerInfoVersion(r);\n\n this._setSignedDataVersion(r);\n };\n\n this._setDigestAlgs = function (v) {\n var u = {};\n var t = v.sinfos;\n\n for (var r = 0; r < t.length; r++) {\n var s = t[r];\n u[s.hashalg] = 1;\n }\n\n v.hashalgs = Object.keys(u).sort();\n };\n\n this._setContentTypeByEContent = function (w) {\n var u = w.econtent.type;\n var v = w.sinfos;\n\n for (var r = 0; r < v.length; r++) {\n var t = v[r];\n\n var s = this._getAttrParamByName(t, \"contentType\");\n\n s.type = u;\n }\n };\n\n this._setMessageDigestByEContent = function (r) {\n var v = r.econtent;\n var y = r.econtent.type;\n var x = v.content.hex;\n\n if (x == undefined && v.type == \"data\" && v.content.str != undefined) {\n x = rstrtohex(v.content.str);\n }\n\n var A = r.sinfos;\n\n for (var u = 0; u < A.length; u++) {\n var t = A[u];\n var s = t.hashalg;\n\n var z = this._getAttrParamByName(t, \"messageDigest\");\n\n var w = KJUR.crypto.Util.hashHex(x, s);\n z.hex = w;\n }\n };\n\n this._getAttrParamByName = function (t, s) {\n var u = t.sattrs.array;\n\n for (var r = 0; r < u.length; r++) {\n if (u[r].attr == s) {\n return u[r];\n }\n }\n };\n\n this._setSignerInfoVersion = function (v) {\n var t = v.sinfos;\n\n for (var r = 0; r < t.length; r++) {\n var s = t[r];\n var u = 1;\n\n if (s.id.type == \"skid\") {\n u = 3;\n }\n\n s.version = u;\n }\n };\n\n this._setSignedDataVersion = function (s) {\n var r = this._getSignedDataVersion(s);\n\n s.version = r;\n };\n\n this._getSignedDataVersion = function (w) {\n if (w.revinfos != undefined) {\n var r = w.revinfos;\n\n for (var t = 0; t < r.length; t++) {\n var s = r[t];\n\n if (s.ocsp != undefined) {\n return 5;\n }\n }\n }\n\n var v = w.sinfos;\n\n for (var t = 0; t < v.length; t++) {\n var u = w.sinfos[t];\n\n if (u.version == 3) {\n return 3;\n }\n }\n\n if (w.econtent.type != \"data\") {\n return 3;\n }\n\n return 1;\n };\n\n this.getEncodedHex = function () {\n var y = this.params;\n\n if (this.getEncodedHexPrepare != undefined) {\n this.getEncodedHexPrepare();\n }\n\n if (y.fixed != true) {\n this.checkAndFixParam();\n }\n\n var r = [];\n r.push(new g({\n \"int\": y.version\n }));\n var w = [];\n\n for (var v = 0; v < y.hashalgs.length; v++) {\n var t = y.hashalgs[v];\n w.push(new n({\n name: t\n }));\n }\n\n r.push(new p({\n array: w\n }));\n r.push(new l(y.econtent));\n\n if (y.certs != undefined) {\n r.push(new k(y.certs));\n }\n\n if (y.revinfos != undefined) {\n r.push(new i(y.revinfos));\n }\n\n var u = [];\n\n for (var v = 0; v < y.sinfos.length; v++) {\n var x = y.sinfos[v];\n u.push(new d(x));\n }\n\n r.push(new p({\n array: u\n }));\n var s = new f({\n array: r\n });\n return s.getEncodedHex();\n };\n\n this.getContentInfo = function () {\n var r = new q({\n type: \"signed-data\",\n obj: this\n });\n return r;\n };\n\n this.getContentInfoEncodedHex = function () {\n return this.getContentInfo().getEncodedHex();\n };\n\n if (e != undefined) {\n this.setByParam(e);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.SignedData, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.CertificateSet = function (f) {\n KJUR.asn1.cms.CertificateSet.superclass.constructor.call(this);\n var c = Error,\n b = KJUR.asn1,\n e = b.DERTaggedObject,\n a = b.DERSet,\n d = b.ASN1Object;\n this.params = null;\n\n this.getEncodedHex = function () {\n var j = this.params;\n var p = [];\n var q;\n\n if (j instanceof Array) {\n q = j;\n } else {\n if (j.array != undefined) {\n q = j.array;\n } else {\n throw new c(\"cert array not specified\");\n }\n }\n\n for (var k = 0; k < q.length; k++) {\n var l = q[k];\n var n = pemtohex(l);\n var g = new d();\n g.hTLV = n;\n p.push(g);\n }\n\n var m = {\n array: p\n };\n\n if (j.sortflag == false) {\n m.sortflag = false;\n }\n\n var o = new a(m);\n var h = new e({\n tag: \"a0\",\n explicit: false,\n obj: o\n });\n return h.getEncodedHex();\n };\n\n if (f != undefined) {\n this.setByParam(f);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.CertificateSet, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.RevocationInfoChoices = function (a) {\n KJUR.asn1.cms.RevocationInfoChoices.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var e = this.params;\n\n if (!e instanceof Array) {\n throw new Error(\"params is not array\");\n }\n\n var b = [];\n\n for (var c = 0; c < e.length; c++) {\n b.push(new KJUR.asn1.cms.RevocationInfoChoice(e[c]));\n }\n\n var d = KJUR.asn1.ASN1Util.newObject({\n tag: {\n tagi: \"a1\",\n obj: {\n set: b\n }\n }\n });\n return d.getEncodedHex();\n };\n\n if (a != undefined) {\n this.setByParam(a);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.RevocationInfoChoices, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.RevocationInfoChoice = function (a) {\n KJUR.asn1.cms.RevocationInfoChoice.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var d = this.params;\n\n if (d.crl != undefined && typeof d.crl == \"string\") {\n var b = d.crl;\n\n if (d.crl.indexOf(\"-----BEGIN\") != -1) {\n b = pemtohex(d.crl);\n }\n\n return b;\n } else {\n if (d.ocsp != undefined) {\n var c = KJUR.asn1.ASN1Util.newObject({\n tag: {\n tagi: \"a1\",\n obj: new KJUR.asn1.cms.OtherRevocationFormat(d)\n }\n });\n return c.getEncodedHex();\n } else {\n throw new Error(\"property crl or ocsp undefined\");\n }\n }\n };\n\n if (a != undefined) {\n this.setByParam(a);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.RevocationInfoChoice, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cms.OtherRevocationFormat = function (f) {\n KJUR.asn1.cms.OtherRevocationFormat.superclass.constructor.call(this);\n var d = Error,\n c = KJUR,\n b = c.asn1,\n a = b.ASN1Util.newObject,\n e = c.lang.String.isHex;\n this.params = null;\n\n this.getEncodedHex = function () {\n var h = this.params;\n\n if (h.ocsp == undefined) {\n throw new d(\"property ocsp not specified\");\n }\n\n if (!e(h.ocsp) || !ASN1HEX.isASN1HEX(h.ocsp)) {\n throw new d(\"ocsp value not ASN.1 hex string\");\n }\n\n var g = a({\n seq: [{\n oid: \"1.3.6.1.5.5.7.16.2\"\n }, {\n asn1: {\n tlv: h.ocsp\n }\n }]\n });\n return g.getEncodedHex();\n };\n\n if (f != undefined) {\n this.setByParam(f);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cms.OtherRevocationFormat, KJUR.asn1.ASN1Object);\nKJUR.asn1.cms.CMSUtil = new function () {}();\n\nKJUR.asn1.cms.CMSUtil.newSignedData = function (a) {\n return new KJUR.asn1.cms.SignedData(a);\n};\n\nKJUR.asn1.cms.CMSUtil.verifySignedData = function (n) {\n var C = KJUR,\n p = C.asn1,\n s = p.cms,\n D = s.SignerInfo,\n q = s.SignedData,\n y = s.SigningTime,\n b = s.SigningCertificate,\n d = s.SigningCertificateV2,\n A = p.cades,\n u = A.SignaturePolicyIdentifier,\n i = C.lang.String.isHex,\n v = ASN1HEX,\n h = v.getVbyList,\n a = v.getTLVbyList,\n t = v.getIdxbyList,\n z = v.getChildIdx,\n c = v.getTLV,\n B = v.oidname,\n j = C.crypto.Util.hashHex;\n\n if (n.cms === undefined && !i(n.cms)) {}\n\n var E = n.cms;\n\n var g = function g(J, H) {\n var G;\n\n for (var I = 3; I < 6; I++) {\n G = t(J, 0, [1, 0, I]);\n\n if (G !== undefined) {\n var F = J.substr(G, 2);\n\n if (F === \"a0\") {\n H.certsIdx = G;\n }\n\n if (F === \"a1\") {\n H.revinfosIdx = G;\n }\n\n if (F === \"31\") {\n H.signerinfosIdx = G;\n }\n }\n }\n };\n\n var l = function l(I, F) {\n var H = F.signerinfosIdx;\n\n if (H === undefined) {\n return;\n }\n\n var L = z(I, H);\n F.signerInfoIdxList = L;\n\n for (var G = 0; G < L.length; G++) {\n var K = L[G];\n var J = {\n idx: K\n };\n k(I, J);\n F.signerInfos.push(J);\n }\n };\n\n var k = function k(I, J) {\n var F = J.idx;\n J.signerid_issuer1 = a(I, F, [1, 0], \"30\");\n J.signerid_serial1 = h(I, F, [1, 1], \"02\");\n J.hashalg = B(h(I, F, [2, 0], \"06\"));\n var H = t(I, F, [3], \"a0\");\n J.idxSignedAttrs = H;\n f(I, J, H);\n var G = z(I, F);\n var K = G.length;\n\n if (K < 6) {\n throw \"malformed SignerInfo\";\n }\n\n J.sigalg = B(h(I, F, [K - 2, 0], \"06\"));\n J.sigval = h(I, F, [K - 1], \"04\");\n };\n\n var f = function f(L, M, F) {\n var J = z(L, F);\n M.signedAttrIdxList = J;\n\n for (var K = 0; K < J.length; K++) {\n var I = J[K];\n var G = h(L, I, [0], \"06\");\n var H;\n\n if (G === \"2a864886f70d010905\") {\n H = hextoutf8(h(L, I, [1, 0]));\n M.saSigningTime = H;\n } else {\n if (G === \"2a864886f70d010904\") {\n H = h(L, I, [1, 0], \"04\");\n M.saMessageDigest = H;\n }\n }\n }\n };\n\n var w = function w(G, F) {\n if (h(G, 0, [0], \"06\") !== \"2a864886f70d010702\") {\n return F;\n }\n\n F.cmsType = \"signedData\";\n F.econtent = h(G, 0, [1, 0, 2, 1, 0]);\n g(G, F);\n F.signerInfos = [];\n l(G, F);\n };\n\n var o = function o(J, F) {\n var G = F.parse.signerInfos;\n var L = G.length;\n var K = true;\n\n for (var I = 0; I < L; I++) {\n var H = G[I];\n e(J, F, H, I);\n\n if (!H.isValid) {\n K = false;\n }\n }\n\n F.isValid = K;\n };\n\n var x = function x(F, Q, J, P) {\n var N = Q.parse.certsIdx;\n var H;\n\n if (Q.certs === undefined) {\n H = [];\n Q.certkeys = [];\n var K = z(F, N);\n\n for (var I = 0; I < K.length; I++) {\n var M = c(F, K[I]);\n var O = new X509();\n O.readCertHex(M);\n H[I] = O;\n Q.certkeys[I] = O.getPublicKey();\n }\n\n Q.certs = H;\n } else {\n H = Q.certs;\n }\n\n Q.cccc = H.length;\n Q.cccci = K.length;\n\n for (var I = 0; I < H.length; I++) {\n var L = O.getIssuerHex();\n var G = O.getSerialNumberHex();\n\n if (J.signerid_issuer1 === L && J.signerid_serial1 === G) {\n J.certkey_idx = I;\n }\n }\n };\n\n var e = function e(F, R, I, N) {\n I.verifyDetail = {};\n var Q = I.verifyDetail;\n var K = R.parse.econtent;\n var G = I.hashalg;\n var L = I.saMessageDigest;\n Q.validMessageDigest = false;\n\n if (j(K, G) === L) {\n Q.validMessageDigest = true;\n }\n\n x(F, R, I, N);\n Q.validSignatureValue = false;\n var H = I.sigalg;\n var M = \"31\" + c(F, I.idxSignedAttrs).substr(2);\n I.signedattrshex = M;\n var J = R.certs[I.certkey_idx].getPublicKey();\n var P = new KJUR.crypto.Signature({\n alg: H\n });\n P.init(J);\n P.updateHex(M);\n var O = P.verify(I.sigval);\n Q.validSignatureValue_isValid = O;\n\n if (O === true) {\n Q.validSignatureValue = true;\n }\n\n I.isValid = false;\n\n if (Q.validMessageDigest && Q.validSignatureValue) {\n I.isValid = true;\n }\n };\n\n var m = function m() {};\n\n var r = {\n isValid: false,\n parse: {}\n };\n w(E, r.parse);\n o(E, r);\n return r;\n};\n\nKJUR.asn1.cms.CMSParser = function () {\n var g = Error,\n a = X509,\n h = new a(),\n l = ASN1HEX,\n i = l.getV,\n b = l.getTLV,\n f = l.getIdxbyList,\n c = l.getTLVbyList,\n d = l.getTLVbyListEx,\n e = l.getVbyList,\n k = l.getVbyListEx,\n j = l.getChildIdx;\n\n this.getCMSSignedData = function (m) {\n var o = c(m, 0, [1, 0]);\n var n = this.getSignedData(o);\n return n;\n };\n\n this.getSignedData = function (o) {\n var q = j(o, 0);\n var v = {};\n var p = i(o, q[0]);\n var n = parseInt(p, 16);\n v.version = n;\n var r = b(o, q[1]);\n v.hashalgs = this.getHashAlgArray(r);\n var t = b(o, q[2]);\n v.econtent = this.getEContent(t);\n var m = d(o, 0, [\"[0]\"]);\n\n if (m != null) {\n v.certs = this.getCertificateSet(m);\n }\n\n var u = d(o, 0, [\"[1]\"]);\n\n if (u != null) {}\n\n var s = d(o, 0, [3]);\n v.sinfos = this.getSignerInfos(s);\n return v;\n };\n\n this.getHashAlgArray = function (s) {\n var q = j(s, 0);\n var m = new a();\n var n = [];\n\n for (var r = 0; r < q.length; r++) {\n var p = b(s, q[r]);\n var o = m.getAlgorithmIdentifierName(p);\n n.push(o);\n }\n\n return n;\n };\n\n this.getEContent = function (m) {\n var n = {};\n var p = e(m, 0, [0]);\n var o = e(m, 0, [1, 0]);\n n.type = KJUR.asn1.x509.OID.oid2name(ASN1HEX.hextooidstr(p));\n n.content = {\n hex: o\n };\n return n;\n };\n\n this.getSignerInfos = function (p) {\n var r = [];\n var m = j(p, 0);\n\n for (var n = 0; n < m.length; n++) {\n var o = b(p, m[n]);\n var q = this.getSignerInfo(o);\n r.push(q);\n }\n\n return r;\n };\n\n this.getSignerInfo = function (s) {\n var y = {};\n var u = j(s, 0);\n var q = l.getInt(s, u[0], -1);\n\n if (q != -1) {\n y.version = q;\n }\n\n var t = b(s, u[1]);\n var p = this.getIssuerAndSerialNumber(t);\n y.id = p;\n var z = b(s, u[2]);\n var n = h.getAlgorithmIdentifierName(z);\n y.hashalg = n;\n var w = d(s, 0, [\"[0]\"]);\n\n if (w != null) {\n var A = this.getAttributeList(w);\n y.sattrs = A;\n }\n\n var m = d(s, 0, [3]);\n var x = h.getAlgorithmIdentifierName(m);\n y.sigalg = x;\n var o = k(s, 0, [4]);\n y.sighex = o;\n var r = d(s, 0, [\"[1]\"]);\n\n if (r != null) {\n var v = this.getAttributeList(r);\n y.uattrs = v;\n }\n\n return y;\n };\n\n this.getSignerIdentifier = function (m) {\n if (m.substr(0, 2) == \"30\") {\n return this.getIssuerAndSerialNumber(m);\n } else {\n throw new Error(\"SKID of signerIdentifier not supported\");\n }\n };\n\n this.getIssuerAndSerialNumber = function (n) {\n var o = {\n type: \"isssn\"\n };\n var m = j(n, 0);\n var p = b(n, m[0]);\n o.issuer = h.getX500Name(p);\n var q = i(n, m[1]);\n o.serial = {\n hex: q\n };\n return o;\n };\n\n this.getAttributeList = function (q) {\n var m = [];\n var n = j(q, 0);\n\n for (var o = 0; o < n.length; o++) {\n var p = b(q, n[o]);\n var r = this.getAttribute(p);\n m.push(r);\n }\n\n return {\n array: m\n };\n };\n\n this.getAttribute = function (p) {\n var t = {};\n var q = j(p, 0);\n var o = l.getOID(p, q[0]);\n var m = KJUR.asn1.x509.OID.oid2name(o);\n t.attr = m;\n var r = b(p, q[1]);\n var u = j(r, 0);\n\n if (u.length == 1) {\n t.valhex = b(r, u[0]);\n } else {\n var s = [];\n\n for (var n = 0; n < u.length; n++) {\n s.push(b(r, u[n]));\n }\n\n t.valhex = s;\n }\n\n if (m == \"contentType\") {\n this.setContentType(t);\n } else {\n if (m == \"messageDigest\") {\n this.setMessageDigest(t);\n } else {\n if (m == \"signingTime\") {\n this.setSigningTime(t);\n } else {\n if (m == \"signingCertificate\") {\n this.setSigningCertificate(t);\n } else {\n if (m == \"signingCertificateV2\") {\n this.setSigningCertificateV2(t);\n } else {\n if (m == \"signaturePolicyIdentifier\") {\n this.setSignaturePolicyIdentifier(t);\n }\n }\n }\n }\n }\n }\n\n return t;\n };\n\n this.setContentType = function (m) {\n var n = l.getOIDName(m.valhex, 0, null);\n\n if (n != null) {\n m.type = n;\n delete m.valhex;\n }\n };\n\n this.setSigningTime = function (o) {\n var n = i(o.valhex, 0);\n var m = hextoutf8(n);\n o.str = m;\n delete o.valhex;\n };\n\n this.setMessageDigest = function (m) {\n var n = i(m.valhex, 0);\n m.hex = n;\n delete m.valhex;\n };\n\n this.setSigningCertificate = function (n) {\n var q = j(n.valhex, 0);\n\n if (q.length > 0) {\n var m = b(n.valhex, q[0]);\n var p = j(m, 0);\n var t = [];\n\n for (var o = 0; o < p.length; o++) {\n var s = b(m, p[o]);\n var u = this.getESSCertID(s);\n t.push(u);\n }\n\n n.array = t;\n }\n\n if (q.length > 1) {\n var r = b(n.valhex, q[1]);\n n.polhex = r;\n }\n\n delete n.valhex;\n };\n\n this.setSignaturePolicyIdentifier = function (s) {\n var q = j(s.valhex, 0);\n\n if (q.length > 0) {\n var r = l.getOID(s.valhex, q[0]);\n s.oid = r;\n }\n\n if (q.length > 1) {\n var m = new a();\n var t = j(s.valhex, q[1]);\n var p = b(s.valhex, t[0]);\n var o = m.getAlgorithmIdentifierName(p);\n s.alg = o;\n var n = i(s.valhex, t[1]);\n s.hash = n;\n }\n\n delete s.valhex;\n };\n\n this.setSigningCertificateV2 = function (o) {\n var s = j(o.valhex, 0);\n\n if (s.length > 0) {\n var n = b(o.valhex, s[0]);\n var r = j(n, 0);\n var u = [];\n\n for (var q = 0; q < r.length; q++) {\n var m = b(n, r[q]);\n var p = this.getESSCertIDv2(m);\n u.push(p);\n }\n\n o.array = u;\n }\n\n if (s.length > 1) {\n var t = b(o.valhex, s[1]);\n o.polhex = t;\n }\n\n delete o.valhex;\n };\n\n this.getESSCertID = function (o) {\n var p = {};\n var n = j(o, 0);\n\n if (n.length > 0) {\n var q = i(o, n[0]);\n p.hash = q;\n }\n\n if (n.length > 1) {\n var m = b(o, n[1]);\n var r = this.getIssuerSerial(m);\n\n if (r.serial != undefined) {\n p.serial = r.serial;\n }\n\n if (r.issuer != undefined) {\n p.issuer = r.issuer;\n }\n }\n\n return p;\n };\n\n this.getESSCertIDv2 = function (q) {\n var s = {};\n var p = j(q, 0);\n\n if (p.length < 1 || 3 < p.length) {\n throw new g(\"wrong number of elements\");\n }\n\n var r = 0;\n\n if (q.substr(p[0], 2) == \"30\") {\n var o = b(q, p[0]);\n s.alg = h.getAlgorithmIdentifierName(o);\n r++;\n } else {\n s.alg = \"sha256\";\n }\n\n var n = i(q, p[r]);\n s.hash = n;\n\n if (p.length > r + 1) {\n var m = b(q, p[r + 1]);\n var t = this.getIssuerSerial(m);\n s.issuer = t.issuer;\n s.serial = t.serial;\n }\n\n return s;\n };\n\n this.getIssuerSerial = function (q) {\n var r = {};\n var n = j(q, 0);\n var m = b(q, n[0]);\n var p = h.getGeneralNames(m);\n var o = p[0].dn;\n r.issuer = o;\n var s = i(q, n[1]);\n r.serial = {\n hex: s\n };\n return r;\n };\n\n this.getCertificateSet = function (p) {\n var n = j(p, 0);\n var m = [];\n\n for (var o = 0; o < n.length; o++) {\n var r = b(p, n[o]);\n\n if (r.substr(0, 2) == \"30\") {\n var q = hextopem(r, \"CERTIFICATE\");\n m.push(q);\n }\n }\n\n return {\n array: m,\n sortflag: false\n };\n };\n};\n\nif (typeof KJUR == \"undefined\" || !KJUR) {\n KJUR = {};\n}\n\nif (typeof KJUR.asn1 == \"undefined\" || !KJUR.asn1) {\n KJUR.asn1 = {};\n}\n\nif (typeof KJUR.asn1.tsp == \"undefined\" || !KJUR.asn1.tsp) {\n KJUR.asn1.tsp = {};\n}\n\nKJUR.asn1.tsp.TimeStampToken = function (d) {\n var c = KJUR,\n b = c.asn1,\n a = b.tsp;\n a.TimeStampToken.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHexPrepare = function () {\n var e = new a.TSTInfo(this.params.econtent.content);\n this.params.econtent.content.hex = e.getEncodedHex();\n };\n\n if (d != undefined) {\n this.setByParam(d);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.tsp.TimeStampToken, KJUR.asn1.cms.SignedData);\n\nKJUR.asn1.tsp.TSTInfo = function (f) {\n var m = Error,\n c = KJUR,\n j = c.asn1,\n g = j.DERSequence,\n i = j.DERInteger,\n l = j.DERBoolean,\n h = j.DERGeneralizedTime,\n n = j.DERObjectIdentifier,\n e = j.DERTaggedObject,\n k = j.tsp,\n d = k.MessageImprint,\n b = k.Accuracy,\n a = j.x509.X500Name,\n o = j.x509.GeneralName;\n k.TSTInfo.superclass.constructor.call(this);\n this.dVersion = new i({\n \"int\": 1\n });\n this.dPolicy = null;\n this.dMessageImprint = null;\n this.dSerial = null;\n this.dGenTime = null;\n this.dAccuracy = null;\n this.dOrdering = null;\n this.dNonce = null;\n this.dTsa = null;\n\n this.getEncodedHex = function () {\n var p = [this.dVersion];\n\n if (this.dPolicy == null) {\n throw new Error(\"policy shall be specified.\");\n }\n\n p.push(this.dPolicy);\n\n if (this.dMessageImprint == null) {\n throw new Error(\"messageImprint shall be specified.\");\n }\n\n p.push(this.dMessageImprint);\n\n if (this.dSerial == null) {\n throw new Error(\"serialNumber shall be specified.\");\n }\n\n p.push(this.dSerial);\n\n if (this.dGenTime == null) {\n throw new Error(\"genTime shall be specified.\");\n }\n\n p.push(this.dGenTime);\n\n if (this.dAccuracy != null) {\n p.push(this.dAccuracy);\n }\n\n if (this.dOrdering != null) {\n p.push(this.dOrdering);\n }\n\n if (this.dNonce != null) {\n p.push(this.dNonce);\n }\n\n if (this.dTsa != null) {\n p.push(this.dTsa);\n }\n\n var q = new g({\n array: p\n });\n this.hTLV = q.getEncodedHex();\n return this.hTLV;\n };\n\n if (f !== undefined) {\n if (typeof f.policy == \"string\") {\n if (!f.policy.match(/^[0-9.]+$/)) {\n throw \"policy shall be oid like 0.1.4.134\";\n }\n\n this.dPolicy = new n({\n oid: f.policy\n });\n }\n\n if (f.messageImprint !== undefined) {\n this.dMessageImprint = new d(f.messageImprint);\n }\n\n if (f.serial !== undefined) {\n this.dSerial = new i(f.serial);\n }\n\n if (f.genTime !== undefined) {\n this.dGenTime = new h(f.genTime);\n }\n\n if (f.accuracy !== undefined) {\n this.dAccuracy = new b(f.accuracy);\n }\n\n if (f.ordering !== undefined && f.ordering == true) {\n this.dOrdering = new l();\n }\n\n if (f.nonce !== undefined) {\n this.dNonce = new i(f.nonce);\n }\n\n if (f.tsa !== undefined) {\n this.dTsa = new e({\n tag: \"a0\",\n explicit: true,\n obj: new o({\n dn: f.tsa\n })\n });\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.tsp.TSTInfo, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.tsp.Accuracy = function (d) {\n var c = KJUR,\n b = c.asn1,\n a = b.ASN1Util.newObject;\n b.tsp.Accuracy.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var f = this.params;\n var e = [];\n\n if (f.seconds != undefined && typeof f.seconds == \"number\") {\n e.push({\n \"int\": f.seconds\n });\n }\n\n if (f.millis != undefined && typeof f.millis == \"number\") {\n e.push({\n tag: {\n tagi: \"80\",\n obj: {\n \"int\": f.millis\n }\n }\n });\n }\n\n if (f.micros != undefined && typeof f.micros == \"number\") {\n e.push({\n tag: {\n tagi: \"81\",\n obj: {\n \"int\": f.micros\n }\n }\n });\n }\n\n return a({\n seq: e\n }).getEncodedHex();\n };\n\n if (d != undefined) {\n this.setByParam(d);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.tsp.Accuracy, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.tsp.MessageImprint = function (g) {\n var c = KJUR,\n b = c.asn1,\n a = b.DERSequence,\n d = b.DEROctetString,\n f = b.x509,\n e = f.AlgorithmIdentifier;\n b.tsp.MessageImprint.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var k = this.params;\n var j = new e({\n name: k.alg\n });\n var h = new d({\n hex: k.hash\n });\n var i = new a({\n array: [j, h]\n });\n return i.getEncodedHex();\n };\n\n if (g !== undefined) {\n this.setByParam(g);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.tsp.MessageImprint, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.tsp.TimeStampReq = function (c) {\n var a = KJUR,\n f = a.asn1,\n d = f.DERSequence,\n e = f.DERInteger,\n h = f.DERBoolean,\n j = f.ASN1Object,\n i = f.DERObjectIdentifier,\n g = f.tsp,\n b = g.MessageImprint;\n g.TimeStampReq.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var m = this.params;\n var k = [];\n k.push(new e({\n \"int\": 1\n }));\n\n if (m.messageImprint instanceof KJUR.asn1.ASN1Object) {\n k.push(m.messageImprint);\n } else {\n k.push(new b(m.messageImprint));\n }\n\n if (m.policy != undefined) {\n k.push(new i(m.policy));\n }\n\n if (m.nonce != undefined) {\n k.push(new e(m.nonce));\n }\n\n if (m.certreq == true) {\n k.push(new h());\n }\n\n var l = new d({\n array: k\n });\n return l.getEncodedHex();\n };\n\n if (c != undefined) {\n this.setByParam(c);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.tsp.TimeStampReq, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.tsp.TimeStampResp = function (g) {\n var e = KJUR,\n d = e.asn1,\n c = d.DERSequence,\n f = d.ASN1Object,\n a = d.tsp,\n b = a.PKIStatusInfo;\n a.TimeStampResp.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var j = this.params;\n var h = [new b(j.statusinfo)];\n\n if (j.econtent != undefined) {\n h.push(new a.TimeStampToken(j).getContentInfo());\n }\n\n if (j.tst != undefined && j.tst instanceof d.ASN1Object) {\n h.push(j.tst);\n }\n\n var i = new c({\n array: h\n });\n return i.getEncodedHex();\n };\n\n if (g != undefined) {\n this.setByParam(g);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.tsp.TimeStampResp, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.tsp.PKIStatusInfo = function (d) {\n var h = Error,\n a = KJUR,\n g = a.asn1,\n e = g.DERSequence,\n i = g.tsp,\n f = i.PKIStatus,\n c = i.PKIFreeText,\n b = i.PKIFailureInfo;\n i.PKIStatusInfo.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var l = this.params;\n var j = [];\n\n if (typeof l == \"string\") {\n j.push(new f(l));\n } else {\n if (l.status == undefined) {\n throw new h(\"property 'status' unspecified\");\n }\n\n j.push(new f(l.status));\n\n if (l.statusstr != undefined) {\n j.push(new c(l.statusstr));\n }\n\n if (l.failinfo != undefined) {\n j.push(new b(l.failinfo));\n }\n }\n\n var k = new e({\n array: j\n });\n return k.getEncodedHex();\n };\n\n if (d != undefined) {\n this.setByParam(d);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.tsp.PKIStatusInfo, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.tsp.PKIStatus = function (g) {\n var e = Error,\n d = KJUR,\n c = d.asn1,\n f = c.DERInteger,\n b = c.tsp;\n b.PKIStatus.superclass.constructor.call(this);\n var a = {\n granted: 0,\n grantedWithMods: 1,\n rejection: 2,\n waiting: 3,\n revocationWarning: 4,\n revocationNotification: 5\n };\n this.params = null;\n\n this.getEncodedHex = function () {\n var k = this.params;\n var h, j;\n\n if (typeof k == \"string\") {\n try {\n j = a[k];\n } catch (i) {\n throw new e(\"undefined name: \" + k);\n }\n } else {\n if (typeof k == \"number\") {\n j = k;\n } else {\n throw new e(\"unsupported params\");\n }\n }\n\n return new f({\n \"int\": j\n }).getEncodedHex();\n };\n\n if (g != undefined) {\n this.setByParam(g);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.tsp.PKIStatus, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.tsp.PKIFreeText = function (g) {\n var f = Error,\n e = KJUR,\n d = e.asn1,\n b = d.DERSequence,\n c = d.DERUTF8String,\n a = d.tsp;\n a.PKIFreeText.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var l = this.params;\n\n if (!l instanceof Array) {\n throw new f(\"wrong params: not array\");\n }\n\n var h = [];\n\n for (var k = 0; k < l.length; k++) {\n h.push(new c({\n str: l[k]\n }));\n }\n\n var j = new b({\n array: h\n });\n return j.getEncodedHex();\n };\n\n if (g != undefined) {\n this.setByParam(g);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.tsp.PKIFreeText, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.tsp.PKIFailureInfo = function (h) {\n var f = Error,\n e = KJUR,\n d = e.asn1,\n g = d.DERBitString,\n b = d.tsp,\n c = b.PKIFailureInfo;\n var a = {\n badAlg: 0,\n badRequest: 2,\n badDataFormat: 5,\n timeNotAvailable: 14,\n unacceptedPolicy: 15,\n unacceptedExtension: 16,\n addInfoNotAvailable: 17,\n systemFailure: 25\n };\n c.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var k = this.params;\n var j;\n\n if (typeof k == \"string\") {\n try {\n j = a[k];\n } catch (i) {\n throw new f(\"undefined name: \" + k);\n }\n } else {\n if (typeof k == \"number\") {\n j = k;\n } else {\n throw new f(\"wrong params\");\n }\n }\n\n return new g({\n bin: j.toString(2)\n }).getEncodedHex();\n };\n\n if (h != undefined) {\n this.setByParam(h);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.tsp.PKIFailureInfo, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.tsp.AbstractTSAAdapter = function (a) {\n this.getTSTHex = function (c, b) {\n throw \"not implemented yet\";\n };\n};\n\nKJUR.asn1.tsp.SimpleTSAAdapter = function (e) {\n var d = KJUR,\n c = d.asn1,\n a = c.tsp,\n b = d.crypto.Util.hashHex;\n a.SimpleTSAAdapter.superclass.constructor.call(this);\n this.params = null;\n this.serial = 0;\n\n this.getTSTHex = function (g, f) {\n var i = b(g, f);\n this.params.econtent.content.messageImprint = {\n alg: f,\n hash: i\n };\n this.params.econtent.content.serial = {\n \"int\": this.serial++\n };\n var h = Math.floor(Math.random() * 1000000000);\n this.params.econtent.content.nonce = {\n \"int\": h\n };\n var j = new a.TimeStampToken(this.params);\n return j.getContentInfoEncodedHex();\n };\n\n if (e !== undefined) {\n this.params = e;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.tsp.SimpleTSAAdapter, KJUR.asn1.tsp.AbstractTSAAdapter);\n\nKJUR.asn1.tsp.FixedTSAAdapter = function (e) {\n var d = KJUR,\n c = d.asn1,\n a = c.tsp,\n b = d.crypto.Util.hashHex;\n a.FixedTSAAdapter.superclass.constructor.call(this);\n this.params = null;\n\n this.getTSTHex = function (g, f) {\n var h = b(g, f);\n this.params.econtent.content.messageImprint = {\n alg: f,\n hash: h\n };\n var i = new a.TimeStampToken(this.params);\n return i.getContentInfoEncodedHex();\n };\n\n if (e !== undefined) {\n this.params = e;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.tsp.FixedTSAAdapter, KJUR.asn1.tsp.AbstractTSAAdapter);\nKJUR.asn1.tsp.TSPUtil = new function () {}();\n\nKJUR.asn1.tsp.TSPUtil.newTimeStampToken = function (a) {\n return new KJUR.asn1.tsp.TimeStampToken(a);\n};\n\nKJUR.asn1.tsp.TSPUtil.parseTimeStampReq = function (m) {\n var l = ASN1HEX;\n var h = l.getChildIdx;\n var f = l.getV;\n var b = l.getTLV;\n var j = {};\n j.certreq = false;\n var a = h(m, 0);\n\n if (a.length < 2) {\n throw \"TimeStampReq must have at least 2 items\";\n }\n\n var e = b(m, a[1]);\n j.messageImprint = KJUR.asn1.tsp.TSPUtil.parseMessageImprint(e);\n\n for (var d = 2; d < a.length; d++) {\n var g = a[d];\n var k = m.substr(g, 2);\n\n if (k == \"06\") {\n var c = f(m, g);\n j.policy = l.hextooidstr(c);\n }\n\n if (k == \"02\") {\n j.nonce = f(m, g);\n }\n\n if (k == \"01\") {\n j.certreq = true;\n }\n }\n\n return j;\n};\n\nKJUR.asn1.tsp.TSPUtil.parseMessageImprint = function (c) {\n var m = ASN1HEX;\n var j = m.getChildIdx;\n var i = m.getV;\n var g = m.getIdxbyList;\n var k = {};\n\n if (c.substr(0, 2) != \"30\") {\n throw \"head of messageImprint hex shall be '30'\";\n }\n\n var a = j(c, 0);\n var l = g(c, 0, [0, 0]);\n var e = i(c, l);\n var d = m.hextooidstr(e);\n var h = KJUR.asn1.x509.OID.oid2name(d);\n\n if (h == \"\") {\n throw \"hashAlg name undefined: \" + d;\n }\n\n var b = h;\n var f = g(c, 0, [1]);\n k.alg = b;\n k.hash = i(c, f);\n return k;\n};\n\nKJUR.asn1.tsp.TSPParser = function () {\n var e = Error,\n a = X509,\n f = new a(),\n k = ASN1HEX,\n g = k.getV,\n b = k.getTLV,\n d = k.getIdxbyList,\n c = k.getTLVbyListEx,\n i = k.getChildIdx;\n var j = [\"granted\", \"grantedWithMods\", \"rejection\", \"waiting\", \"revocationWarning\", \"revocationNotification\"];\n var h = {\n 0: \"badAlg\",\n 2: \"badRequest\",\n 5: \"badDataFormat\",\n 14: \"timeNotAvailable\",\n 15: \"unacceptedPolicy\",\n 16: \"unacceptedExtension\",\n 17: \"addInfoNotAvailable\",\n 25: \"systemFailure\"\n };\n\n this.getResponse = function (n) {\n var l = i(n, 0);\n\n if (l.length == 1) {\n return this.getPKIStatusInfo(b(n, l[0]));\n } else {\n if (l.length > 1) {\n var o = this.getPKIStatusInfo(b(n, l[0]));\n var m = b(n, l[1]);\n var p = this.getToken(m);\n p.statusinfo = o;\n return p;\n }\n }\n };\n\n this.getToken = function (m) {\n var l = new KJUR.asn1.cms.CMSParser();\n var n = l.getCMSSignedData(m);\n this.setTSTInfo(n);\n return n;\n };\n\n this.setTSTInfo = function (l) {\n var o = l.econtent;\n\n if (o.type == \"tstinfo\") {\n var n = o.content.hex;\n var m = this.getTSTInfo(n);\n o.content = m;\n }\n };\n\n this.getTSTInfo = function (r) {\n var x = {};\n var s = i(r, 0);\n var p = g(r, s[1]);\n x.policy = hextooid(p);\n var o = b(r, s[2]);\n x.messageImprint = this.getMessageImprint(o);\n var u = g(r, s[3]);\n x.serial = {\n hex: u\n };\n var y = g(r, s[4]);\n x.genTime = {\n str: hextoutf8(y)\n };\n var q = 0;\n\n if (s.length > 5 && r.substr(s[5], 2) == \"30\") {\n var v = b(r, s[5]);\n x.accuracy = this.getAccuracy(v);\n q++;\n }\n\n if (s.length > 5 + q && r.substr(s[5 + q], 2) == \"01\") {\n var z = g(r, s[5 + q]);\n\n if (z == \"ff\") {\n x.ordering = true;\n }\n\n q++;\n }\n\n if (s.length > 5 + q && r.substr(s[5 + q], 2) == \"02\") {\n var n = g(r, s[5 + q]);\n x.nonce = {\n hex: n\n };\n q++;\n }\n\n if (s.length > 5 + q && r.substr(s[5 + q], 2) == \"a0\") {\n var m = b(r, s[5 + q]);\n m = \"30\" + m.substr(2);\n pGeneralNames = f.getGeneralNames(m);\n var t = pGeneralNames[0].dn;\n x.tsa = t;\n q++;\n }\n\n if (s.length > 5 + q && r.substr(s[5 + q], 2) == \"a1\") {\n var l = b(r, s[5 + q]);\n l = \"30\" + l.substr(2);\n var w = f.getExtParamArray(l);\n x.ext = w;\n q++;\n }\n\n return x;\n };\n\n this.getAccuracy = function (q) {\n var r = {};\n var o = i(q, 0);\n\n for (var p = 0; p < o.length; p++) {\n var m = q.substr(o[p], 2);\n var l = g(q, o[p]);\n var n = parseInt(l, 16);\n\n if (m == \"02\") {\n r.seconds = n;\n } else {\n if (m == \"80\") {\n r.millis = n;\n } else {\n if (m == \"81\") {\n r.micros = n;\n }\n }\n }\n }\n\n return r;\n };\n\n this.getMessageImprint = function (n) {\n if (n.substr(0, 2) != \"30\") {\n throw new Error(\"head of messageImprint hex shall be x30\");\n }\n\n var s = {};\n var l = i(n, 0);\n var t = d(n, 0, [0, 0]);\n var o = g(n, t);\n var p = k.hextooidstr(o);\n var r = KJUR.asn1.x509.OID.oid2name(p);\n\n if (r == \"\") {\n throw new Error(\"hashAlg name undefined: \" + p);\n }\n\n var m = r;\n var q = d(n, 0, [1]);\n s.alg = m;\n s.hash = g(n, q);\n return s;\n };\n\n this.getPKIStatusInfo = function (o) {\n var t = {};\n var r = i(o, 0);\n var n = 0;\n\n try {\n var l = g(o, r[0]);\n var p = parseInt(l, 16);\n t.status = j[p];\n } catch (s) {}\n\n if (r.length > 1 && o.substr(r[1], 2) == \"30\") {\n var m = b(o, r[1]);\n t.statusstr = this.getPKIFreeText(m);\n n++;\n }\n\n if (r.length > n && o.substr(r[1 + n], 2) == \"03\") {\n var q = b(o, r[1 + n]);\n t.failinfo = this.getPKIFailureInfo(q);\n }\n\n return t;\n };\n\n this.getPKIFreeText = function (n) {\n var o = [];\n var l = i(n, 0);\n\n for (var m = 0; m < l.length; m++) {\n o.push(k.getString(n, l[m]));\n }\n\n return o;\n };\n\n this.getPKIFailureInfo = function (l) {\n var m = k.getInt(l, 0);\n\n if (h[m] != undefined) {\n return h[m];\n } else {\n return m;\n }\n };\n};\n\nif (typeof KJUR == \"undefined\" || !KJUR) {\n KJUR = {};\n}\n\nif (typeof KJUR.asn1 == \"undefined\" || !KJUR.asn1) {\n KJUR.asn1 = {};\n}\n\nif (typeof KJUR.asn1.cades == \"undefined\" || !KJUR.asn1.cades) {\n KJUR.asn1.cades = {};\n}\n\nKJUR.asn1.cades.SignaturePolicyIdentifier = function (e) {\n var c = KJUR,\n b = c.asn1,\n a = b.cades,\n d = a.SignaturePolicyId;\n a.SignaturePolicyIdentifier.superclass.constructor.call(this);\n this.typeOid = \"1.2.840.113549.1.9.16.2.15\";\n this.params = null;\n\n this.getValueArray = function () {\n return [new d(this.params)];\n };\n\n this.setByParam = function (f) {\n this.params = f;\n };\n\n if (e != undefined) {\n this.setByParam(e);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cades.SignaturePolicyIdentifier, KJUR.asn1.cms.Attribute);\n\nKJUR.asn1.cades.SignaturePolicyId = function (e) {\n var a = KJUR,\n g = a.asn1,\n f = g.DERSequence,\n i = g.DERObjectIdentifier,\n d = g.x509,\n j = d.AlgorithmIdentifier,\n c = g.cades,\n h = c.SignaturePolicyId,\n b = c.OtherHashAlgAndValue;\n h.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var m = this.params;\n var k = [];\n k.push(new i(m.oid));\n k.push(new b(m));\n var l = new f({\n array: k\n });\n return l.getEncodedHex();\n };\n\n this.setByParam = function (k) {\n this.params = k;\n };\n\n if (e != undefined) {\n this.setByParam(e);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cades.SignaturePolicyId, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cades.OtherHashAlgAndValue = function (e) {\n var h = Error,\n a = KJUR,\n g = a.asn1,\n f = g.DERSequence,\n i = g.DEROctetString,\n d = g.x509,\n j = d.AlgorithmIdentifier,\n c = g.cades,\n b = c.OtherHashAlgAndValue;\n b.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var o = this.params;\n\n if (o.alg == undefined) {\n throw new h(\"property 'alg' not specified\");\n }\n\n if (o.hash == undefined && o.cert == undefined) {\n throw new h(\"property 'hash' nor 'cert' not specified\");\n }\n\n var m = null;\n\n if (o.hash != undefined) {\n m = o.hash;\n } else {\n if (o.cert != undefined) {\n if (typeof o.cert != \"string\") {\n throw new h(\"cert not string\");\n }\n\n var n = o.cert;\n\n if (o.cert.indexOf(\"-----BEGIN\") != -1) {\n n = pemtohex(o.cert);\n }\n\n m = KJUR.crypto.Util.hashHex(n, o.alg);\n }\n }\n\n var k = [];\n k.push(new j({\n name: o.alg\n }));\n k.push(new i({\n hex: m\n }));\n var l = new f({\n array: k\n });\n return l.getEncodedHex();\n };\n\n if (e != undefined) {\n this.setByParam(e);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cades.OtherHashAlgAndValue, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cades.OtherHashValue = function (g) {\n KJUR.asn1.cades.OtherHashValue.superclass.constructor.call(this);\n var d = Error,\n c = KJUR,\n f = c.lang.String.isHex,\n b = c.asn1,\n e = b.DEROctetString,\n a = c.crypto.Util.hashHex;\n this.params = null;\n\n this.getEncodedHex = function () {\n var j = this.params;\n\n if (j.hash == undefined && j.cert == undefined) {\n throw new d(\"hash or cert not specified\");\n }\n\n var h = null;\n\n if (j.hash != undefined) {\n h = j.hash;\n } else {\n if (j.cert != undefined) {\n if (typeof j.cert != \"string\") {\n throw new d(\"cert not string\");\n }\n\n var i = j.cert;\n\n if (j.cert.indexOf(\"-----BEGIN\") != -1) {\n i = pemtohex(j.cert);\n }\n\n h = KJUR.crypto.Util.hashHex(i, \"sha1\");\n }\n }\n\n return new e({\n hex: h\n }).getEncodedHex();\n };\n\n if (g != undefined) {\n this.setByParam(g);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cades.OtherHashValue, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cades.SignatureTimeStamp = function (h) {\n var d = Error,\n c = KJUR,\n f = c.lang.String.isHex,\n b = c.asn1,\n e = b.ASN1Object,\n g = b.x509,\n a = b.cades;\n a.SignatureTimeStamp.superclass.constructor.call(this);\n this.typeOid = \"1.2.840.113549.1.9.16.2.14\";\n this.params = null;\n\n this.getValueArray = function () {\n var l = this.params;\n\n if (l.tst != undefined) {\n if (f(l.tst)) {\n var j = new e();\n j.hTLV = l.tst;\n return [j];\n } else {\n if (l.tst instanceof e) {\n return [l.tst];\n } else {\n throw new d(\"params.tst has wrong value\");\n }\n }\n } else {\n if (l.res != undefined) {\n var k = l.res;\n\n if (k instanceof e) {\n k = k.getEncodedHex();\n }\n\n if (typeof k != \"string\" || !f(k)) {\n throw new d(\"params.res has wrong value\");\n }\n\n var i = ASN1HEX.getTLVbyList(k, 0, [1]);\n var j = new e();\n j.hTLV = l.tst;\n return [j];\n }\n }\n };\n\n if (h != null) {\n this.setByParam(h);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cades.SignatureTimeStamp, KJUR.asn1.cms.Attribute);\n\nKJUR.asn1.cades.CompleteCertificateRefs = function (h) {\n var f = Error,\n e = KJUR,\n d = e.asn1,\n b = d.DERSequence,\n c = d.cades,\n a = c.OtherCertID,\n g = e.lang.String.isHex;\n c.CompleteCertificateRefs.superclass.constructor.call(this);\n this.typeOid = \"1.2.840.113549.1.9.16.2.21\";\n this.params = null;\n\n this.getValueArray = function () {\n var o = this.params;\n var k = [];\n\n for (var m = 0; m < o.array.length; m++) {\n var n = o.array[m];\n\n if (typeof n == \"string\") {\n if (n.indexOf(\"-----BEGIN\") != -1) {\n n = {\n cert: n\n };\n } else {\n if (g(n)) {\n n = {\n hash: n\n };\n } else {\n throw new f(\"unsupported value: \" + n);\n }\n }\n }\n\n if (o.alg != undefined && n.alg == undefined) {\n n.alg = o.alg;\n }\n\n if (o.hasis != undefined && n.hasis == undefined) {\n n.hasis = o.hasis;\n }\n\n var j = new a(n);\n k.push(j);\n }\n\n var l = new b({\n array: k\n });\n return [l];\n };\n\n if (h != undefined) {\n this.setByParam(h);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cades.CompleteCertificateRefs, KJUR.asn1.cms.Attribute);\n\nKJUR.asn1.cades.OtherCertID = function (e) {\n var a = KJUR,\n h = a.asn1,\n f = h.DERSequence,\n i = h.cms,\n g = i.IssuerSerial,\n c = h.cades,\n d = c.OtherHashValue,\n b = c.OtherHashAlgAndValue;\n c.OtherCertID.superclass.constructor.call(this);\n this.params = e;\n\n this.getEncodedHex = function () {\n var n = this.params;\n\n if (typeof n == \"string\") {\n if (n.indexOf(\"-----BEGIN\") != -1) {\n n = {\n cert: n\n };\n } else {\n if (_isHex(n)) {\n n = {\n hash: n\n };\n }\n }\n }\n\n var j = [];\n var m = null;\n\n if (n.alg != undefined) {\n m = new b(n);\n } else {\n m = new d(n);\n }\n\n j.push(m);\n\n if (n.cert != undefined && n.hasis == true || n.issuer != undefined && n.serial != undefined) {\n var l = new g(n);\n j.push(l);\n }\n\n var k = new f({\n array: j\n });\n return k.getEncodedHex();\n };\n\n if (e != undefined) {\n this.setByParam(e);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cades.OtherCertID, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.cades.OtherHash = function (g) {\n var i = Error,\n a = KJUR,\n h = a.asn1,\n j = h.cms,\n c = h.cades,\n b = c.OtherHashAlgAndValue,\n e = c.OtherHashValue,\n d = a.crypto.Util.hashHex,\n f = a.lang.String.isHex;\n c.OtherHash.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var l = this.params;\n\n if (typeof l == \"string\") {\n if (l.indexOf(\"-----BEGIN\") != -1) {\n l = {\n cert: l\n };\n } else {\n if (f(l)) {\n l = {\n hash: l\n };\n }\n }\n }\n\n var k = null;\n\n if (l.alg != undefined) {\n k = new b(l);\n } else {\n k = new e(l);\n }\n\n return k.getEncodedHex();\n };\n\n if (g != undefined) {\n this.setByParam(g);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.cades.OtherHash, KJUR.asn1.ASN1Object);\nKJUR.asn1.cades.CAdESUtil = new function () {}();\n\nKJUR.asn1.cades.CAdESUtil.parseSignedDataForAddingUnsigned = function (a) {\n var c = new KJUR.asn1.cms.CMSParser();\n var b = c.getCMSSignedData(a);\n return b;\n};\n\nKJUR.asn1.cades.CAdESUtil.parseSignerInfoForAddingUnsigned = function (g, q, c) {\n var p = ASN1HEX,\n s = p.getChildIdx,\n a = p.getTLV,\n l = p.getV,\n v = KJUR,\n h = v.asn1,\n n = h.ASN1Object,\n j = h.cms,\n k = j.AttributeList,\n w = j.SignerInfo;\n var o = {};\n var t = s(g, q);\n\n if (t.length != 6) {\n throw \"not supported items for SignerInfo (!=6)\";\n }\n\n var d = t.shift();\n o.version = a(g, d);\n var e = t.shift();\n o.si = a(g, e);\n var m = t.shift();\n o.digalg = a(g, m);\n var f = t.shift();\n o.sattrs = a(g, f);\n var i = t.shift();\n o.sigalg = a(g, i);\n var b = t.shift();\n o.sig = a(g, b);\n o.sigval = l(g, b);\n var u = null;\n o.obj = new w();\n u = new n();\n u.hTLV = o.version;\n o.obj.dCMSVersion = u;\n u = new n();\n u.hTLV = o.si;\n o.obj.dSignerIdentifier = u;\n u = new n();\n u.hTLV = o.digalg;\n o.obj.dDigestAlgorithm = u;\n u = new n();\n u.hTLV = o.sattrs;\n o.obj.dSignedAttrs = u;\n u = new n();\n u.hTLV = o.sigalg;\n o.obj.dSigAlg = u;\n u = new n();\n u.hTLV = o.sig;\n o.obj.dSig = u;\n o.obj.dUnsignedAttrs = new k();\n return o;\n};\n\nif (typeof KJUR.asn1.csr == \"undefined\" || !KJUR.asn1.csr) {\n KJUR.asn1.csr = {};\n}\n\nKJUR.asn1.csr.CertificationRequest = function (g) {\n var d = KJUR,\n c = d.asn1,\n e = c.DERBitString,\n b = c.DERSequence,\n a = c.csr,\n f = c.x509,\n h = a.CertificationRequestInfo;\n a.CertificationRequest.superclass.constructor.call(this);\n\n this.setByParam = function (i) {\n this.params = i;\n };\n\n this.sign = function () {\n var j = new h(this.params).getEncodedHex();\n var k = new KJUR.crypto.Signature({\n alg: this.params.sigalg\n });\n k.init(this.params.sbjprvkey);\n k.updateHex(j);\n var i = k.sign();\n this.params.sighex = i;\n };\n\n this.getPEM = function () {\n return hextopem(this.getEncodedHex(), \"CERTIFICATE REQUEST\");\n };\n\n this.getEncodedHex = function () {\n var l = this.params;\n var j = new KJUR.asn1.csr.CertificationRequestInfo(this.params);\n var m = new KJUR.asn1.x509.AlgorithmIdentifier({\n name: l.sigalg\n });\n\n if (l.sighex == undefined && l.sbjprvkey != undefined) {\n this.sign();\n }\n\n if (l.sighex == undefined) {\n throw new Error(\"sighex or sbjprvkey parameter not defined\");\n }\n\n var k = new e({\n hex: \"00\" + l.sighex\n });\n var i = new b({\n array: [j, m, k]\n });\n return i.getEncodedHex();\n };\n\n if (g !== undefined) {\n this.setByParam(g);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.csr.CertificationRequest, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.csr.CertificationRequestInfo = function (f) {\n var b = KJUR,\n j = b.asn1,\n c = j.DERBitString,\n g = j.DERSequence,\n i = j.DERInteger,\n n = j.DERUTF8String,\n d = j.DERTaggedObject,\n h = j.ASN1Util.newObject,\n l = j.csr,\n e = j.x509,\n a = e.X500Name,\n k = e.Extensions,\n m = e.SubjectPublicKeyInfo;\n l.CertificationRequestInfo.superclass.constructor.call(this);\n this.params = null;\n\n this.setByParam = function (o) {\n if (o != undefined) {\n this.params = o;\n }\n };\n\n this.getEncodedHex = function () {\n var s = this.params;\n var p = [];\n p.push(new i({\n \"int\": 0\n }));\n p.push(new a(s.subject));\n p.push(new m(KEYUTIL.getKey(s.sbjpubkey)));\n\n if (s.extreq != undefined) {\n var o = new k(s.extreq);\n var r = h({\n tag: {\n tag: \"a0\",\n explict: true,\n obj: {\n seq: [{\n oid: \"1.2.840.113549.1.9.14\"\n }, {\n set: [o]\n }]\n }\n }\n });\n p.push(r);\n } else {\n p.push(new d({\n tag: \"a0\",\n explicit: false,\n obj: new n({\n str: \"\"\n })\n }));\n }\n\n var q = new g({\n array: p\n });\n return q.getEncodedHex();\n };\n\n if (f != undefined) {\n this.setByParam(f);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.csr.CertificationRequestInfo, KJUR.asn1.ASN1Object);\nKJUR.asn1.csr.CSRUtil = new function () {}();\n\nKJUR.asn1.csr.CSRUtil.newCSRPEM = function (e) {\n var b = KEYUTIL,\n a = KJUR.asn1.csr;\n var c = new a.CertificationRequest(e);\n var d = c.getPEM();\n return d;\n};\n\nKJUR.asn1.csr.CSRUtil.getParam = function (c) {\n var m = ASN1HEX,\n j = m.getV;\n _getIdxbyList = m.getIdxbyList;\n _getTLVbyList = m.getTLVbyList, _getTLVbyListEx = m.getTLVbyListEx, _getVbyListEx = m.getVbyListEx;\n\n var b = function b(p) {\n var o = _getIdxbyList(p, 0, [0, 3, 0, 0], \"06\");\n\n if (j(p, o) != \"2a864886f70d01090e\") {\n return null;\n }\n\n return _getTLVbyList(p, 0, [0, 3, 0, 1, 0], \"30\");\n };\n\n var n = {};\n\n if (c.indexOf(\"-----BEGIN CERTIFICATE REQUEST\") == -1) {\n throw new Error(\"argument is not PEM file\");\n }\n\n var e = pemtohex(c, \"CERTIFICATE REQUEST\");\n\n try {\n var g = _getTLVbyListEx(e, 0, [0, 1]);\n\n if (g == \"3000\") {\n n.subject = {};\n } else {\n var k = new X509();\n n.subject = k.getX500Name(g);\n }\n } catch (h) {}\n\n var d = _getTLVbyListEx(e, 0, [0, 2]);\n\n var f = KEYUTIL.getKey(d, null, \"pkcs8pub\");\n n.sbjpubkey = KEYUTIL.getPEM(f, \"PKCS8PUB\");\n var i = b(e);\n var k = new X509();\n\n if (i != null) {\n n.extreq = k.getExtParamArray(i);\n }\n\n try {\n var a = _getTLVbyListEx(e, 0, [1], \"30\");\n\n var k = new X509();\n n.sigalg = k.getAlgorithmIdentifierName(a);\n } catch (h) {}\n\n try {\n var l = _getVbyListEx(e, 0, [2]);\n\n n.sighex = l;\n } catch (h) {}\n\n return n;\n};\n\nif (typeof KJUR == \"undefined\" || !KJUR) {\n KJUR = {};\n}\n\nif (typeof KJUR.asn1 == \"undefined\" || !KJUR.asn1) {\n KJUR.asn1 = {};\n}\n\nif (typeof KJUR.asn1.ocsp == \"undefined\" || !KJUR.asn1.ocsp) {\n KJUR.asn1.ocsp = {};\n}\n\nKJUR.asn1.ocsp.DEFAULT_HASH = \"sha1\";\n\nKJUR.asn1.ocsp.OCSPResponse = function (e) {\n KJUR.asn1.ocsp.OCSPResponse.superclass.constructor.call(this);\n var a = KJUR.asn1.DEREnumerated,\n b = KJUR.asn1.ASN1Util.newObject,\n c = KJUR.asn1.ocsp.ResponseBytes;\n var d = [\"successful\", \"malformedRequest\", \"internalError\", \"tryLater\", \"_not_used_\", \"sigRequired\", \"unauthorized\"];\n this.params = null;\n\n this._getStatusCode = function () {\n var f = this.params.resstatus;\n\n if (typeof f == \"number\") {\n return f;\n }\n\n if (typeof f != \"string\") {\n return -1;\n }\n\n return d.indexOf(f);\n };\n\n this.setByParam = function (f) {\n this.params = f;\n };\n\n this.getEncodedHex = function () {\n var h = this.params;\n\n var g = this._getStatusCode();\n\n if (g == -1) {\n throw new Error(\"responseStatus not supported: \" + h.resstatus);\n }\n\n if (g != 0) {\n return b({\n seq: [{\n \"enum\": {\n \"int\": g\n }\n }]\n }).getEncodedHex();\n }\n\n var f = new c(h);\n return b({\n seq: [{\n \"enum\": {\n \"int\": 0\n }\n }, {\n tag: {\n tag: \"a0\",\n explicit: true,\n obj: f\n }\n }]\n }).getEncodedHex();\n };\n\n if (e !== undefined) {\n this.setByParam(e);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.ocsp.OCSPResponse, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.ocsp.ResponseBytes = function (e) {\n KJUR.asn1.ocsp.ResponseBytes.superclass.constructor.call(this);\n var b = KJUR.asn1,\n a = b.DERSequence,\n f = b.DERObjectIdentifier,\n c = b.DEROctetString,\n d = b.ocsp.BasicOCSPResponse;\n this.params = null;\n\n this.setByParam = function (g) {\n this.params = g;\n };\n\n this.getEncodedHex = function () {\n var j = this.params;\n\n if (j.restype != \"ocspBasic\") {\n throw new Error(\"not supported responseType: \" + j.restype);\n }\n\n var i = new d(j);\n var g = [];\n g.push(new f({\n name: \"ocspBasic\"\n }));\n g.push(new c({\n hex: i.getEncodedHex()\n }));\n var h = new a({\n array: g\n });\n return h.getEncodedHex();\n };\n\n if (e !== undefined) {\n this.setByParam(e);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.ocsp.ResponseBytes, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.ocsp.BasicOCSPResponse = function (d) {\n KJUR.asn1.ocsp.BasicOCSPResponse.superclass.constructor.call(this);\n var i = Error,\n g = KJUR.asn1,\n j = g.ASN1Object,\n e = g.DERSequence,\n f = g.DERGeneralizedTime,\n c = g.DERTaggedObject,\n b = g.DERBitString,\n h = g.x509.Extensions,\n k = g.x509.AlgorithmIdentifier,\n l = g.ocsp,\n a = l.ResponderID;\n _SingleResponseList = l.SingleResponseList, _ResponseData = l.ResponseData;\n this.params = null;\n\n this.setByParam = function (m) {\n this.params = m;\n };\n\n this.sign = function () {\n var o = this.params;\n var m = o.tbsresp.getEncodedHex();\n var n = new KJUR.crypto.Signature({\n alg: o.sigalg\n });\n n.init(o.reskey);\n n.updateHex(m);\n o.sighex = n.sign();\n };\n\n this.getEncodedHex = function () {\n var t = this.params;\n\n if (t.tbsresp == undefined) {\n t.tbsresp = new _ResponseData(t);\n }\n\n if (t.sighex == undefined && t.reskey != undefined) {\n this.sign();\n }\n\n var n = [];\n n.push(t.tbsresp);\n n.push(new k({\n name: t.sigalg\n }));\n n.push(new b({\n hex: \"00\" + t.sighex\n }));\n\n if (t.certs != undefined && t.certs.length != undefined) {\n var m = [];\n\n for (var q = 0; q < t.certs.length; q++) {\n var s = t.certs[q];\n var r = null;\n\n if (ASN1HEX.isASN1HEX(s)) {\n r = s;\n } else {\n if (s.match(/-----BEGIN/)) {\n r = pemtohex(s);\n } else {\n throw new i(\"certs[\" + q + \"] not hex or PEM\");\n }\n }\n\n m.push(new j({\n tlv: r\n }));\n }\n\n var p = new e({\n array: m\n });\n n.push(new c({\n tag: \"a0\",\n explicit: true,\n obj: p\n }));\n }\n\n var o = new e({\n array: n\n });\n return o.getEncodedHex();\n };\n\n if (d !== undefined) {\n this.setByParam(d);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.ocsp.BasicOCSPResponse, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.ocsp.ResponseData = function (c) {\n KJUR.asn1.ocsp.ResponseData.superclass.constructor.call(this);\n var h = Error,\n f = KJUR.asn1,\n d = f.DERSequence,\n e = f.DERGeneralizedTime,\n b = f.DERTaggedObject,\n g = f.x509.Extensions,\n i = f.ocsp,\n a = i.ResponderID;\n _SingleResponseList = i.SingleResponseList;\n this.params = null;\n\n this.getEncodedHex = function () {\n var m = this.params;\n\n if (m.respid != undefined) {\n new h(\"respid not specified\");\n }\n\n if (m.prodat != undefined) {\n new h(\"prodat not specified\");\n }\n\n if (m.array != undefined) {\n new h(\"array not specified\");\n }\n\n var j = [];\n j.push(new a(m.respid));\n j.push(new e(m.prodat));\n j.push(new _SingleResponseList(m.array));\n\n if (m.ext != undefined) {\n var l = new g(m.ext);\n j.push(new b({\n tag: \"a1\",\n explicit: true,\n obj: l\n }));\n }\n\n var k = new d({\n array: j\n });\n return k.getEncodedHex();\n };\n\n this.setByParam = function (j) {\n this.params = j;\n };\n\n if (c !== undefined) {\n this.setByParam(c);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.ocsp.ResponseData, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.ocsp.ResponderID = function (d) {\n KJUR.asn1.ocsp.ResponderID.superclass.constructor.call(this);\n var b = KJUR.asn1,\n a = b.ASN1Util.newObject,\n c = b.x509.X500Name;\n this.params = null;\n\n this.getEncodedHex = function () {\n var f = this.params;\n\n if (f.key != undefined) {\n var e = a({\n tag: {\n tag: \"a2\",\n explicit: true,\n obj: {\n octstr: {\n hex: f.key\n }\n }\n }\n });\n return e.getEncodedHex();\n } else {\n if (f.name != undefined) {\n var e = a({\n tag: {\n tag: \"a1\",\n explicit: true,\n obj: new c(f.name)\n }\n });\n return e.getEncodedHex();\n }\n }\n\n throw new Error(\"key or name not specified\");\n };\n\n this.setByParam = function (e) {\n this.params = e;\n };\n\n if (d !== undefined) {\n this.setByParam(d);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.ocsp.ResponderID, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.ocsp.SingleResponseList = function (d) {\n KJUR.asn1.ocsp.SingleResponseList.superclass.constructor.call(this);\n var c = KJUR.asn1,\n b = c.DERSequence,\n a = c.ocsp.SingleResponse;\n this.params = null;\n\n this.getEncodedHex = function () {\n var h = this.params;\n\n if (_typeof(h) != \"object\" || h.length == undefined) {\n throw new Error(\"params not specified properly\");\n }\n\n var e = [];\n\n for (var g = 0; g < h.length; g++) {\n e.push(new a(h[g]));\n }\n\n var f = new b({\n array: e\n });\n return f.getEncodedHex();\n };\n\n this.setByParam = function (e) {\n this.params = e;\n };\n\n if (d !== undefined) {\n this.setByParam(d);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.ocsp.SingleResponseList, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.ocsp.SingleResponse = function (e) {\n var k = Error,\n a = KJUR,\n i = a.asn1,\n f = i.DERSequence,\n g = i.DERGeneralizedTime,\n b = i.DERTaggedObject,\n l = i.ocsp,\n h = l.CertID,\n c = l.CertStatus,\n d = i.x509,\n j = d.Extensions;\n l.SingleResponse.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var q = this.params;\n var n = [];\n\n if (q.certid == undefined) {\n throw new k(\"certid unspecified\");\n }\n\n if (q.status == undefined) {\n throw new k(\"status unspecified\");\n }\n\n if (q.thisupdate == undefined) {\n throw new k(\"thisupdate unspecified\");\n }\n\n n.push(new h(q.certid));\n n.push(new c(q.status));\n n.push(new g(q.thisupdate));\n\n if (q.nextupdate != undefined) {\n var m = new g(q.nextupdate);\n n.push(new b({\n tag: \"a0\",\n explicit: true,\n obj: m\n }));\n }\n\n if (q.ext != undefined) {\n var p = new j(q.ext);\n n.push(new b({\n tag: \"a1\",\n explicit: true,\n obj: p\n }));\n }\n\n var o = new f({\n array: n\n });\n return o.getEncodedHex();\n };\n\n this.setByParam = function (m) {\n this.params = m;\n };\n\n if (e !== undefined) {\n this.setByParam(e);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.ocsp.SingleResponse, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.ocsp.CertID = function (g) {\n var d = KJUR,\n k = d.asn1,\n m = k.DEROctetString,\n j = k.DERInteger,\n h = k.DERSequence,\n f = k.x509,\n n = f.AlgorithmIdentifier,\n o = k.ocsp,\n l = o.DEFAULT_HASH,\n i = d.crypto,\n e = i.Util.hashHex,\n c = X509,\n q = ASN1HEX;\n o.CertID.superclass.constructor.call(this);\n this.dHashAlg = null;\n this.dIssuerNameHash = null;\n this.dIssuerKeyHash = null;\n this.dSerialNumber = null;\n\n this.setByValue = function (t, s, p, r) {\n if (r === undefined) {\n r = l;\n }\n\n this.dHashAlg = new n({\n name: r\n });\n this.dIssuerNameHash = new m({\n hex: t\n });\n this.dIssuerKeyHash = new m({\n hex: s\n });\n this.dSerialNumber = new j({\n hex: p\n });\n };\n\n this.setByCert = function (x, t, v) {\n if (v === undefined) {\n v = l;\n }\n\n var p = new c();\n p.readCertPEM(t);\n var y = new c();\n y.readCertPEM(x);\n var z = y.getPublicKeyHex();\n var w = q.getTLVbyList(z, 0, [1, 0], \"30\");\n var r = p.getSerialNumberHex();\n var s = e(y.getSubjectHex(), v);\n var u = e(w, v);\n this.setByValue(s, u, r, v);\n this.hoge = p.getSerialNumberHex();\n };\n\n this.getEncodedHex = function () {\n if (this.dHashAlg === null && this.dIssuerNameHash === null && this.dIssuerKeyHash === null && this.dSerialNumber === null) {\n throw \"not yet set values\";\n }\n\n var p = [this.dHashAlg, this.dIssuerNameHash, this.dIssuerKeyHash, this.dSerialNumber];\n var r = new h({\n array: p\n });\n this.hTLV = r.getEncodedHex();\n return this.hTLV;\n };\n\n if (g !== undefined) {\n var b = g;\n\n if (b.issuerCert !== undefined && b.subjectCert !== undefined) {\n var a = l;\n\n if (b.alg === undefined) {\n a = undefined;\n }\n\n this.setByCert(b.issuerCert, b.subjectCert, a);\n } else {\n if (b.issname !== undefined && b.isskey !== undefined && b.sbjsn !== undefined) {\n var a = l;\n\n if (b.alg === undefined) {\n a = undefined;\n }\n\n this.setByValue(b.issname, b.isskey, b.sbjsn, a);\n } else {\n throw new Error(\"invalid constructor arguments\");\n }\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.ocsp.CertID, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.ocsp.CertStatus = function (a) {\n KJUR.asn1.ocsp.CertStatus.superclass.constructor.call(this);\n this.params = null;\n\n this.getEncodedHex = function () {\n var d = this.params;\n\n if (d.status == \"good\") {\n return \"8000\";\n }\n\n if (d.status == \"unknown\") {\n return \"8200\";\n }\n\n if (d.status == \"revoked\") {\n var c = [{\n gentime: {\n str: d.time\n }\n }];\n\n if (d.reason != undefined) {\n c.push({\n tag: {\n tag: \"a0\",\n explicit: true,\n obj: {\n \"enum\": {\n \"int\": d.reason\n }\n }\n }\n });\n }\n\n var b = {\n tag: \"a1\",\n explicit: false,\n obj: {\n seq: c\n }\n };\n return KJUR.asn1.ASN1Util.newObject({\n tag: b\n }).getEncodedHex();\n }\n\n throw new Error(\"bad status\");\n };\n\n this.setByParam = function (b) {\n this.params = b;\n };\n\n if (a !== undefined) {\n this.setByParam(a);\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.ocsp.CertStatus, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.ocsp.Request = function (f) {\n var c = KJUR,\n b = c.asn1,\n a = b.DERSequence,\n d = b.ocsp;\n d.Request.superclass.constructor.call(this);\n this.dReqCert = null;\n this.dExt = null;\n\n this.getEncodedHex = function () {\n var g = [];\n\n if (this.dReqCert === null) {\n throw \"reqCert not set\";\n }\n\n g.push(this.dReqCert);\n var h = new a({\n array: g\n });\n this.hTLV = h.getEncodedHex();\n return this.hTLV;\n };\n\n if (typeof f !== \"undefined\") {\n var e = new d.CertID(f);\n this.dReqCert = e;\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.ocsp.Request, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.ocsp.TBSRequest = function (e) {\n var c = KJUR,\n b = c.asn1,\n a = b.DERSequence,\n d = b.ocsp;\n d.TBSRequest.superclass.constructor.call(this);\n this.version = 0;\n this.dRequestorName = null;\n this.dRequestList = [];\n this.dRequestExt = null;\n\n this.setRequestListByParam = function (h) {\n var f = [];\n\n for (var g = 0; g < h.length; g++) {\n var j = new d.Request(h[0]);\n f.push(j);\n }\n\n this.dRequestList = f;\n };\n\n this.getEncodedHex = function () {\n var f = [];\n\n if (this.version !== 0) {\n throw \"not supported version: \" + this.version;\n }\n\n if (this.dRequestorName !== null) {\n throw \"requestorName not supported\";\n }\n\n var h = new a({\n array: this.dRequestList\n });\n f.push(h);\n\n if (this.dRequestExt !== null) {\n throw \"requestExtensions not supported\";\n }\n\n var g = new a({\n array: f\n });\n this.hTLV = g.getEncodedHex();\n return this.hTLV;\n };\n\n if (e !== undefined) {\n if (e.reqList !== undefined) {\n this.setRequestListByParam(e.reqList);\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.ocsp.TBSRequest, KJUR.asn1.ASN1Object);\n\nKJUR.asn1.ocsp.OCSPRequest = function (f) {\n var c = KJUR,\n b = c.asn1,\n a = b.DERSequence,\n d = b.ocsp;\n d.OCSPRequest.superclass.constructor.call(this);\n this.dTbsRequest = null;\n this.dOptionalSignature = null;\n\n this.getEncodedHex = function () {\n var g = [];\n\n if (this.dTbsRequest !== null) {\n g.push(this.dTbsRequest);\n } else {\n throw \"tbsRequest not set\";\n }\n\n if (this.dOptionalSignature !== null) {\n throw \"optionalSignature not supported\";\n }\n\n var h = new a({\n array: g\n });\n this.hTLV = h.getEncodedHex();\n return this.hTLV;\n };\n\n if (f !== undefined) {\n if (f.reqList !== undefined) {\n var e = new d.TBSRequest(f);\n this.dTbsRequest = e;\n }\n }\n};\n\nYAHOO.lang.extend(KJUR.asn1.ocsp.OCSPRequest, KJUR.asn1.ASN1Object);\nKJUR.asn1.ocsp.OCSPUtil = {};\n\nKJUR.asn1.ocsp.OCSPUtil.getRequestHex = function (a, b, h) {\n var d = KJUR,\n c = d.asn1,\n e = c.ocsp;\n\n if (h === undefined) {\n h = e.DEFAULT_HASH;\n }\n\n var g = {\n alg: h,\n issuerCert: a,\n subjectCert: b\n };\n var f = new e.OCSPRequest({\n reqList: [g]\n });\n return f.getEncodedHex();\n};\n\nKJUR.asn1.ocsp.OCSPUtil.getOCSPResponseInfo = function (b) {\n var m = ASN1HEX,\n c = m.getVbyList,\n k = m.getVbyListEx,\n e = m.getIdxbyList,\n d = m.getIdxbyListEx,\n g = m.getV;\n var n = {};\n\n try {\n var j = k(b, 0, [0], \"0a\");\n n.responseStatus = parseInt(j, 16);\n } catch (f) {}\n\n if (n.responseStatus !== 0) {\n return n;\n }\n\n try {\n var i = e(b, 0, [1, 0, 1, 0, 0, 2, 0, 1]);\n\n if (b.substr(i, 2) === \"80\") {\n n.certStatus = \"good\";\n } else {\n if (b.substr(i, 2) === \"a1\") {\n n.certStatus = \"revoked\";\n n.revocationTime = hextoutf8(c(b, i, [0]));\n } else {\n if (b.substr(i, 2) === \"82\") {\n n.certStatus = \"unknown\";\n }\n }\n }\n } catch (f) {}\n\n try {\n var a = e(b, 0, [1, 0, 1, 0, 0, 2, 0, 2]);\n n.thisUpdate = hextoutf8(g(b, a));\n } catch (f) {}\n\n try {\n var l = e(b, 0, [1, 0, 1, 0, 0, 2, 0, 3]);\n\n if (b.substr(l, 2) === \"a0\") {\n n.nextUpdate = hextoutf8(c(b, l, [0]));\n }\n } catch (f) {}\n\n return n;\n};\n\nKJUR.asn1.ocsp.OCSPParser = function () {\n var e = Error,\n a = X509,\n f = new a(),\n i = ASN1HEX,\n g = i.getV,\n b = i.getTLV,\n d = i.getIdxbyList,\n c = i.getTLVbyListEx,\n h = i.getChildIdx;\n\n this.getOCSPRequest = function (l) {\n var k = h(l, 0);\n\n if (k.length != 1 && k.length != 2) {\n throw new e(\"wrong number elements: \" + k.length);\n }\n\n var j = this.getTBSRequest(b(l, k[0]));\n return j;\n };\n\n this.getTBSRequest = function (l) {\n var j = {};\n var k = c(l, 0, [0], \"30\");\n j.array = this.getRequestList(k);\n var m = c(l, 0, [\"[2]\", 0], \"30\");\n\n if (m != null) {\n j.ext = f.getExtParamArray(m);\n }\n\n return j;\n };\n\n this.getRequestList = function (m) {\n var j = [];\n var k = h(m, 0);\n\n for (var l = 0; l < k.length; l++) {\n var m = b(m, k[l]);\n j.push(this.getRequest(m));\n }\n\n return j;\n };\n\n this.getRequest = function (k) {\n var j = h(k, 0);\n\n if (j.length != 1 && j.length != 2) {\n throw new e(\"wrong number elements: \" + j.length);\n }\n\n var m = this.getCertID(b(k, j[0]));\n\n if (j.length == 2) {\n var l = d(k, 0, [1, 0]);\n m.ext = f.getExtParamArray(b(k, l));\n }\n\n return m;\n };\n\n this.getCertID = function (m) {\n var l = h(m, 0);\n\n if (l.length != 4) {\n throw new e(\"wrong number elements: \" + l.length);\n }\n\n var k = new a();\n var j = {};\n j.alg = k.getAlgorithmIdentifierName(b(m, l[0]));\n j.issname = g(m, l[1]);\n j.isskey = g(m, l[2]);\n j.sbjsn = g(m, l[3]);\n return j;\n };\n};\n\nvar KJUR;\n\nif (typeof KJUR == \"undefined\" || !KJUR) {\n KJUR = {};\n}\n\nif (typeof KJUR.lang == \"undefined\" || !KJUR.lang) {\n KJUR.lang = {};\n}\n\nKJUR.lang.String = function () {};\n\nfunction Base64x() {}\n\nfunction stoBA(d) {\n var b = new Array();\n\n for (var c = 0; c < d.length; c++) {\n b[c] = d.charCodeAt(c);\n }\n\n return b;\n}\n\nfunction BAtos(b) {\n var d = \"\";\n\n for (var c = 0; c < b.length; c++) {\n d = d + String.fromCharCode(b[c]);\n }\n\n return d;\n}\n\nfunction BAtohex(b) {\n var e = \"\";\n\n for (var d = 0; d < b.length; d++) {\n var c = b[d].toString(16);\n\n if (c.length == 1) {\n c = \"0\" + c;\n }\n\n e = e + c;\n }\n\n return e;\n}\n\nfunction stohex(a) {\n return BAtohex(stoBA(a));\n}\n\nfunction stob64(a) {\n return hex2b64(stohex(a));\n}\n\nfunction stob64u(a) {\n return b64tob64u(hex2b64(stohex(a)));\n}\n\nfunction b64utos(a) {\n return BAtos(b64toBA(b64utob64(a)));\n}\n\nfunction b64tob64u(a) {\n a = a.replace(/\\=/g, \"\");\n a = a.replace(/\\+/g, \"-\");\n a = a.replace(/\\//g, \"_\");\n return a;\n}\n\nfunction b64utob64(a) {\n if (a.length % 4 == 2) {\n a = a + \"==\";\n } else {\n if (a.length % 4 == 3) {\n a = a + \"=\";\n }\n }\n\n a = a.replace(/-/g, \"+\");\n a = a.replace(/_/g, \"/\");\n return a;\n}\n\nfunction hextob64u(a) {\n if (a.length % 2 == 1) {\n a = \"0\" + a;\n }\n\n return b64tob64u(hex2b64(a));\n}\n\nfunction b64utohex(a) {\n return b64tohex(b64utob64(a));\n}\n\nvar utf8tob64u, b64utoutf8;\n\nif (typeof Buffer === \"function\") {\n utf8tob64u = function utf8tob64u(a) {\n return b64tob64u(Buffer.from(a, \"utf8\").toString(\"base64\"));\n };\n\n b64utoutf8 = function b64utoutf8(a) {\n return Buffer.from(b64utob64(a), \"base64\").toString(\"utf8\");\n };\n} else {\n utf8tob64u = function utf8tob64u(a) {\n return hextob64u(uricmptohex(encodeURIComponentAll(a)));\n };\n\n b64utoutf8 = function b64utoutf8(a) {\n return decodeURIComponent(hextouricmp(b64utohex(a)));\n };\n}\n\nfunction utf8tob64(a) {\n return hex2b64(uricmptohex(encodeURIComponentAll(a)));\n}\n\nfunction b64toutf8(a) {\n return decodeURIComponent(hextouricmp(b64tohex(a)));\n}\n\nfunction utf8tohex(a) {\n return uricmptohex(encodeURIComponentAll(a));\n}\n\nfunction hextoutf8(a) {\n return decodeURIComponent(hextouricmp(a));\n}\n\nfunction hextorstr(c) {\n var b = \"\";\n\n for (var a = 0; a < c.length - 1; a += 2) {\n b += String.fromCharCode(parseInt(c.substr(a, 2), 16));\n }\n\n return b;\n}\n\nfunction rstrtohex(c) {\n var a = \"\";\n\n for (var b = 0; b < c.length; b++) {\n a += (\"0\" + c.charCodeAt(b).toString(16)).slice(-2);\n }\n\n return a;\n}\n\nfunction hextob64(a) {\n return hex2b64(a);\n}\n\nfunction hextob64nl(b) {\n var a = hextob64(b);\n var c = a.replace(/(.{64})/g, \"$1\\r\\n\");\n c = c.replace(/\\r\\n$/, \"\");\n return c;\n}\n\nfunction b64nltohex(b) {\n var a = b.replace(/[^0-9A-Za-z\\/+=]*/g, \"\");\n var c = b64tohex(a);\n return c;\n}\n\nfunction hextopem(a, b) {\n var c = hextob64nl(a);\n return \"-----BEGIN \" + b + \"-----\\r\\n\" + c + \"\\r\\n-----END \" + b + \"-----\\r\\n\";\n}\n\nfunction pemtohex(a, b) {\n if (a.indexOf(\"-----BEGIN \") == -1) {\n throw \"can't find PEM header: \" + b;\n }\n\n if (b !== undefined) {\n a = a.replace(new RegExp(\"^[^]*-----BEGIN \" + b + \"-----\"), \"\");\n a = a.replace(new RegExp(\"-----END \" + b + \"-----[^]*$\"), \"\");\n } else {\n a = a.replace(/^[^]*-----BEGIN [^-]+-----/, \"\");\n a = a.replace(/-----END [^-]+-----[^]*$/, \"\");\n }\n\n return b64nltohex(a);\n}\n\nfunction hextoArrayBuffer(d) {\n if (d.length % 2 != 0) {\n throw \"input is not even length\";\n }\n\n if (d.match(/^[0-9A-Fa-f]+$/) == null) {\n throw \"input is not hexadecimal\";\n }\n\n var b = new ArrayBuffer(d.length / 2);\n var a = new DataView(b);\n\n for (var c = 0; c < d.length / 2; c++) {\n a.setUint8(c, parseInt(d.substr(c * 2, 2), 16));\n }\n\n return b;\n}\n\nfunction ArrayBuffertohex(b) {\n var d = \"\";\n var a = new DataView(b);\n\n for (var c = 0; c < b.byteLength; c++) {\n d += (\"00\" + a.getUint8(c).toString(16)).slice(-2);\n }\n\n return d;\n}\n\nfunction zulutomsec(n) {\n var l, j, m, e, f, i, b, k;\n var a, h, g, c;\n c = n.match(/^(\\d{2}|\\d{4})(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(\\d\\d)(|\\.\\d+)Z$/);\n\n if (c) {\n a = c[1];\n l = parseInt(a);\n\n if (a.length === 2) {\n if (50 <= l && l < 100) {\n l = 1900 + l;\n } else {\n if (0 <= l && l < 50) {\n l = 2000 + l;\n }\n }\n }\n\n j = parseInt(c[2]) - 1;\n m = parseInt(c[3]);\n e = parseInt(c[4]);\n f = parseInt(c[5]);\n i = parseInt(c[6]);\n b = 0;\n h = c[7];\n\n if (h !== \"\") {\n g = (h.substr(1) + \"00\").substr(0, 3);\n b = parseInt(g);\n }\n\n return Date.UTC(l, j, m, e, f, i, b);\n }\n\n throw \"unsupported zulu format: \" + n;\n}\n\nfunction zulutosec(a) {\n var b = zulutomsec(a);\n return ~~(b / 1000);\n}\n\nfunction zulutodate(a) {\n return new Date(zulutomsec(a));\n}\n\nfunction datetozulu(g, e, f) {\n var b;\n var a = g.getUTCFullYear();\n\n if (e) {\n if (a < 1950 || 2049 < a) {\n throw \"not proper year for UTCTime: \" + a;\n }\n\n b = (\"\" + a).slice(-2);\n } else {\n b = (\"000\" + a).slice(-4);\n }\n\n b += (\"0\" + (g.getUTCMonth() + 1)).slice(-2);\n b += (\"0\" + g.getUTCDate()).slice(-2);\n b += (\"0\" + g.getUTCHours()).slice(-2);\n b += (\"0\" + g.getUTCMinutes()).slice(-2);\n b += (\"0\" + g.getUTCSeconds()).slice(-2);\n\n if (f) {\n var c = g.getUTCMilliseconds();\n\n if (c !== 0) {\n c = (\"00\" + c).slice(-3);\n c = c.replace(/0+$/g, \"\");\n b += \".\" + c;\n }\n }\n\n b += \"Z\";\n return b;\n}\n\nfunction uricmptohex(a) {\n return a.replace(/%/g, \"\");\n}\n\nfunction hextouricmp(a) {\n return a.replace(/(..)/g, \"%$1\");\n}\n\nfunction ipv6tohex(g) {\n var b = \"malformed IPv6 address\";\n\n if (!g.match(/^[0-9A-Fa-f:]+$/)) {\n throw b;\n }\n\n g = g.toLowerCase();\n var d = g.split(\":\").length - 1;\n\n if (d < 2) {\n throw b;\n }\n\n var e = \":\".repeat(7 - d + 2);\n g = g.replace(\"::\", e);\n var c = g.split(\":\");\n\n if (c.length != 8) {\n throw b;\n }\n\n for (var f = 0; f < 8; f++) {\n c[f] = (\"0000\" + c[f]).slice(-4);\n }\n\n return c.join(\"\");\n}\n\nfunction hextoipv6(e) {\n if (!e.match(/^[0-9A-Fa-f]{32}$/)) {\n throw \"malformed IPv6 address octet\";\n }\n\n e = e.toLowerCase();\n var b = e.match(/.{1,4}/g);\n\n for (var d = 0; d < 8; d++) {\n b[d] = b[d].replace(/^0+/, \"\");\n\n if (b[d] == \"\") {\n b[d] = \"0\";\n }\n }\n\n e = \":\" + b.join(\":\") + \":\";\n var c = e.match(/:(0:){2,}/g);\n\n if (c === null) {\n return e.slice(1, -1);\n }\n\n var f = \"\";\n\n for (var d = 0; d < c.length; d++) {\n if (c[d].length > f.length) {\n f = c[d];\n }\n }\n\n e = e.replace(f, \"::\");\n return e.slice(1, -1);\n}\n\nfunction hextoip(b) {\n var d = \"malformed hex value\";\n\n if (!b.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/)) {\n throw d;\n }\n\n if (b.length == 8) {\n var c;\n\n try {\n c = parseInt(b.substr(0, 2), 16) + \".\" + parseInt(b.substr(2, 2), 16) + \".\" + parseInt(b.substr(4, 2), 16) + \".\" + parseInt(b.substr(6, 2), 16);\n return c;\n } catch (a) {\n throw d;\n }\n } else {\n if (b.length == 32) {\n return hextoipv6(b);\n } else {\n return b;\n }\n }\n}\n\nfunction iptohex(f) {\n var j = \"malformed IP address\";\n f = f.toLowerCase(f);\n\n if (f.match(/^[0-9.]+$/)) {\n var b = f.split(\".\");\n\n if (b.length !== 4) {\n throw j;\n }\n\n var g = \"\";\n\n try {\n for (var e = 0; e < 4; e++) {\n var h = parseInt(b[e]);\n g += (\"0\" + h.toString(16)).slice(-2);\n }\n\n return g;\n } catch (c) {\n throw j;\n }\n } else {\n if (f.match(/^[0-9a-f:]+$/) && f.indexOf(\":\") !== -1) {\n return ipv6tohex(f);\n } else {\n throw j;\n }\n }\n}\n\nfunction ucs2hextoutf8(d) {\n function e(f) {\n var h = parseInt(f.substr(0, 2), 16);\n var a = parseInt(f.substr(2), 16);\n\n if (h == 0 & a < 128) {\n return String.fromCharCode(a);\n }\n\n if (h < 8) {\n var j = 192 | (h & 7) << 3 | (a & 192) >> 6;\n var i = 128 | a & 63;\n return hextoutf8(j.toString(16) + i.toString(16));\n }\n\n var j = 224 | (h & 240) >> 4;\n var i = 128 | (h & 15) << 2 | (a & 192) >> 6;\n var g = 128 | a & 63;\n return hextoutf8(j.toString(16) + i.toString(16) + g.toString(16));\n }\n\n var c = d.match(/.{4}/g);\n var b = c.map(e);\n return b.join(\"\");\n}\n\nfunction encodeURIComponentAll(a) {\n var d = encodeURIComponent(a);\n var b = \"\";\n\n for (var c = 0; c < d.length; c++) {\n if (d[c] == \"%\") {\n b = b + d.substr(c, 3);\n c = c + 2;\n } else {\n b = b + \"%\" + stohex(d[c]);\n }\n }\n\n return b;\n}\n\nfunction newline_toUnix(a) {\n a = a.replace(/\\r\\n/mg, \"\\n\");\n return a;\n}\n\nfunction newline_toDos(a) {\n a = a.replace(/\\r\\n/mg, \"\\n\");\n a = a.replace(/\\n/mg, \"\\r\\n\");\n return a;\n}\n\nKJUR.lang.String.isInteger = function (a) {\n if (a.match(/^[0-9]+$/)) {\n return true;\n } else {\n if (a.match(/^-[0-9]+$/)) {\n return true;\n } else {\n return false;\n }\n }\n};\n\nKJUR.lang.String.isHex = function (a) {\n return ishex(a);\n};\n\nfunction ishex(a) {\n if (a.length % 2 == 0 && (a.match(/^[0-9a-f]+$/) || a.match(/^[0-9A-F]+$/))) {\n return true;\n } else {\n return false;\n }\n}\n\nKJUR.lang.String.isBase64 = function (a) {\n a = a.replace(/\\s+/g, \"\");\n\n if (a.match(/^[0-9A-Za-z+\\/]+={0,3}$/) && a.length % 4 == 0) {\n return true;\n } else {\n return false;\n }\n};\n\nKJUR.lang.String.isBase64URL = function (a) {\n if (a.match(/[+/=]/)) {\n return false;\n }\n\n a = b64utob64(a);\n return KJUR.lang.String.isBase64(a);\n};\n\nKJUR.lang.String.isIntegerArray = function (a) {\n a = a.replace(/\\s+/g, \"\");\n\n if (a.match(/^\\[[0-9,]+\\]$/)) {\n return true;\n } else {\n return false;\n }\n};\n\nKJUR.lang.String.isPrintable = function (a) {\n if (a.match(/^[0-9A-Za-z '()+,-./:=?]*$/) !== null) {\n return true;\n }\n\n return false;\n};\n\nKJUR.lang.String.isIA5 = function (a) {\n if (a.match(/^[\\x20-\\x21\\x23-\\x7f]*$/) !== null) {\n return true;\n }\n\n return false;\n};\n\nKJUR.lang.String.isMail = function (a) {\n if (a.match(/^[A-Za-z0-9]{1}[A-Za-z0-9_.-]*@{1}[A-Za-z0-9_.-]{1,}\\.[A-Za-z0-9]{1,}$/) !== null) {\n return true;\n }\n\n return false;\n};\n\nfunction hextoposhex(a) {\n if (a.length % 2 == 1) {\n return \"0\" + a;\n }\n\n if (a.substr(0, 1) > \"7\") {\n return \"00\" + a;\n }\n\n return a;\n}\n\nfunction intarystrtohex(b) {\n b = b.replace(/^\\s*\\[\\s*/, \"\");\n b = b.replace(/\\s*\\]\\s*$/, \"\");\n b = b.replace(/\\s*/g, \"\");\n\n try {\n var c = b.split(/,/).map(function (g, e, h) {\n var f = parseInt(g);\n\n if (f < 0 || 255 < f) {\n throw \"integer not in range 0-255\";\n }\n\n var d = (\"00\" + f.toString(16)).slice(-2);\n return d;\n }).join(\"\");\n return c;\n } catch (a) {\n throw \"malformed integer array string: \" + a;\n }\n}\n\nvar strdiffidx = function strdiffidx(c, a) {\n var d = c.length;\n\n if (c.length > a.length) {\n d = a.length;\n }\n\n for (var b = 0; b < d; b++) {\n if (c.charCodeAt(b) != a.charCodeAt(b)) {\n return b;\n }\n }\n\n if (c.length != a.length) {\n return d;\n }\n\n return -1;\n};\n\nfunction oidtohex(g) {\n var f = function f(a) {\n var l = a.toString(16);\n\n if (l.length == 1) {\n l = \"0\" + l;\n }\n\n return l;\n };\n\n var e = function e(p) {\n var o = \"\";\n var l = parseInt(p, 10);\n var a = l.toString(2);\n var m = 7 - a.length % 7;\n\n if (m == 7) {\n m = 0;\n }\n\n var r = \"\";\n\n for (var n = 0; n < m; n++) {\n r += \"0\";\n }\n\n a = r + a;\n\n for (var n = 0; n < a.length - 1; n += 7) {\n var q = a.substr(n, 7);\n\n if (n != a.length - 7) {\n q = \"1\" + q;\n }\n\n o += f(parseInt(q, 2));\n }\n\n return o;\n };\n\n try {\n if (!g.match(/^[0-9.]+$/)) {\n return null;\n }\n\n var j = \"\";\n var b = g.split(\".\");\n var k = parseInt(b[0], 10) * 40 + parseInt(b[1], 10);\n j += f(k);\n b.splice(0, 2);\n\n for (var d = 0; d < b.length; d++) {\n j += e(b[d]);\n }\n\n return j;\n } catch (c) {\n return null;\n }\n}\n\nfunction hextooid(g) {\n if (!ishex(g)) {\n return null;\n }\n\n try {\n var m = [];\n var p = g.substr(0, 2);\n var e = parseInt(p, 16);\n m[0] = new String(Math.floor(e / 40));\n m[1] = new String(e % 40);\n var n = g.substr(2);\n var l = [];\n\n for (var f = 0; f < n.length / 2; f++) {\n l.push(parseInt(n.substr(f * 2, 2), 16));\n }\n\n var k = [];\n var d = \"\";\n\n for (var f = 0; f < l.length; f++) {\n if (l[f] & 128) {\n d = d + strpad((l[f] & 127).toString(2), 7);\n } else {\n d = d + strpad((l[f] & 127).toString(2), 7);\n k.push(new String(parseInt(d, 2)));\n d = \"\";\n }\n }\n\n var o = m.join(\".\");\n\n if (k.length > 0) {\n o = o + \".\" + k.join(\".\");\n }\n\n return o;\n } catch (j) {\n return null;\n }\n}\n\nvar strpad = function strpad(c, b, a) {\n if (a == undefined) {\n a = \"0\";\n }\n\n if (c.length >= b) {\n return c;\n }\n\n return new Array(b - c.length + 1).join(a) + c;\n};\n\nfunction bitstrtoint(e) {\n try {\n var a = e.substr(0, 2);\n\n if (a == \"00\") {\n return parseInt(e.substr(2), 16);\n }\n\n var b = parseInt(a, 16);\n var f = e.substr(2);\n var d = parseInt(f, 16).toString(2);\n\n if (d == \"0\") {\n d = \"00000000\";\n }\n\n d = d.slice(0, 0 - b);\n return parseInt(d, 2);\n } catch (c) {\n return -1;\n }\n}\n\nfunction inttobitstr(e) {\n var c = Number(e).toString(2);\n var b = 8 - c.length % 8;\n\n if (b == 8) {\n b = 0;\n }\n\n c = c + strpad(\"\", b, \"0\");\n var d = parseInt(c, 2).toString(16);\n\n if (d.length % 2 == 1) {\n d = \"0\" + d;\n }\n\n var a = \"0\" + b;\n return a + d;\n}\n\n;\n\nif (typeof KJUR == \"undefined\" || !KJUR) {\n KJUR = {};\n}\n\nif (typeof KJUR.crypto == \"undefined\" || !KJUR.crypto) {\n KJUR.crypto = {};\n}\n\nKJUR.crypto.Util = new function () {\n this.DIGESTINFOHEAD = {\n sha1: \"3021300906052b0e03021a05000414\",\n sha224: \"302d300d06096086480165030402040500041c\",\n sha256: \"3031300d060960864801650304020105000420\",\n sha384: \"3041300d060960864801650304020205000430\",\n sha512: \"3051300d060960864801650304020305000440\",\n md2: \"3020300c06082a864886f70d020205000410\",\n md5: \"3020300c06082a864886f70d020505000410\",\n ripemd160: \"3021300906052b2403020105000414\"\n };\n this.DEFAULTPROVIDER = {\n md5: \"cryptojs\",\n sha1: \"cryptojs\",\n sha224: \"cryptojs\",\n sha256: \"cryptojs\",\n sha384: \"cryptojs\",\n sha512: \"cryptojs\",\n ripemd160: \"cryptojs\",\n hmacmd5: \"cryptojs\",\n hmacsha1: \"cryptojs\",\n hmacsha224: \"cryptojs\",\n hmacsha256: \"cryptojs\",\n hmacsha384: \"cryptojs\",\n hmacsha512: \"cryptojs\",\n hmacripemd160: \"cryptojs\",\n MD5withRSA: \"cryptojs/jsrsa\",\n SHA1withRSA: \"cryptojs/jsrsa\",\n SHA224withRSA: \"cryptojs/jsrsa\",\n SHA256withRSA: \"cryptojs/jsrsa\",\n SHA384withRSA: \"cryptojs/jsrsa\",\n SHA512withRSA: \"cryptojs/jsrsa\",\n RIPEMD160withRSA: \"cryptojs/jsrsa\",\n MD5withECDSA: \"cryptojs/jsrsa\",\n SHA1withECDSA: \"cryptojs/jsrsa\",\n SHA224withECDSA: \"cryptojs/jsrsa\",\n SHA256withECDSA: \"cryptojs/jsrsa\",\n SHA384withECDSA: \"cryptojs/jsrsa\",\n SHA512withECDSA: \"cryptojs/jsrsa\",\n RIPEMD160withECDSA: \"cryptojs/jsrsa\",\n SHA1withDSA: \"cryptojs/jsrsa\",\n SHA224withDSA: \"cryptojs/jsrsa\",\n SHA256withDSA: \"cryptojs/jsrsa\",\n MD5withRSAandMGF1: \"cryptojs/jsrsa\",\n SHAwithRSAandMGF1: \"cryptojs/jsrsa\",\n SHA1withRSAandMGF1: \"cryptojs/jsrsa\",\n SHA224withRSAandMGF1: \"cryptojs/jsrsa\",\n SHA256withRSAandMGF1: \"cryptojs/jsrsa\",\n SHA384withRSAandMGF1: \"cryptojs/jsrsa\",\n SHA512withRSAandMGF1: \"cryptojs/jsrsa\",\n RIPEMD160withRSAandMGF1: \"cryptojs/jsrsa\"\n };\n this.CRYPTOJSMESSAGEDIGESTNAME = {\n md5: CryptoJS.algo.MD5,\n sha1: CryptoJS.algo.SHA1,\n sha224: CryptoJS.algo.SHA224,\n sha256: CryptoJS.algo.SHA256,\n sha384: CryptoJS.algo.SHA384,\n sha512: CryptoJS.algo.SHA512,\n ripemd160: CryptoJS.algo.RIPEMD160\n };\n\n this.getDigestInfoHex = function (a, b) {\n if (typeof this.DIGESTINFOHEAD[b] == \"undefined\") {\n throw \"alg not supported in Util.DIGESTINFOHEAD: \" + b;\n }\n\n return this.DIGESTINFOHEAD[b] + a;\n };\n\n this.getPaddedDigestInfoHex = function (h, a, j) {\n var c = this.getDigestInfoHex(h, a);\n var d = j / 4;\n\n if (c.length + 22 > d) {\n throw \"key is too short for SigAlg: keylen=\" + j + \",\" + a;\n }\n\n var b = \"0001\";\n var k = \"00\" + c;\n var g = \"\";\n var l = d - b.length - k.length;\n\n for (var f = 0; f < l; f += 2) {\n g += \"ff\";\n }\n\n var e = b + g + k;\n return e;\n };\n\n this.hashString = function (a, c) {\n var b = new KJUR.crypto.MessageDigest({\n alg: c\n });\n return b.digestString(a);\n };\n\n this.hashHex = function (b, c) {\n var a = new KJUR.crypto.MessageDigest({\n alg: c\n });\n return a.digestHex(b);\n };\n\n this.sha1 = function (a) {\n return this.hashString(a, \"sha1\");\n };\n\n this.sha256 = function (a) {\n return this.hashString(a, \"sha256\");\n };\n\n this.sha256Hex = function (a) {\n return this.hashHex(a, \"sha256\");\n };\n\n this.sha512 = function (a) {\n return this.hashString(a, \"sha512\");\n };\n\n this.sha512Hex = function (a) {\n return this.hashHex(a, \"sha512\");\n };\n\n this.isKey = function (a) {\n if (a instanceof RSAKey || a instanceof KJUR.crypto.DSA || a instanceof KJUR.crypto.ECDSA) {\n return true;\n } else {\n return false;\n }\n };\n}();\n\nKJUR.crypto.Util.md5 = function (a) {\n var b = new KJUR.crypto.MessageDigest({\n alg: \"md5\",\n prov: \"cryptojs\"\n });\n return b.digestString(a);\n};\n\nKJUR.crypto.Util.ripemd160 = function (a) {\n var b = new KJUR.crypto.MessageDigest({\n alg: \"ripemd160\",\n prov: \"cryptojs\"\n });\n return b.digestString(a);\n};\n\nKJUR.crypto.Util.SECURERANDOMGEN = new SecureRandom();\n\nKJUR.crypto.Util.getRandomHexOfNbytes = function (b) {\n var a = new Array(b);\n KJUR.crypto.Util.SECURERANDOMGEN.nextBytes(a);\n return BAtohex(a);\n};\n\nKJUR.crypto.Util.getRandomBigIntegerOfNbytes = function (a) {\n return new BigInteger(KJUR.crypto.Util.getRandomHexOfNbytes(a), 16);\n};\n\nKJUR.crypto.Util.getRandomHexOfNbits = function (d) {\n var c = d % 8;\n var a = (d - c) / 8;\n var b = new Array(a + 1);\n KJUR.crypto.Util.SECURERANDOMGEN.nextBytes(b);\n b[0] = (255 << c & 255 ^ 255) & b[0];\n return BAtohex(b);\n};\n\nKJUR.crypto.Util.getRandomBigIntegerOfNbits = function (a) {\n return new BigInteger(KJUR.crypto.Util.getRandomHexOfNbits(a), 16);\n};\n\nKJUR.crypto.Util.getRandomBigIntegerZeroToMax = function (b) {\n var a = b.bitLength();\n\n while (1) {\n var c = KJUR.crypto.Util.getRandomBigIntegerOfNbits(a);\n\n if (b.compareTo(c) != -1) {\n return c;\n }\n }\n};\n\nKJUR.crypto.Util.getRandomBigIntegerMinToMax = function (e, b) {\n var c = e.compareTo(b);\n\n if (c == 1) {\n throw \"biMin is greater than biMax\";\n }\n\n if (c == 0) {\n return e;\n }\n\n var a = b.subtract(e);\n var d = KJUR.crypto.Util.getRandomBigIntegerZeroToMax(a);\n return d.add(e);\n};\n\nKJUR.crypto.MessageDigest = function (c) {\n var b = null;\n var a = null;\n var d = null;\n\n this.setAlgAndProvider = function (g, f) {\n g = KJUR.crypto.MessageDigest.getCanonicalAlgName(g);\n\n if (g !== null && f === undefined) {\n f = KJUR.crypto.Util.DEFAULTPROVIDER[g];\n }\n\n if (\":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:\".indexOf(g) != -1 && f == \"cryptojs\") {\n try {\n this.md = KJUR.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[g].create();\n } catch (e) {\n throw \"setAlgAndProvider hash alg set fail alg=\" + g + \"/\" + e;\n }\n\n this.updateString = function (h) {\n this.md.update(h);\n };\n\n this.updateHex = function (h) {\n var i = CryptoJS.enc.Hex.parse(h);\n this.md.update(i);\n };\n\n this.digest = function () {\n var h = this.md.finalize();\n return h.toString(CryptoJS.enc.Hex);\n };\n\n this.digestString = function (h) {\n this.updateString(h);\n return this.digest();\n };\n\n this.digestHex = function (h) {\n this.updateHex(h);\n return this.digest();\n };\n }\n\n if (\":sha256:\".indexOf(g) != -1 && f == \"sjcl\") {\n try {\n this.md = new sjcl.hash.sha256();\n } catch (e) {\n throw \"setAlgAndProvider hash alg set fail alg=\" + g + \"/\" + e;\n }\n\n this.updateString = function (h) {\n this.md.update(h);\n };\n\n this.updateHex = function (i) {\n var h = sjcl.codec.hex.toBits(i);\n this.md.update(h);\n };\n\n this.digest = function () {\n var h = this.md.finalize();\n return sjcl.codec.hex.fromBits(h);\n };\n\n this.digestString = function (h) {\n this.updateString(h);\n return this.digest();\n };\n\n this.digestHex = function (h) {\n this.updateHex(h);\n return this.digest();\n };\n }\n };\n\n this.updateString = function (e) {\n throw \"updateString(str) not supported for this alg/prov: \" + this.algName + \"/\" + this.provName;\n };\n\n this.updateHex = function (e) {\n throw \"updateHex(hex) not supported for this alg/prov: \" + this.algName + \"/\" + this.provName;\n };\n\n this.digest = function () {\n throw \"digest() not supported for this alg/prov: \" + this.algName + \"/\" + this.provName;\n };\n\n this.digestString = function (e) {\n throw \"digestString(str) not supported for this alg/prov: \" + this.algName + \"/\" + this.provName;\n };\n\n this.digestHex = function (e) {\n throw \"digestHex(hex) not supported for this alg/prov: \" + this.algName + \"/\" + this.provName;\n };\n\n if (c !== undefined) {\n if (c.alg !== undefined) {\n this.algName = c.alg;\n\n if (c.prov === undefined) {\n this.provName = KJUR.crypto.Util.DEFAULTPROVIDER[this.algName];\n }\n\n this.setAlgAndProvider(this.algName, this.provName);\n }\n }\n};\n\nKJUR.crypto.MessageDigest.getCanonicalAlgName = function (a) {\n if (typeof a === \"string\") {\n a = a.toLowerCase();\n a = a.replace(/-/, \"\");\n }\n\n return a;\n};\n\nKJUR.crypto.MessageDigest.getHashLength = function (c) {\n var b = KJUR.crypto.MessageDigest;\n var a = b.getCanonicalAlgName(c);\n\n if (b.HASHLENGTH[a] === undefined) {\n throw \"not supported algorithm: \" + c;\n }\n\n return b.HASHLENGTH[a];\n};\n\nKJUR.crypto.MessageDigest.HASHLENGTH = {\n md5: 16,\n sha1: 20,\n sha224: 28,\n sha256: 32,\n sha384: 48,\n sha512: 64,\n ripemd160: 20\n};\n\nKJUR.crypto.Mac = function (d) {\n var f = null;\n var c = null;\n var a = null;\n var e = null;\n var b = null;\n\n this.setAlgAndProvider = function (k, i) {\n k = k.toLowerCase();\n\n if (k == null) {\n k = \"hmacsha1\";\n }\n\n k = k.toLowerCase();\n\n if (k.substr(0, 4) != \"hmac\") {\n throw \"setAlgAndProvider unsupported HMAC alg: \" + k;\n }\n\n if (i === undefined) {\n i = KJUR.crypto.Util.DEFAULTPROVIDER[k];\n }\n\n this.algProv = k + \"/\" + i;\n var g = k.substr(4);\n\n if (\":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:\".indexOf(g) != -1 && i == \"cryptojs\") {\n try {\n var j = KJUR.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[g];\n this.mac = CryptoJS.algo.HMAC.create(j, this.pass);\n } catch (h) {\n throw \"setAlgAndProvider hash alg set fail hashAlg=\" + g + \"/\" + h;\n }\n\n this.updateString = function (l) {\n this.mac.update(l);\n };\n\n this.updateHex = function (l) {\n var m = CryptoJS.enc.Hex.parse(l);\n this.mac.update(m);\n };\n\n this.doFinal = function () {\n var l = this.mac.finalize();\n return l.toString(CryptoJS.enc.Hex);\n };\n\n this.doFinalString = function (l) {\n this.updateString(l);\n return this.doFinal();\n };\n\n this.doFinalHex = function (l) {\n this.updateHex(l);\n return this.doFinal();\n };\n }\n };\n\n this.updateString = function (g) {\n throw \"updateString(str) not supported for this alg/prov: \" + this.algProv;\n };\n\n this.updateHex = function (g) {\n throw \"updateHex(hex) not supported for this alg/prov: \" + this.algProv;\n };\n\n this.doFinal = function () {\n throw \"digest() not supported for this alg/prov: \" + this.algProv;\n };\n\n this.doFinalString = function (g) {\n throw \"digestString(str) not supported for this alg/prov: \" + this.algProv;\n };\n\n this.doFinalHex = function (g) {\n throw \"digestHex(hex) not supported for this alg/prov: \" + this.algProv;\n };\n\n this.setPassword = function (h) {\n if (typeof h == \"string\") {\n var g = h;\n\n if (h.length % 2 == 1 || !h.match(/^[0-9A-Fa-f]+$/)) {\n g = rstrtohex(h);\n }\n\n this.pass = CryptoJS.enc.Hex.parse(g);\n return;\n }\n\n if (_typeof(h) != \"object\") {\n throw \"KJUR.crypto.Mac unsupported password type: \" + h;\n }\n\n var g = null;\n\n if (h.hex !== undefined) {\n if (h.hex.length % 2 != 0 || !h.hex.match(/^[0-9A-Fa-f]+$/)) {\n throw \"Mac: wrong hex password: \" + h.hex;\n }\n\n g = h.hex;\n }\n\n if (h.utf8 !== undefined) {\n g = utf8tohex(h.utf8);\n }\n\n if (h.rstr !== undefined) {\n g = rstrtohex(h.rstr);\n }\n\n if (h.b64 !== undefined) {\n g = b64tohex(h.b64);\n }\n\n if (h.b64u !== undefined) {\n g = b64utohex(h.b64u);\n }\n\n if (g == null) {\n throw \"KJUR.crypto.Mac unsupported password type: \" + h;\n }\n\n this.pass = CryptoJS.enc.Hex.parse(g);\n };\n\n if (d !== undefined) {\n if (d.pass !== undefined) {\n this.setPassword(d.pass);\n }\n\n if (d.alg !== undefined) {\n this.algName = d.alg;\n\n if (d.prov === undefined) {\n this.provName = KJUR.crypto.Util.DEFAULTPROVIDER[this.algName];\n }\n\n this.setAlgAndProvider(this.algName, this.provName);\n }\n }\n};\n\nKJUR.crypto.Signature = function (o) {\n var q = null;\n var n = null;\n var r = null;\n var c = null;\n var l = null;\n var d = null;\n var k = null;\n var h = null;\n var p = null;\n var e = null;\n var b = -1;\n var g = null;\n var j = null;\n var a = null;\n var i = null;\n var f = null;\n\n this._setAlgNames = function () {\n var s = this.algName.match(/^(.+)with(.+)$/);\n\n if (s) {\n this.mdAlgName = s[1].toLowerCase();\n this.pubkeyAlgName = s[2].toLowerCase();\n\n if (this.pubkeyAlgName == \"rsaandmgf1\" && this.mdAlgName == \"sha\") {\n this.mdAlgName = \"sha1\";\n }\n }\n };\n\n this._zeroPaddingOfSignature = function (x, w) {\n var v = \"\";\n var t = w / 4 - x.length;\n\n for (var u = 0; u < t; u++) {\n v = v + \"0\";\n }\n\n return v + x;\n };\n\n this.setAlgAndProvider = function (u, t) {\n this._setAlgNames();\n\n if (t != \"cryptojs/jsrsa\") {\n throw new Error(\"provider not supported: \" + t);\n }\n\n if (\":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:\".indexOf(this.mdAlgName) != -1) {\n try {\n this.md = new KJUR.crypto.MessageDigest({\n alg: this.mdAlgName\n });\n } catch (s) {\n throw new Error(\"setAlgAndProvider hash alg set fail alg=\" + this.mdAlgName + \"/\" + s);\n }\n\n this.init = function (w, x) {\n var y = null;\n\n try {\n if (x === undefined) {\n y = KEYUTIL.getKey(w);\n } else {\n y = KEYUTIL.getKey(w, x);\n }\n } catch (v) {\n throw \"init failed:\" + v;\n }\n\n if (y.isPrivate === true) {\n this.prvKey = y;\n this.state = \"SIGN\";\n } else {\n if (y.isPublic === true) {\n this.pubKey = y;\n this.state = \"VERIFY\";\n } else {\n throw \"init failed.:\" + y;\n }\n }\n };\n\n this.updateString = function (v) {\n this.md.updateString(v);\n };\n\n this.updateHex = function (v) {\n this.md.updateHex(v);\n };\n\n this.sign = function () {\n this.sHashHex = this.md.digest();\n\n if (this.prvKey === undefined && this.ecprvhex !== undefined && this.eccurvename !== undefined && KJUR.crypto.ECDSA !== undefined) {\n this.prvKey = new KJUR.crypto.ECDSA({\n curve: this.eccurvename,\n prv: this.ecprvhex\n });\n }\n\n if (this.prvKey instanceof RSAKey && this.pubkeyAlgName === \"rsaandmgf1\") {\n this.hSign = this.prvKey.signWithMessageHashPSS(this.sHashHex, this.mdAlgName, this.pssSaltLen);\n } else {\n if (this.prvKey instanceof RSAKey && this.pubkeyAlgName === \"rsa\") {\n this.hSign = this.prvKey.signWithMessageHash(this.sHashHex, this.mdAlgName);\n } else {\n if (this.prvKey instanceof KJUR.crypto.ECDSA) {\n this.hSign = this.prvKey.signWithMessageHash(this.sHashHex);\n } else {\n if (this.prvKey instanceof KJUR.crypto.DSA) {\n this.hSign = this.prvKey.signWithMessageHash(this.sHashHex);\n } else {\n throw \"Signature: unsupported private key alg: \" + this.pubkeyAlgName;\n }\n }\n }\n }\n\n return this.hSign;\n };\n\n this.signString = function (v) {\n this.updateString(v);\n return this.sign();\n };\n\n this.signHex = function (v) {\n this.updateHex(v);\n return this.sign();\n };\n\n this.verify = function (v) {\n this.sHashHex = this.md.digest();\n\n if (this.pubKey === undefined && this.ecpubhex !== undefined && this.eccurvename !== undefined && KJUR.crypto.ECDSA !== undefined) {\n this.pubKey = new KJUR.crypto.ECDSA({\n curve: this.eccurvename,\n pub: this.ecpubhex\n });\n }\n\n if (this.pubKey instanceof RSAKey && this.pubkeyAlgName === \"rsaandmgf1\") {\n return this.pubKey.verifyWithMessageHashPSS(this.sHashHex, v, this.mdAlgName, this.pssSaltLen);\n } else {\n if (this.pubKey instanceof RSAKey && this.pubkeyAlgName === \"rsa\") {\n return this.pubKey.verifyWithMessageHash(this.sHashHex, v);\n } else {\n if (KJUR.crypto.ECDSA !== undefined && this.pubKey instanceof KJUR.crypto.ECDSA) {\n return this.pubKey.verifyWithMessageHash(this.sHashHex, v);\n } else {\n if (KJUR.crypto.DSA !== undefined && this.pubKey instanceof KJUR.crypto.DSA) {\n return this.pubKey.verifyWithMessageHash(this.sHashHex, v);\n } else {\n throw \"Signature: unsupported public key alg: \" + this.pubkeyAlgName;\n }\n }\n }\n }\n };\n }\n };\n\n this.init = function (s, t) {\n throw \"init(key, pass) not supported for this alg:prov=\" + this.algProvName;\n };\n\n this.updateString = function (s) {\n throw \"updateString(str) not supported for this alg:prov=\" + this.algProvName;\n };\n\n this.updateHex = function (s) {\n throw \"updateHex(hex) not supported for this alg:prov=\" + this.algProvName;\n };\n\n this.sign = function () {\n throw \"sign() not supported for this alg:prov=\" + this.algProvName;\n };\n\n this.signString = function (s) {\n throw \"digestString(str) not supported for this alg:prov=\" + this.algProvName;\n };\n\n this.signHex = function (s) {\n throw \"digestHex(hex) not supported for this alg:prov=\" + this.algProvName;\n };\n\n this.verify = function (s) {\n throw \"verify(hSigVal) not supported for this alg:prov=\" + this.algProvName;\n };\n\n this.initParams = o;\n\n if (o !== undefined) {\n if (o.alg !== undefined) {\n this.algName = o.alg;\n\n if (o.prov === undefined) {\n this.provName = KJUR.crypto.Util.DEFAULTPROVIDER[this.algName];\n } else {\n this.provName = o.prov;\n }\n\n this.algProvName = this.algName + \":\" + this.provName;\n this.setAlgAndProvider(this.algName, this.provName);\n\n this._setAlgNames();\n }\n\n if (o.psssaltlen !== undefined) {\n this.pssSaltLen = o.psssaltlen;\n }\n\n if (o.prvkeypem !== undefined) {\n if (o.prvkeypas !== undefined) {\n throw \"both prvkeypem and prvkeypas parameters not supported\";\n } else {\n try {\n var q = KEYUTIL.getKey(o.prvkeypem);\n this.init(q);\n } catch (m) {\n throw \"fatal error to load pem private key: \" + m;\n }\n }\n }\n }\n};\n\nKJUR.crypto.Cipher = function (a) {};\n\nKJUR.crypto.Cipher.encrypt = function (e, f, d) {\n if (f instanceof RSAKey && f.isPublic) {\n var c = KJUR.crypto.Cipher.getAlgByKeyAndName(f, d);\n\n if (c === \"RSA\") {\n return f.encrypt(e);\n }\n\n if (c === \"RSAOAEP\") {\n return f.encryptOAEP(e, \"sha1\");\n }\n\n var b = c.match(/^RSAOAEP(\\d+)$/);\n\n if (b !== null) {\n return f.encryptOAEP(e, \"sha\" + b[1]);\n }\n\n throw \"Cipher.encrypt: unsupported algorithm for RSAKey: \" + d;\n } else {\n throw \"Cipher.encrypt: unsupported key or algorithm\";\n }\n};\n\nKJUR.crypto.Cipher.decrypt = function (e, f, d) {\n if (f instanceof RSAKey && f.isPrivate) {\n var c = KJUR.crypto.Cipher.getAlgByKeyAndName(f, d);\n\n if (c === \"RSA\") {\n return f.decrypt(e);\n }\n\n if (c === \"RSAOAEP\") {\n return f.decryptOAEP(e, \"sha1\");\n }\n\n var b = c.match(/^RSAOAEP(\\d+)$/);\n\n if (b !== null) {\n return f.decryptOAEP(e, \"sha\" + b[1]);\n }\n\n throw \"Cipher.decrypt: unsupported algorithm for RSAKey: \" + d;\n } else {\n throw \"Cipher.decrypt: unsupported key or algorithm\";\n }\n};\n\nKJUR.crypto.Cipher.getAlgByKeyAndName = function (b, a) {\n if (b instanceof RSAKey) {\n if (\":RSA:RSAOAEP:RSAOAEP224:RSAOAEP256:RSAOAEP384:RSAOAEP512:\".indexOf(a) != -1) {\n return a;\n }\n\n if (a === null || a === undefined) {\n return \"RSA\";\n }\n\n throw \"getAlgByKeyAndName: not supported algorithm name for RSAKey: \" + a;\n }\n\n throw \"getAlgByKeyAndName: not supported algorithm name: \" + a;\n};\n\nKJUR.crypto.OID = new function () {\n this.oidhex2name = {\n \"2a864886f70d010101\": \"rsaEncryption\",\n \"2a8648ce3d0201\": \"ecPublicKey\",\n \"2a8648ce380401\": \"dsa\",\n \"2a8648ce3d030107\": \"secp256r1\",\n \"2b8104001f\": \"secp192k1\",\n \"2b81040021\": \"secp224r1\",\n \"2b8104000a\": \"secp256k1\",\n \"2b81040023\": \"secp521r1\",\n \"2b81040022\": \"secp384r1\",\n \"2a8648ce380403\": \"SHA1withDSA\",\n \"608648016503040301\": \"SHA224withDSA\",\n \"608648016503040302\": \"SHA256withDSA\"\n };\n}();\n\nif (typeof KJUR == \"undefined\" || !KJUR) {\n KJUR = {};\n}\n\nif (typeof KJUR.crypto == \"undefined\" || !KJUR.crypto) {\n KJUR.crypto = {};\n}\n\nKJUR.crypto.ECDSA = function (e) {\n var g = \"secp256r1\";\n var p = null;\n var b = null;\n var i = null;\n var j = Error,\n f = BigInteger,\n h = ECPointFp,\n m = KJUR.crypto.ECDSA,\n c = KJUR.crypto.ECParameterDB,\n d = m.getName,\n q = ASN1HEX,\n n = q.getVbyListEx,\n k = q.isASN1HEX;\n var a = new SecureRandom();\n var o = null;\n this.type = \"EC\";\n this.isPrivate = false;\n this.isPublic = false;\n\n function l(x, t, w, s) {\n var r = Math.max(t.bitLength(), s.bitLength());\n var y = x.add2D(w);\n var v = x.curve.getInfinity();\n\n for (var u = r - 1; u >= 0; --u) {\n v = v.twice2D();\n v.z = f.ONE;\n\n if (t.testBit(u)) {\n if (s.testBit(u)) {\n v = v.add2D(y);\n } else {\n v = v.add2D(x);\n }\n } else {\n if (s.testBit(u)) {\n v = v.add2D(w);\n }\n }\n }\n\n return v;\n }\n\n this.getBigRandom = function (r) {\n return new f(r.bitLength(), a).mod(r.subtract(f.ONE)).add(f.ONE);\n };\n\n this.setNamedCurve = function (r) {\n this.ecparams = c.getByName(r);\n this.prvKeyHex = null;\n this.pubKeyHex = null;\n this.curveName = r;\n };\n\n this.setPrivateKeyHex = function (r) {\n this.isPrivate = true;\n this.prvKeyHex = r;\n };\n\n this.setPublicKeyHex = function (r) {\n this.isPublic = true;\n this.pubKeyHex = r;\n };\n\n this.getPublicKeyXYHex = function () {\n var t = this.pubKeyHex;\n\n if (t.substr(0, 2) !== \"04\") {\n throw \"this method supports uncompressed format(04) only\";\n }\n\n var s = this.ecparams.keylen / 4;\n\n if (t.length !== 2 + s * 2) {\n throw \"malformed public key hex length\";\n }\n\n var r = {};\n r.x = t.substr(2, s);\n r.y = t.substr(2 + s);\n return r;\n };\n\n this.getShortNISTPCurveName = function () {\n var r = this.curveName;\n\n if (r === \"secp256r1\" || r === \"NIST P-256\" || r === \"P-256\" || r === \"prime256v1\") {\n return \"P-256\";\n }\n\n if (r === \"secp384r1\" || r === \"NIST P-384\" || r === \"P-384\") {\n return \"P-384\";\n }\n\n return null;\n };\n\n this.generateKeyPairHex = function () {\n var t = this.ecparams.n;\n var w = this.getBigRandom(t);\n var u = this.ecparams.G.multiply(w);\n var z = u.getX().toBigInteger();\n var x = u.getY().toBigInteger();\n var r = this.ecparams.keylen / 4;\n var v = (\"0000000000\" + w.toString(16)).slice(-r);\n var A = (\"0000000000\" + z.toString(16)).slice(-r);\n var y = (\"0000000000\" + x.toString(16)).slice(-r);\n var s = \"04\" + A + y;\n this.setPrivateKeyHex(v);\n this.setPublicKeyHex(s);\n return {\n ecprvhex: v,\n ecpubhex: s\n };\n };\n\n this.signWithMessageHash = function (r) {\n return this.signHex(r, this.prvKeyHex);\n };\n\n this.signHex = function (x, u) {\n var A = new f(u, 16);\n var v = this.ecparams.n;\n var z = new f(x.substring(0, this.ecparams.keylen / 4), 16);\n\n do {\n var w = this.getBigRandom(v);\n var B = this.ecparams.G;\n var y = B.multiply(w);\n var t = y.getX().toBigInteger().mod(v);\n } while (t.compareTo(f.ZERO) <= 0);\n\n var C = w.modInverse(v).multiply(z.add(A.multiply(t))).mod(v);\n return m.biRSSigToASN1Sig(t, C);\n };\n\n this.sign = function (w, B) {\n var z = B;\n var u = this.ecparams.n;\n var y = f.fromByteArrayUnsigned(w);\n\n do {\n var v = this.getBigRandom(u);\n var A = this.ecparams.G;\n var x = A.multiply(v);\n var t = x.getX().toBigInteger().mod(u);\n } while (t.compareTo(BigInteger.ZERO) <= 0);\n\n var C = v.modInverse(u).multiply(y.add(z.multiply(t))).mod(u);\n return this.serializeSig(t, C);\n };\n\n this.verifyWithMessageHash = function (s, r) {\n return this.verifyHex(s, r, this.pubKeyHex);\n };\n\n this.verifyHex = function (v, y, u) {\n try {\n var t, B;\n var w = m.parseSigHex(y);\n t = w.r;\n B = w.s;\n var x = h.decodeFromHex(this.ecparams.curve, u);\n var z = new f(v.substring(0, this.ecparams.keylen / 4), 16);\n return this.verifyRaw(z, t, B, x);\n } catch (A) {\n return false;\n }\n };\n\n this.verify = function (z, A, u) {\n var w, t;\n\n if (Bitcoin.Util.isArray(A)) {\n var y = this.parseSig(A);\n w = y.r;\n t = y.s;\n } else {\n if (\"object\" === _typeof(A) && A.r && A.s) {\n w = A.r;\n t = A.s;\n } else {\n throw \"Invalid value for signature\";\n }\n }\n\n var v;\n\n if (u instanceof ECPointFp) {\n v = u;\n } else {\n if (Bitcoin.Util.isArray(u)) {\n v = h.decodeFrom(this.ecparams.curve, u);\n } else {\n throw \"Invalid format for pubkey value, must be byte array or ECPointFp\";\n }\n }\n\n var x = f.fromByteArrayUnsigned(z);\n return this.verifyRaw(x, w, t, v);\n };\n\n this.verifyRaw = function (z, t, E, y) {\n var x = this.ecparams.n;\n var D = this.ecparams.G;\n\n if (t.compareTo(f.ONE) < 0 || t.compareTo(x) >= 0) {\n return false;\n }\n\n if (E.compareTo(f.ONE) < 0 || E.compareTo(x) >= 0) {\n return false;\n }\n\n var A = E.modInverse(x);\n var w = z.multiply(A).mod(x);\n var u = t.multiply(A).mod(x);\n var B = D.multiply(w).add(y.multiply(u));\n var C = B.getX().toBigInteger().mod(x);\n return C.equals(t);\n };\n\n this.serializeSig = function (v, u) {\n var w = v.toByteArraySigned();\n var t = u.toByteArraySigned();\n var x = [];\n x.push(2);\n x.push(w.length);\n x = x.concat(w);\n x.push(2);\n x.push(t.length);\n x = x.concat(t);\n x.unshift(x.length);\n x.unshift(48);\n return x;\n };\n\n this.parseSig = function (y) {\n var x;\n\n if (y[0] != 48) {\n throw new Error(\"Signature not a valid DERSequence\");\n }\n\n x = 2;\n\n if (y[x] != 2) {\n throw new Error(\"First element in signature must be a DERInteger\");\n }\n\n var w = y.slice(x + 2, x + 2 + y[x + 1]);\n x += 2 + y[x + 1];\n\n if (y[x] != 2) {\n throw new Error(\"Second element in signature must be a DERInteger\");\n }\n\n var t = y.slice(x + 2, x + 2 + y[x + 1]);\n x += 2 + y[x + 1];\n var v = f.fromByteArrayUnsigned(w);\n var u = f.fromByteArrayUnsigned(t);\n return {\n r: v,\n s: u\n };\n };\n\n this.parseSigCompact = function (w) {\n if (w.length !== 65) {\n throw \"Signature has the wrong length\";\n }\n\n var t = w[0] - 27;\n\n if (t < 0 || t > 7) {\n throw \"Invalid signature type\";\n }\n\n var x = this.ecparams.n;\n var v = f.fromByteArrayUnsigned(w.slice(1, 33)).mod(x);\n var u = f.fromByteArrayUnsigned(w.slice(33, 65)).mod(x);\n return {\n r: v,\n s: u,\n i: t\n };\n };\n\n this.readPKCS5PrvKeyHex = function (u) {\n if (k(u) === false) {\n throw new Error(\"not ASN.1 hex string\");\n }\n\n var r, t, v;\n\n try {\n r = n(u, 0, [\"[0]\", 0], \"06\");\n t = n(u, 0, [1], \"04\");\n\n try {\n v = n(u, 0, [\"[1]\", 0], \"03\");\n } catch (s) {}\n } catch (s) {\n throw new Error(\"malformed PKCS#1/5 plain ECC private key\");\n }\n\n this.curveName = d(r);\n\n if (this.curveName === undefined) {\n throw \"unsupported curve name\";\n }\n\n this.setNamedCurve(this.curveName);\n this.setPublicKeyHex(v);\n this.setPrivateKeyHex(t);\n this.isPublic = false;\n };\n\n this.readPKCS8PrvKeyHex = function (v) {\n if (k(v) === false) {\n throw new j(\"not ASN.1 hex string\");\n }\n\n var t, r, u, w;\n\n try {\n t = n(v, 0, [1, 0], \"06\");\n r = n(v, 0, [1, 1], \"06\");\n u = n(v, 0, [2, 0, 1], \"04\");\n\n try {\n w = n(v, 0, [2, 0, \"[1]\", 0], \"03\");\n } catch (s) {}\n } catch (s) {\n throw new j(\"malformed PKCS#8 plain ECC private key\");\n }\n\n this.curveName = d(r);\n\n if (this.curveName === undefined) {\n throw new j(\"unsupported curve name\");\n }\n\n this.setNamedCurve(this.curveName);\n this.setPublicKeyHex(w);\n this.setPrivateKeyHex(u);\n this.isPublic = false;\n };\n\n this.readPKCS8PubKeyHex = function (u) {\n if (k(u) === false) {\n throw new j(\"not ASN.1 hex string\");\n }\n\n var t, r, v;\n\n try {\n t = n(u, 0, [0, 0], \"06\");\n r = n(u, 0, [0, 1], \"06\");\n v = n(u, 0, [1], \"03\");\n } catch (s) {\n throw new j(\"malformed PKCS#8 ECC public key\");\n }\n\n this.curveName = d(r);\n\n if (this.curveName === null) {\n throw new j(\"unsupported curve name\");\n }\n\n this.setNamedCurve(this.curveName);\n this.setPublicKeyHex(v);\n };\n\n this.readCertPubKeyHex = function (t, v) {\n if (k(t) === false) {\n throw new j(\"not ASN.1 hex string\");\n }\n\n var r, u;\n\n try {\n r = n(t, 0, [0, 5, 0, 1], \"06\");\n u = n(t, 0, [0, 5, 1], \"03\");\n } catch (s) {\n throw new j(\"malformed X.509 certificate ECC public key\");\n }\n\n this.curveName = d(r);\n\n if (this.curveName === null) {\n throw new j(\"unsupported curve name\");\n }\n\n this.setNamedCurve(this.curveName);\n this.setPublicKeyHex(u);\n };\n\n if (e !== undefined) {\n if (e.curve !== undefined) {\n this.curveName = e.curve;\n }\n }\n\n if (this.curveName === undefined) {\n this.curveName = g;\n }\n\n this.setNamedCurve(this.curveName);\n\n if (e !== undefined) {\n if (e.prv !== undefined) {\n this.setPrivateKeyHex(e.prv);\n }\n\n if (e.pub !== undefined) {\n this.setPublicKeyHex(e.pub);\n }\n }\n};\n\nKJUR.crypto.ECDSA.parseSigHex = function (a) {\n var b = KJUR.crypto.ECDSA.parseSigHexInHexRS(a);\n var d = new BigInteger(b.r, 16);\n var c = new BigInteger(b.s, 16);\n return {\n r: d,\n s: c\n };\n};\n\nKJUR.crypto.ECDSA.parseSigHexInHexRS = function (f) {\n var j = ASN1HEX,\n i = j.getChildIdx,\n g = j.getV;\n j.checkStrictDER(f, 0);\n\n if (f.substr(0, 2) != \"30\") {\n throw new Error(\"signature is not a ASN.1 sequence\");\n }\n\n var h = i(f, 0);\n\n if (h.length != 2) {\n throw new Error(\"signature shall have two elements\");\n }\n\n var e = h[0];\n var d = h[1];\n\n if (f.substr(e, 2) != \"02\") {\n throw new Error(\"1st item not ASN.1 integer\");\n }\n\n if (f.substr(d, 2) != \"02\") {\n throw new Error(\"2nd item not ASN.1 integer\");\n }\n\n var c = g(f, e);\n var b = g(f, d);\n return {\n r: c,\n s: b\n };\n};\n\nKJUR.crypto.ECDSA.asn1SigToConcatSig = function (c) {\n var d = KJUR.crypto.ECDSA.parseSigHexInHexRS(c);\n var b = d.r;\n var a = d.s;\n\n if (b.substr(0, 2) == \"00\" && b.length % 32 == 2) {\n b = b.substr(2);\n }\n\n if (a.substr(0, 2) == \"00\" && a.length % 32 == 2) {\n a = a.substr(2);\n }\n\n if (b.length % 32 == 30) {\n b = \"00\" + b;\n }\n\n if (a.length % 32 == 30) {\n a = \"00\" + a;\n }\n\n if (b.length % 32 != 0) {\n throw \"unknown ECDSA sig r length error\";\n }\n\n if (a.length % 32 != 0) {\n throw \"unknown ECDSA sig s length error\";\n }\n\n return b + a;\n};\n\nKJUR.crypto.ECDSA.concatSigToASN1Sig = function (a) {\n if (a.length / 2 * 8 % (16 * 8) != 0) {\n throw \"unknown ECDSA concatinated r-s sig length error\";\n }\n\n var c = a.substr(0, a.length / 2);\n var b = a.substr(a.length / 2);\n return KJUR.crypto.ECDSA.hexRSSigToASN1Sig(c, b);\n};\n\nKJUR.crypto.ECDSA.hexRSSigToASN1Sig = function (b, a) {\n var d = new BigInteger(b, 16);\n var c = new BigInteger(a, 16);\n return KJUR.crypto.ECDSA.biRSSigToASN1Sig(d, c);\n};\n\nKJUR.crypto.ECDSA.biRSSigToASN1Sig = function (f, d) {\n var c = KJUR.asn1;\n var b = new c.DERInteger({\n bigint: f\n });\n var a = new c.DERInteger({\n bigint: d\n });\n var e = new c.DERSequence({\n array: [b, a]\n });\n return e.getEncodedHex();\n};\n\nKJUR.crypto.ECDSA.getName = function (a) {\n if (a === \"2b8104001f\") {\n return \"secp192k1\";\n }\n\n if (a === \"2a8648ce3d030107\") {\n return \"secp256r1\";\n }\n\n if (a === \"2b8104000a\") {\n return \"secp256k1\";\n }\n\n if (a === \"2b81040021\") {\n return \"secp224r1\";\n }\n\n if (a === \"2b81040022\") {\n return \"secp384r1\";\n }\n\n if (\"|secp256r1|NIST P-256|P-256|prime256v1|\".indexOf(a) !== -1) {\n return \"secp256r1\";\n }\n\n if (\"|secp256k1|\".indexOf(a) !== -1) {\n return \"secp256k1\";\n }\n\n if (\"|secp224r1|NIST P-224|P-224|\".indexOf(a) !== -1) {\n return \"secp224r1\";\n }\n\n if (\"|secp384r1|NIST P-384|P-384|\".indexOf(a) !== -1) {\n return \"secp384r1\";\n }\n\n return null;\n};\n\nif (typeof KJUR == \"undefined\" || !KJUR) {\n KJUR = {};\n}\n\nif (typeof KJUR.crypto == \"undefined\" || !KJUR.crypto) {\n KJUR.crypto = {};\n}\n\nKJUR.crypto.ECParameterDB = new function () {\n var b = {};\n var c = {};\n\n function a(d) {\n return new BigInteger(d, 16);\n }\n\n this.getByName = function (e) {\n var d = e;\n\n if (typeof c[d] != \"undefined\") {\n d = c[e];\n }\n\n if (typeof b[d] != \"undefined\") {\n return b[d];\n }\n\n throw \"unregistered EC curve name: \" + d;\n };\n\n this.regist = function (A, l, o, g, m, e, j, f, k, u, d, x) {\n b[A] = {};\n var s = a(o);\n var z = a(g);\n var y = a(m);\n var t = a(e);\n var w = a(j);\n var r = new ECCurveFp(s, z, y);\n var q = r.decodePointHex(\"04\" + f + k);\n b[A][\"name\"] = A;\n b[A][\"keylen\"] = l;\n b[A][\"curve\"] = r;\n b[A][\"G\"] = q;\n b[A][\"n\"] = t;\n b[A][\"h\"] = w;\n b[A][\"oid\"] = d;\n b[A][\"info\"] = x;\n\n for (var v = 0; v < u.length; v++) {\n c[u[v]] = A;\n }\n };\n}();\nKJUR.crypto.ECParameterDB.regist(\"secp128r1\", 128, \"FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF\", \"FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC\", \"E87579C11079F43DD824993C2CEE5ED3\", \"FFFFFFFE0000000075A30D1B9038A115\", \"1\", \"161FF7528B899B2D0C28607CA52C5B86\", \"CF5AC8395BAFEB13C02DA292DDED7A83\", [], \"\", \"secp128r1 : SECG curve over a 128 bit prime field\");\nKJUR.crypto.ECParameterDB.regist(\"secp160k1\", 160, \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73\", \"0\", \"7\", \"0100000000000000000001B8FA16DFAB9ACA16B6B3\", \"1\", \"3B4C382CE37AA192A4019E763036F4F5DD4D7EBB\", \"938CF935318FDCED6BC28286531733C3F03C4FEE\", [], \"\", \"secp160k1 : SECG curve over a 160 bit prime field\");\nKJUR.crypto.ECParameterDB.regist(\"secp160r1\", 160, \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF\", \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC\", \"1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45\", \"0100000000000000000001F4C8F927AED3CA752257\", \"1\", \"4A96B5688EF573284664698968C38BB913CBFC82\", \"23A628553168947D59DCC912042351377AC5FB32\", [], \"\", \"secp160r1 : SECG curve over a 160 bit prime field\");\nKJUR.crypto.ECParameterDB.regist(\"secp192k1\", 192, \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37\", \"0\", \"3\", \"FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D\", \"1\", \"DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D\", \"9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D\", []);\nKJUR.crypto.ECParameterDB.regist(\"secp192r1\", 192, \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF\", \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC\", \"64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1\", \"FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831\", \"1\", \"188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012\", \"07192B95FFC8DA78631011ED6B24CDD573F977A11E794811\", []);\nKJUR.crypto.ECParameterDB.regist(\"secp224r1\", 224, \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001\", \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE\", \"B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4\", \"FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D\", \"1\", \"B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21\", \"BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34\", []);\nKJUR.crypto.ECParameterDB.regist(\"secp256k1\", 256, \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F\", \"0\", \"7\", \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141\", \"1\", \"79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798\", \"483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8\", []);\nKJUR.crypto.ECParameterDB.regist(\"secp256r1\", 256, \"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF\", \"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC\", \"5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B\", \"FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551\", \"1\", \"6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296\", \"4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5\", [\"NIST P-256\", \"P-256\", \"prime256v1\"]);\nKJUR.crypto.ECParameterDB.regist(\"secp384r1\", 384, \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF\", \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC\", \"B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF\", \"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973\", \"1\", \"AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7\", \"3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f\", [\"NIST P-384\", \"P-384\"]);\nKJUR.crypto.ECParameterDB.regist(\"secp521r1\", 521, \"1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\", \"1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC\", \"051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00\", \"1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409\", \"1\", \"C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66\", \"011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650\", [\"NIST P-521\", \"P-521\"]);\n\nif (typeof KJUR == \"undefined\" || !KJUR) {\n KJUR = {};\n}\n\nif (typeof KJUR.crypto == \"undefined\" || !KJUR.crypto) {\n KJUR.crypto = {};\n}\n\nKJUR.crypto.DSA = function () {\n var b = ASN1HEX,\n e = b.getVbyList,\n d = b.getVbyListEx,\n a = b.isASN1HEX,\n c = BigInteger;\n this.p = null;\n this.q = null;\n this.g = null;\n this.y = null;\n this.x = null;\n this.type = \"DSA\";\n this.isPrivate = false;\n this.isPublic = false;\n\n this.setPrivate = function (j, i, h, k, f) {\n this.isPrivate = true;\n this.p = j;\n this.q = i;\n this.g = h;\n this.y = k;\n this.x = f;\n };\n\n this.setPrivateHex = function (i, g, k, n, o) {\n var h, f, j, l, m;\n h = new BigInteger(i, 16);\n f = new BigInteger(g, 16);\n j = new BigInteger(k, 16);\n\n if (typeof n === \"string\" && n.length > 1) {\n l = new BigInteger(n, 16);\n } else {\n l = null;\n }\n\n m = new BigInteger(o, 16);\n this.setPrivate(h, f, j, l, m);\n };\n\n this.setPublic = function (i, h, f, j) {\n this.isPublic = true;\n this.p = i;\n this.q = h;\n this.g = f;\n this.y = j;\n this.x = null;\n };\n\n this.setPublicHex = function (k, j, i, l) {\n var g, f, m, h;\n g = new BigInteger(k, 16);\n f = new BigInteger(j, 16);\n m = new BigInteger(i, 16);\n h = new BigInteger(l, 16);\n this.setPublic(g, f, m, h);\n };\n\n this.signWithMessageHash = function (j) {\n var i = this.p;\n var h = this.q;\n var m = this.g;\n var o = this.y;\n var t = this.x;\n var l = KJUR.crypto.Util.getRandomBigIntegerMinToMax(BigInteger.ONE.add(BigInteger.ONE), h.subtract(BigInteger.ONE));\n var u = j.substr(0, h.bitLength() / 4);\n var n = new BigInteger(u, 16);\n var f = m.modPow(l, i).mod(h);\n var w = l.modInverse(h).multiply(n.add(t.multiply(f))).mod(h);\n var v = KJUR.asn1.ASN1Util.jsonToASN1HEX({\n seq: [{\n \"int\": {\n bigint: f\n }\n }, {\n \"int\": {\n bigint: w\n }\n }]\n });\n return v;\n };\n\n this.verifyWithMessageHash = function (m, l) {\n var j = this.p;\n var h = this.q;\n var o = this.g;\n var u = this.y;\n var n = this.parseASN1Signature(l);\n var f = n[0];\n var C = n[1];\n var B = m.substr(0, h.bitLength() / 4);\n var t = new BigInteger(B, 16);\n\n if (BigInteger.ZERO.compareTo(f) > 0 || f.compareTo(h) > 0) {\n throw \"invalid DSA signature\";\n }\n\n if (BigInteger.ZERO.compareTo(C) >= 0 || C.compareTo(h) > 0) {\n throw \"invalid DSA signature\";\n }\n\n var x = C.modInverse(h);\n var k = t.multiply(x).mod(h);\n var i = f.multiply(x).mod(h);\n var A = o.modPow(k, j).multiply(u.modPow(i, j)).mod(j).mod(h);\n return A.compareTo(f) == 0;\n };\n\n this.parseASN1Signature = function (f) {\n try {\n var i = new c(d(f, 0, [0], \"02\"), 16);\n var h = new c(d(f, 0, [1], \"02\"), 16);\n return [i, h];\n } catch (g) {\n throw new Error(\"malformed ASN.1 DSA signature\");\n }\n };\n\n this.readPKCS5PrvKeyHex = function (j) {\n var k, i, g, l, m;\n\n if (a(j) === false) {\n throw new Error(\"not ASN.1 hex string\");\n }\n\n try {\n k = d(j, 0, [1], \"02\");\n i = d(j, 0, [2], \"02\");\n g = d(j, 0, [3], \"02\");\n l = d(j, 0, [4], \"02\");\n m = d(j, 0, [5], \"02\");\n } catch (f) {\n throw new Error(\"malformed PKCS#1/5 plain DSA private key\");\n }\n\n this.setPrivateHex(k, i, g, l, m);\n };\n\n this.readPKCS8PrvKeyHex = function (j) {\n var k, i, g, l;\n\n if (a(j) === false) {\n throw new Error(\"not ASN.1 hex string\");\n }\n\n try {\n k = d(j, 0, [1, 1, 0], \"02\");\n i = d(j, 0, [1, 1, 1], \"02\");\n g = d(j, 0, [1, 1, 2], \"02\");\n l = d(j, 0, [2, 0], \"02\");\n } catch (f) {\n throw new Error(\"malformed PKCS#8 plain DSA private key\");\n }\n\n this.setPrivateHex(k, i, g, null, l);\n };\n\n this.readPKCS8PubKeyHex = function (j) {\n var k, i, g, l;\n\n if (a(j) === false) {\n throw new Error(\"not ASN.1 hex string\");\n }\n\n try {\n k = d(j, 0, [0, 1, 0], \"02\");\n i = d(j, 0, [0, 1, 1], \"02\");\n g = d(j, 0, [0, 1, 2], \"02\");\n l = d(j, 0, [1, 0], \"02\");\n } catch (f) {\n throw new Error(\"malformed PKCS#8 DSA public key\");\n }\n\n this.setPublicHex(k, i, g, l);\n };\n\n this.readCertPubKeyHex = function (j, m) {\n var k, i, g, l;\n\n if (a(j) === false) {\n throw new Error(\"not ASN.1 hex string\");\n }\n\n try {\n k = d(j, 0, [0, 5, 0, 1, 0], \"02\");\n i = d(j, 0, [0, 5, 0, 1, 1], \"02\");\n g = d(j, 0, [0, 5, 0, 1, 2], \"02\");\n l = d(j, 0, [0, 5, 1, 0], \"02\");\n } catch (f) {\n throw new Error(\"malformed X.509 certificate DSA public key\");\n }\n\n this.setPublicHex(k, i, g, l);\n };\n};\n\nvar KEYUTIL = function () {\n var d = function d(p, r, q) {\n return k(CryptoJS.AES, p, r, q);\n };\n\n var e = function e(p, r, q) {\n return k(CryptoJS.TripleDES, p, r, q);\n };\n\n var a = function a(p, r, q) {\n return k(CryptoJS.DES, p, r, q);\n };\n\n var k = function k(s, x, u, q) {\n var r = CryptoJS.enc.Hex.parse(x);\n var w = CryptoJS.enc.Hex.parse(u);\n var p = CryptoJS.enc.Hex.parse(q);\n var t = {};\n t.key = w;\n t.iv = p;\n t.ciphertext = r;\n var v = s.decrypt(t, w, {\n iv: p\n });\n return CryptoJS.enc.Hex.stringify(v);\n };\n\n var l = function l(p, r, q) {\n return g(CryptoJS.AES, p, r, q);\n };\n\n var o = function o(p, r, q) {\n return g(CryptoJS.TripleDES, p, r, q);\n };\n\n var f = function f(p, r, q) {\n return g(CryptoJS.DES, p, r, q);\n };\n\n var g = function g(t, y, v, q) {\n var s = CryptoJS.enc.Hex.parse(y);\n var x = CryptoJS.enc.Hex.parse(v);\n var p = CryptoJS.enc.Hex.parse(q);\n var w = t.encrypt(s, x, {\n iv: p\n });\n var r = CryptoJS.enc.Hex.parse(w.toString());\n var u = CryptoJS.enc.Base64.stringify(r);\n return u;\n };\n\n var i = {\n \"AES-256-CBC\": {\n proc: d,\n eproc: l,\n keylen: 32,\n ivlen: 16\n },\n \"AES-192-CBC\": {\n proc: d,\n eproc: l,\n keylen: 24,\n ivlen: 16\n },\n \"AES-128-CBC\": {\n proc: d,\n eproc: l,\n keylen: 16,\n ivlen: 16\n },\n \"DES-EDE3-CBC\": {\n proc: e,\n eproc: o,\n keylen: 24,\n ivlen: 8\n },\n \"DES-CBC\": {\n proc: a,\n eproc: f,\n keylen: 8,\n ivlen: 8\n }\n };\n\n var c = function c(p) {\n return i[p][\"proc\"];\n };\n\n var m = function m(p) {\n var r = CryptoJS.lib.WordArray.random(p);\n var q = CryptoJS.enc.Hex.stringify(r);\n return q;\n };\n\n var n = function n(v) {\n var w = {};\n var q = v.match(new RegExp(\"DEK-Info: ([^,]+),([0-9A-Fa-f]+)\", \"m\"));\n\n if (q) {\n w.cipher = q[1];\n w.ivsalt = q[2];\n }\n\n var p = v.match(new RegExp(\"-----BEGIN ([A-Z]+) PRIVATE KEY-----\"));\n\n if (p) {\n w.type = p[1];\n }\n\n var u = -1;\n var x = 0;\n\n if (v.indexOf(\"\\r\\n\\r\\n\") != -1) {\n u = v.indexOf(\"\\r\\n\\r\\n\");\n x = 2;\n }\n\n if (v.indexOf(\"\\n\\n\") != -1) {\n u = v.indexOf(\"\\n\\n\");\n x = 1;\n }\n\n var t = v.indexOf(\"-----END\");\n\n if (u != -1 && t != -1) {\n var r = v.substring(u + x * 2, t - x);\n r = r.replace(/\\s+/g, \"\");\n w.data = r;\n }\n\n return w;\n };\n\n var j = function j(q, y, p) {\n var v = p.substring(0, 16);\n var t = CryptoJS.enc.Hex.parse(v);\n var r = CryptoJS.enc.Utf8.parse(y);\n var u = i[q][\"keylen\"] + i[q][\"ivlen\"];\n var x = \"\";\n var w = null;\n\n for (;;) {\n var s = CryptoJS.algo.MD5.create();\n\n if (w != null) {\n s.update(w);\n }\n\n s.update(r);\n s.update(t);\n w = s.finalize();\n x = x + CryptoJS.enc.Hex.stringify(w);\n\n if (x.length >= u * 2) {\n break;\n }\n }\n\n var z = {};\n z.keyhex = x.substr(0, i[q][\"keylen\"] * 2);\n z.ivhex = x.substr(i[q][\"keylen\"] * 2, i[q][\"ivlen\"] * 2);\n return z;\n };\n\n var b = function b(p, v, r, w) {\n var s = CryptoJS.enc.Base64.parse(p);\n var q = CryptoJS.enc.Hex.stringify(s);\n var u = i[v][\"proc\"];\n var t = u(q, r, w);\n return t;\n };\n\n var h = function h(p, s, q, u) {\n var r = i[s][\"eproc\"];\n var t = r(p, q, u);\n return t;\n };\n\n return {\n version: \"1.0.0\",\n parsePKCS5PEM: function parsePKCS5PEM(p) {\n return n(p);\n },\n getKeyAndUnusedIvByPasscodeAndIvsalt: function getKeyAndUnusedIvByPasscodeAndIvsalt(q, p, r) {\n return j(q, p, r);\n },\n decryptKeyB64: function decryptKeyB64(p, r, q, s) {\n return b(p, r, q, s);\n },\n getDecryptedKeyHex: function getDecryptedKeyHex(y, x) {\n var q = n(y);\n var t = q.type;\n var r = q.cipher;\n var p = q.ivsalt;\n var s = q.data;\n var w = j(r, x, p);\n var v = w.keyhex;\n var u = b(s, r, v, p);\n return u;\n },\n getEncryptedPKCS5PEMFromPrvKeyHex: function getEncryptedPKCS5PEMFromPrvKeyHex(x, s, A, t, r) {\n var p = \"\";\n\n if (typeof t == \"undefined\" || t == null) {\n t = \"AES-256-CBC\";\n }\n\n if (typeof i[t] == \"undefined\") {\n throw \"KEYUTIL unsupported algorithm: \" + t;\n }\n\n if (typeof r == \"undefined\" || r == null) {\n var v = i[t][\"ivlen\"];\n var u = m(v);\n r = u.toUpperCase();\n }\n\n var z = j(t, A, r);\n var y = z.keyhex;\n var w = h(s, t, y, r);\n var q = w.replace(/(.{64})/g, \"$1\\r\\n\");\n var p = \"-----BEGIN \" + x + \" PRIVATE KEY-----\\r\\n\";\n p += \"Proc-Type: 4,ENCRYPTED\\r\\n\";\n p += \"DEK-Info: \" + t + \",\" + r + \"\\r\\n\";\n p += \"\\r\\n\";\n p += q;\n p += \"\\r\\n-----END \" + x + \" PRIVATE KEY-----\\r\\n\";\n return p;\n },\n parseHexOfEncryptedPKCS8: function parseHexOfEncryptedPKCS8(y) {\n var B = ASN1HEX;\n var z = B.getChildIdx;\n var w = B.getV;\n var t = {};\n var r = z(y, 0);\n\n if (r.length != 2) {\n throw \"malformed format: SEQUENCE(0).items != 2: \" + r.length;\n }\n\n t.ciphertext = w(y, r[1]);\n var A = z(y, r[0]);\n\n if (A.length != 2) {\n throw \"malformed format: SEQUENCE(0.0).items != 2: \" + A.length;\n }\n\n if (w(y, A[0]) != \"2a864886f70d01050d\") {\n throw \"this only supports pkcs5PBES2\";\n }\n\n var p = z(y, A[1]);\n\n if (A.length != 2) {\n throw \"malformed format: SEQUENCE(0.0.1).items != 2: \" + p.length;\n }\n\n var q = z(y, p[1]);\n\n if (q.length != 2) {\n throw \"malformed format: SEQUENCE(0.0.1.1).items != 2: \" + q.length;\n }\n\n if (w(y, q[0]) != \"2a864886f70d0307\") {\n throw \"this only supports TripleDES\";\n }\n\n t.encryptionSchemeAlg = \"TripleDES\";\n t.encryptionSchemeIV = w(y, q[1]);\n var s = z(y, p[0]);\n\n if (s.length != 2) {\n throw \"malformed format: SEQUENCE(0.0.1.0).items != 2: \" + s.length;\n }\n\n if (w(y, s[0]) != \"2a864886f70d01050c\") {\n throw \"this only supports pkcs5PBKDF2\";\n }\n\n var x = z(y, s[1]);\n\n if (x.length < 2) {\n throw \"malformed format: SEQUENCE(0.0.1.0.1).items < 2: \" + x.length;\n }\n\n t.pbkdf2Salt = w(y, x[0]);\n var u = w(y, x[1]);\n\n try {\n t.pbkdf2Iter = parseInt(u, 16);\n } catch (v) {\n throw \"malformed format pbkdf2Iter: \" + u;\n }\n\n return t;\n },\n getPBKDF2KeyHexFromParam: function getPBKDF2KeyHexFromParam(u, p) {\n var t = CryptoJS.enc.Hex.parse(u.pbkdf2Salt);\n var q = u.pbkdf2Iter;\n var s = CryptoJS.PBKDF2(p, t, {\n keySize: 192 / 32,\n iterations: q\n });\n var r = CryptoJS.enc.Hex.stringify(s);\n return r;\n },\n _getPlainPKCS8HexFromEncryptedPKCS8PEM: function _getPlainPKCS8HexFromEncryptedPKCS8PEM(x, y) {\n var r = pemtohex(x, \"ENCRYPTED PRIVATE KEY\");\n var p = this.parseHexOfEncryptedPKCS8(r);\n var u = KEYUTIL.getPBKDF2KeyHexFromParam(p, y);\n var v = {};\n v.ciphertext = CryptoJS.enc.Hex.parse(p.ciphertext);\n var t = CryptoJS.enc.Hex.parse(u);\n var s = CryptoJS.enc.Hex.parse(p.encryptionSchemeIV);\n var w = CryptoJS.TripleDES.decrypt(v, t, {\n iv: s\n });\n var q = CryptoJS.enc.Hex.stringify(w);\n return q;\n },\n getKeyFromEncryptedPKCS8PEM: function getKeyFromEncryptedPKCS8PEM(s, q) {\n var p = this._getPlainPKCS8HexFromEncryptedPKCS8PEM(s, q);\n\n var r = this.getKeyFromPlainPrivatePKCS8Hex(p);\n return r;\n },\n parsePlainPrivatePKCS8Hex: function parsePlainPrivatePKCS8Hex(s) {\n var v = ASN1HEX;\n var u = v.getChildIdx;\n var t = v.getV;\n var q = {};\n q.algparam = null;\n\n if (s.substr(0, 2) != \"30\") {\n throw new Error(\"malformed plain PKCS8 private key(code:001)\");\n }\n\n var r = u(s, 0);\n\n if (r.length < 3) {\n throw new Error(\"malformed plain PKCS8 private key(code:002)\");\n }\n\n if (s.substr(r[1], 2) != \"30\") {\n throw new Error(\"malformed PKCS8 private key(code:003)\");\n }\n\n var p = u(s, r[1]);\n\n if (p.length != 2) {\n throw new Error(\"malformed PKCS8 private key(code:004)\");\n }\n\n if (s.substr(p[0], 2) != \"06\") {\n throw new Error(\"malformed PKCS8 private key(code:005)\");\n }\n\n q.algoid = t(s, p[0]);\n\n if (s.substr(p[1], 2) == \"06\") {\n q.algparam = t(s, p[1]);\n }\n\n if (s.substr(r[2], 2) != \"04\") {\n throw new Error(\"malformed PKCS8 private key(code:006)\");\n }\n\n q.keyidx = v.getVidx(s, r[2]);\n return q;\n },\n getKeyFromPlainPrivatePKCS8PEM: function getKeyFromPlainPrivatePKCS8PEM(q) {\n var p = pemtohex(q, \"PRIVATE KEY\");\n var r = this.getKeyFromPlainPrivatePKCS8Hex(p);\n return r;\n },\n getKeyFromPlainPrivatePKCS8Hex: function getKeyFromPlainPrivatePKCS8Hex(p) {\n var q = this.parsePlainPrivatePKCS8Hex(p);\n var r;\n\n if (q.algoid == \"2a864886f70d010101\") {\n r = new RSAKey();\n } else {\n if (q.algoid == \"2a8648ce380401\") {\n r = new KJUR.crypto.DSA();\n } else {\n if (q.algoid == \"2a8648ce3d0201\") {\n r = new KJUR.crypto.ECDSA();\n } else {\n throw \"unsupported private key algorithm\";\n }\n }\n }\n\n r.readPKCS8PrvKeyHex(p);\n return r;\n },\n _getKeyFromPublicPKCS8Hex: function _getKeyFromPublicPKCS8Hex(q) {\n var p;\n var r = ASN1HEX.getVbyList(q, 0, [0, 0], \"06\");\n\n if (r === \"2a864886f70d010101\") {\n p = new RSAKey();\n } else {\n if (r === \"2a8648ce380401\") {\n p = new KJUR.crypto.DSA();\n } else {\n if (r === \"2a8648ce3d0201\") {\n p = new KJUR.crypto.ECDSA();\n } else {\n throw \"unsupported PKCS#8 public key hex\";\n }\n }\n }\n\n p.readPKCS8PubKeyHex(q);\n return p;\n },\n parsePublicRawRSAKeyHex: function parsePublicRawRSAKeyHex(r) {\n var u = ASN1HEX;\n var t = u.getChildIdx;\n var s = u.getV;\n var p = {};\n\n if (r.substr(0, 2) != \"30\") {\n throw \"malformed RSA key(code:001)\";\n }\n\n var q = t(r, 0);\n\n if (q.length != 2) {\n throw \"malformed RSA key(code:002)\";\n }\n\n if (r.substr(q[0], 2) != \"02\") {\n throw \"malformed RSA key(code:003)\";\n }\n\n p.n = s(r, q[0]);\n\n if (r.substr(q[1], 2) != \"02\") {\n throw \"malformed RSA key(code:004)\";\n }\n\n p.e = s(r, q[1]);\n return p;\n },\n parsePublicPKCS8Hex: function parsePublicPKCS8Hex(t) {\n var v = ASN1HEX;\n var u = v.getChildIdx;\n var s = v.getV;\n var q = {};\n q.algparam = null;\n var r = u(t, 0);\n\n if (r.length != 2) {\n throw \"outer DERSequence shall have 2 elements: \" + r.length;\n }\n\n var w = r[0];\n\n if (t.substr(w, 2) != \"30\") {\n throw \"malformed PKCS8 public key(code:001)\";\n }\n\n var p = u(t, w);\n\n if (p.length != 2) {\n throw \"malformed PKCS8 public key(code:002)\";\n }\n\n if (t.substr(p[0], 2) != \"06\") {\n throw \"malformed PKCS8 public key(code:003)\";\n }\n\n q.algoid = s(t, p[0]);\n\n if (t.substr(p[1], 2) == \"06\") {\n q.algparam = s(t, p[1]);\n } else {\n if (t.substr(p[1], 2) == \"30\") {\n q.algparam = {};\n q.algparam.p = v.getVbyList(t, p[1], [0], \"02\");\n q.algparam.q = v.getVbyList(t, p[1], [1], \"02\");\n q.algparam.g = v.getVbyList(t, p[1], [2], \"02\");\n }\n }\n\n if (t.substr(r[1], 2) != \"03\") {\n throw \"malformed PKCS8 public key(code:004)\";\n }\n\n q.key = s(t, r[1]).substr(2);\n return q;\n }\n };\n}();\n\nKEYUTIL.getKey = function (l, k, n) {\n var G = ASN1HEX,\n L = G.getChildIdx,\n v = G.getV,\n d = G.getVbyList,\n c = KJUR.crypto,\n i = c.ECDSA,\n C = c.DSA,\n w = RSAKey,\n M = pemtohex,\n F = KEYUTIL;\n\n if (typeof w != \"undefined\" && l instanceof w) {\n return l;\n }\n\n if (typeof i != \"undefined\" && l instanceof i) {\n return l;\n }\n\n if (typeof C != \"undefined\" && l instanceof C) {\n return l;\n }\n\n if (l.curve !== undefined && l.xy !== undefined && l.d === undefined) {\n return new i({\n pub: l.xy,\n curve: l.curve\n });\n }\n\n if (l.curve !== undefined && l.d !== undefined) {\n return new i({\n prv: l.d,\n curve: l.curve\n });\n }\n\n if (l.kty === undefined && l.n !== undefined && l.e !== undefined && l.d === undefined) {\n var P = new w();\n P.setPublic(l.n, l.e);\n return P;\n }\n\n if (l.kty === undefined && l.n !== undefined && l.e !== undefined && l.d !== undefined && l.p !== undefined && l.q !== undefined && l.dp !== undefined && l.dq !== undefined && l.co !== undefined && l.qi === undefined) {\n var P = new w();\n P.setPrivateEx(l.n, l.e, l.d, l.p, l.q, l.dp, l.dq, l.co);\n return P;\n }\n\n if (l.kty === undefined && l.n !== undefined && l.e !== undefined && l.d !== undefined && l.p === undefined) {\n var P = new w();\n P.setPrivate(l.n, l.e, l.d);\n return P;\n }\n\n if (l.p !== undefined && l.q !== undefined && l.g !== undefined && l.y !== undefined && l.x === undefined) {\n var P = new C();\n P.setPublic(l.p, l.q, l.g, l.y);\n return P;\n }\n\n if (l.p !== undefined && l.q !== undefined && l.g !== undefined && l.y !== undefined && l.x !== undefined) {\n var P = new C();\n P.setPrivate(l.p, l.q, l.g, l.y, l.x);\n return P;\n }\n\n if (l.kty === \"RSA\" && l.n !== undefined && l.e !== undefined && l.d === undefined) {\n var P = new w();\n P.setPublic(b64utohex(l.n), b64utohex(l.e));\n return P;\n }\n\n if (l.kty === \"RSA\" && l.n !== undefined && l.e !== undefined && l.d !== undefined && l.p !== undefined && l.q !== undefined && l.dp !== undefined && l.dq !== undefined && l.qi !== undefined) {\n var P = new w();\n P.setPrivateEx(b64utohex(l.n), b64utohex(l.e), b64utohex(l.d), b64utohex(l.p), b64utohex(l.q), b64utohex(l.dp), b64utohex(l.dq), b64utohex(l.qi));\n return P;\n }\n\n if (l.kty === \"RSA\" && l.n !== undefined && l.e !== undefined && l.d !== undefined) {\n var P = new w();\n P.setPrivate(b64utohex(l.n), b64utohex(l.e), b64utohex(l.d));\n return P;\n }\n\n if (l.kty === \"EC\" && l.crv !== undefined && l.x !== undefined && l.y !== undefined && l.d === undefined) {\n var j = new i({\n curve: l.crv\n });\n var t = j.ecparams.keylen / 4;\n var B = (\"0000000000\" + b64utohex(l.x)).slice(-t);\n var z = (\"0000000000\" + b64utohex(l.y)).slice(-t);\n var u = \"04\" + B + z;\n j.setPublicKeyHex(u);\n return j;\n }\n\n if (l.kty === \"EC\" && l.crv !== undefined && l.x !== undefined && l.y !== undefined && l.d !== undefined) {\n var j = new i({\n curve: l.crv\n });\n var t = j.ecparams.keylen / 4;\n var B = (\"0000000000\" + b64utohex(l.x)).slice(-t);\n var z = (\"0000000000\" + b64utohex(l.y)).slice(-t);\n var u = \"04\" + B + z;\n var b = (\"0000000000\" + b64utohex(l.d)).slice(-t);\n j.setPublicKeyHex(u);\n j.setPrivateKeyHex(b);\n return j;\n }\n\n if (n === \"pkcs5prv\") {\n var J = l,\n G = ASN1HEX,\n N,\n P;\n N = L(J, 0);\n\n if (N.length === 9) {\n P = new w();\n P.readPKCS5PrvKeyHex(J);\n } else {\n if (N.length === 6) {\n P = new C();\n P.readPKCS5PrvKeyHex(J);\n } else {\n if (N.length > 2 && J.substr(N[1], 2) === \"04\") {\n P = new i();\n P.readPKCS5PrvKeyHex(J);\n } else {\n throw \"unsupported PKCS#1/5 hexadecimal key\";\n }\n }\n }\n\n return P;\n }\n\n if (n === \"pkcs8prv\") {\n var P = F.getKeyFromPlainPrivatePKCS8Hex(l);\n return P;\n }\n\n if (n === \"pkcs8pub\") {\n return F._getKeyFromPublicPKCS8Hex(l);\n }\n\n if (n === \"x509pub\") {\n return X509.getPublicKeyFromCertHex(l);\n }\n\n if (l.indexOf(\"-END CERTIFICATE-\", 0) != -1 || l.indexOf(\"-END X509 CERTIFICATE-\", 0) != -1 || l.indexOf(\"-END TRUSTED CERTIFICATE-\", 0) != -1) {\n return X509.getPublicKeyFromCertPEM(l);\n }\n\n if (l.indexOf(\"-END PUBLIC KEY-\") != -1) {\n var O = pemtohex(l, \"PUBLIC KEY\");\n return F._getKeyFromPublicPKCS8Hex(O);\n }\n\n if (l.indexOf(\"-END RSA PRIVATE KEY-\") != -1 && l.indexOf(\"4,ENCRYPTED\") == -1) {\n var m = M(l, \"RSA PRIVATE KEY\");\n return F.getKey(m, null, \"pkcs5prv\");\n }\n\n if (l.indexOf(\"-END DSA PRIVATE KEY-\") != -1 && l.indexOf(\"4,ENCRYPTED\") == -1) {\n var I = M(l, \"DSA PRIVATE KEY\");\n var E = d(I, 0, [1], \"02\");\n var D = d(I, 0, [2], \"02\");\n var K = d(I, 0, [3], \"02\");\n var r = d(I, 0, [4], \"02\");\n var s = d(I, 0, [5], \"02\");\n var P = new C();\n P.setPrivate(new BigInteger(E, 16), new BigInteger(D, 16), new BigInteger(K, 16), new BigInteger(r, 16), new BigInteger(s, 16));\n return P;\n }\n\n if (l.indexOf(\"-END EC PRIVATE KEY-\") != -1 && l.indexOf(\"4,ENCRYPTED\") == -1) {\n var m = M(l, \"EC PRIVATE KEY\");\n return F.getKey(m, null, \"pkcs5prv\");\n }\n\n if (l.indexOf(\"-END PRIVATE KEY-\") != -1) {\n return F.getKeyFromPlainPrivatePKCS8PEM(l);\n }\n\n if (l.indexOf(\"-END RSA PRIVATE KEY-\") != -1 && l.indexOf(\"4,ENCRYPTED\") != -1) {\n var o = F.getDecryptedKeyHex(l, k);\n var H = new RSAKey();\n H.readPKCS5PrvKeyHex(o);\n return H;\n }\n\n if (l.indexOf(\"-END EC PRIVATE KEY-\") != -1 && l.indexOf(\"4,ENCRYPTED\") != -1) {\n var I = F.getDecryptedKeyHex(l, k);\n var P = d(I, 0, [1], \"04\");\n var f = d(I, 0, [2, 0], \"06\");\n var A = d(I, 0, [3, 0], \"03\").substr(2);\n var e = \"\";\n\n if (KJUR.crypto.OID.oidhex2name[f] !== undefined) {\n e = KJUR.crypto.OID.oidhex2name[f];\n } else {\n throw \"undefined OID(hex) in KJUR.crypto.OID: \" + f;\n }\n\n var j = new i({\n curve: e\n });\n j.setPublicKeyHex(A);\n j.setPrivateKeyHex(P);\n j.isPublic = false;\n return j;\n }\n\n if (l.indexOf(\"-END DSA PRIVATE KEY-\") != -1 && l.indexOf(\"4,ENCRYPTED\") != -1) {\n var I = F.getDecryptedKeyHex(l, k);\n var E = d(I, 0, [1], \"02\");\n var D = d(I, 0, [2], \"02\");\n var K = d(I, 0, [3], \"02\");\n var r = d(I, 0, [4], \"02\");\n var s = d(I, 0, [5], \"02\");\n var P = new C();\n P.setPrivate(new BigInteger(E, 16), new BigInteger(D, 16), new BigInteger(K, 16), new BigInteger(r, 16), new BigInteger(s, 16));\n return P;\n }\n\n if (l.indexOf(\"-END ENCRYPTED PRIVATE KEY-\") != -1) {\n return F.getKeyFromEncryptedPKCS8PEM(l, k);\n }\n\n throw new Error(\"not supported argument\");\n};\n\nKEYUTIL.generateKeypair = function (a, c) {\n if (a == \"RSA\") {\n var b = c;\n var h = new RSAKey();\n h.generate(b, \"10001\");\n h.isPrivate = true;\n h.isPublic = true;\n var f = new RSAKey();\n var e = h.n.toString(16);\n var i = h.e.toString(16);\n f.setPublic(e, i);\n f.isPrivate = false;\n f.isPublic = true;\n var k = {};\n k.prvKeyObj = h;\n k.pubKeyObj = f;\n return k;\n } else {\n if (a == \"EC\") {\n var d = c;\n var g = new KJUR.crypto.ECDSA({\n curve: d\n });\n var j = g.generateKeyPairHex();\n var h = new KJUR.crypto.ECDSA({\n curve: d\n });\n h.setPublicKeyHex(j.ecpubhex);\n h.setPrivateKeyHex(j.ecprvhex);\n h.isPrivate = true;\n h.isPublic = false;\n var f = new KJUR.crypto.ECDSA({\n curve: d\n });\n f.setPublicKeyHex(j.ecpubhex);\n f.isPrivate = false;\n f.isPublic = true;\n var k = {};\n k.prvKeyObj = h;\n k.pubKeyObj = f;\n return k;\n } else {\n throw \"unknown algorithm: \" + a;\n }\n }\n};\n\nKEYUTIL.getPEM = function (b, D, y, m, q, j) {\n var F = KJUR,\n k = F.asn1,\n z = k.DERObjectIdentifier,\n f = k.DERInteger,\n l = k.ASN1Util.newObject,\n a = k.x509,\n C = a.SubjectPublicKeyInfo,\n e = F.crypto,\n u = e.DSA,\n r = e.ECDSA,\n n = RSAKey;\n\n function A(s) {\n var G = l({\n seq: [{\n \"int\": 0\n }, {\n \"int\": {\n bigint: s.n\n }\n }, {\n \"int\": s.e\n }, {\n \"int\": {\n bigint: s.d\n }\n }, {\n \"int\": {\n bigint: s.p\n }\n }, {\n \"int\": {\n bigint: s.q\n }\n }, {\n \"int\": {\n bigint: s.dmp1\n }\n }, {\n \"int\": {\n bigint: s.dmq1\n }\n }, {\n \"int\": {\n bigint: s.coeff\n }\n }]\n });\n return G;\n }\n\n function B(G) {\n var s = l({\n seq: [{\n \"int\": 1\n }, {\n octstr: {\n hex: G.prvKeyHex\n }\n }, {\n tag: [\"a0\", true, {\n oid: {\n name: G.curveName\n }\n }]\n }, {\n tag: [\"a1\", true, {\n bitstr: {\n hex: \"00\" + G.pubKeyHex\n }\n }]\n }]\n });\n return s;\n }\n\n function x(s) {\n var G = l({\n seq: [{\n \"int\": 0\n }, {\n \"int\": {\n bigint: s.p\n }\n }, {\n \"int\": {\n bigint: s.q\n }\n }, {\n \"int\": {\n bigint: s.g\n }\n }, {\n \"int\": {\n bigint: s.y\n }\n }, {\n \"int\": {\n bigint: s.x\n }\n }]\n });\n return G;\n }\n\n if ((n !== undefined && b instanceof n || u !== undefined && b instanceof u || r !== undefined && b instanceof r) && b.isPublic == true && (D === undefined || D == \"PKCS8PUB\")) {\n var E = new C(b);\n var w = E.getEncodedHex();\n return hextopem(w, \"PUBLIC KEY\");\n }\n\n if (D == \"PKCS1PRV\" && n !== undefined && b instanceof n && (y === undefined || y == null) && b.isPrivate == true) {\n var E = A(b);\n var w = E.getEncodedHex();\n return hextopem(w, \"RSA PRIVATE KEY\");\n }\n\n if (D == \"PKCS1PRV\" && r !== undefined && b instanceof r && (y === undefined || y == null) && b.isPrivate == true) {\n var i = new z({\n name: b.curveName\n });\n var v = i.getEncodedHex();\n var h = B(b);\n var t = h.getEncodedHex();\n var p = \"\";\n p += hextopem(v, \"EC PARAMETERS\");\n p += hextopem(t, \"EC PRIVATE KEY\");\n return p;\n }\n\n if (D == \"PKCS1PRV\" && u !== undefined && b instanceof u && (y === undefined || y == null) && b.isPrivate == true) {\n var E = x(b);\n var w = E.getEncodedHex();\n return hextopem(w, \"DSA PRIVATE KEY\");\n }\n\n if (D == \"PKCS5PRV\" && n !== undefined && b instanceof n && y !== undefined && y != null && b.isPrivate == true) {\n var E = A(b);\n var w = E.getEncodedHex();\n\n if (m === undefined) {\n m = \"DES-EDE3-CBC\";\n }\n\n return this.getEncryptedPKCS5PEMFromPrvKeyHex(\"RSA\", w, y, m, j);\n }\n\n if (D == \"PKCS5PRV\" && r !== undefined && b instanceof r && y !== undefined && y != null && b.isPrivate == true) {\n var E = B(b);\n var w = E.getEncodedHex();\n\n if (m === undefined) {\n m = \"DES-EDE3-CBC\";\n }\n\n return this.getEncryptedPKCS5PEMFromPrvKeyHex(\"EC\", w, y, m, j);\n }\n\n if (D == \"PKCS5PRV\" && u !== undefined && b instanceof u && y !== undefined && y != null && b.isPrivate == true) {\n var E = x(b);\n var w = E.getEncodedHex();\n\n if (m === undefined) {\n m = \"DES-EDE3-CBC\";\n }\n\n return this.getEncryptedPKCS5PEMFromPrvKeyHex(\"DSA\", w, y, m, j);\n }\n\n var o = function o(G, s) {\n var I = c(G, s);\n var H = new l({\n seq: [{\n seq: [{\n oid: {\n name: \"pkcs5PBES2\"\n }\n }, {\n seq: [{\n seq: [{\n oid: {\n name: \"pkcs5PBKDF2\"\n }\n }, {\n seq: [{\n octstr: {\n hex: I.pbkdf2Salt\n }\n }, {\n \"int\": I.pbkdf2Iter\n }]\n }]\n }, {\n seq: [{\n oid: {\n name: \"des-EDE3-CBC\"\n }\n }, {\n octstr: {\n hex: I.encryptionSchemeIV\n }\n }]\n }]\n }]\n }, {\n octstr: {\n hex: I.ciphertext\n }\n }]\n });\n return H.getEncodedHex();\n };\n\n var c = function c(N, O) {\n var H = 100;\n var M = CryptoJS.lib.WordArray.random(8);\n var L = \"DES-EDE3-CBC\";\n var s = CryptoJS.lib.WordArray.random(8);\n var I = CryptoJS.PBKDF2(O, M, {\n keySize: 192 / 32,\n iterations: H\n });\n var J = CryptoJS.enc.Hex.parse(N);\n var K = CryptoJS.TripleDES.encrypt(J, I, {\n iv: s\n }) + \"\";\n var G = {};\n G.ciphertext = K;\n G.pbkdf2Salt = CryptoJS.enc.Hex.stringify(M);\n G.pbkdf2Iter = H;\n G.encryptionSchemeAlg = L;\n G.encryptionSchemeIV = CryptoJS.enc.Hex.stringify(s);\n return G;\n };\n\n if (D == \"PKCS8PRV\" && n != undefined && b instanceof n && b.isPrivate == true) {\n var g = A(b);\n var d = g.getEncodedHex();\n var E = l({\n seq: [{\n \"int\": 0\n }, {\n seq: [{\n oid: {\n name: \"rsaEncryption\"\n }\n }, {\n \"null\": true\n }]\n }, {\n octstr: {\n hex: d\n }\n }]\n });\n var w = E.getEncodedHex();\n\n if (y === undefined || y == null) {\n return hextopem(w, \"PRIVATE KEY\");\n } else {\n var t = o(w, y);\n return hextopem(t, \"ENCRYPTED PRIVATE KEY\");\n }\n }\n\n if (D == \"PKCS8PRV\" && r !== undefined && b instanceof r && b.isPrivate == true) {\n var g = new l({\n seq: [{\n \"int\": 1\n }, {\n octstr: {\n hex: b.prvKeyHex\n }\n }, {\n tag: [\"a1\", true, {\n bitstr: {\n hex: \"00\" + b.pubKeyHex\n }\n }]\n }]\n });\n var d = g.getEncodedHex();\n var E = l({\n seq: [{\n \"int\": 0\n }, {\n seq: [{\n oid: {\n name: \"ecPublicKey\"\n }\n }, {\n oid: {\n name: b.curveName\n }\n }]\n }, {\n octstr: {\n hex: d\n }\n }]\n });\n var w = E.getEncodedHex();\n\n if (y === undefined || y == null) {\n return hextopem(w, \"PRIVATE KEY\");\n } else {\n var t = o(w, y);\n return hextopem(t, \"ENCRYPTED PRIVATE KEY\");\n }\n }\n\n if (D == \"PKCS8PRV\" && u !== undefined && b instanceof u && b.isPrivate == true) {\n var g = new f({\n bigint: b.x\n });\n var d = g.getEncodedHex();\n var E = l({\n seq: [{\n \"int\": 0\n }, {\n seq: [{\n oid: {\n name: \"dsa\"\n }\n }, {\n seq: [{\n \"int\": {\n bigint: b.p\n }\n }, {\n \"int\": {\n bigint: b.q\n }\n }, {\n \"int\": {\n bigint: b.g\n }\n }]\n }]\n }, {\n octstr: {\n hex: d\n }\n }]\n });\n var w = E.getEncodedHex();\n\n if (y === undefined || y == null) {\n return hextopem(w, \"PRIVATE KEY\");\n } else {\n var t = o(w, y);\n return hextopem(t, \"ENCRYPTED PRIVATE KEY\");\n }\n }\n\n throw new Error(\"unsupported object nor format\");\n};\n\nKEYUTIL.getKeyFromCSRPEM = function (b) {\n var a = pemtohex(b, \"CERTIFICATE REQUEST\");\n var c = KEYUTIL.getKeyFromCSRHex(a);\n return c;\n};\n\nKEYUTIL.getKeyFromCSRHex = function (a) {\n var c = KEYUTIL.parseCSRHex(a);\n var b = KEYUTIL.getKey(c.p8pubkeyhex, null, \"pkcs8pub\");\n return b;\n};\n\nKEYUTIL.parseCSRHex = function (d) {\n var i = ASN1HEX;\n var f = i.getChildIdx;\n var c = i.getTLV;\n var b = {};\n var g = d;\n\n if (g.substr(0, 2) != \"30\") {\n throw \"malformed CSR(code:001)\";\n }\n\n var e = f(g, 0);\n\n if (e.length < 1) {\n throw \"malformed CSR(code:002)\";\n }\n\n if (g.substr(e[0], 2) != \"30\") {\n throw \"malformed CSR(code:003)\";\n }\n\n var a = f(g, e[0]);\n\n if (a.length < 3) {\n throw \"malformed CSR(code:004)\";\n }\n\n b.p8pubkeyhex = c(g, a[2]);\n return b;\n};\n\nKEYUTIL.getKeyID = function (f) {\n var c = KEYUTIL;\n var e = ASN1HEX;\n\n if (typeof f === \"string\" && f.indexOf(\"BEGIN \") != -1) {\n f = c.getKey(f);\n }\n\n var d = pemtohex(c.getPEM(f));\n var b = e.getIdxbyList(d, 0, [1]);\n var a = e.getV(d, b).substring(2);\n return KJUR.crypto.Util.hashHex(a, \"sha1\");\n};\n\nKEYUTIL.getJWKFromKey = function (d) {\n var b = {};\n\n if (d instanceof RSAKey && d.isPrivate) {\n b.kty = \"RSA\";\n b.n = hextob64u(d.n.toString(16));\n b.e = hextob64u(d.e.toString(16));\n b.d = hextob64u(d.d.toString(16));\n b.p = hextob64u(d.p.toString(16));\n b.q = hextob64u(d.q.toString(16));\n b.dp = hextob64u(d.dmp1.toString(16));\n b.dq = hextob64u(d.dmq1.toString(16));\n b.qi = hextob64u(d.coeff.toString(16));\n return b;\n } else {\n if (d instanceof RSAKey && d.isPublic) {\n b.kty = \"RSA\";\n b.n = hextob64u(d.n.toString(16));\n b.e = hextob64u(d.e.toString(16));\n return b;\n } else {\n if (d instanceof KJUR.crypto.ECDSA && d.isPrivate) {\n var a = d.getShortNISTPCurveName();\n\n if (a !== \"P-256\" && a !== \"P-384\") {\n throw \"unsupported curve name for JWT: \" + a;\n }\n\n var c = d.getPublicKeyXYHex();\n b.kty = \"EC\";\n b.crv = a;\n b.x = hextob64u(c.x);\n b.y = hextob64u(c.y);\n b.d = hextob64u(d.prvKeyHex);\n return b;\n } else {\n if (d instanceof KJUR.crypto.ECDSA && d.isPublic) {\n var a = d.getShortNISTPCurveName();\n\n if (a !== \"P-256\" && a !== \"P-384\") {\n throw \"unsupported curve name for JWT: \" + a;\n }\n\n var c = d.getPublicKeyXYHex();\n b.kty = \"EC\";\n b.crv = a;\n b.x = hextob64u(c.x);\n b.y = hextob64u(c.y);\n return b;\n }\n }\n }\n }\n\n throw \"not supported key object\";\n};\n\nRSAKey.getPosArrayOfChildrenFromHex = function (a) {\n return ASN1HEX.getChildIdx(a, 0);\n};\n\nRSAKey.getHexValueArrayOfChildrenFromHex = function (f) {\n var n = ASN1HEX;\n var i = n.getV;\n var k = RSAKey.getPosArrayOfChildrenFromHex(f);\n var e = i(f, k[0]);\n var j = i(f, k[1]);\n var b = i(f, k[2]);\n var c = i(f, k[3]);\n var h = i(f, k[4]);\n var g = i(f, k[5]);\n var m = i(f, k[6]);\n var l = i(f, k[7]);\n var d = i(f, k[8]);\n var k = new Array();\n k.push(e, j, b, c, h, g, m, l, d);\n return k;\n};\n\nRSAKey.prototype.readPrivateKeyFromPEMString = function (d) {\n var c = pemtohex(d);\n var b = RSAKey.getHexValueArrayOfChildrenFromHex(c);\n this.setPrivateEx(b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8]);\n};\n\nRSAKey.prototype.readPKCS5PrvKeyHex = function (c) {\n var b = RSAKey.getHexValueArrayOfChildrenFromHex(c);\n this.setPrivateEx(b[1], b[2], b[3], b[4], b[5], b[6], b[7], b[8]);\n};\n\nRSAKey.prototype.readPKCS8PrvKeyHex = function (e) {\n var c, i, k, b, a, f, d, j;\n var m = ASN1HEX;\n var l = m.getVbyListEx;\n\n if (m.isASN1HEX(e) === false) {\n throw new Error(\"not ASN.1 hex string\");\n }\n\n try {\n c = l(e, 0, [2, 0, 1], \"02\");\n i = l(e, 0, [2, 0, 2], \"02\");\n k = l(e, 0, [2, 0, 3], \"02\");\n b = l(e, 0, [2, 0, 4], \"02\");\n a = l(e, 0, [2, 0, 5], \"02\");\n f = l(e, 0, [2, 0, 6], \"02\");\n d = l(e, 0, [2, 0, 7], \"02\");\n j = l(e, 0, [2, 0, 8], \"02\");\n } catch (g) {\n throw new Error(\"malformed PKCS#8 plain RSA private key\");\n }\n\n this.setPrivateEx(c, i, k, b, a, f, d, j);\n};\n\nRSAKey.prototype.readPKCS5PubKeyHex = function (c) {\n var e = ASN1HEX;\n var b = e.getV;\n\n if (e.isASN1HEX(c) === false) {\n throw new Error(\"keyHex is not ASN.1 hex string\");\n }\n\n var a = e.getChildIdx(c, 0);\n\n if (a.length !== 2 || c.substr(a[0], 2) !== \"02\" || c.substr(a[1], 2) !== \"02\") {\n throw new Error(\"wrong hex for PKCS#5 public key\");\n }\n\n var f = b(c, a[0]);\n var d = b(c, a[1]);\n this.setPublic(f, d);\n};\n\nRSAKey.prototype.readPKCS8PubKeyHex = function (b) {\n var c = ASN1HEX;\n\n if (c.isASN1HEX(b) === false) {\n throw new Error(\"not ASN.1 hex string\");\n }\n\n if (c.getTLVbyListEx(b, 0, [0, 0]) !== \"06092a864886f70d010101\") {\n throw new Error(\"not PKCS8 RSA public key\");\n }\n\n var a = c.getTLVbyListEx(b, 0, [1, 0]);\n this.readPKCS5PubKeyHex(a);\n};\n\nRSAKey.prototype.readCertPubKeyHex = function (b, d) {\n var a, c;\n a = new X509();\n a.readCertHex(b);\n c = a.getPublicKeyHex();\n this.readPKCS8PubKeyHex(c);\n};\n\nvar _RE_HEXDECONLY = new RegExp(\"[^0-9a-f]\", \"gi\");\n\nfunction _rsasign_getHexPaddedDigestInfoForString(d, e, a) {\n var b = function b(f) {\n return KJUR.crypto.Util.hashString(f, a);\n };\n\n var c = b(d);\n return KJUR.crypto.Util.getPaddedDigestInfoHex(c, a, e);\n}\n\nfunction _zeroPaddingOfSignature(e, d) {\n var c = \"\";\n var a = d / 4 - e.length;\n\n for (var b = 0; b < a; b++) {\n c = c + \"0\";\n }\n\n return c + e;\n}\n\nRSAKey.prototype.sign = function (d, a) {\n var b = function b(e) {\n return KJUR.crypto.Util.hashString(e, a);\n };\n\n var c = b(d);\n return this.signWithMessageHash(c, a);\n};\n\nRSAKey.prototype.signWithMessageHash = function (e, c) {\n var f = KJUR.crypto.Util.getPaddedDigestInfoHex(e, c, this.n.bitLength());\n var b = parseBigInt(f, 16);\n var d = this.doPrivate(b);\n var a = d.toString(16);\n return _zeroPaddingOfSignature(a, this.n.bitLength());\n};\n\nfunction pss_mgf1_str(c, a, e) {\n var b = \"\",\n d = 0;\n\n while (b.length < a) {\n b += hextorstr(e(rstrtohex(c + String.fromCharCode.apply(String, [(d & 4278190080) >> 24, (d & 16711680) >> 16, (d & 65280) >> 8, d & 255]))));\n d += 1;\n }\n\n return b;\n}\n\nRSAKey.prototype.signPSS = function (e, a, d) {\n var c = function c(f) {\n return KJUR.crypto.Util.hashHex(f, a);\n };\n\n var b = c(rstrtohex(e));\n\n if (d === undefined) {\n d = -1;\n }\n\n return this.signWithMessageHashPSS(b, a, d);\n};\n\nRSAKey.prototype.signWithMessageHashPSS = function (l, a, k) {\n var b = hextorstr(l);\n var g = b.length;\n var m = this.n.bitLength() - 1;\n var c = Math.ceil(m / 8);\n var d;\n\n var o = function o(i) {\n return KJUR.crypto.Util.hashHex(i, a);\n };\n\n if (k === -1 || k === undefined) {\n k = g;\n } else {\n if (k === -2) {\n k = c - g - 2;\n } else {\n if (k < -2) {\n throw new Error(\"invalid salt length\");\n }\n }\n }\n\n if (c < g + k + 2) {\n throw new Error(\"data too long\");\n }\n\n var f = \"\";\n\n if (k > 0) {\n f = new Array(k);\n new SecureRandom().nextBytes(f);\n f = String.fromCharCode.apply(String, f);\n }\n\n var n = hextorstr(o(rstrtohex(\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" + b + f)));\n var j = [];\n\n for (d = 0; d < c - k - g - 2; d += 1) {\n j[d] = 0;\n }\n\n var e = String.fromCharCode.apply(String, j) + \"\\x01\" + f;\n var h = pss_mgf1_str(n, e.length, o);\n var q = [];\n\n for (d = 0; d < e.length; d += 1) {\n q[d] = e.charCodeAt(d) ^ h.charCodeAt(d);\n }\n\n var p = 65280 >> 8 * c - m & 255;\n q[0] &= ~p;\n\n for (d = 0; d < g; d++) {\n q.push(n.charCodeAt(d));\n }\n\n q.push(188);\n return _zeroPaddingOfSignature(this.doPrivate(new BigInteger(q)).toString(16), this.n.bitLength());\n};\n\nfunction _rsasign_getDecryptSignatureBI(a, d, c) {\n var b = new RSAKey();\n b.setPublic(d, c);\n var e = b.doPublic(a);\n return e;\n}\n\nfunction _rsasign_getHexDigestInfoFromSig(a, c, b) {\n var e = _rsasign_getDecryptSignatureBI(a, c, b);\n\n var d = e.toString(16).replace(/^1f+00/, \"\");\n return d;\n}\n\nfunction _rsasign_getAlgNameAndHashFromHexDisgestInfo(f) {\n for (var e in KJUR.crypto.Util.DIGESTINFOHEAD) {\n var d = KJUR.crypto.Util.DIGESTINFOHEAD[e];\n var b = d.length;\n\n if (f.substring(0, b) == d) {\n var c = [e, f.substring(b)];\n return c;\n }\n }\n\n return [];\n}\n\nRSAKey.prototype.verify = function (f, j) {\n j = j.replace(_RE_HEXDECONLY, \"\");\n j = j.replace(/[ \\n]+/g, \"\");\n var b = parseBigInt(j, 16);\n\n if (b.bitLength() > this.n.bitLength()) {\n return 0;\n }\n\n var i = this.doPublic(b);\n var e = i.toString(16).replace(/^1f+00/, \"\");\n\n var g = _rsasign_getAlgNameAndHashFromHexDisgestInfo(e);\n\n if (g.length == 0) {\n return false;\n }\n\n var d = g[0];\n var h = g[1];\n\n var a = function a(k) {\n return KJUR.crypto.Util.hashString(k, d);\n };\n\n var c = a(f);\n return h == c;\n};\n\nRSAKey.prototype.verifyWithMessageHash = function (e, a) {\n if (a.length != Math.ceil(this.n.bitLength() / 4)) {\n return false;\n }\n\n var b = parseBigInt(a, 16);\n\n if (b.bitLength() > this.n.bitLength()) {\n return 0;\n }\n\n var h = this.doPublic(b);\n var g = h.toString(16).replace(/^1f+00/, \"\");\n\n var c = _rsasign_getAlgNameAndHashFromHexDisgestInfo(g);\n\n if (c.length == 0) {\n return false;\n }\n\n var d = c[0];\n var f = c[1];\n return f == e;\n};\n\nRSAKey.prototype.verifyPSS = function (c, b, a, f) {\n var e = function e(g) {\n return KJUR.crypto.Util.hashHex(g, a);\n };\n\n var d = e(rstrtohex(c));\n\n if (f === undefined) {\n f = -1;\n }\n\n return this.verifyWithMessageHashPSS(d, b, a, f);\n};\n\nRSAKey.prototype.verifyWithMessageHashPSS = function (f, s, l, c) {\n if (s.length != Math.ceil(this.n.bitLength() / 4)) {\n return false;\n }\n\n var k = new BigInteger(s, 16);\n\n var r = function r(i) {\n return KJUR.crypto.Util.hashHex(i, l);\n };\n\n var j = hextorstr(f);\n var h = j.length;\n var g = this.n.bitLength() - 1;\n var m = Math.ceil(g / 8);\n var q;\n\n if (c === -1 || c === undefined) {\n c = h;\n } else {\n if (c === -2) {\n c = m - h - 2;\n } else {\n if (c < -2) {\n throw new Error(\"invalid salt length\");\n }\n }\n }\n\n if (m < h + c + 2) {\n throw new Error(\"data too long\");\n }\n\n var a = this.doPublic(k).toByteArray();\n\n for (q = 0; q < a.length; q += 1) {\n a[q] &= 255;\n }\n\n while (a.length < m) {\n a.unshift(0);\n }\n\n if (a[m - 1] !== 188) {\n throw new Error(\"encoded message does not end in 0xbc\");\n }\n\n a = String.fromCharCode.apply(String, a);\n var d = a.substr(0, m - h - 1);\n var e = a.substr(d.length, h);\n var p = 65280 >> 8 * m - g & 255;\n\n if ((d.charCodeAt(0) & p) !== 0) {\n throw new Error(\"bits beyond keysize not zero\");\n }\n\n var n = pss_mgf1_str(e, d.length, r);\n var o = [];\n\n for (q = 0; q < d.length; q += 1) {\n o[q] = d.charCodeAt(q) ^ n.charCodeAt(q);\n }\n\n o[0] &= ~p;\n var b = m - h - c - 2;\n\n for (q = 0; q < b; q += 1) {\n if (o[q] !== 0) {\n throw new Error(\"leftmost octets not zero\");\n }\n }\n\n if (o[b] !== 1) {\n throw new Error(\"0x01 marker not found\");\n }\n\n return e === hextorstr(r(rstrtohex(\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\" + j + String.fromCharCode.apply(String, o.slice(-c)))));\n};\n\nRSAKey.SALT_LEN_HLEN = -1;\nRSAKey.SALT_LEN_MAX = -2;\nRSAKey.SALT_LEN_RECOVER = -2;\n\nfunction X509(q) {\n var j = ASN1HEX,\n n = j.getChildIdx,\n g = j.getV,\n b = j.getTLV,\n c = j.getVbyList,\n k = j.getVbyListEx,\n a = j.getTLVbyList,\n l = j.getTLVbyListEx,\n h = j.getIdxbyList,\n e = j.getIdxbyListEx,\n i = j.getVidx,\n s = j.getInt,\n p = j.oidname,\n m = j.hextooidstr,\n d = X509,\n r = pemtohex,\n f;\n\n try {\n f = KJUR.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV;\n } catch (o) {}\n\n this.HEX2STAG = {\n \"0c\": \"utf8\",\n \"13\": \"prn\",\n \"16\": \"ia5\",\n \"1a\": \"vis\",\n \"1e\": \"bmp\"\n };\n this.hex = null;\n this.version = 0;\n this.foffset = 0;\n this.aExtInfo = null;\n\n this.getVersion = function () {\n if (this.hex === null || this.version !== 0) {\n return this.version;\n }\n\n var u = a(this.hex, 0, [0, 0]);\n\n if (u.substr(0, 2) == \"a0\") {\n var v = a(u, 0, [0]);\n var t = s(v, 0);\n\n if (t < 0 || 2 < t) {\n throw new Error(\"malformed version field\");\n }\n\n this.version = t + 1;\n return this.version;\n } else {\n this.version = 1;\n this.foffset = -1;\n return 1;\n }\n };\n\n this.getSerialNumberHex = function () {\n return k(this.hex, 0, [0, 0], \"02\");\n };\n\n this.getSignatureAlgorithmField = function () {\n var t = l(this.hex, 0, [0, 1]);\n return this.getAlgorithmIdentifierName(t);\n };\n\n this.getAlgorithmIdentifierName = function (t) {\n for (var u in f) {\n if (t === f[u]) {\n return u;\n }\n }\n\n return p(k(t, 0, [0], \"06\"));\n };\n\n this.getIssuer = function () {\n return this.getX500Name(this.getIssuerHex());\n };\n\n this.getIssuerHex = function () {\n return a(this.hex, 0, [0, 3 + this.foffset], \"30\");\n };\n\n this.getIssuerString = function () {\n var t = this.getIssuer();\n return t.str;\n };\n\n this.getSubject = function () {\n return this.getX500Name(this.getSubjectHex());\n };\n\n this.getSubjectHex = function () {\n return a(this.hex, 0, [0, 5 + this.foffset], \"30\");\n };\n\n this.getSubjectString = function () {\n var t = this.getSubject();\n return t.str;\n };\n\n this.getNotBefore = function () {\n var t = c(this.hex, 0, [0, 4 + this.foffset, 0]);\n t = t.replace(/(..)/g, \"%$1\");\n t = decodeURIComponent(t);\n return t;\n };\n\n this.getNotAfter = function () {\n var t = c(this.hex, 0, [0, 4 + this.foffset, 1]);\n t = t.replace(/(..)/g, \"%$1\");\n t = decodeURIComponent(t);\n return t;\n };\n\n this.getPublicKeyHex = function () {\n return j.getTLVbyList(this.hex, 0, [0, 6 + this.foffset], \"30\");\n };\n\n this.getPublicKeyIdx = function () {\n return h(this.hex, 0, [0, 6 + this.foffset], \"30\");\n };\n\n this.getPublicKeyContentIdx = function () {\n var t = this.getPublicKeyIdx();\n return h(this.hex, t, [1, 0], \"30\");\n };\n\n this.getPublicKey = function () {\n return KEYUTIL.getKey(this.getPublicKeyHex(), null, \"pkcs8pub\");\n };\n\n this.getSignatureAlgorithmName = function () {\n var t = a(this.hex, 0, [1], \"30\");\n return this.getAlgorithmIdentifierName(t);\n };\n\n this.getSignatureValueHex = function () {\n return c(this.hex, 0, [2], \"03\", true);\n };\n\n this.verifySignature = function (v) {\n var w = this.getSignatureAlgorithmField();\n var t = this.getSignatureValueHex();\n var u = a(this.hex, 0, [0], \"30\");\n var x = new KJUR.crypto.Signature({\n alg: w\n });\n x.init(v);\n x.updateHex(u);\n return x.verify(t);\n };\n\n this.parseExt = function (C) {\n var v, t, x;\n\n if (C === undefined) {\n x = this.hex;\n\n if (this.version !== 3) {\n return -1;\n }\n\n v = h(x, 0, [0, 7, 0], \"30\");\n t = n(x, v);\n } else {\n x = pemtohex(C);\n var y = h(x, 0, [0, 3, 0, 0], \"06\");\n\n if (g(x, y) != \"2a864886f70d01090e\") {\n this.aExtInfo = new Array();\n return;\n }\n\n v = h(x, 0, [0, 3, 0, 1, 0], \"30\");\n t = n(x, v);\n this.hex = x;\n }\n\n this.aExtInfo = new Array();\n\n for (var w = 0; w < t.length; w++) {\n var A = {};\n A.critical = false;\n var z = n(x, t[w]);\n var u = 0;\n\n if (z.length === 3) {\n A.critical = true;\n u = 1;\n }\n\n A.oid = j.hextooidstr(c(x, t[w], [0], \"06\"));\n var B = h(x, t[w], [1 + u]);\n A.vidx = i(x, B);\n this.aExtInfo.push(A);\n }\n };\n\n this.getExtInfo = function (v) {\n var t = this.aExtInfo;\n var w = v;\n\n if (!v.match(/^[0-9.]+$/)) {\n w = KJUR.asn1.x509.OID.name2oid(v);\n }\n\n if (w === \"\") {\n return undefined;\n }\n\n for (var u = 0; u < t.length; u++) {\n if (t[u].oid === w) {\n return t[u];\n }\n }\n\n return undefined;\n };\n\n this.getExtBasicConstraints = function (u, y) {\n if (u === undefined && y === undefined) {\n var w = this.getExtInfo(\"basicConstraints\");\n\n if (w === undefined) {\n return undefined;\n }\n\n u = b(this.hex, w.vidx);\n y = w.critical;\n }\n\n var t = {\n extname: \"basicConstraints\"\n };\n\n if (y) {\n t.critical = true;\n }\n\n if (u === \"3000\") {\n return t;\n }\n\n if (u === \"30030101ff\") {\n t.cA = true;\n return t;\n }\n\n if (u.substr(0, 12) === \"30060101ff02\") {\n var x = g(u, 10);\n var v = parseInt(x, 16);\n t.cA = true;\n t.pathLen = v;\n return t;\n }\n\n throw new Error(\"hExtV parse error: \" + u);\n };\n\n this.getExtKeyUsage = function (u, w) {\n if (u === undefined && w === undefined) {\n var v = this.getExtInfo(\"keyUsage\");\n\n if (v === undefined) {\n return undefined;\n }\n\n u = b(this.hex, v.vidx);\n w = v.critical;\n }\n\n var t = {\n extname: \"keyUsage\"\n };\n\n if (w) {\n t.critical = true;\n }\n\n t.names = this.getExtKeyUsageString(u).split(\",\");\n return t;\n };\n\n this.getExtKeyUsageBin = function (u) {\n if (u === undefined) {\n var v = this.getExtInfo(\"keyUsage\");\n\n if (v === undefined) {\n return \"\";\n }\n\n u = b(this.hex, v.vidx);\n }\n\n if (u.length != 8 && u.length != 10) {\n throw new Error(\"malformed key usage value: \" + u);\n }\n\n var t = \"000000000000000\" + parseInt(u.substr(6), 16).toString(2);\n\n if (u.length == 8) {\n t = t.slice(-8);\n }\n\n if (u.length == 10) {\n t = t.slice(-16);\n }\n\n t = t.replace(/0+$/, \"\");\n\n if (t == \"\") {\n t = \"0\";\n }\n\n return t;\n };\n\n this.getExtKeyUsageString = function (v) {\n var w = this.getExtKeyUsageBin(v);\n var t = new Array();\n\n for (var u = 0; u < w.length; u++) {\n if (w.substr(u, 1) == \"1\") {\n t.push(X509.KEYUSAGE_NAME[u]);\n }\n }\n\n return t.join(\",\");\n };\n\n this.getExtSubjectKeyIdentifier = function (v, x) {\n if (v === undefined && x === undefined) {\n var w = this.getExtInfo(\"subjectKeyIdentifier\");\n\n if (w === undefined) {\n return undefined;\n }\n\n v = b(this.hex, w.vidx);\n x = w.critical;\n }\n\n var t = {\n extname: \"subjectKeyIdentifier\"\n };\n\n if (x) {\n t.critical = true;\n }\n\n var u = g(v, 0);\n t.kid = {\n hex: u\n };\n return t;\n };\n\n this.getExtAuthorityKeyIdentifier = function (z, x) {\n if (z === undefined && x === undefined) {\n var t = this.getExtInfo(\"authorityKeyIdentifier\");\n\n if (t === undefined) {\n return undefined;\n }\n\n z = b(this.hex, t.vidx);\n x = t.critical;\n }\n\n var A = {\n extname: \"authorityKeyIdentifier\"\n };\n\n if (x) {\n A.critical = true;\n }\n\n var y = n(z, 0);\n\n for (var u = 0; u < y.length; u++) {\n var B = z.substr(y[u], 2);\n\n if (B === \"80\") {\n A.kid = {\n hex: g(z, y[u])\n };\n }\n\n if (B === \"a1\") {\n var w = b(z, y[u]);\n var v = this.getGeneralNames(w);\n A.issuer = v[0][\"dn\"];\n }\n\n if (B === \"82\") {\n A.sn = {\n hex: g(z, y[u])\n };\n }\n }\n\n return A;\n };\n\n this.getExtExtKeyUsage = function (w, y) {\n if (w === undefined && y === undefined) {\n var x = this.getExtInfo(\"extKeyUsage\");\n\n if (x === undefined) {\n return undefined;\n }\n\n w = b(this.hex, x.vidx);\n y = x.critical;\n }\n\n var t = {\n extname: \"extKeyUsage\",\n array: []\n };\n\n if (y) {\n t.critical = true;\n }\n\n var u = n(w, 0);\n\n for (var v = 0; v < u.length; v++) {\n t.array.push(p(g(w, u[v])));\n }\n\n return t;\n };\n\n this.getExtExtKeyUsageName = function () {\n var x = this.getExtInfo(\"extKeyUsage\");\n\n if (x === undefined) {\n return x;\n }\n\n var t = new Array();\n var w = b(this.hex, x.vidx);\n\n if (w === \"\") {\n return t;\n }\n\n var u = n(w, 0);\n\n for (var v = 0; v < u.length; v++) {\n t.push(p(g(w, u[v])));\n }\n\n return t;\n };\n\n this.getExtSubjectAltName = function (u, w) {\n if (u === undefined && w === undefined) {\n var v = this.getExtInfo(\"subjectAltName\");\n\n if (v === undefined) {\n return undefined;\n }\n\n u = b(this.hex, v.vidx);\n w = v.critical;\n }\n\n var t = {\n extname: \"subjectAltName\",\n array: []\n };\n\n if (w) {\n t.critical = true;\n }\n\n t.array = this.getGeneralNames(u);\n return t;\n };\n\n this.getExtIssuerAltName = function (u, w) {\n if (u === undefined && w === undefined) {\n var v = this.getExtInfo(\"issuerAltName\");\n\n if (v === undefined) {\n return undefined;\n }\n\n u = b(this.hex, v.vidx);\n w = v.critical;\n }\n\n var t = {\n extname: \"issuerAltName\",\n array: []\n };\n\n if (w) {\n t.critical = true;\n }\n\n t.array = this.getGeneralNames(u);\n return t;\n };\n\n this.getGeneralNames = function (x) {\n var v = n(x, 0);\n var t = [];\n\n for (var w = 0; w < v.length; w++) {\n var u = this.getGeneralName(b(x, v[w]));\n\n if (u !== undefined) {\n t.push(u);\n }\n }\n\n return t;\n };\n\n this.getGeneralName = function (u) {\n var t = u.substr(0, 2);\n var w = g(u, 0);\n var v = hextorstr(w);\n\n if (t == \"81\") {\n return {\n rfc822: v\n };\n }\n\n if (t == \"82\") {\n return {\n dns: v\n };\n }\n\n if (t == \"86\") {\n return {\n uri: v\n };\n }\n\n if (t == \"87\") {\n return {\n ip: hextoip(w)\n };\n }\n\n if (t == \"a4\") {\n return {\n dn: this.getX500Name(w)\n };\n }\n\n return undefined;\n };\n\n this.getExtSubjectAltName2 = function () {\n var x, A, z;\n var y = this.getExtInfo(\"subjectAltName\");\n\n if (y === undefined) {\n return y;\n }\n\n var t = new Array();\n var w = b(this.hex, y.vidx);\n var u = n(w, 0);\n\n for (var v = 0; v < u.length; v++) {\n z = w.substr(u[v], 2);\n x = g(w, u[v]);\n\n if (z === \"81\") {\n A = hextoutf8(x);\n t.push([\"MAIL\", A]);\n }\n\n if (z === \"82\") {\n A = hextoutf8(x);\n t.push([\"DNS\", A]);\n }\n\n if (z === \"84\") {\n A = X509.hex2dn(x, 0);\n t.push([\"DN\", A]);\n }\n\n if (z === \"86\") {\n A = hextoutf8(x);\n t.push([\"URI\", A]);\n }\n\n if (z === \"87\") {\n A = hextoip(x);\n t.push([\"IP\", A]);\n }\n }\n\n return t;\n };\n\n this.getExtCRLDistributionPoints = function (x, z) {\n if (x === undefined && z === undefined) {\n var y = this.getExtInfo(\"cRLDistributionPoints\");\n\n if (y === undefined) {\n return undefined;\n }\n\n x = b(this.hex, y.vidx);\n z = y.critical;\n }\n\n var u = {\n extname: \"cRLDistributionPoints\",\n array: []\n };\n\n if (z) {\n u.critical = true;\n }\n\n var v = n(x, 0);\n\n for (var w = 0; w < v.length; w++) {\n var t = b(x, v[w]);\n u.array.push(this.getDistributionPoint(t));\n }\n\n return u;\n };\n\n this.getDistributionPoint = function (y) {\n var v = {};\n var w = n(y, 0);\n\n for (var x = 0; x < w.length; x++) {\n var u = y.substr(w[x], 2);\n var t = b(y, w[x]);\n\n if (u == \"a0\") {\n v.dpname = this.getDistributionPointName(t);\n }\n }\n\n return v;\n };\n\n this.getDistributionPointName = function (y) {\n var v = {};\n var w = n(y, 0);\n\n for (var x = 0; x < w.length; x++) {\n var u = y.substr(w[x], 2);\n var t = b(y, w[x]);\n\n if (u == \"a0\") {\n v.full = this.getGeneralNames(t);\n }\n }\n\n return v;\n };\n\n this.getExtCRLDistributionPointsURI = function () {\n var y = this.getExtInfo(\"cRLDistributionPoints\");\n\n if (y === undefined) {\n return y;\n }\n\n var t = new Array();\n var u = n(this.hex, y.vidx);\n\n for (var w = 0; w < u.length; w++) {\n try {\n var z = c(this.hex, u[w], [0, 0, 0], \"86\");\n var x = hextoutf8(z);\n t.push(x);\n } catch (v) {}\n }\n\n return t;\n };\n\n this.getExtAIAInfo = function () {\n var x = this.getExtInfo(\"authorityInfoAccess\");\n\n if (x === undefined) {\n return x;\n }\n\n var t = {\n ocsp: [],\n caissuer: []\n };\n var u = n(this.hex, x.vidx);\n\n for (var v = 0; v < u.length; v++) {\n var y = c(this.hex, u[v], [0], \"06\");\n var w = c(this.hex, u[v], [1], \"86\");\n\n if (y === \"2b06010505073001\") {\n t.ocsp.push(hextoutf8(w));\n }\n\n if (y === \"2b06010505073002\") {\n t.caissuer.push(hextoutf8(w));\n }\n }\n\n return t;\n };\n\n this.getExtAuthorityInfoAccess = function (A, y) {\n if (A === undefined && y === undefined) {\n var t = this.getExtInfo(\"authorityInfoAccess\");\n\n if (t === undefined) {\n return undefined;\n }\n\n A = b(this.hex, t.vidx);\n y = t.critical;\n }\n\n var B = {\n extname: \"authorityInfoAccess\",\n array: []\n };\n\n if (y) {\n B.critical = true;\n }\n\n var z = n(A, 0);\n\n for (var u = 0; u < z.length; u++) {\n var x = k(A, z[u], [0], \"06\");\n var v = c(A, z[u], [1], \"86\");\n var w = hextoutf8(v);\n\n if (x == \"2b06010505073001\") {\n B.array.push({\n ocsp: w\n });\n } else {\n if (x == \"2b06010505073002\") {\n B.array.push({\n caissuer: w\n });\n } else {\n throw new Error(\"unknown method: \" + x);\n }\n }\n }\n\n return B;\n };\n\n this.getExtCertificatePolicies = function (x, A) {\n if (x === undefined && A === undefined) {\n var z = this.getExtInfo(\"certificatePolicies\");\n\n if (z === undefined) {\n return undefined;\n }\n\n x = b(this.hex, z.vidx);\n A = z.critical;\n }\n\n var t = {\n extname: \"certificatePolicies\",\n array: []\n };\n\n if (A) {\n t.critical = true;\n }\n\n var u = n(x, 0);\n\n for (var v = 0; v < u.length; v++) {\n var y = b(x, u[v]);\n var w = this.getPolicyInformation(y);\n t.array.push(w);\n }\n\n return t;\n };\n\n this.getPolicyInformation = function (x) {\n var t = {};\n var z = c(x, 0, [0], \"06\");\n t.policyoid = p(z);\n var A = e(x, 0, [1], \"30\");\n\n if (A != -1) {\n t.array = [];\n var u = n(x, A);\n\n for (var v = 0; v < u.length; v++) {\n var y = b(x, u[v]);\n var w = this.getPolicyQualifierInfo(y);\n t.array.push(w);\n }\n }\n\n return t;\n };\n\n this.getPolicyQualifierInfo = function (u) {\n var t = {};\n var v = c(u, 0, [0], \"06\");\n\n if (v === \"2b06010505070201\") {\n var x = k(u, 0, [1], \"16\");\n t.cps = hextorstr(x);\n } else {\n if (v === \"2b06010505070202\") {\n var w = a(u, 0, [1], \"30\");\n t.unotice = this.getUserNotice(w);\n }\n }\n\n return t;\n };\n\n this.getUserNotice = function (x) {\n var u = {};\n var v = n(x, 0);\n\n for (var w = 0; w < v.length; w++) {\n var t = b(x, v[w]);\n\n if (t.substr(0, 2) != \"30\") {\n u.exptext = this.getDisplayText(t);\n }\n }\n\n return u;\n };\n\n this.getDisplayText = function (u) {\n var v = {\n \"0c\": \"utf8\",\n \"16\": \"ia5\",\n \"1a\": \"vis\",\n \"1e\": \"bmp\"\n };\n var t = {};\n t.type = v[u.substr(0, 2)];\n t.str = hextorstr(g(u, 0));\n return t;\n };\n\n this.getExtCRLNumber = function (u, v) {\n var t = {\n extname: \"cRLNumber\"\n };\n\n if (v) {\n t.critical = true;\n }\n\n if (u.substr(0, 2) == \"02\") {\n t.num = {\n hex: g(u, 0)\n };\n return t;\n }\n\n throw new Error(\"hExtV parse error: \" + u);\n };\n\n this.getExtCRLReason = function (u, v) {\n var t = {\n extname: \"cRLReason\"\n };\n\n if (v) {\n t.critical = true;\n }\n\n if (u.substr(0, 2) == \"0a\") {\n t.code = parseInt(g(u, 0), 16);\n return t;\n }\n\n throw new Error(\"hExtV parse error: \" + u);\n };\n\n this.getExtOcspNonce = function (u, w) {\n var t = {\n extname: \"ocspNonce\"\n };\n\n if (w) {\n t.critical = true;\n }\n\n var v = g(u, 0);\n t.hex = v;\n return t;\n };\n\n this.getExtOcspNoCheck = function (u, v) {\n var t = {\n extname: \"ocspNoCheck\"\n };\n\n if (v) {\n t.critical = true;\n }\n\n return t;\n };\n\n this.getExtAdobeTimeStamp = function (w, z) {\n if (w === undefined && z === undefined) {\n var y = this.getExtInfo(\"adobeTimeStamp\");\n\n if (y === undefined) {\n return undefined;\n }\n\n w = b(this.hex, y.vidx);\n z = y.critical;\n }\n\n var t = {\n extname: \"adobeTimeStamp\"\n };\n\n if (z) {\n t.critical = true;\n }\n\n var v = n(w, 0);\n\n if (v.length > 1) {\n var A = b(w, v[1]);\n var u = this.getGeneralName(A);\n\n if (u.uri != undefined) {\n t.uri = u.uri;\n }\n }\n\n if (v.length > 2) {\n var x = b(w, v[2]);\n\n if (x == \"0101ff\") {\n t.reqauth = true;\n }\n\n if (x == \"010100\") {\n t.reqauth = false;\n }\n }\n\n return t;\n };\n\n this.getX500NameRule = function (t) {\n var A = true;\n var E = true;\n var D = false;\n var u = \"\";\n var x = \"\";\n var G = null;\n var B = [];\n\n for (var w = 0; w < t.length; w++) {\n var y = t[w];\n\n for (var v = 0; v < y.length; v++) {\n B.push(y[v]);\n }\n }\n\n for (var w = 0; w < B.length; w++) {\n var F = B[w];\n var H = F.ds;\n var C = F.value;\n var z = F.type;\n u += \":\" + H;\n\n if (H != \"prn\" && H != \"utf8\" && H != \"ia5\") {\n return \"mixed\";\n }\n\n if (H == \"ia5\") {\n if (z != \"CN\") {\n return \"mixed\";\n } else {\n if (!KJUR.lang.String.isMail(C)) {\n return \"mixed\";\n } else {\n continue;\n }\n }\n }\n\n if (z == \"C\") {\n if (H == \"prn\") {\n continue;\n } else {\n return \"mixed\";\n }\n }\n\n x += \":\" + H;\n\n if (G == null) {\n G = H;\n } else {\n if (G !== H) {\n return \"mixed\";\n }\n }\n }\n\n if (G == null) {\n return \"prn\";\n } else {\n return G;\n }\n };\n\n this.getX500Name = function (v) {\n var t = this.getX500NameArray(v);\n var u = this.dnarraytostr(t);\n return {\n array: t,\n str: u\n };\n };\n\n this.getX500NameArray = function (w) {\n var t = [];\n var u = n(w, 0);\n\n for (var v = 0; v < u.length; v++) {\n t.push(this.getRDN(b(w, u[v])));\n }\n\n return t;\n };\n\n this.getRDN = function (w) {\n var t = [];\n var u = n(w, 0);\n\n for (var v = 0; v < u.length; v++) {\n t.push(this.getAttrTypeAndValue(b(w, u[v])));\n }\n\n return t;\n };\n\n this.getAttrTypeAndValue = function (v) {\n var t = {\n type: null,\n value: null,\n ds: null\n };\n var u = n(v, 0);\n var y = c(v, u[0], [], \"06\");\n var x = c(v, u[1], []);\n var w = KJUR.asn1.ASN1Util.oidHexToInt(y);\n t.type = KJUR.asn1.x509.OID.oid2atype(w);\n t.ds = this.HEX2STAG[v.substr(u[1], 2)];\n\n if (t.ds != \"bmp\") {\n t.value = hextoutf8(x);\n } else {\n t.value = ucs2hextoutf8(x);\n }\n\n return t;\n };\n\n this.readCertPEM = function (t) {\n this.readCertHex(r(t));\n };\n\n this.readCertHex = function (t) {\n this.hex = t;\n this.getVersion();\n\n try {\n h(this.hex, 0, [0, 7], \"a3\");\n this.parseExt();\n } catch (u) {}\n };\n\n this.getParam = function () {\n var t = {};\n t.version = this.getVersion();\n t.serial = {\n hex: this.getSerialNumberHex()\n };\n t.sigalg = this.getSignatureAlgorithmField();\n t.issuer = this.getIssuer();\n t.notbefore = this.getNotBefore();\n t.notafter = this.getNotAfter();\n t.subject = this.getSubject();\n t.sbjpubkey = hextopem(this.getPublicKeyHex(), \"PUBLIC KEY\");\n\n if (this.aExtInfo.length > 0) {\n t.ext = this.getExtParamArray();\n }\n\n t.sighex = this.getSignatureValueHex();\n return t;\n };\n\n this.getExtParamArray = function (u) {\n if (u == undefined) {\n var w = e(this.hex, 0, [0, \"[3]\"]);\n\n if (w != -1) {\n u = l(this.hex, 0, [0, \"[3]\", 0], \"30\");\n }\n }\n\n var t = [];\n var v = n(u, 0);\n\n for (var x = 0; x < v.length; x++) {\n var z = b(u, v[x]);\n var y = this.getExtParam(z);\n\n if (y != null) {\n t.push(y);\n }\n }\n\n return t;\n };\n\n this.getExtParam = function (u) {\n var B = {};\n var w = n(u, 0);\n var x = w.length;\n\n if (x != 2 && x != 3) {\n throw new Error(\"wrong number elements in Extension: \" + x + \" \" + u);\n }\n\n var v = m(c(u, 0, [0], \"06\"));\n var z = false;\n\n if (x == 3 && a(u, 0, [1]) == \"0101ff\") {\n z = true;\n }\n\n var A = a(u, 0, [x - 1, 0]);\n var y = undefined;\n\n if (v == \"2.5.29.14\") {\n y = this.getExtSubjectKeyIdentifier(A, z);\n } else {\n if (v == \"2.5.29.15\") {\n y = this.getExtKeyUsage(A, z);\n } else {\n if (v == \"2.5.29.17\") {\n y = this.getExtSubjectAltName(A, z);\n } else {\n if (v == \"2.5.29.18\") {\n y = this.getExtIssuerAltName(A, z);\n } else {\n if (v == \"2.5.29.19\") {\n y = this.getExtBasicConstraints(A, z);\n } else {\n if (v == \"2.5.29.31\") {\n y = this.getExtCRLDistributionPoints(A, z);\n } else {\n if (v == \"2.5.29.32\") {\n y = this.getExtCertificatePolicies(A, z);\n } else {\n if (v == \"2.5.29.35\") {\n y = this.getExtAuthorityKeyIdentifier(A, z);\n } else {\n if (v == \"2.5.29.37\") {\n y = this.getExtExtKeyUsage(A, z);\n } else {\n if (v == \"1.3.6.1.5.5.7.1.1\") {\n y = this.getExtAuthorityInfoAccess(A, z);\n } else {\n if (v == \"2.5.29.20\") {\n y = this.getExtCRLNumber(A, z);\n } else {\n if (v == \"2.5.29.21\") {\n y = this.getExtCRLReason(A, z);\n } else {\n if (v == \"1.3.6.1.5.5.7.48.1.2\") {\n y = this.getExtOcspNonce(A, z);\n } else {\n if (v == \"1.3.6.1.5.5.7.48.1.5\") {\n y = this.getExtOcspNoCheck(A, z);\n } else {\n if (v == \"1.2.840.113583.1.1.9.1\") {\n y = this.getExtAdobeTimeStamp(A, z);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n if (y != undefined) {\n return y;\n }\n\n var t = {\n extname: v,\n extn: A\n };\n\n if (z) {\n t.critical = true;\n }\n\n return t;\n };\n\n this.findExt = function (u, v) {\n for (var t = 0; t < u.length; t++) {\n if (u[t].extname == v) {\n return u[t];\n }\n }\n\n return null;\n };\n\n this.updateExtCDPFullURI = function (x, t) {\n var w = this.findExt(x, \"cRLDistributionPoints\");\n\n if (w == null) {\n return;\n }\n\n if (w.array == undefined) {\n return;\n }\n\n var z = w.array;\n\n for (var v = 0; v < z.length; v++) {\n if (z[v].dpname == undefined) {\n continue;\n }\n\n if (z[v].dpname.full == undefined) {\n continue;\n }\n\n var A = z[v].dpname.full;\n\n for (var u = 0; u < A.length; u++) {\n var y = A[v];\n\n if (y.uri == undefined) {\n continue;\n }\n\n y.uri = t;\n }\n }\n };\n\n this.updateExtAIAOCSP = function (x, u) {\n var w = this.findExt(x, \"authorityInfoAccess\");\n\n if (w == null) {\n return;\n }\n\n if (w.array == undefined) {\n return;\n }\n\n var t = w.array;\n\n for (var v = 0; v < t.length; v++) {\n if (t[v].ocsp != undefined) {\n t[v].ocsp = u;\n }\n }\n };\n\n this.updateExtAIACAIssuer = function (x, u) {\n var w = this.findExt(x, \"authorityInfoAccess\");\n\n if (w == null) {\n return;\n }\n\n if (w.array == undefined) {\n return;\n }\n\n var t = w.array;\n\n for (var v = 0; v < t.length; v++) {\n if (t[v].caissuer != undefined) {\n t[v].caissuer = u;\n }\n }\n };\n\n this.dnarraytostr = function (v) {\n function t(w) {\n return w.map(function (y) {\n return u(y).replace(/\\+/, \"\\\\+\");\n }).join(\"+\");\n }\n\n function u(w) {\n return w.type + \"=\" + w.value;\n }\n\n return \"/\" + v.map(function (w) {\n return t(w).replace(/\\//, \"\\\\/\");\n }).join(\"/\");\n };\n\n this.getInfo = function () {\n var u = function u(M) {\n var L = JSON.stringify(M.array).replace(/[\\[\\]\\{\\}\\\"]/g, \"\");\n return L;\n };\n\n var A = function A(R) {\n var P = \"\";\n var L = R.array;\n\n for (var O = 0; O < L.length; O++) {\n var Q = L[O];\n P += \" policy oid: \" + Q.policyoid + \"\\n\";\n\n if (Q.array === undefined) {\n continue;\n }\n\n for (var N = 0; N < Q.array.length; N++) {\n var M = Q.array[N];\n\n if (M.cps !== undefined) {\n P += \" cps: \" + M.cps + \"\\n\";\n }\n }\n }\n\n return P;\n };\n\n var D = function D(P) {\n var O = \"\";\n var L = P.array;\n\n for (var N = 0; N < L.length; N++) {\n var Q = L[N];\n\n try {\n if (Q.dpname.full[0].uri !== undefined) {\n O += \" \" + Q.dpname.full[0].uri + \"\\n\";\n }\n } catch (M) {}\n\n try {\n if (Q.dname.full[0].dn.hex !== undefined) {\n O += \" \" + X509.hex2dn(Q.dpname.full[0].dn.hex) + \"\\n\";\n }\n } catch (M) {}\n }\n\n return O;\n };\n\n var B = function B(P) {\n var O = \"\";\n var L = P.array;\n\n for (var M = 0; M < L.length; M++) {\n var N = L[M];\n\n if (N.caissuer !== undefined) {\n O += \" caissuer: \" + N.caissuer + \"\\n\";\n }\n\n if (N.ocsp !== undefined) {\n O += \" ocsp: \" + N.ocsp + \"\\n\";\n }\n }\n\n return O;\n };\n\n var v = X509;\n var F, E, K;\n F = \"Basic Fields\\n\";\n F += \" serial number: \" + this.getSerialNumberHex() + \"\\n\";\n F += \" signature algorithm: \" + this.getSignatureAlgorithmField() + \"\\n\";\n F += \" issuer: \" + this.getIssuerString() + \"\\n\";\n F += \" notBefore: \" + this.getNotBefore() + \"\\n\";\n F += \" notAfter: \" + this.getNotAfter() + \"\\n\";\n F += \" subject: \" + this.getSubjectString() + \"\\n\";\n F += \" subject public key info: \\n\";\n E = this.getPublicKey();\n F += \" key algorithm: \" + E.type + \"\\n\";\n\n if (E.type === \"RSA\") {\n F += \" n=\" + hextoposhex(E.n.toString(16)).substr(0, 16) + \"...\\n\";\n F += \" e=\" + hextoposhex(E.e.toString(16)) + \"\\n\";\n }\n\n K = this.aExtInfo;\n\n if (K !== undefined && K !== null) {\n F += \"X509v3 Extensions:\\n\";\n\n for (var H = 0; H < K.length; H++) {\n var J = K[H];\n var t = KJUR.asn1.x509.OID.oid2name(J.oid);\n\n if (t === \"\") {\n t = J.oid;\n }\n\n var G = \"\";\n\n if (J.critical === true) {\n G = \"CRITICAL\";\n }\n\n F += \" \" + t + \" \" + G + \":\\n\";\n\n if (t === \"basicConstraints\") {\n var w = this.getExtBasicConstraints();\n\n if (w.cA === undefined) {\n F += \" {}\\n\";\n } else {\n F += \" cA=true\";\n\n if (w.pathLen !== undefined) {\n F += \", pathLen=\" + w.pathLen;\n }\n\n F += \"\\n\";\n }\n } else {\n if (t === \"keyUsage\") {\n F += \" \" + this.getExtKeyUsageString() + \"\\n\";\n } else {\n if (t === \"subjectKeyIdentifier\") {\n F += \" \" + this.getExtSubjectKeyIdentifier().kid.hex + \"\\n\";\n } else {\n if (t === \"authorityKeyIdentifier\") {\n var x = this.getExtAuthorityKeyIdentifier();\n\n if (x.kid !== undefined) {\n F += \" kid=\" + x.kid.hex + \"\\n\";\n }\n } else {\n if (t === \"extKeyUsage\") {\n var I = this.getExtExtKeyUsage().array;\n F += \" \" + I.join(\", \") + \"\\n\";\n } else {\n if (t === \"subjectAltName\") {\n var y = u(this.getExtSubjectAltName());\n F += \" \" + y + \"\\n\";\n } else {\n if (t === \"cRLDistributionPoints\") {\n var C = this.getExtCRLDistributionPoints();\n F += D(C);\n } else {\n if (t === \"authorityInfoAccess\") {\n var z = this.getExtAuthorityInfoAccess();\n F += B(z);\n } else {\n if (t === \"certificatePolicies\") {\n F += A(this.getExtCertificatePolicies());\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n F += \"signature algorithm: \" + this.getSignatureAlgorithmName() + \"\\n\";\n F += \"signature: \" + this.getSignatureValueHex().substr(0, 16) + \"...\\n\";\n return F;\n };\n\n if (typeof q == \"string\") {\n if (q.indexOf(\"-----BEGIN\") != -1) {\n this.readCertPEM(q);\n } else {\n if (KJUR.lang.String.isHex(q)) {\n this.readCertHex(q);\n }\n }\n }\n}\n\nX509.hex2dn = function (e, b) {\n if (b === undefined) {\n b = 0;\n }\n\n var a = new X509();\n var c = ASN1HEX.getTLV(e, b);\n var d = a.getX500Name(e);\n return d.str;\n};\n\nX509.hex2rdn = function (f, b) {\n if (b === undefined) {\n b = 0;\n }\n\n if (f.substr(b, 2) !== \"31\") {\n throw new Error(\"malformed RDN\");\n }\n\n var c = new Array();\n var d = ASN1HEX.getChildIdx(f, b);\n\n for (var e = 0; e < d.length; e++) {\n c.push(X509.hex2attrTypeValue(f, d[e]));\n }\n\n c = c.map(function (a) {\n return a.replace(\"+\", \"\\\\+\");\n });\n return c.join(\"+\");\n};\n\nX509.hex2attrTypeValue = function (d, i) {\n var j = ASN1HEX;\n var h = j.getV;\n\n if (i === undefined) {\n i = 0;\n }\n\n if (d.substr(i, 2) !== \"30\") {\n throw new Error(\"malformed attribute type and value\");\n }\n\n var g = j.getChildIdx(d, i);\n\n if (g.length !== 2 || d.substr(g[0], 2) !== \"06\") {\n \"malformed attribute type and value\";\n }\n\n var b = h(d, g[0]);\n var f = KJUR.asn1.ASN1Util.oidHexToInt(b);\n var e = KJUR.asn1.x509.OID.oid2atype(f);\n var a = h(d, g[1]);\n var c = hextorstr(a);\n return e + \"=\" + c;\n};\n\nX509.getPublicKeyFromCertHex = function (b) {\n var a = new X509();\n a.readCertHex(b);\n return a.getPublicKey();\n};\n\nX509.getPublicKeyFromCertPEM = function (b) {\n var a = new X509();\n a.readCertPEM(b);\n return a.getPublicKey();\n};\n\nX509.getPublicKeyInfoPropOfCertPEM = function (c) {\n var e = ASN1HEX;\n var g = e.getVbyList;\n var b = {};\n var a, f, d;\n b.algparam = null;\n a = new X509();\n a.readCertPEM(c);\n f = a.getPublicKeyHex();\n b.keyhex = g(f, 0, [1], \"03\").substr(2);\n b.algoid = g(f, 0, [0, 0], \"06\");\n\n if (b.algoid === \"2a8648ce3d0201\") {\n b.algparam = g(f, 0, [0, 1], \"06\");\n }\n\n return b;\n};\n\nX509.KEYUSAGE_NAME = [\"digitalSignature\", \"nonRepudiation\", \"keyEncipherment\", \"dataEncipherment\", \"keyAgreement\", \"keyCertSign\", \"cRLSign\", \"encipherOnly\", \"decipherOnly\"];\n\nvar X509CRL = function X509CRL(e) {\n var a = KJUR,\n f = a.lang.String.isHex,\n m = ASN1HEX,\n k = m.getV,\n b = m.getTLV,\n h = m.getVbyList,\n c = m.getTLVbyList,\n d = m.getTLVbyListEx,\n i = m.getIdxbyList,\n g = m.getIdxbyListEx,\n l = m.getChildIdx,\n j = new X509();\n this.hex = null;\n this.posSigAlg = null;\n this.posRevCert = null;\n\n this._setPos = function () {\n var o = i(this.hex, 0, [0, 0]);\n var n = this.hex.substr(o, 2);\n\n if (n == \"02\") {\n this.posSigAlg = 1;\n } else {\n if (n == \"30\") {\n this.posSigAlg = 0;\n } else {\n throw new Error(\"malformed 1st item of TBSCertList: \" + n);\n }\n }\n\n var s = i(this.hex, 0, [0, this.posSigAlg + 3]);\n var r = this.hex.substr(s, 2);\n\n if (r == \"17\" || r == \"18\") {\n var q, p;\n q = i(this.hex, 0, [0, this.posSigAlg + 4]);\n this.posRevCert = null;\n\n if (q != -1) {\n p = this.hex.substr(q, 2);\n\n if (p == \"30\") {\n this.posRevCert = this.posSigAlg + 4;\n }\n }\n } else {\n if (r == \"30\") {\n this.posRevCert = this.posSigAlg + 3;\n } else {\n if (r == \"a0\") {\n this.posRevCert = null;\n } else {\n throw new Error(\"malformed nextUpdate or revCert tag: \" + r);\n }\n }\n }\n };\n\n this.getVersion = function () {\n if (this.posSigAlg == 0) {\n return null;\n }\n\n return parseInt(h(this.hex, 0, [0, 0], \"02\"), 16) + 1;\n };\n\n this.getSignatureAlgorithmField = function () {\n var n = c(this.hex, 0, [0, this.posSigAlg], \"30\");\n return j.getAlgorithmIdentifierName(n);\n };\n\n this.getIssuer = function () {\n var n = c(this.hex, 0, [0, this.posSigAlg + 1], \"30\");\n return j.getX500Name(n);\n };\n\n this.getThisUpdate = function () {\n var n = h(this.hex, 0, [0, this.posSigAlg + 2]);\n return result = hextorstr(n);\n };\n\n this.getNextUpdate = function () {\n var o = i(this.hex, 0, [0, this.posSigAlg + 3]);\n var n = this.hex.substr(o, 2);\n\n if (n != \"17\" && n != \"18\") {\n return null;\n }\n\n return hextorstr(k(this.hex, o));\n };\n\n this.getRevCertArray = function () {\n if (this.posRevCert == null) {\n return null;\n }\n\n var o = [];\n var n = i(this.hex, 0, [0, this.posRevCert]);\n var p = l(this.hex, n);\n\n for (var q = 0; q < p.length; q++) {\n var r = b(this.hex, p[q]);\n o.push(this.getRevCert(r));\n }\n\n return o;\n };\n\n this.getRevCert = function (p) {\n var o = {};\n var n = l(p, 0);\n o.sn = {\n hex: h(p, 0, [0], \"02\")\n };\n o.date = hextorstr(h(p, 0, [1]));\n\n if (n.length == 3) {\n o.ext = j.getExtParamArray(c(p, 0, [2]));\n }\n\n return o;\n };\n\n this.getSignatureValueHex = function () {\n return h(this.hex, 0, [2], \"03\", true);\n };\n\n this.verifySignature = function (o) {\n var p = this.getSignatureAlgorithmField();\n var n = this.getSignatureValueHex();\n var q = c(this.hex, 0, [0], \"30\");\n var r = new KJUR.crypto.Signature({\n alg: p\n });\n r.init(o);\n r.updateHex(q);\n return r.verify(n);\n };\n\n this.getParam = function () {\n var n = {};\n var p = this.getVersion();\n\n if (p != null) {\n n.version = p;\n }\n\n n.sigalg = this.getSignatureAlgorithmField();\n n.issuer = this.getIssuer();\n n.thisupdate = this.getThisUpdate();\n var q = this.getNextUpdate();\n\n if (q != null) {\n n.nextupdate = q;\n }\n\n var s = this.getRevCertArray();\n\n if (s != null) {\n n.revcert = s;\n }\n\n var r = g(this.hex, 0, [0, \"[0]\"]);\n\n if (r != -1) {\n var o = d(this.hex, 0, [0, \"[0]\", 0]);\n n.ext = j.getExtParamArray(o);\n }\n\n n.sighex = this.getSignatureValueHex();\n return n;\n };\n\n if (typeof e == \"string\") {\n if (f(e)) {\n this.hex = e;\n } else {\n if (e.match(/-----BEGIN X509 CRL/)) {\n this.hex = pemtohex(e);\n }\n }\n\n this._setPos();\n }\n};\n\nif (typeof KJUR == \"undefined\" || !KJUR) {\n KJUR = {};\n}\n\nif (typeof KJUR.jws == \"undefined\" || !KJUR.jws) {\n KJUR.jws = {};\n}\n\nKJUR.jws.JWS = function () {\n var b = KJUR,\n a = b.jws.JWS,\n c = a.isSafeJSONString;\n\n this.parseJWS = function (g, j) {\n if (this.parsedJWS !== undefined && (j || this.parsedJWS.sigvalH !== undefined)) {\n return;\n }\n\n var i = g.match(/^([^.]+)\\.([^.]+)\\.([^.]+)$/);\n\n if (i == null) {\n throw \"JWS signature is not a form of 'Head.Payload.SigValue'.\";\n }\n\n var k = i[1];\n var e = i[2];\n var l = i[3];\n var n = k + \".\" + e;\n this.parsedJWS = {};\n this.parsedJWS.headB64U = k;\n this.parsedJWS.payloadB64U = e;\n this.parsedJWS.sigvalB64U = l;\n this.parsedJWS.si = n;\n\n if (!j) {\n var h = b64utohex(l);\n var f = parseBigInt(h, 16);\n this.parsedJWS.sigvalH = h;\n this.parsedJWS.sigvalBI = f;\n }\n\n var d = b64utoutf8(k);\n var m = b64utoutf8(e);\n this.parsedJWS.headS = d;\n this.parsedJWS.payloadS = m;\n\n if (!c(d, this.parsedJWS, \"headP\")) {\n throw \"malformed JSON string for JWS Head: \" + d;\n }\n };\n};\n\nKJUR.jws.JWS.sign = function (j, w, z, A, a) {\n var x = KJUR,\n n = x.jws,\n r = n.JWS,\n h = r.readSafeJSONString,\n q = r.isSafeJSONString,\n d = x.crypto,\n l = d.ECDSA,\n p = d.Mac,\n c = d.Signature,\n u = JSON;\n var t, k, o;\n\n if (typeof w != \"string\" && _typeof(w) != \"object\") {\n throw \"spHeader must be JSON string or object: \" + w;\n }\n\n if (_typeof(w) == \"object\") {\n k = w;\n t = u.stringify(k);\n }\n\n if (typeof w == \"string\") {\n t = w;\n\n if (!q(t)) {\n throw \"JWS Head is not safe JSON string: \" + t;\n }\n\n k = h(t);\n }\n\n o = z;\n\n if (_typeof(z) == \"object\") {\n o = u.stringify(z);\n }\n\n if ((j == \"\" || j == null) && k.alg !== undefined) {\n j = k.alg;\n }\n\n if (j != \"\" && j != null && k.alg === undefined) {\n k.alg = j;\n t = u.stringify(k);\n }\n\n if (j !== k.alg) {\n throw \"alg and sHeader.alg doesn't match: \" + j + \"!=\" + k.alg;\n }\n\n var s = null;\n\n if (r.jwsalg2sigalg[j] === undefined) {\n throw \"unsupported alg name: \" + j;\n } else {\n s = r.jwsalg2sigalg[j];\n }\n\n var e = utf8tob64u(t);\n var m = utf8tob64u(o);\n var b = e + \".\" + m;\n var y = \"\";\n\n if (s.substr(0, 4) == \"Hmac\") {\n if (A === undefined) {\n throw \"mac key shall be specified for HS* alg\";\n }\n\n var i = new p({\n alg: s,\n prov: \"cryptojs\",\n pass: A\n });\n i.updateString(b);\n y = i.doFinal();\n } else {\n if (s.indexOf(\"withECDSA\") != -1) {\n var f = new c({\n alg: s\n });\n f.init(A, a);\n f.updateString(b);\n var g = f.sign();\n y = KJUR.crypto.ECDSA.asn1SigToConcatSig(g);\n } else {\n if (s != \"none\") {\n var f = new c({\n alg: s\n });\n f.init(A, a);\n f.updateString(b);\n y = f.sign();\n }\n }\n }\n\n var v = hextob64u(y);\n return b + \".\" + v;\n};\n\nKJUR.jws.JWS.verify = function (w, B, n) {\n var x = KJUR,\n q = x.jws,\n t = q.JWS,\n i = t.readSafeJSONString,\n e = x.crypto,\n p = e.ECDSA,\n s = e.Mac,\n d = e.Signature,\n m;\n\n if (_typeof(RSAKey) !== undefined) {\n m = RSAKey;\n }\n\n var y = w.split(\".\");\n\n if (y.length !== 3) {\n return false;\n }\n\n var f = y[0];\n var r = y[1];\n var c = f + \".\" + r;\n var A = b64utohex(y[2]);\n var l = i(b64utoutf8(y[0]));\n var k = null;\n var z = null;\n\n if (l.alg === undefined) {\n throw \"algorithm not specified in header\";\n } else {\n k = l.alg;\n z = k.substr(0, 2);\n }\n\n if (n != null && Object.prototype.toString.call(n) === \"[object Array]\" && n.length > 0) {\n var b = \":\" + n.join(\":\") + \":\";\n\n if (b.indexOf(\":\" + k + \":\") == -1) {\n throw \"algorithm '\" + k + \"' not accepted in the list\";\n }\n }\n\n if (k != \"none\" && B === null) {\n throw \"key shall be specified to verify.\";\n }\n\n if (typeof B == \"string\" && B.indexOf(\"-----BEGIN \") != -1) {\n B = KEYUTIL.getKey(B);\n }\n\n if (z == \"RS\" || z == \"PS\") {\n if (!(B instanceof m)) {\n throw \"key shall be a RSAKey obj for RS* and PS* algs\";\n }\n }\n\n if (z == \"ES\") {\n if (!(B instanceof p)) {\n throw \"key shall be a ECDSA obj for ES* algs\";\n }\n }\n\n if (k == \"none\") {}\n\n var u = null;\n\n if (t.jwsalg2sigalg[l.alg] === undefined) {\n throw \"unsupported alg name: \" + k;\n } else {\n u = t.jwsalg2sigalg[k];\n }\n\n if (u == \"none\") {\n throw \"not supported\";\n } else {\n if (u.substr(0, 4) == \"Hmac\") {\n var o = null;\n\n if (B === undefined) {\n throw \"hexadecimal key shall be specified for HMAC\";\n }\n\n var j = new s({\n alg: u,\n pass: B\n });\n j.updateString(c);\n o = j.doFinal();\n return A == o;\n } else {\n if (u.indexOf(\"withECDSA\") != -1) {\n var h = null;\n\n try {\n h = p.concatSigToASN1Sig(A);\n } catch (v) {\n return false;\n }\n\n var g = new d({\n alg: u\n });\n g.init(B);\n g.updateString(c);\n return g.verify(h);\n } else {\n var g = new d({\n alg: u\n });\n g.init(B);\n g.updateString(c);\n return g.verify(A);\n }\n }\n }\n};\n\nKJUR.jws.JWS.parse = function (g) {\n var c = g.split(\".\");\n var b = {};\n var f, e, d;\n\n if (c.length != 2 && c.length != 3) {\n throw \"malformed sJWS: wrong number of '.' splitted elements\";\n }\n\n f = c[0];\n e = c[1];\n\n if (c.length == 3) {\n d = c[2];\n }\n\n b.headerObj = KJUR.jws.JWS.readSafeJSONString(b64utoutf8(f));\n b.payloadObj = KJUR.jws.JWS.readSafeJSONString(b64utoutf8(e));\n b.headerPP = JSON.stringify(b.headerObj, null, \" \");\n\n if (b.payloadObj == null) {\n b.payloadPP = b64utoutf8(e);\n } else {\n b.payloadPP = JSON.stringify(b.payloadObj, null, \" \");\n }\n\n if (d !== undefined) {\n b.sigHex = b64utohex(d);\n }\n\n return b;\n};\n\nKJUR.jws.JWS.verifyJWT = function (e, l, r) {\n var d = KJUR,\n j = d.jws,\n o = j.JWS,\n n = o.readSafeJSONString,\n p = o.inArray,\n f = o.includedArray;\n var k = e.split(\".\");\n var c = k[0];\n var i = k[1];\n var q = c + \".\" + i;\n var m = b64utohex(k[2]);\n var h = n(b64utoutf8(c));\n var g = n(b64utoutf8(i));\n\n if (h.alg === undefined) {\n return false;\n }\n\n if (r.alg === undefined) {\n throw \"acceptField.alg shall be specified\";\n }\n\n if (!p(h.alg, r.alg)) {\n return false;\n }\n\n if (g.iss !== undefined && _typeof(r.iss) === \"object\") {\n if (!p(g.iss, r.iss)) {\n return false;\n }\n }\n\n if (g.sub !== undefined && _typeof(r.sub) === \"object\") {\n if (!p(g.sub, r.sub)) {\n return false;\n }\n }\n\n if (g.aud !== undefined && _typeof(r.aud) === \"object\") {\n if (typeof g.aud == \"string\") {\n if (!p(g.aud, r.aud)) {\n return false;\n }\n } else {\n if (_typeof(g.aud) == \"object\") {\n if (!f(g.aud, r.aud)) {\n return false;\n }\n }\n }\n }\n\n var b = j.IntDate.getNow();\n\n if (r.verifyAt !== undefined && typeof r.verifyAt === \"number\") {\n b = r.verifyAt;\n }\n\n if (r.gracePeriod === undefined || typeof r.gracePeriod !== \"number\") {\n r.gracePeriod = 0;\n }\n\n if (g.exp !== undefined && typeof g.exp == \"number\") {\n if (g.exp + r.gracePeriod < b) {\n return false;\n }\n }\n\n if (g.nbf !== undefined && typeof g.nbf == \"number\") {\n if (b < g.nbf - r.gracePeriod) {\n return false;\n }\n }\n\n if (g.iat !== undefined && typeof g.iat == \"number\") {\n if (b < g.iat - r.gracePeriod) {\n return false;\n }\n }\n\n if (g.jti !== undefined && r.jti !== undefined) {\n if (g.jti !== r.jti) {\n return false;\n }\n }\n\n if (!o.verify(e, l, r.alg)) {\n return false;\n }\n\n return true;\n};\n\nKJUR.jws.JWS.includedArray = function (b, a) {\n var c = KJUR.jws.JWS.inArray;\n\n if (b === null) {\n return false;\n }\n\n if (_typeof(b) !== \"object\") {\n return false;\n }\n\n if (typeof b.length !== \"number\") {\n return false;\n }\n\n for (var d = 0; d < b.length; d++) {\n if (!c(b[d], a)) {\n return false;\n }\n }\n\n return true;\n};\n\nKJUR.jws.JWS.inArray = function (d, b) {\n if (b === null) {\n return false;\n }\n\n if (_typeof(b) !== \"object\") {\n return false;\n }\n\n if (typeof b.length !== \"number\") {\n return false;\n }\n\n for (var c = 0; c < b.length; c++) {\n if (b[c] == d) {\n return true;\n }\n }\n\n return false;\n};\n\nKJUR.jws.JWS.jwsalg2sigalg = {\n HS256: \"HmacSHA256\",\n HS384: \"HmacSHA384\",\n HS512: \"HmacSHA512\",\n RS256: \"SHA256withRSA\",\n RS384: \"SHA384withRSA\",\n RS512: \"SHA512withRSA\",\n ES256: \"SHA256withECDSA\",\n ES384: \"SHA384withECDSA\",\n PS256: \"SHA256withRSAandMGF1\",\n PS384: \"SHA384withRSAandMGF1\",\n PS512: \"SHA512withRSAandMGF1\",\n none: \"none\"\n};\n\nKJUR.jws.JWS.isSafeJSONString = function (c, b, d) {\n var e = null;\n\n try {\n e = jsonParse(c);\n\n if (_typeof(e) != \"object\") {\n return 0;\n }\n\n if (e.constructor === Array) {\n return 0;\n }\n\n if (b) {\n b[d] = e;\n }\n\n return 1;\n } catch (a) {\n return 0;\n }\n};\n\nKJUR.jws.JWS.readSafeJSONString = function (b) {\n var c = null;\n\n try {\n c = jsonParse(b);\n\n if (_typeof(c) != \"object\") {\n return null;\n }\n\n if (c.constructor === Array) {\n return null;\n }\n\n return c;\n } catch (a) {\n return null;\n }\n};\n\nKJUR.jws.JWS.getEncodedSignatureValueFromJWS = function (b) {\n var a = b.match(/^[^.]+\\.[^.]+\\.([^.]+)$/);\n\n if (a == null) {\n throw \"JWS signature is not a form of 'Head.Payload.SigValue'.\";\n }\n\n return a[1];\n};\n\nKJUR.jws.JWS.getJWKthumbprint = function (d) {\n if (d.kty !== \"RSA\" && d.kty !== \"EC\" && d.kty !== \"oct\") {\n throw \"unsupported algorithm for JWK Thumprint\";\n }\n\n var a = \"{\";\n\n if (d.kty === \"RSA\") {\n if (typeof d.n != \"string\" || typeof d.e != \"string\") {\n throw \"wrong n and e value for RSA key\";\n }\n\n a += '\"e\":\"' + d.e + '\",';\n a += '\"kty\":\"' + d.kty + '\",';\n a += '\"n\":\"' + d.n + '\"}';\n } else {\n if (d.kty === \"EC\") {\n if (typeof d.crv != \"string\" || typeof d.x != \"string\" || typeof d.y != \"string\") {\n throw \"wrong crv, x and y value for EC key\";\n }\n\n a += '\"crv\":\"' + d.crv + '\",';\n a += '\"kty\":\"' + d.kty + '\",';\n a += '\"x\":\"' + d.x + '\",';\n a += '\"y\":\"' + d.y + '\"}';\n } else {\n if (d.kty === \"oct\") {\n if (typeof d.k != \"string\") {\n throw \"wrong k value for oct(symmetric) key\";\n }\n\n a += '\"kty\":\"' + d.kty + '\",';\n a += '\"k\":\"' + d.k + '\"}';\n }\n }\n }\n\n var b = rstrtohex(a);\n var c = KJUR.crypto.Util.hashHex(b, \"sha256\");\n var e = hextob64u(c);\n return e;\n};\n\nKJUR.jws.IntDate = {};\n\nKJUR.jws.IntDate.get = function (c) {\n var b = KJUR.jws.IntDate,\n d = b.getNow,\n a = b.getZulu;\n\n if (c == \"now\") {\n return d();\n } else {\n if (c == \"now + 1hour\") {\n return d() + 60 * 60;\n } else {\n if (c == \"now + 1day\") {\n return d() + 60 * 60 * 24;\n } else {\n if (c == \"now + 1month\") {\n return d() + 60 * 60 * 24 * 30;\n } else {\n if (c == \"now + 1year\") {\n return d() + 60 * 60 * 24 * 365;\n } else {\n if (c.match(/Z$/)) {\n return a(c);\n } else {\n if (c.match(/^[0-9]+$/)) {\n return parseInt(c);\n }\n }\n }\n }\n }\n }\n }\n\n throw \"unsupported format: \" + c;\n};\n\nKJUR.jws.IntDate.getZulu = function (a) {\n return zulutosec(a);\n};\n\nKJUR.jws.IntDate.getNow = function () {\n var a = ~~(new Date() / 1000);\n return a;\n};\n\nKJUR.jws.IntDate.intDate2UTCString = function (a) {\n var b = new Date(a * 1000);\n return b.toUTCString();\n};\n\nKJUR.jws.IntDate.intDate2Zulu = function (e) {\n var i = new Date(e * 1000),\n h = (\"0000\" + i.getUTCFullYear()).slice(-4),\n g = (\"00\" + (i.getUTCMonth() + 1)).slice(-2),\n b = (\"00\" + i.getUTCDate()).slice(-2),\n a = (\"00\" + i.getUTCHours()).slice(-2),\n c = (\"00\" + i.getUTCMinutes()).slice(-2),\n f = (\"00\" + i.getUTCSeconds()).slice(-2);\n return h + g + b + a + c + f + \"Z\";\n};\n\nif (typeof KJUR == \"undefined\" || !KJUR) {\n KJUR = {};\n}\n\nif (typeof KJUR.jws == \"undefined\" || !KJUR.jws) {\n KJUR.jws = {};\n}\n\nKJUR.jws.JWSJS = function () {\n var c = KJUR,\n b = c.jws,\n a = b.JWS,\n d = a.readSafeJSONString;\n this.aHeader = [];\n this.sPayload = \"\";\n this.aSignature = [];\n\n this.init = function () {\n this.aHeader = [];\n this.sPayload = undefined;\n this.aSignature = [];\n };\n\n this.initWithJWS = function (f) {\n this.init();\n var e = f.split(\".\");\n\n if (e.length != 3) {\n throw \"malformed input JWS\";\n }\n\n this.aHeader.push(e[0]);\n this.sPayload = e[1];\n this.aSignature.push(e[2]);\n };\n\n this.addSignature = function (e, h, m, k) {\n if (this.sPayload === undefined || this.sPayload === null) {\n throw \"there's no JSON-JS signature to add.\";\n }\n\n var l = this.aHeader.length;\n\n if (this.aHeader.length != this.aSignature.length) {\n throw \"aHeader.length != aSignature.length\";\n }\n\n try {\n var f = KJUR.jws.JWS.sign(e, h, this.sPayload, m, k);\n var j = f.split(\".\");\n var n = j[0];\n var g = j[2];\n this.aHeader.push(j[0]);\n this.aSignature.push(j[2]);\n } catch (i) {\n if (this.aHeader.length > l) {\n this.aHeader.pop();\n }\n\n if (this.aSignature.length > l) {\n this.aSignature.pop();\n }\n\n throw \"addSignature failed: \" + i;\n }\n };\n\n this.verifyAll = function (h) {\n if (this.aHeader.length !== h.length || this.aSignature.length !== h.length) {\n return false;\n }\n\n for (var g = 0; g < h.length; g++) {\n var f = h[g];\n\n if (f.length !== 2) {\n return false;\n }\n\n var e = this.verifyNth(g, f[0], f[1]);\n\n if (e === false) {\n return false;\n }\n }\n\n return true;\n };\n\n this.verifyNth = function (f, j, g) {\n if (this.aHeader.length <= f || this.aSignature.length <= f) {\n return false;\n }\n\n var h = this.aHeader[f];\n var k = this.aSignature[f];\n var l = h + \".\" + this.sPayload + \".\" + k;\n var e = false;\n\n try {\n e = a.verify(l, j, g);\n } catch (i) {\n return false;\n }\n\n return e;\n };\n\n this.readJWSJS = function (g) {\n if (typeof g === \"string\") {\n var f = d(g);\n\n if (f == null) {\n throw \"argument is not safe JSON object string\";\n }\n\n this.aHeader = f.headers;\n this.sPayload = f.payload;\n this.aSignature = f.signatures;\n } else {\n try {\n if (g.headers.length > 0) {\n this.aHeader = g.headers;\n } else {\n throw \"malformed header\";\n }\n\n if (typeof g.payload === \"string\") {\n this.sPayload = g.payload;\n } else {\n throw \"malformed signatures\";\n }\n\n if (g.signatures.length > 0) {\n this.aSignature = g.signatures;\n } else {\n throw \"malformed signatures\";\n }\n } catch (e) {\n throw \"malformed JWS-JS JSON object: \" + e;\n }\n }\n };\n\n this.getJSON = function () {\n return {\n headers: this.aHeader,\n payload: this.sPayload,\n signatures: this.aSignature\n };\n };\n\n this.isEmpty = function () {\n if (this.aHeader.length == 0) {\n return 1;\n }\n\n return 0;\n };\n};\n\nexports.SecureRandom = SecureRandom;\nexports.rng_seed_time = rng_seed_time;\nexports.BigInteger = BigInteger;\nexports.RSAKey = RSAKey;\nexports.ECDSA = KJUR.crypto.ECDSA;\nexports.DSA = KJUR.crypto.DSA;\nexports.Signature = KJUR.crypto.Signature;\nexports.MessageDigest = KJUR.crypto.MessageDigest;\nexports.Mac = KJUR.crypto.Mac;\nexports.Cipher = KJUR.crypto.Cipher;\nexports.KEYUTIL = KEYUTIL;\nexports.ASN1HEX = ASN1HEX;\nexports.X509 = X509;\nexports.X509CRL = X509CRL;\nexports.CryptoJS = CryptoJS; // ext/base64.js\n\nexports.b64tohex = b64tohex;\nexports.b64toBA = b64toBA; // ext/ec*.js\n\nexports.ECFieldElementFp = ECFieldElementFp;\nexports.ECPointFp = ECPointFp;\nexports.ECCurveFp = ECCurveFp; // base64x.js\n\nexports.stoBA = stoBA;\nexports.BAtos = BAtos;\nexports.BAtohex = BAtohex;\nexports.stohex = stohex;\nexports.stob64 = stob64;\nexports.stob64u = stob64u;\nexports.b64utos = b64utos;\nexports.b64tob64u = b64tob64u;\nexports.b64utob64 = b64utob64;\nexports.hex2b64 = hex2b64;\nexports.hextob64u = hextob64u;\nexports.b64utohex = b64utohex;\nexports.utf8tob64u = utf8tob64u;\nexports.b64utoutf8 = b64utoutf8;\nexports.utf8tob64 = utf8tob64;\nexports.b64toutf8 = b64toutf8;\nexports.utf8tohex = utf8tohex;\nexports.hextoutf8 = hextoutf8;\nexports.hextorstr = hextorstr;\nexports.rstrtohex = rstrtohex;\nexports.hextob64 = hextob64;\nexports.hextob64nl = hextob64nl;\nexports.b64nltohex = b64nltohex;\nexports.hextopem = hextopem;\nexports.pemtohex = pemtohex;\nexports.hextoArrayBuffer = hextoArrayBuffer;\nexports.ArrayBuffertohex = ArrayBuffertohex;\nexports.zulutomsec = zulutomsec;\nexports.zulutosec = zulutosec;\nexports.zulutodate = zulutodate;\nexports.datetozulu = datetozulu;\nexports.uricmptohex = uricmptohex;\nexports.hextouricmp = hextouricmp;\nexports.ipv6tohex = ipv6tohex;\nexports.hextoipv6 = hextoipv6;\nexports.hextoip = hextoip;\nexports.iptohex = iptohex;\nexports.ucs2hextoutf8 = ucs2hextoutf8;\nexports.encodeURIComponentAll = encodeURIComponentAll;\nexports.newline_toUnix = newline_toUnix;\nexports.newline_toDos = newline_toDos;\nexports.hextoposhex = hextoposhex;\nexports.intarystrtohex = intarystrtohex;\nexports.strdiffidx = strdiffidx;\nexports.oidtohex = oidtohex;\nexports.hextooid = hextooid;\nexports.strpad = strpad;\nexports.bitstrtoint = bitstrtoint;\nexports.inttobitstr = inttobitstr; // name spaces\n\nexports.KJUR = KJUR;\nexports.crypto = KJUR.crypto;\nexports.asn1 = KJUR.asn1;\nexports.jws = KJUR.jws;\nexports.lang = KJUR.lang;","function _typeof2(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\n/*!\n * clipboard.js v2.0.8\n * https://clipboardjs.com/\n *\n * Licensed MIT © Zeno Rocha\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof2(exports)) === 'object' && (typeof module === \"undefined\" ? \"undefined\" : _typeof2(module)) === 'object') module.exports = factory();else if (typeof define === 'function' && define.amd) define([], factory);else if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof2(exports)) === 'object') exports[\"ClipboardJS\"] = factory();else root[\"ClipboardJS\"] = factory();\n})(this, function () {\n return (\n /******/\n function () {\n // webpackBootstrap\n\n /******/\n var __webpack_modules__ = {\n /***/\n 134:\n /***/\n function _(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n \"use strict\"; // EXPORTS\n\n __webpack_require__.d(__webpack_exports__, {\n \"default\": function _default() {\n return (\n /* binding */\n clipboard\n );\n }\n }); // EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js\n\n\n var tiny_emitter = __webpack_require__(279);\n\n var tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter); // EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js\n\n\n var listen = __webpack_require__(370);\n\n var listen_default = /*#__PURE__*/__webpack_require__.n(listen); // EXTERNAL MODULE: ./node_modules/select/src/select.js\n\n\n var src_select = __webpack_require__(817);\n\n var select_default = /*#__PURE__*/__webpack_require__.n(src_select);\n\n ; // CONCATENATED MODULE: ./src/clipboard-action.js\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _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 Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n /**\n * Inner class which performs selection from either `text` or `target`\n * properties and then executes copy or cut operations.\n */\n\n\n var ClipboardAction = /*#__PURE__*/function () {\n /**\n * @param {Object} options\n */\n function ClipboardAction(options) {\n _classCallCheck(this, ClipboardAction);\n\n this.resolveOptions(options);\n this.initSelection();\n }\n /**\n * Defines base properties passed from constructor.\n * @param {Object} options\n */\n\n\n _createClass(ClipboardAction, [{\n key: \"resolveOptions\",\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.action = options.action;\n this.container = options.container;\n this.emitter = options.emitter;\n this.target = options.target;\n this.text = options.text;\n this.trigger = options.trigger;\n this.selectedText = '';\n }\n /**\n * Decides which selection strategy is going to be applied based\n * on the existence of `text` and `target` properties.\n */\n\n }, {\n key: \"initSelection\",\n value: function initSelection() {\n if (this.text) {\n this.selectFake();\n } else if (this.target) {\n this.selectTarget();\n }\n }\n /**\n * Creates a fake textarea element, sets its value from `text` property,\n */\n\n }, {\n key: \"createFakeElement\",\n value: function createFakeElement() {\n var isRTL = document.documentElement.getAttribute('dir') === 'rtl';\n this.fakeElem = document.createElement('textarea'); // Prevent zooming on iOS\n\n this.fakeElem.style.fontSize = '12pt'; // Reset box model\n\n this.fakeElem.style.border = '0';\n this.fakeElem.style.padding = '0';\n this.fakeElem.style.margin = '0'; // Move element out of screen horizontally\n\n this.fakeElem.style.position = 'absolute';\n this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px'; // Move element to the same position vertically\n\n var yPosition = window.pageYOffset || document.documentElement.scrollTop;\n this.fakeElem.style.top = \"\".concat(yPosition, \"px\");\n this.fakeElem.setAttribute('readonly', '');\n this.fakeElem.value = this.text;\n return this.fakeElem;\n }\n /**\n * Get's the value of fakeElem,\n * and makes a selection on it.\n */\n\n }, {\n key: \"selectFake\",\n value: function selectFake() {\n var _this = this;\n\n var fakeElem = this.createFakeElement();\n\n this.fakeHandlerCallback = function () {\n return _this.removeFake();\n };\n\n this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || true;\n this.container.appendChild(fakeElem);\n this.selectedText = select_default()(fakeElem);\n this.copyText();\n this.removeFake();\n }\n /**\n * Only removes the fake element after another click event, that way\n * a user can hit `Ctrl+C` to copy because selection still exists.\n */\n\n }, {\n key: \"removeFake\",\n value: function removeFake() {\n if (this.fakeHandler) {\n this.container.removeEventListener('click', this.fakeHandlerCallback);\n this.fakeHandler = null;\n this.fakeHandlerCallback = null;\n }\n\n if (this.fakeElem) {\n this.container.removeChild(this.fakeElem);\n this.fakeElem = null;\n }\n }\n /**\n * Selects the content from element passed on `target` property.\n */\n\n }, {\n key: \"selectTarget\",\n value: function selectTarget() {\n this.selectedText = select_default()(this.target);\n this.copyText();\n }\n /**\n * Executes the copy operation based on the current selection.\n */\n\n }, {\n key: \"copyText\",\n value: function copyText() {\n var succeeded;\n\n try {\n succeeded = document.execCommand(this.action);\n } catch (err) {\n succeeded = false;\n }\n\n this.handleResult(succeeded);\n }\n /**\n * Fires an event based on the copy operation result.\n * @param {Boolean} succeeded\n */\n\n }, {\n key: \"handleResult\",\n value: function handleResult(succeeded) {\n this.emitter.emit(succeeded ? 'success' : 'error', {\n action: this.action,\n text: this.selectedText,\n trigger: this.trigger,\n clearSelection: this.clearSelection.bind(this)\n });\n }\n /**\n * Moves focus away from `target` and back to the trigger, removes current selection.\n */\n\n }, {\n key: \"clearSelection\",\n value: function clearSelection() {\n if (this.trigger) {\n this.trigger.focus();\n }\n\n document.activeElement.blur();\n window.getSelection().removeAllRanges();\n }\n /**\n * Sets the `action` to be performed which can be either 'copy' or 'cut'.\n * @param {String} action\n */\n\n }, {\n key: \"destroy\",\n\n /**\n * Destroy lifecycle.\n */\n value: function destroy() {\n this.removeFake();\n }\n }, {\n key: \"action\",\n set: function set() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy';\n this._action = action;\n\n if (this._action !== 'copy' && this._action !== 'cut') {\n throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n }\n }\n /**\n * Gets the `action` property.\n * @return {String}\n */\n ,\n get: function get() {\n return this._action;\n }\n /**\n * Sets the `target` property using an element\n * that will be have its content copied.\n * @param {Element} target\n */\n\n }, {\n key: \"target\",\n set: function set(target) {\n if (target !== undefined) {\n if (target && _typeof(target) === 'object' && target.nodeType === 1) {\n if (this.action === 'copy' && target.hasAttribute('disabled')) {\n throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n }\n\n if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {\n throw new Error('Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes');\n }\n\n this._target = target;\n } else {\n throw new Error('Invalid \"target\" value, use a valid Element');\n }\n }\n }\n /**\n * Gets the `target` property.\n * @return {String|HTMLElement}\n */\n ,\n get: function get() {\n return this._target;\n }\n }]);\n\n return ClipboardAction;\n }();\n /* harmony default export */\n\n\n var clipboard_action = ClipboardAction;\n ; // CONCATENATED MODULE: ./src/clipboard.js\n\n function clipboard_typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n clipboard_typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n clipboard_typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return clipboard_typeof(obj);\n }\n\n function clipboard_classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function clipboard_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 Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function clipboard_createClass(Constructor, protoProps, staticProps) {\n if (protoProps) clipboard_defineProperties(Constructor.prototype, protoProps);\n if (staticProps) clipboard_defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _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\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n }\n\n function _possibleConstructorReturn(self, call) {\n if (call && (clipboard_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n }\n\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\n function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n /**\n * Helper function to retrieve attribute value.\n * @param {String} suffix\n * @param {Element} element\n */\n\n\n function getAttributeValue(suffix, element) {\n var attribute = \"data-clipboard-\".concat(suffix);\n\n if (!element.hasAttribute(attribute)) {\n return;\n }\n\n return element.getAttribute(attribute);\n }\n /**\n * Base class which takes one or more elements, adds event listeners to them,\n * and instantiates a new `ClipboardAction` on each click.\n */\n\n\n var Clipboard = /*#__PURE__*/function (_Emitter) {\n _inherits(Clipboard, _Emitter);\n\n var _super = _createSuper(Clipboard);\n /**\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n * @param {Object} options\n */\n\n\n function Clipboard(trigger, options) {\n var _this;\n\n clipboard_classCallCheck(this, Clipboard);\n _this = _super.call(this);\n\n _this.resolveOptions(options);\n\n _this.listenClick(trigger);\n\n return _this;\n }\n /**\n * Defines if attributes would be resolved using internal setter functions\n * or custom functions that were passed in the constructor.\n * @param {Object} options\n */\n\n\n clipboard_createClass(Clipboard, [{\n key: \"resolveOptions\",\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.action = typeof options.action === 'function' ? options.action : this.defaultAction;\n this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;\n this.text = typeof options.text === 'function' ? options.text : this.defaultText;\n this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;\n }\n /**\n * Adds a click event listener to the passed trigger.\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n */\n\n }, {\n key: \"listenClick\",\n value: function listenClick(trigger) {\n var _this2 = this;\n\n this.listener = listen_default()(trigger, 'click', function (e) {\n return _this2.onClick(e);\n });\n }\n /**\n * Defines a new `ClipboardAction` on each click event.\n * @param {Event} e\n */\n\n }, {\n key: \"onClick\",\n value: function onClick(e) {\n var trigger = e.delegateTarget || e.currentTarget;\n\n if (this.clipboardAction) {\n this.clipboardAction = null;\n }\n\n this.clipboardAction = new clipboard_action({\n action: this.action(trigger),\n target: this.target(trigger),\n text: this.text(trigger),\n container: this.container,\n trigger: trigger,\n emitter: this\n });\n }\n /**\n * Default `action` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultAction\",\n value: function defaultAction(trigger) {\n return getAttributeValue('action', trigger);\n }\n /**\n * Default `target` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: \"defaultTarget\",\n value: function defaultTarget(trigger) {\n var selector = getAttributeValue('target', trigger);\n\n if (selector) {\n return document.querySelector(selector);\n }\n }\n /**\n * Returns the support of the given action, or all actions if no action is\n * given.\n * @param {String} [action]\n */\n\n }, {\n key: \"defaultText\",\n\n /**\n * Default `text` lookup function.\n * @param {Element} trigger\n */\n value: function defaultText(trigger) {\n return getAttributeValue('text', trigger);\n }\n /**\n * Destroy lifecycle.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.listener.destroy();\n\n if (this.clipboardAction) {\n this.clipboardAction.destroy();\n this.clipboardAction = null;\n }\n }\n }], [{\n key: \"isSupported\",\n value: function isSupported() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];\n var actions = typeof action === 'string' ? [action] : action;\n var support = !!document.queryCommandSupported;\n actions.forEach(function (action) {\n support = support && !!document.queryCommandSupported(action);\n });\n return support;\n }\n }]);\n return Clipboard;\n }(tiny_emitter_default());\n /* harmony default export */\n\n\n var clipboard = Clipboard;\n /***/\n },\n\n /***/\n 828:\n /***/\n function _(module) {\n var DOCUMENT_NODE_TYPE = 9;\n /**\n * A polyfill for Element.matches()\n */\n\n if (typeof Element !== 'undefined' && !Element.prototype.matches) {\n var proto = Element.prototype;\n proto.matches = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector;\n }\n /**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\n\n\n function closest(element, selector) {\n while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n if (typeof element.matches === 'function' && element.matches(selector)) {\n return element;\n }\n\n element = element.parentNode;\n }\n }\n\n module.exports = closest;\n /***/\n },\n\n /***/\n 438:\n /***/\n function _(module, __unused_webpack_exports, __webpack_require__) {\n var closest = __webpack_require__(828);\n /**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\n\n\n function _delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n element.addEventListener(type, listenerFn, useCapture);\n return {\n destroy: function destroy() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n };\n }\n /**\n * Delegates event to a selector.\n *\n * @param {Element|String|Array} [elements]\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\n\n\n function delegate(elements, selector, type, callback, useCapture) {\n // Handle the regular Element usage\n if (typeof elements.addEventListener === 'function') {\n return _delegate.apply(null, arguments);\n } // Handle Element-less usage, it defaults to global delegation\n\n\n if (typeof type === 'function') {\n // Use `document` as the first parameter, then apply arguments\n // This is a short way to .unshift `arguments` without running into deoptimizations\n return _delegate.bind(null, document).apply(null, arguments);\n } // Handle Selector-based usage\n\n\n if (typeof elements === 'string') {\n elements = document.querySelectorAll(elements);\n } // Handle Array-like based usage\n\n\n return Array.prototype.map.call(elements, function (element) {\n return _delegate(element, selector, type, callback, useCapture);\n });\n }\n /**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\n\n\n function listener(element, selector, type, callback) {\n return function (e) {\n e.delegateTarget = closest(e.target, selector);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n };\n }\n\n module.exports = delegate;\n /***/\n },\n\n /***/\n 879:\n /***/\n function _(__unused_webpack_module, exports) {\n /**\n * Check if argument is a HTML element.\n *\n * @param {Object} value\n * @return {Boolean}\n */\n exports.node = function (value) {\n return value !== undefined && value instanceof HTMLElement && value.nodeType === 1;\n };\n /**\n * Check if argument is a list of HTML elements.\n *\n * @param {Object} value\n * @return {Boolean}\n */\n\n\n exports.nodeList = function (value) {\n var type = Object.prototype.toString.call(value);\n return value !== undefined && (type === '[object NodeList]' || type === '[object HTMLCollection]') && 'length' in value && (value.length === 0 || exports.node(value[0]));\n };\n /**\n * Check if argument is a string.\n *\n * @param {Object} value\n * @return {Boolean}\n */\n\n\n exports.string = function (value) {\n return typeof value === 'string' || value instanceof String;\n };\n /**\n * Check if argument is a function.\n *\n * @param {Object} value\n * @return {Boolean}\n */\n\n\n exports.fn = function (value) {\n var type = Object.prototype.toString.call(value);\n return type === '[object Function]';\n };\n /***/\n\n },\n\n /***/\n 370:\n /***/\n function _(module, __unused_webpack_exports, __webpack_require__) {\n var is = __webpack_require__(879);\n\n var delegate = __webpack_require__(438);\n /**\n * Validates all params and calls the right\n * listener function based on its target type.\n *\n * @param {String|HTMLElement|HTMLCollection|NodeList} target\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\n\n\n function listen(target, type, callback) {\n if (!target && !type && !callback) {\n throw new Error('Missing required arguments');\n }\n\n if (!is.string(type)) {\n throw new TypeError('Second argument must be a String');\n }\n\n if (!is.fn(callback)) {\n throw new TypeError('Third argument must be a Function');\n }\n\n if (is.node(target)) {\n return listenNode(target, type, callback);\n } else if (is.nodeList(target)) {\n return listenNodeList(target, type, callback);\n } else if (is.string(target)) {\n return listenSelector(target, type, callback);\n } else {\n throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n }\n }\n /**\n * Adds an event listener to a HTML element\n * and returns a remove listener function.\n *\n * @param {HTMLElement} node\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\n\n\n function listenNode(node, type, callback) {\n node.addEventListener(type, callback);\n return {\n destroy: function destroy() {\n node.removeEventListener(type, callback);\n }\n };\n }\n /**\n * Add an event listener to a list of HTML elements\n * and returns a remove listener function.\n *\n * @param {NodeList|HTMLCollection} nodeList\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\n\n\n function listenNodeList(nodeList, type, callback) {\n Array.prototype.forEach.call(nodeList, function (node) {\n node.addEventListener(type, callback);\n });\n return {\n destroy: function destroy() {\n Array.prototype.forEach.call(nodeList, function (node) {\n node.removeEventListener(type, callback);\n });\n }\n };\n }\n /**\n * Add an event listener to a selector\n * and returns a remove listener function.\n *\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\n\n\n function listenSelector(selector, type, callback) {\n return delegate(document.body, selector, type, callback);\n }\n\n module.exports = listen;\n /***/\n },\n\n /***/\n 817:\n /***/\n function _(module) {\n function select(element) {\n var selectedText;\n\n if (element.nodeName === 'SELECT') {\n element.focus();\n selectedText = element.value;\n } else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n var isReadOnly = element.hasAttribute('readonly');\n\n if (!isReadOnly) {\n element.setAttribute('readonly', '');\n }\n\n element.select();\n element.setSelectionRange(0, element.value.length);\n\n if (!isReadOnly) {\n element.removeAttribute('readonly');\n }\n\n selectedText = element.value;\n } else {\n if (element.hasAttribute('contenteditable')) {\n element.focus();\n }\n\n var selection = window.getSelection();\n var range = document.createRange();\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n selectedText = selection.toString();\n }\n\n return selectedText;\n }\n\n module.exports = select;\n /***/\n },\n\n /***/\n 279:\n /***/\n function _(module) {\n function E() {// Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n }\n\n E.prototype = {\n on: function on(name, callback, ctx) {\n var e = this.e || (this.e = {});\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n return this;\n },\n once: function once(name, callback, ctx) {\n var self = this;\n\n function listener() {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n }\n\n ;\n listener._ = callback;\n return this.on(name, listener, ctx);\n },\n emit: function emit(name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n\n return this;\n },\n off: function off(name, callback) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n\n if (evts && callback) {\n for (var i = 0, len = evts.length; i < len; i++) {\n if (evts[i].fn !== callback && evts[i].fn._ !== callback) liveEvents.push(evts[i]);\n }\n } // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n\n liveEvents.length ? e[name] = liveEvents : delete e[name];\n return this;\n }\n };\n module.exports = E;\n module.exports.TinyEmitter = E;\n /***/\n }\n /******/\n\n };\n /************************************************************************/\n\n /******/\n // The module cache\n\n /******/\n\n var __webpack_module_cache__ = {};\n /******/\n\n /******/\n // The require function\n\n /******/\n\n function __webpack_require__(moduleId) {\n /******/\n // Check if module is in cache\n\n /******/\n if (__webpack_module_cache__[moduleId]) {\n /******/\n return __webpack_module_cache__[moduleId].exports;\n /******/\n }\n /******/\n // Create a new module (and put it into the cache)\n\n /******/\n\n\n var module = __webpack_module_cache__[moduleId] = {\n /******/\n // no module.id needed\n\n /******/\n // no module.loaded needed\n\n /******/\n exports: {}\n /******/\n\n };\n /******/\n\n /******/\n // Execute the module function\n\n /******/\n\n __webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n /******/\n\n /******/\n // Return the exports of the module\n\n /******/\n\n\n return module.exports;\n /******/\n }\n /******/\n\n /************************************************************************/\n\n /******/\n\n /* webpack/runtime/compat get default export */\n\n /******/\n\n\n !function () {\n /******/\n // getDefaultExport function for compatibility with non-harmony modules\n\n /******/\n __webpack_require__.n = function (module) {\n /******/\n var getter = module && module.__esModule ?\n /******/\n function () {\n return module['default'];\n } :\n /******/\n function () {\n return module;\n };\n /******/\n\n __webpack_require__.d(getter, {\n a: getter\n });\n /******/\n\n\n return getter;\n /******/\n };\n /******/\n\n }();\n /******/\n\n /******/\n\n /* webpack/runtime/define property getters */\n\n /******/\n\n !function () {\n /******/\n // define getter functions for harmony exports\n\n /******/\n __webpack_require__.d = function (exports, definition) {\n /******/\n for (var key in definition) {\n /******/\n if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n /******/\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: definition[key]\n });\n /******/\n }\n /******/\n\n }\n /******/\n\n };\n /******/\n\n }();\n /******/\n\n /******/\n\n /* webpack/runtime/hasOwnProperty shorthand */\n\n /******/\n\n !function () {\n /******/\n __webpack_require__.o = function (obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n };\n /******/\n\n }();\n /******/\n\n /************************************************************************/\n\n /******/\n // module exports must be returned from runtime so entry inlining is disabled\n\n /******/\n // startup\n\n /******/\n // Load entry module and return exports\n\n /******/\n\n return __webpack_require__(134);\n /******/\n }()[\"default\"]\n );\n});","'use strict';\n\nvar utils = require('./utils');\n\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {\n return data;\n }\n\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n\n return data;\n }],\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) {\n /* Ignore */\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n maxContentLength: -1,\n maxBodyLength: -1,\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\nmodule.exports = defaults;","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\n\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n this.clear();\n\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n} // Add methods to `MapCache`.\n\n\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\nmodule.exports = MapCache;","var getNative = require('./_getNative'),\n root = require('./_root');\n/* Built-in method references that are verified to be native. */\n\n\nvar Map = getNative(root, 'Map');\nmodule.exports = Map;","var baseIndexOf = require('./_baseIndexOf');\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n\n\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n\n return false;\n}\n\nmodule.exports = arrayIncludesWith;","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function () {\n return value;\n };\n}\n\nmodule.exports = constant;","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n\n return array;\n}\n\nmodule.exports = arrayPush;","/**\n * Copyright (c) 2014, Chris Pettitt\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its contributors\n * may be used to endorse or promote products derived from this software without\n * specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar lib = require(\"./lib\");\n\nmodule.exports = {\n Graph: lib.Graph,\n json: require(\"./lib/json\"),\n alg: require(\"./lib/alg\"),\n version: lib.version\n};","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar _ = require(\"./lodash\");\n\nmodule.exports = Graph;\nvar DEFAULT_EDGE_NAME = \"\\x00\";\nvar GRAPH_NODE = \"\\x00\";\nvar EDGE_KEY_DELIM = \"\\x01\"; // Implementation notes:\n//\n// * Node id query functions should return string ids for the nodes\n// * Edge id query functions should return an \"edgeObj\", edge object, that is\n// composed of enough information to uniquely identify an edge: {v, w, name}.\n// * Internally we use an \"edgeId\", a stringified form of the edgeObj, to\n// reference edges. This is because we need a performant way to look these\n// edges up and, object properties, which have string keys, are the closest\n// we're going to get to a performant hashtable in JavaScript.\n\nfunction Graph(opts) {\n this._isDirected = _.has(opts, \"directed\") ? opts.directed : true;\n this._isMultigraph = _.has(opts, \"multigraph\") ? opts.multigraph : false;\n this._isCompound = _.has(opts, \"compound\") ? opts.compound : false; // Label for the graph itself\n\n this._label = undefined; // Defaults to be set when creating a new node\n\n this._defaultNodeLabelFn = _.constant(undefined); // Defaults to be set when creating a new edge\n\n this._defaultEdgeLabelFn = _.constant(undefined); // v -> label\n\n this._nodes = {};\n\n if (this._isCompound) {\n // v -> parent\n this._parent = {}; // v -> children\n\n this._children = {};\n this._children[GRAPH_NODE] = {};\n } // v -> edgeObj\n\n\n this._in = {}; // u -> v -> Number\n\n this._preds = {}; // v -> edgeObj\n\n this._out = {}; // v -> w -> Number\n\n this._sucs = {}; // e -> edgeObj\n\n this._edgeObjs = {}; // e -> label\n\n this._edgeLabels = {};\n}\n/* Number of nodes in the graph. Should only be changed by the implementation. */\n\n\nGraph.prototype._nodeCount = 0;\n/* Number of edges in the graph. Should only be changed by the implementation. */\n\nGraph.prototype._edgeCount = 0;\n/* === Graph functions ========= */\n\nGraph.prototype.isDirected = function () {\n return this._isDirected;\n};\n\nGraph.prototype.isMultigraph = function () {\n return this._isMultigraph;\n};\n\nGraph.prototype.isCompound = function () {\n return this._isCompound;\n};\n\nGraph.prototype.setGraph = function (label) {\n this._label = label;\n return this;\n};\n\nGraph.prototype.graph = function () {\n return this._label;\n};\n/* === Node functions ========== */\n\n\nGraph.prototype.setDefaultNodeLabel = function (newDefault) {\n if (!_.isFunction(newDefault)) {\n newDefault = _.constant(newDefault);\n }\n\n this._defaultNodeLabelFn = newDefault;\n return this;\n};\n\nGraph.prototype.nodeCount = function () {\n return this._nodeCount;\n};\n\nGraph.prototype.nodes = function () {\n return _.keys(this._nodes);\n};\n\nGraph.prototype.sources = function () {\n var self = this;\n return _.filter(this.nodes(), function (v) {\n return _.isEmpty(self._in[v]);\n });\n};\n\nGraph.prototype.sinks = function () {\n var self = this;\n return _.filter(this.nodes(), function (v) {\n return _.isEmpty(self._out[v]);\n });\n};\n\nGraph.prototype.setNodes = function (vs, value) {\n var args = arguments;\n var self = this;\n\n _.each(vs, function (v) {\n if (args.length > 1) {\n self.setNode(v, value);\n } else {\n self.setNode(v);\n }\n });\n\n return this;\n};\n\nGraph.prototype.setNode = function (v, value) {\n if (_.has(this._nodes, v)) {\n if (arguments.length > 1) {\n this._nodes[v] = value;\n }\n\n return this;\n }\n\n this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v);\n\n if (this._isCompound) {\n this._parent[v] = GRAPH_NODE;\n this._children[v] = {};\n this._children[GRAPH_NODE][v] = true;\n }\n\n this._in[v] = {};\n this._preds[v] = {};\n this._out[v] = {};\n this._sucs[v] = {};\n ++this._nodeCount;\n return this;\n};\n\nGraph.prototype.node = function (v) {\n return this._nodes[v];\n};\n\nGraph.prototype.hasNode = function (v) {\n return _.has(this._nodes, v);\n};\n\nGraph.prototype.removeNode = function (v) {\n var self = this;\n\n if (_.has(this._nodes, v)) {\n var removeEdge = function removeEdge(e) {\n self.removeEdge(self._edgeObjs[e]);\n };\n\n delete this._nodes[v];\n\n if (this._isCompound) {\n this._removeFromParentsChildList(v);\n\n delete this._parent[v];\n\n _.each(this.children(v), function (child) {\n self.setParent(child);\n });\n\n delete this._children[v];\n }\n\n _.each(_.keys(this._in[v]), removeEdge);\n\n delete this._in[v];\n delete this._preds[v];\n\n _.each(_.keys(this._out[v]), removeEdge);\n\n delete this._out[v];\n delete this._sucs[v];\n --this._nodeCount;\n }\n\n return this;\n};\n\nGraph.prototype.setParent = function (v, parent) {\n if (!this._isCompound) {\n throw new Error(\"Cannot set parent in a non-compound graph\");\n }\n\n if (_.isUndefined(parent)) {\n parent = GRAPH_NODE;\n } else {\n // Coerce parent to string\n parent += \"\";\n\n for (var ancestor = parent; !_.isUndefined(ancestor); ancestor = this.parent(ancestor)) {\n if (ancestor === v) {\n throw new Error(\"Setting \" + parent + \" as parent of \" + v + \" would create a cycle\");\n }\n }\n\n this.setNode(parent);\n }\n\n this.setNode(v);\n\n this._removeFromParentsChildList(v);\n\n this._parent[v] = parent;\n this._children[parent][v] = true;\n return this;\n};\n\nGraph.prototype._removeFromParentsChildList = function (v) {\n delete this._children[this._parent[v]][v];\n};\n\nGraph.prototype.parent = function (v) {\n if (this._isCompound) {\n var parent = this._parent[v];\n\n if (parent !== GRAPH_NODE) {\n return parent;\n }\n }\n};\n\nGraph.prototype.children = function (v) {\n if (_.isUndefined(v)) {\n v = GRAPH_NODE;\n }\n\n if (this._isCompound) {\n var children = this._children[v];\n\n if (children) {\n return _.keys(children);\n }\n } else if (v === GRAPH_NODE) {\n return this.nodes();\n } else if (this.hasNode(v)) {\n return [];\n }\n};\n\nGraph.prototype.predecessors = function (v) {\n var predsV = this._preds[v];\n\n if (predsV) {\n return _.keys(predsV);\n }\n};\n\nGraph.prototype.successors = function (v) {\n var sucsV = this._sucs[v];\n\n if (sucsV) {\n return _.keys(sucsV);\n }\n};\n\nGraph.prototype.neighbors = function (v) {\n var preds = this.predecessors(v);\n\n if (preds) {\n return _.union(preds, this.successors(v));\n }\n};\n\nGraph.prototype.isLeaf = function (v) {\n var neighbors;\n\n if (this.isDirected()) {\n neighbors = this.successors(v);\n } else {\n neighbors = this.neighbors(v);\n }\n\n return neighbors.length === 0;\n};\n\nGraph.prototype.filterNodes = function (filter) {\n var copy = new this.constructor({\n directed: this._isDirected,\n multigraph: this._isMultigraph,\n compound: this._isCompound\n });\n copy.setGraph(this.graph());\n var self = this;\n\n _.each(this._nodes, function (value, v) {\n if (filter(v)) {\n copy.setNode(v, value);\n }\n });\n\n _.each(this._edgeObjs, function (e) {\n if (copy.hasNode(e.v) && copy.hasNode(e.w)) {\n copy.setEdge(e, self.edge(e));\n }\n });\n\n var parents = {};\n\n function findParent(v) {\n var parent = self.parent(v);\n\n if (parent === undefined || copy.hasNode(parent)) {\n parents[v] = parent;\n return parent;\n } else if (parent in parents) {\n return parents[parent];\n } else {\n return findParent(parent);\n }\n }\n\n if (this._isCompound) {\n _.each(copy.nodes(), function (v) {\n copy.setParent(v, findParent(v));\n });\n }\n\n return copy;\n};\n/* === Edge functions ========== */\n\n\nGraph.prototype.setDefaultEdgeLabel = function (newDefault) {\n if (!_.isFunction(newDefault)) {\n newDefault = _.constant(newDefault);\n }\n\n this._defaultEdgeLabelFn = newDefault;\n return this;\n};\n\nGraph.prototype.edgeCount = function () {\n return this._edgeCount;\n};\n\nGraph.prototype.edges = function () {\n return _.values(this._edgeObjs);\n};\n\nGraph.prototype.setPath = function (vs, value) {\n var self = this;\n var args = arguments;\n\n _.reduce(vs, function (v, w) {\n if (args.length > 1) {\n self.setEdge(v, w, value);\n } else {\n self.setEdge(v, w);\n }\n\n return w;\n });\n\n return this;\n};\n/*\n * setEdge(v, w, [value, [name]])\n * setEdge({ v, w, [name] }, [value])\n */\n\n\nGraph.prototype.setEdge = function () {\n var v, w, name, value;\n var valueSpecified = false;\n var arg0 = arguments[0];\n\n if (_typeof(arg0) === \"object\" && arg0 !== null && \"v\" in arg0) {\n v = arg0.v;\n w = arg0.w;\n name = arg0.name;\n\n if (arguments.length === 2) {\n value = arguments[1];\n valueSpecified = true;\n }\n } else {\n v = arg0;\n w = arguments[1];\n name = arguments[3];\n\n if (arguments.length > 2) {\n value = arguments[2];\n valueSpecified = true;\n }\n }\n\n v = \"\" + v;\n w = \"\" + w;\n\n if (!_.isUndefined(name)) {\n name = \"\" + name;\n }\n\n var e = edgeArgsToId(this._isDirected, v, w, name);\n\n if (_.has(this._edgeLabels, e)) {\n if (valueSpecified) {\n this._edgeLabels[e] = value;\n }\n\n return this;\n }\n\n if (!_.isUndefined(name) && !this._isMultigraph) {\n throw new Error(\"Cannot set a named edge when isMultigraph = false\");\n } // It didn't exist, so we need to create it.\n // First ensure the nodes exist.\n\n\n this.setNode(v);\n this.setNode(w);\n this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name);\n var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); // Ensure we add undirected edges in a consistent way.\n\n v = edgeObj.v;\n w = edgeObj.w;\n Object.freeze(edgeObj);\n this._edgeObjs[e] = edgeObj;\n incrementOrInitEntry(this._preds[w], v);\n incrementOrInitEntry(this._sucs[v], w);\n this._in[w][e] = edgeObj;\n this._out[v][e] = edgeObj;\n this._edgeCount++;\n return this;\n};\n\nGraph.prototype.edge = function (v, w, name) {\n var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name);\n return this._edgeLabels[e];\n};\n\nGraph.prototype.hasEdge = function (v, w, name) {\n var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name);\n return _.has(this._edgeLabels, e);\n};\n\nGraph.prototype.removeEdge = function (v, w, name) {\n var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name);\n var edge = this._edgeObjs[e];\n\n if (edge) {\n v = edge.v;\n w = edge.w;\n delete this._edgeLabels[e];\n delete this._edgeObjs[e];\n decrementOrRemoveEntry(this._preds[w], v);\n decrementOrRemoveEntry(this._sucs[v], w);\n delete this._in[w][e];\n delete this._out[v][e];\n this._edgeCount--;\n }\n\n return this;\n};\n\nGraph.prototype.inEdges = function (v, u) {\n var inV = this._in[v];\n\n if (inV) {\n var edges = _.values(inV);\n\n if (!u) {\n return edges;\n }\n\n return _.filter(edges, function (edge) {\n return edge.v === u;\n });\n }\n};\n\nGraph.prototype.outEdges = function (v, w) {\n var outV = this._out[v];\n\n if (outV) {\n var edges = _.values(outV);\n\n if (!w) {\n return edges;\n }\n\n return _.filter(edges, function (edge) {\n return edge.w === w;\n });\n }\n};\n\nGraph.prototype.nodeEdges = function (v, w) {\n var inEdges = this.inEdges(v, w);\n\n if (inEdges) {\n return inEdges.concat(this.outEdges(v, w));\n }\n};\n\nfunction incrementOrInitEntry(map, k) {\n if (map[k]) {\n map[k]++;\n } else {\n map[k] = 1;\n }\n}\n\nfunction decrementOrRemoveEntry(map, k) {\n if (! --map[k]) {\n delete map[k];\n }\n}\n\nfunction edgeArgsToId(isDirected, v_, w_, name) {\n var v = \"\" + v_;\n var w = \"\" + w_;\n\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n\n return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name);\n}\n\nfunction edgeArgsToObj(isDirected, v_, w_, name) {\n var v = \"\" + v_;\n var w = \"\" + w_;\n\n if (!isDirected && v > w) {\n var tmp = v;\n v = w;\n w = tmp;\n }\n\n var edgeObj = {\n v: v,\n w: w\n };\n\n if (name) {\n edgeObj.name = name;\n }\n\n return edgeObj;\n}\n\nfunction edgeObjToId(isDirected, edgeObj) {\n return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name);\n}","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n\n return array;\n}\n\nmodule.exports = arrayEach;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar freeGlobal = require('./_freeGlobal');\n/** Detect free variable `exports`. */\n\n\nvar freeExports = (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;\n/** Detect free variable `module`. */\n\nvar freeModule = freeExports && (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) == 'object' && module && !module.nodeType && module;\n/** Detect the popular CommonJS extension `module.exports`. */\n\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n/** Detect free variable `process` from Node.js. */\n\nvar freeProcess = moduleExports && freeGlobal.process;\n/** Used to access faster Node.js helpers. */\n\nvar nodeUtil = function () {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n } // Legacy `process.binding('util')` for Node.js < 10.\n\n\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}();\n\nmodule.exports = nodeUtil;","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n\n var result = [];\n\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n\n return result;\n}\n\nmodule.exports = baseKeys;","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Built-in value references. */\n\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n\nvar getSymbols = !nativeGetSymbols ? stubArray : function (object) {\n if (object == null) {\n return [];\n }\n\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function (symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\nmodule.exports = getSymbols;","var Uint8Array = require('./_Uint8Array');\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n\n\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;","module.exports = require('./forEach');","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n\n\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;","var createBaseFor = require('./_createBaseFor');\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n\n\nvar baseFor = createBaseFor();\nmodule.exports = baseFor;","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n set.forEach(function (value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n/** Used to match property names within property paths. */\n\n\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n\n var type = _typeof(value);\n\n if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {\n return true;\n }\n\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);\n}\n\nmodule.exports = isKey;","var baseHas = require('./_baseHas'),\n hasPath = require('./_hasPath');\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n\n\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nmodule.exports = has;","var isSymbol = require('./isSymbol');\n/**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n\n\nfunction baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined ? current === current && !isSymbol(current) : comparator(current, computed))) {\n var computed = current,\n result = value;\n }\n }\n\n return result;\n}\n\nmodule.exports = baseExtremum;","module.exports = intersectEllipse;\n\nfunction intersectEllipse(node, rx, ry, point) {\n // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html\n var cx = node.x;\n var cy = node.y;\n var px = cx - point.x;\n var py = cy - point.y;\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n var dx = Math.abs(rx * ry * px / det);\n\n if (point.x < cx) {\n dx = -dx;\n }\n\n var dy = Math.abs(rx * ry * py / det);\n\n if (point.y < cy) {\n dy = -dy;\n }\n\n return {\n x: cx + dx,\n y: cy + dy\n };\n}","var addTextLabel = require(\"./add-text-label\");\n\nvar addHtmlLabel = require(\"./add-html-label\");\n\nvar addSVGLabel = require(\"./add-svg-label\");\n\nmodule.exports = addLabel;\n\nfunction addLabel(root, node, location) {\n var label = node.label;\n var labelSvg = root.append(\"g\"); // Allow the label to be a string, a function that returns a DOM element, or\n // a DOM element itself.\n\n if (node.labelType === \"svg\") {\n addSVGLabel(labelSvg, node);\n } else if (typeof label !== \"string\" || node.labelType === \"html\") {\n addHtmlLabel(labelSvg, node);\n } else {\n addTextLabel(labelSvg, node);\n }\n\n var labelBBox = labelSvg.node().getBBox();\n var y;\n\n switch (location) {\n case \"top\":\n y = -node.height / 2;\n break;\n\n case \"bottom\":\n y = node.height / 2 - labelBBox.height;\n break;\n\n default:\n y = -labelBBox.height / 2;\n }\n\n labelSvg.attr(\"transform\", \"translate(\" + -labelBBox.width / 2 + \",\" + y + \")\");\n return labelSvg;\n}","\"use strict\";\n/* ENUMS */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar TYPE;\n\n(function (TYPE) {\n TYPE[TYPE[\"ALL\"] = 0] = \"ALL\";\n TYPE[TYPE[\"RGB\"] = 1] = \"RGB\";\n TYPE[TYPE[\"HSL\"] = 2] = \"HSL\";\n})(TYPE || (TYPE = {}));\n\nexports.TYPE = TYPE;\n;","module.exports = __webpack_public_path__ + \"media/logos/Vonage-api-f5f267d7.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-api--white-faaff4ce.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-api-changelog-d65d1f06.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-api-changelog--white-1bd97f04.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-api-dashboard-vert-8af86a96.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-api-dashboard-vert--white-1dfad70d.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-api-developer-5f94c73a.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-api-developer--white-e98b9c90.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-api-support-9a09970e.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-api-support--white-020f27bd.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-apis-1a690a13.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-apis--white-274df3a4.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-developer-aaf580fc.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-developer--white-fa61f085.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-lettermark-c5f4c571.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-lettermark--white-26cdf2d2.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-logo-collapsed-b51e5cfd.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-nexmo-b55cd326.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-nexmo--white-df3a0984.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-nexmo-vert-7b2e755e.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-nexmo-vert--white-53f43ae1.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-tokbox-374d0b2b.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-tokbox--white-588eecf3.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-tokbox-vert-24f66958.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-tokbox-vert--white-3f7376b2.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-video-api-6547ac01.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-video-api--white-ccd1c34e.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-video-api-stacked-2239c1e1.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-video-api-stacked--white-c9449041.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-wordmark-a50689e2.svg\";","module.exports = __webpack_public_path__ + \"media/logos/Vonage-wordmark--white-95eac2b4.svg\";","module.exports = __webpack_public_path__ + \"media/logos/volta-logo-7e38d941.svg\";","module.exports = __webpack_public_path__ + \"media/logos/vonage-logo-4843dbd0.svg\";","module.exports = __webpack_public_path__ + \"media/logos/vonage-logo--white-2a89ec1d.svg\";","module.exports = __webpack_public_path__ + \"media/logos/vonage-logo-collapsed--white-6cd2aa45.svg\";","module.exports = __webpack_public_path__ + \"media/symbol/volta-brand-icons-3670f3c6.svg\";","module.exports = __webpack_public_path__ + \"media/symbol/volta-flag-icons-d7178fe4.svg\";","module.exports = __webpack_public_path__ + \"media/symbol/volta-icons-398d9c47.svg\";","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var af = moment.defineLocale('af', {\n months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'),\n monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'),\n weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n meridiemParse: /vm|nm/i,\n isPM: function isPM(input) {\n return /^nm$/i.test(input);\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'vm' : 'VM';\n } else {\n return isLower ? 'nm' : 'NM';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Vandag om] LT',\n nextDay: '[Môre om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[Gister om] LT',\n lastWeek: '[Laas] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'oor %s',\n past: '%s gelede',\n s: \"'n paar sekondes\",\n ss: '%d sekondes',\n m: \"'n minuut\",\n mm: '%d minute',\n h: \"'n uur\",\n hh: '%d ure',\n d: \"'n dag\",\n dd: '%d dae',\n M: \"'n maand\",\n MM: '%d maande',\n y: \"'n jaar\",\n yy: '%d jaar'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function ordinal(number) {\n return number + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter\n },\n week: {\n dow: 1,\n // Maandag is die eerste dag van die week.\n doy: 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n\n }\n });\n return af;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠'\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0'\n },\n pluralForm = function pluralForm(n) {\n return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n },\n plurals = {\n s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n },\n pluralize = function pluralize(u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n\n return str.replace(/%d/i, number);\n };\n },\n months = ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'];\n\n var ar = moment.defineLocale('ar', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: \"D/\\u200FM/\\u200FYYYY\",\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM: function isPM(input) {\n return 'م' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y')\n },\n preparse: function preparse(string) {\n return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return ar;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic (Algeria) [ar-dz]\n//! author : Amine Roukh: https://github.com/Amine27\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var pluralForm = function pluralForm(n) {\n return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n },\n plurals = {\n s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n },\n pluralize = function pluralize(u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n\n return str.replace(/%d/i, number);\n };\n },\n months = ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان', 'جويلية', 'أوت', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'];\n\n var arDz = moment.defineLocale('ar-dz', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: \"D/\\u200FM/\\u200FYYYY\",\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM: function isPM(input) {\n return 'م' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y')\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return arDz;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic (Kuwait) [ar-kw]\n//! author : Nusret Parlak: https://github.com/nusretparlak\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var arKw = moment.defineLocale('ar-kw', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return arKw;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic (Lybia) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '1',\n 2: '2',\n 3: '3',\n 4: '4',\n 5: '5',\n 6: '6',\n 7: '7',\n 8: '8',\n 9: '9',\n 0: '0'\n },\n pluralForm = function pluralForm(n) {\n return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;\n },\n plurals = {\n s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],\n m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],\n h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],\n d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],\n M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],\n y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']\n },\n pluralize = function pluralize(u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n\n return str.replace(/%d/i, number);\n };\n },\n months = ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'];\n\n var arLy = moment.defineLocale('ar-ly', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: \"D/\\u200FM/\\u200FYYYY\",\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM: function isPM(input) {\n return 'م' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y')\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return arLy;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var arMa = moment.defineLocale('ar-ma', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return arMa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠'\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0'\n };\n var arSa = moment.defineLocale('ar-sa', {\n months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ص|م/,\n isPM: function isPM(input) {\n return 'م' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n preparse: function preparse(string) {\n return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return arSa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var arTn = moment.defineLocale('ar-tn', {\n months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return arTn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var suffixes = {\n 1: '-inci',\n 5: '-inci',\n 8: '-inci',\n 70: '-inci',\n 80: '-inci',\n 2: '-nci',\n 7: '-nci',\n 20: '-nci',\n 50: '-nci',\n 3: '-üncü',\n 4: '-üncü',\n 100: '-üncü',\n 6: '-ncı',\n 9: '-uncu',\n 10: '-uncu',\n 30: '-uncu',\n 60: '-ıncı',\n 90: '-ıncı'\n };\n var az = moment.defineLocale('az', {\n months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'),\n monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'),\n weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[sabah saat] LT',\n nextWeek: '[gələn həftə] dddd [saat] LT',\n lastDay: '[dünən] LT',\n lastWeek: '[keçən həftə] dddd [saat] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s əvvəl',\n s: 'bir neçə saniyə',\n ss: '%d saniyə',\n m: 'bir dəqiqə',\n mm: '%d dəqiqə',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir il',\n yy: '%d il'\n },\n meridiemParse: /gecə|səhər|gündüz|axşam/,\n isPM: function isPM(input) {\n return /^(gündüz|axşam)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'gecə';\n } else if (hour < 12) {\n return 'səhər';\n } else if (hour < 17) {\n return 'gündüz';\n } else {\n return 'axşam';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n ordinal: function ordinal(number) {\n if (number === 0) {\n // special case for zero\n return number + '-ıncı';\n }\n\n var a = number % 10,\n b = number % 100 - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return az;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2];\n }\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n dd: 'дзень_дні_дзён',\n MM: 'месяц_месяцы_месяцаў',\n yy: 'год_гады_гадоў'\n };\n\n if (key === 'm') {\n return withoutSuffix ? 'хвіліна' : 'хвіліну';\n } else if (key === 'h') {\n return withoutSuffix ? 'гадзіна' : 'гадзіну';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n var be = moment.defineLocale('be', {\n months: {\n format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'),\n standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_')\n },\n monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n weekdays: {\n format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'),\n standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'),\n isFormat: /\\[ ?[Ууў] ?(?:мінулую|наступную)? ?\\] ?dddd/\n },\n weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., HH:mm',\n LLLL: 'dddd, D MMMM YYYY г., HH:mm'\n },\n calendar: {\n sameDay: '[Сёння ў] LT',\n nextDay: '[Заўтра ў] LT',\n lastDay: '[Учора ў] LT',\n nextWeek: function nextWeek() {\n return '[У] dddd [ў] LT';\n },\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return '[У мінулую] dddd [ў] LT';\n\n case 1:\n case 2:\n case 4:\n return '[У мінулы] dddd [ў] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'праз %s',\n past: '%s таму',\n s: 'некалькі секунд',\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithPlural,\n hh: relativeTimeWithPlural,\n d: 'дзень',\n dd: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural\n },\n meridiemParse: /ночы|раніцы|дня|вечара/,\n isPM: function isPM(input) {\n return /^(дня|вечара)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ночы';\n } else if (hour < 12) {\n return 'раніцы';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечара';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(і|ы|га)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return (number % 10 === 2 || number % 10 === 3) && number % 100 !== 12 && number % 100 !== 13 ? number + '-і' : number + '-ы';\n\n case 'D':\n return number + '-га';\n\n default:\n return number;\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return be;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var bg = moment.defineLocale('bg', {\n months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),\n monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),\n weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[Днес в] LT',\n nextDay: '[Утре в] LT',\n nextWeek: 'dddd [в] LT',\n lastDay: '[Вчера в] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Миналата] dddd [в] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Миналия] dddd [в] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'след %s',\n past: 'преди %s',\n s: 'няколко секунди',\n ss: '%d секунди',\n m: 'минута',\n mm: '%d минути',\n h: 'час',\n hh: '%d часа',\n d: 'ден',\n dd: '%d дена',\n w: 'седмица',\n ww: '%d седмици',\n M: 'месец',\n MM: '%d месеца',\n y: 'година',\n yy: '%d години'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function ordinal(number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return bg;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Bambara [bm]\n//! author : Estelle Comment : https://github.com/estellecomment\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var bm = moment.defineLocale('bm', {\n months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split('_'),\n monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),\n weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),\n weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),\n weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'MMMM [tile] D [san] YYYY',\n LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm'\n },\n calendar: {\n sameDay: '[Bi lɛrɛ] LT',\n nextDay: '[Sini lɛrɛ] LT',\n nextWeek: 'dddd [don lɛrɛ] LT',\n lastDay: '[Kunu lɛrɛ] LT',\n lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s kɔnɔ',\n past: 'a bɛ %s bɔ',\n s: 'sanga dama dama',\n ss: 'sekondi %d',\n m: 'miniti kelen',\n mm: 'miniti %d',\n h: 'lɛrɛ kelen',\n hh: 'lɛrɛ %d',\n d: 'tile kelen',\n dd: 'tile %d',\n M: 'kalo kelen',\n MM: 'kalo %d',\n y: 'san kelen',\n yy: 'san %d'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return bm;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০'\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0'\n };\n var bn = moment.defineLocale('bn', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),\n monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়'\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর'\n },\n preparse: function preparse(string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'রাত' && hour >= 4 || meridiem === 'দুপুর' && hour < 5 || meridiem === 'বিকাল') {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 10) {\n return 'সকাল';\n } else if (hour < 17) {\n return 'দুপুর';\n } else if (hour < 20) {\n return 'বিকাল';\n } else {\n return 'রাত';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return bn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Bengali (Bangladesh) [bn-bd]\n//! author : Asraf Hossain Patoary : https://github.com/ashwoolford\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০'\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0'\n };\n var bnBd = moment.defineLocale('bn-bd', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),\n monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়'\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর'\n },\n preparse: function preparse(string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'রাত') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ভোর') {\n return hour;\n } else if (meridiem === 'সকাল') {\n return hour;\n } else if (meridiem === 'দুপুর') {\n return hour >= 3 ? hour : hour + 12;\n } else if (meridiem === 'বিকাল') {\n return hour + 12;\n } else if (meridiem === 'সন্ধ্যা') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 6) {\n return 'ভোর';\n } else if (hour < 12) {\n return 'সকাল';\n } else if (hour < 15) {\n return 'দুপুর';\n } else if (hour < 18) {\n return 'বিকাল';\n } else if (hour < 20) {\n return 'সন্ধ্যা';\n } else {\n return 'রাত';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return bnBd;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '༡',\n 2: '༢',\n 3: '༣',\n 4: '༤',\n 5: '༥',\n 6: '༦',\n 7: '༧',\n 8: '༨',\n 9: '༩',\n 0: '༠'\n },\n numberMap = {\n '༡': '1',\n '༢': '2',\n '༣': '3',\n '༤': '4',\n '༥': '5',\n '༦': '6',\n '༧': '7',\n '༨': '8',\n '༩': '9',\n '༠': '0'\n };\n var bo = moment.defineLocale('bo', {\n months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),\n monthsShort: 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split('_'),\n monthsShortRegex: /^(ཟླ་\\d{1,2})/,\n monthsParseExact: true,\n weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'),\n weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),\n weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm'\n },\n calendar: {\n sameDay: '[དི་རིང] LT',\n nextDay: '[སང་ཉིན] LT',\n nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',\n lastDay: '[ཁ་སང] LT',\n lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ལ་',\n past: '%s སྔན་ལ',\n s: 'ལམ་སང',\n ss: '%d སྐར་ཆ།',\n m: 'སྐར་མ་གཅིག',\n mm: '%d སྐར་མ',\n h: 'ཆུ་ཚོད་གཅིག',\n hh: '%d ཆུ་ཚོད',\n d: 'ཉིན་གཅིག',\n dd: '%d ཉིན་',\n M: 'ཟླ་བ་གཅིག',\n MM: '%d ཟླ་བ',\n y: 'ལོ་གཅིག',\n yy: '%d ལོ'\n },\n preparse: function preparse(string) {\n return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'མཚན་མོ' && hour >= 4 || meridiem === 'ཉིན་གུང' && hour < 5 || meridiem === 'དགོང་དག') {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'མཚན་མོ';\n } else if (hour < 10) {\n return 'ཞོགས་ཀས';\n } else if (hour < 17) {\n return 'ཉིན་གུང';\n } else if (hour < 20) {\n return 'དགོང་དག';\n } else {\n return 'མཚན་མོ';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return bo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function relativeTimeWithMutation(number, withoutSuffix, key) {\n var format = {\n mm: 'munutenn',\n MM: 'miz',\n dd: 'devezh'\n };\n return number + ' ' + mutation(format[key], number);\n }\n\n function specialMutationForYears(number) {\n switch (lastNumber(number)) {\n case 1:\n case 3:\n case 4:\n case 5:\n case 9:\n return number + ' bloaz';\n\n default:\n return number + ' vloaz';\n }\n }\n\n function lastNumber(number) {\n if (number > 9) {\n return lastNumber(number % 10);\n }\n\n return number;\n }\n\n function mutation(text, number) {\n if (number === 2) {\n return softMutation(text);\n }\n\n return text;\n }\n\n function softMutation(text) {\n var mutationTable = {\n m: 'v',\n b: 'v',\n d: 'z'\n };\n\n if (mutationTable[text.charAt(0)] === undefined) {\n return text;\n }\n\n return mutationTable[text.charAt(0)] + text.substring(1);\n }\n\n var monthsParse = [/^gen/i, /^c[ʼ\\']hwe/i, /^meu/i, /^ebr/i, /^mae/i, /^(mez|eve)/i, /^gou/i, /^eos/i, /^gwe/i, /^her/i, /^du/i, /^ker/i],\n monthsRegex = /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n monthsStrictRegex = /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,\n monthsShortStrictRegex = /^(gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n fullWeekdaysParse = [/^sul/i, /^lun/i, /^meurzh/i, /^merc[ʼ\\']her/i, /^yaou/i, /^gwener/i, /^sadorn/i],\n shortWeekdaysParse = [/^Sul/i, /^Lun/i, /^Meu/i, /^Mer/i, /^Yao/i, /^Gwe/i, /^Sad/i],\n minWeekdaysParse = [/^Su/i, /^Lu/i, /^Me([^r]|$)/i, /^Mer/i, /^Ya/i, /^Gw/i, /^Sa/i];\n var br = moment.defineLocale('br', {\n months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'),\n monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),\n weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n weekdaysParse: minWeekdaysParse,\n fullWeekdaysParse: fullWeekdaysParse,\n shortWeekdaysParse: shortWeekdaysParse,\n minWeekdaysParse: minWeekdaysParse,\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [a viz] MMMM YYYY',\n LLL: 'D [a viz] MMMM YYYY HH:mm',\n LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Hiziv da] LT',\n nextDay: '[Warcʼhoazh da] LT',\n nextWeek: 'dddd [da] LT',\n lastDay: '[Decʼh da] LT',\n lastWeek: 'dddd [paset da] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'a-benn %s',\n past: '%s ʼzo',\n s: 'un nebeud segondennoù',\n ss: '%d eilenn',\n m: 'ur vunutenn',\n mm: relativeTimeWithMutation,\n h: 'un eur',\n hh: '%d eur',\n d: 'un devezh',\n dd: relativeTimeWithMutation,\n M: 'ur miz',\n MM: relativeTimeWithMutation,\n y: 'ur bloaz',\n yy: specialMutationForYears\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(añ|vet)/,\n ordinal: function ordinal(number) {\n var output = number === 1 ? 'añ' : 'vet';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n },\n meridiemParse: /a.m.|g.m./,\n // goude merenn | a-raok merenn\n isPM: function isPM(token) {\n return token === 'g.m.';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n return hour < 12 ? 'a.m.' : 'g.m.';\n }\n });\n return br;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n\n return result;\n\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n\n return result;\n\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n\n return result;\n\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n\n return result;\n\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n\n return result;\n\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n\n return result;\n }\n }\n\n var bs = moment.defineLocale('bs', {\n months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n\n case 3:\n return '[u] [srijedu] [u] LT';\n\n case 6:\n return '[u] [subotu] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n return '[prošlu] dddd [u] LT';\n\n case 6:\n return '[prošle] [subote] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return bs;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ca = moment.defineLocale('ca', {\n months: {\n standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),\n format: \"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre\".split('_'),\n isFormat: /D[oD]?(\\s)+MMMM/\n },\n monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),\n weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a les] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',\n llll: 'ddd D MMM YYYY, H:mm'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextDay: function nextDay() {\n return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [passat a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'uns segons',\n ss: '%d segons',\n m: 'un minut',\n mm: '%d minuts',\n h: 'una hora',\n hh: '%d hores',\n d: 'un dia',\n dd: '%d dies',\n M: 'un mes',\n MM: '%d mesos',\n y: 'un any',\n yy: '%d anys'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function ordinal(number, period) {\n var output = number === 1 ? 'r' : number === 2 ? 'n' : number === 3 ? 'r' : number === 4 ? 't' : 'è';\n\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ca;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'),\n monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),\n monthsParse = [/^led/i, /^úno/i, /^bře/i, /^dub/i, /^kvě/i, /^(čvn|červen$|června)/i, /^(čvc|červenec|července)/i, /^srp/i, /^zář/i, /^říj/i, /^lis/i, /^pro/i],\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;\n\n function plural(n) {\n return n > 1 && n < 5 && ~~(n / 10) !== 1;\n }\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';\n\n case 'ss':\n // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekund');\n } else {\n return result + 'sekundami';\n }\n\n case 'm':\n // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';\n\n case 'mm':\n // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minuty' : 'minut');\n } else {\n return result + 'minutami';\n }\n\n case 'h':\n // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n\n case 'hh':\n // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodin');\n } else {\n return result + 'hodinami';\n }\n\n case 'd':\n // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'den' : 'dnem';\n\n case 'dd':\n // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dny' : 'dní');\n } else {\n return result + 'dny';\n }\n\n case 'M':\n // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';\n\n case 'MM':\n // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'měsíce' : 'měsíců');\n } else {\n return result + 'měsíci';\n }\n\n case 'y':\n // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokem';\n\n case 'yy':\n // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'let');\n } else {\n return result + 'lety';\n }\n\n }\n }\n\n var cs = moment.defineLocale('cs', {\n months: months,\n monthsShort: monthsShort,\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,\n monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),\n weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm',\n l: 'D. M. YYYY'\n },\n calendar: {\n sameDay: '[dnes v] LT',\n nextDay: '[zítra v] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[v neděli v] LT';\n\n case 1:\n case 2:\n return '[v] dddd [v] LT';\n\n case 3:\n return '[ve středu v] LT';\n\n case 4:\n return '[ve čtvrtek v] LT';\n\n case 5:\n return '[v pátek v] LT';\n\n case 6:\n return '[v sobotu v] LT';\n }\n },\n lastDay: '[včera v] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[minulou neděli v] LT';\n\n case 1:\n case 2:\n return '[minulé] dddd [v] LT';\n\n case 3:\n return '[minulou středu v] LT';\n\n case 4:\n case 5:\n return '[minulý] dddd [v] LT';\n\n case 6:\n return '[minulou sobotu v] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'před %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return cs;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var cv = moment.defineLocale('cv', {\n months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'),\n monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'),\n weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm'\n },\n calendar: {\n sameDay: '[Паян] LT [сехетре]',\n nextDay: '[Ыран] LT [сехетре]',\n lastDay: '[Ӗнер] LT [сехетре]',\n nextWeek: '[Ҫитес] dddd LT [сехетре]',\n lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n sameElse: 'L'\n },\n relativeTime: {\n future: function future(output) {\n var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран';\n return output + affix;\n },\n past: '%s каялла',\n s: 'пӗр-ик ҫеккунт',\n ss: '%d ҫеккунт',\n m: 'пӗр минут',\n mm: '%d минут',\n h: 'пӗр сехет',\n hh: '%d сехет',\n d: 'пӗр кун',\n dd: '%d кун',\n M: 'пӗр уйӑх',\n MM: '%d уйӑх',\n y: 'пӗр ҫул',\n yy: '%d ҫул'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-мӗш/,\n ordinal: '%d-мӗш',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return cv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var cy = moment.defineLocale('cy', {\n months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'),\n monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'),\n weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'),\n weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n weekdaysParseExact: true,\n // time formats are the same as en-gb\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Heddiw am] LT',\n nextDay: '[Yfory am] LT',\n nextWeek: 'dddd [am] LT',\n lastDay: '[Ddoe am] LT',\n lastWeek: 'dddd [diwethaf am] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'mewn %s',\n past: '%s yn ôl',\n s: 'ychydig eiliadau',\n ss: '%d eiliad',\n m: 'munud',\n mm: '%d munud',\n h: 'awr',\n hh: '%d awr',\n d: 'diwrnod',\n dd: '%d diwrnod',\n M: 'mis',\n MM: '%d mis',\n y: 'blwyddyn',\n yy: '%d flynedd'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n ordinal: function ordinal(number) {\n var b = number,\n output = '',\n lookup = ['', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed\n 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed\n ];\n\n if (b > 20) {\n if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n output = 'fed'; // not 30ain, 70ain or 90ain\n } else {\n output = 'ain';\n }\n } else if (b > 0) {\n output = lookup[b];\n }\n\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return cy;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var da = moment.defineLocale('da', {\n months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'på dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[i] dddd[s kl.] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'få sekunder',\n ss: '%d sekunder',\n m: 'et minut',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dage',\n M: 'en måned',\n MM: '%d måneder',\n y: 'et år',\n yy: '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return da;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var de = moment.defineLocale('de', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]'\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return de;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deAt = moment.defineLocale('de-at', {\n months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]'\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return deAt;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : German (Switzerland) [de-ch]\n//! author : sschueller : https://github.com/sschueller\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deCh = moment.defineLocale('de-ch', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),\n weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]'\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return deCh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = ['ޖެނުއަރީ', 'ފެބްރުއަރީ', 'މާރިޗު', 'އޭޕްރީލު', 'މޭ', 'ޖޫން', 'ޖުލައި', 'އޯގަސްޓު', 'ސެޕްޓެމްބަރު', 'އޮކްޓޯބަރު', 'ނޮވެމްބަރު', 'ޑިސެމްބަރު'],\n weekdays = ['އާދިއްތަ', 'ހޯމަ', 'އަންގާރަ', 'ބުދަ', 'ބުރާސްފަތި', 'ހުކުރު', 'ހޮނިހިރު'];\n var dv = moment.defineLocale('dv', {\n months: months,\n monthsShort: months,\n weekdays: weekdays,\n weekdaysShort: weekdays,\n weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/M/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /މކ|މފ/,\n isPM: function isPM(input) {\n return 'މފ' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'މކ';\n } else {\n return 'މފ';\n }\n },\n calendar: {\n sameDay: '[މިއަދު] LT',\n nextDay: '[މާދަމާ] LT',\n nextWeek: 'dddd LT',\n lastDay: '[އިއްޔެ] LT',\n lastWeek: '[ފާއިތުވި] dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ތެރޭގައި %s',\n past: 'ކުރިން %s',\n s: 'ސިކުންތުކޮޅެއް',\n ss: 'd% ސިކުންތު',\n m: 'މިނިޓެއް',\n mm: 'މިނިޓު %d',\n h: 'ގަޑިއިރެއް',\n hh: 'ގަޑިއިރު %d',\n d: 'ދުވަހެއް',\n dd: 'ދުވަސް %d',\n M: 'މަހެއް',\n MM: 'މަސް %d',\n y: 'އަހަރެއް',\n yy: 'އަހަރު %d'\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 7,\n // Sunday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return dv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function isFunction(input) {\n return typeof Function !== 'undefined' && input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';\n }\n\n var el = moment.defineLocale('el', {\n monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),\n monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),\n months: function months(momentToFormat, format) {\n if (!momentToFormat) {\n return this._monthsNominativeEl;\n } else if (typeof format === 'string' && /D/.test(format.substring(0, format.indexOf('MMMM')))) {\n // if there is a day number before 'MMMM'\n return this._monthsGenitiveEl[momentToFormat.month()];\n } else {\n return this._monthsNominativeEl[momentToFormat.month()];\n }\n },\n monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'),\n weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'μμ' : 'ΜΜ';\n } else {\n return isLower ? 'πμ' : 'ΠΜ';\n }\n },\n isPM: function isPM(input) {\n return (input + '').toLowerCase()[0] === 'μ';\n },\n meridiemParse: /[ΠΜ]\\.?Μ?\\.?/i,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendarEl: {\n sameDay: '[Σήμερα {}] LT',\n nextDay: '[Αύριο {}] LT',\n nextWeek: 'dddd [{}] LT',\n lastDay: '[Χθες {}] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 6:\n return '[το προηγούμενο] dddd [{}] LT';\n\n default:\n return '[την προηγούμενη] dddd [{}] LT';\n }\n },\n sameElse: 'L'\n },\n calendar: function calendar(key, mom) {\n var output = this._calendarEl[key],\n hours = mom && mom.hours();\n\n if (isFunction(output)) {\n output = output.apply(mom);\n }\n\n return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');\n },\n relativeTime: {\n future: 'σε %s',\n past: '%s πριν',\n s: 'λίγα δευτερόλεπτα',\n ss: '%d δευτερόλεπτα',\n m: 'ένα λεπτό',\n mm: '%d λεπτά',\n h: 'μία ώρα',\n hh: '%d ώρες',\n d: 'μία μέρα',\n dd: '%d μέρες',\n M: 'ένας μήνας',\n MM: '%d μήνες',\n y: 'ένας χρόνος',\n yy: '%d χρόνια'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}η/,\n ordinal: '%dη',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4st is the first week of the year.\n\n }\n });\n return el;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enAu = moment.defineLocale('en-au', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enAu;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enCa = moment.defineLocale('en-ca', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'YYYY-MM-DD',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n });\n return enCa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enGb = moment.defineLocale('en-gb', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enGb;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enIe = moment.defineLocale('en-ie', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enIe;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (Israel) [en-il]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enIl = moment.defineLocale('en-il', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n }\n });\n return enIl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (India) [en-in]\n//! author : Jatin Agrawal : https://github.com/jatinag22\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enIn = moment.defineLocale('en-in', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 1st is the first week of the year.\n\n }\n });\n return enIn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enNz = moment.defineLocale('en-nz', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enNz;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : English (Singapore) [en-sg]\n//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var enSg = moment.defineLocale('en-sg', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return enSg;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia\n//! comment : miestasmia corrected the translation by colindean\n//! comment : Vivakvo corrected the translation by colindean and miestasmia\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var eo = moment.defineLocale('eo', {\n months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),\n monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),\n weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),\n weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),\n weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: '[la] D[-an de] MMMM, YYYY',\n LLL: '[la] D[-an de] MMMM, YYYY HH:mm',\n LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',\n llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm'\n },\n meridiemParse: /[ap]\\.t\\.m/i,\n isPM: function isPM(input) {\n return input.charAt(0).toLowerCase() === 'p';\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'p.t.m.' : 'P.T.M.';\n } else {\n return isLower ? 'a.t.m.' : 'A.T.M.';\n }\n },\n calendar: {\n sameDay: '[Hodiaŭ je] LT',\n nextDay: '[Morgaŭ je] LT',\n nextWeek: 'dddd[n je] LT',\n lastDay: '[Hieraŭ je] LT',\n lastWeek: '[pasintan] dddd[n je] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'post %s',\n past: 'antaŭ %s',\n s: 'kelkaj sekundoj',\n ss: '%d sekundoj',\n m: 'unu minuto',\n mm: '%d minutoj',\n h: 'unu horo',\n hh: '%d horoj',\n d: 'unu tago',\n //ne 'diurno', ĉar estas uzita por proksimumo\n dd: '%d tagoj',\n M: 'unu monato',\n MM: '%d monatoj',\n y: 'unu jaro',\n yy: '%d jaroj'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}a/,\n ordinal: '%da',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return eo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i],\n monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var es = moment.defineLocale('es', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return _monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n },\n invalidDate: 'Fecha inválida'\n });\n return es;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i],\n monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esDo = moment.defineLocale('es-do', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return _monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return esDo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Spanish (Mexico) [es-mx]\n//! author : JC Franco : https://github.com/jcfranco\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i],\n monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esMx = moment.defineLocale('es-mx', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return _monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n },\n invalidDate: 'Fecha inválida'\n });\n return esMx;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Spanish (United States) [es-us]\n//! author : bustta : https://github.com/bustta\n//! author : chrisrodz : https://github.com/chrisrodz\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'),\n _monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i],\n monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esUs = moment.defineLocale('es-us', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return _monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex: /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'MM/DD/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function lastDay() {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[el] dddd [pasado a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return esUs;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n ss: [number + 'sekundi', number + 'sekundit'],\n m: ['ühe minuti', 'üks minut'],\n mm: [number + ' minuti', number + ' minutit'],\n h: ['ühe tunni', 'tund aega', 'üks tund'],\n hh: [number + ' tunni', number + ' tundi'],\n d: ['ühe päeva', 'üks päev'],\n M: ['kuu aja', 'kuu aega', 'üks kuu'],\n MM: [number + ' kuu', number + ' kuud'],\n y: ['ühe aasta', 'aasta', 'üks aasta'],\n yy: [number + ' aasta', number + ' aastat']\n };\n\n if (withoutSuffix) {\n return format[key][2] ? format[key][2] : format[key][1];\n }\n\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var et = moment.defineLocale('et', {\n months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),\n monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),\n weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),\n weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[Täna,] LT',\n nextDay: '[Homme,] LT',\n nextWeek: '[Järgmine] dddd LT',\n lastDay: '[Eile,] LT',\n lastWeek: '[Eelmine] dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s pärast',\n past: '%s tagasi',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: '%d päeva',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return et;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var eu = moment.defineLocale('eu', {\n months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'),\n monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'),\n monthsParseExact: true,\n weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'),\n weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),\n weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY[ko] MMMM[ren] D[a]',\n LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n l: 'YYYY-M-D',\n ll: 'YYYY[ko] MMM D[a]',\n lll: 'YYYY[ko] MMM D[a] HH:mm',\n llll: 'ddd, YYYY[ko] MMM D[a] HH:mm'\n },\n calendar: {\n sameDay: '[gaur] LT[etan]',\n nextDay: '[bihar] LT[etan]',\n nextWeek: 'dddd LT[etan]',\n lastDay: '[atzo] LT[etan]',\n lastWeek: '[aurreko] dddd LT[etan]',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s barru',\n past: 'duela %s',\n s: 'segundo batzuk',\n ss: '%d segundo',\n m: 'minutu bat',\n mm: '%d minutu',\n h: 'ordu bat',\n hh: '%d ordu',\n d: 'egun bat',\n dd: '%d egun',\n M: 'hilabete bat',\n MM: '%d hilabete',\n y: 'urte bat',\n yy: '%d urte'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return eu;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '۱',\n 2: '۲',\n 3: '۳',\n 4: '۴',\n 5: '۵',\n 6: '۶',\n 7: '۷',\n 8: '۸',\n 9: '۹',\n 0: '۰'\n },\n numberMap = {\n '۱': '1',\n '۲': '2',\n '۳': '3',\n '۴': '4',\n '۵': '5',\n '۶': '6',\n '۷': '7',\n '۸': '8',\n '۹': '9',\n '۰': '0'\n };\n var fa = moment.defineLocale('fa', {\n months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),\n monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),\n weekdays: \"\\u06CC\\u06A9\\u200C\\u0634\\u0646\\u0628\\u0647_\\u062F\\u0648\\u0634\\u0646\\u0628\\u0647_\\u0633\\u0647\\u200C\\u0634\\u0646\\u0628\\u0647_\\u0686\\u0647\\u0627\\u0631\\u0634\\u0646\\u0628\\u0647_\\u067E\\u0646\\u062C\\u200C\\u0634\\u0646\\u0628\\u0647_\\u062C\\u0645\\u0639\\u0647_\\u0634\\u0646\\u0628\\u0647\".split('_'),\n weekdaysShort: \"\\u06CC\\u06A9\\u200C\\u0634\\u0646\\u0628\\u0647_\\u062F\\u0648\\u0634\\u0646\\u0628\\u0647_\\u0633\\u0647\\u200C\\u0634\\u0646\\u0628\\u0647_\\u0686\\u0647\\u0627\\u0631\\u0634\\u0646\\u0628\\u0647_\\u067E\\u0646\\u062C\\u200C\\u0634\\u0646\\u0628\\u0647_\\u062C\\u0645\\u0639\\u0647_\\u0634\\u0646\\u0628\\u0647\".split('_'),\n weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n meridiemParse: /قبل از ظهر|بعد از ظهر/,\n isPM: function isPM(input) {\n return /بعد از ظهر/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'قبل از ظهر';\n } else {\n return 'بعد از ظهر';\n }\n },\n calendar: {\n sameDay: '[امروز ساعت] LT',\n nextDay: '[فردا ساعت] LT',\n nextWeek: 'dddd [ساعت] LT',\n lastDay: '[دیروز ساعت] LT',\n lastWeek: 'dddd [پیش] [ساعت] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'در %s',\n past: '%s پیش',\n s: 'چند ثانیه',\n ss: '%d ثانیه',\n m: 'یک دقیقه',\n mm: '%d دقیقه',\n h: 'یک ساعت',\n hh: '%d ساعت',\n d: 'یک روز',\n dd: '%d روز',\n M: 'یک ماه',\n MM: '%d ماه',\n y: 'یک سال',\n yy: '%d سال'\n },\n preparse: function preparse(string) {\n return string.replace(/[۰-۹]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n dayOfMonthOrdinalParse: /\\d{1,2}م/,\n ordinal: '%dم',\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return fa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '),\n numbersFuture = ['nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden', numbersPast[7], numbersPast[8], numbersPast[9]];\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = '';\n\n switch (key) {\n case 's':\n return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n\n case 'ss':\n result = isFuture ? 'sekunnin' : 'sekuntia';\n break;\n\n case 'm':\n return isFuture ? 'minuutin' : 'minuutti';\n\n case 'mm':\n result = isFuture ? 'minuutin' : 'minuuttia';\n break;\n\n case 'h':\n return isFuture ? 'tunnin' : 'tunti';\n\n case 'hh':\n result = isFuture ? 'tunnin' : 'tuntia';\n break;\n\n case 'd':\n return isFuture ? 'päivän' : 'päivä';\n\n case 'dd':\n result = isFuture ? 'päivän' : 'päivää';\n break;\n\n case 'M':\n return isFuture ? 'kuukauden' : 'kuukausi';\n\n case 'MM':\n result = isFuture ? 'kuukauden' : 'kuukautta';\n break;\n\n case 'y':\n return isFuture ? 'vuoden' : 'vuosi';\n\n case 'yy':\n result = isFuture ? 'vuoden' : 'vuotta';\n break;\n }\n\n result = verbalNumber(number, isFuture) + ' ' + result;\n return result;\n }\n\n function verbalNumber(number, isFuture) {\n return number < 10 ? isFuture ? numbersFuture[number] : numbersPast[number] : number;\n }\n\n var fi = moment.defineLocale('fi', {\n months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),\n monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),\n weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),\n weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),\n weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM[ta] YYYY',\n LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',\n LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n l: 'D.M.YYYY',\n ll: 'Do MMM YYYY',\n lll: 'Do MMM YYYY, [klo] HH.mm',\n llll: 'ddd, Do MMM YYYY, [klo] HH.mm'\n },\n calendar: {\n sameDay: '[tänään] [klo] LT',\n nextDay: '[huomenna] [klo] LT',\n nextWeek: 'dddd [klo] LT',\n lastDay: '[eilen] [klo] LT',\n lastWeek: '[viime] dddd[na] [klo] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s päästä',\n past: '%s sitten',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fi;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Filipino [fil]\n//! author : Dan Hagman : https://github.com/hagmandan\n//! author : Matthew Co : https://github.com/matthewdeeco\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var fil = moment.defineLocale('fil', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm'\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function ordinal(number) {\n return number;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fil;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n//! author : Kristian Sakarisson : https://github.com/sakarisson\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var fo = moment.defineLocale('fo', {\n months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'),\n weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D. MMMM, YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Í dag kl.] LT',\n nextDay: '[Í morgin kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[Í gjár kl.] LT',\n lastWeek: '[síðstu] dddd [kl] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'um %s',\n past: '%s síðani',\n s: 'fá sekund',\n ss: '%d sekundir',\n m: 'ein minuttur',\n mm: '%d minuttir',\n h: 'ein tími',\n hh: '%d tímar',\n d: 'ein dagur',\n dd: '%d dagar',\n M: 'ein mánaður',\n MM: '%d mánaðir',\n y: 'eitt ár',\n yy: '%d ár'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsStrictRegex = /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsShortStrictRegex = /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?)/i,\n monthsRegex = /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsParse = [/^janv/i, /^févr/i, /^mars/i, /^avr/i, /^mai/i, /^juin/i, /^juil/i, /^août/i, /^sept/i, /^oct/i, /^nov/i, /^déc/i];\n var fr = moment.defineLocale('fr', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n w: 'une semaine',\n ww: '%d semaines',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // TODO: Return 'e' when day of month > 1. Move this case inside\n // block for masculine words below.\n // See https://github.com/moment/moment/issues/3375\n case 'D':\n return number + (number === 1 ? 'er' : '');\n // Words with masculine grammatical gender: mois, trimestre, jour\n\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n // Words with feminine grammatical gender: semaine\n\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var frCa = moment.defineLocale('fr-ca', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n // Words with feminine grammatical gender: semaine\n\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n }\n });\n return frCa;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var frCh = moment.defineLocale('fr-ch', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),\n monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n // Words with feminine grammatical gender: semaine\n\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return frCh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),\n monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n var fy = moment.defineLocale('fy', {\n months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsParseExact: true,\n weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'),\n weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),\n weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[hjoed om] LT',\n nextDay: '[moarn om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[juster om] LT',\n lastWeek: '[ôfrûne] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'oer %s',\n past: '%s lyn',\n s: 'in pear sekonden',\n ss: '%d sekonden',\n m: 'ien minút',\n mm: '%d minuten',\n h: 'ien oere',\n hh: '%d oeren',\n d: 'ien dei',\n dd: '%d dagen',\n M: 'ien moanne',\n MM: '%d moannen',\n y: 'ien jier',\n yy: '%d jierren'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function ordinal(number) {\n return number + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return fy;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Irish or Irish Gaelic [ga]\n//! author : André Silva : https://github.com/askpt\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = ['Eanáir', 'Feabhra', 'Márta', 'Aibreán', 'Bealtaine', 'Meitheamh', 'Iúil', 'Lúnasa', 'Meán Fómhair', 'Deireadh Fómhair', 'Samhain', 'Nollaig'],\n monthsShort = ['Ean', 'Feabh', 'Márt', 'Aib', 'Beal', 'Meith', 'Iúil', 'Lún', 'M.F.', 'D.F.', 'Samh', 'Noll'],\n weekdays = ['Dé Domhnaigh', 'Dé Luain', 'Dé Máirt', 'Dé Céadaoin', 'Déardaoin', 'Dé hAoine', 'Dé Sathairn'],\n weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],\n weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];\n var ga = moment.defineLocale('ga', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Inniu ag] LT',\n nextDay: '[Amárach ag] LT',\n nextWeek: 'dddd [ag] LT',\n lastDay: '[Inné ag] LT',\n lastWeek: 'dddd [seo caite] [ag] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'i %s',\n past: '%s ó shin',\n s: 'cúpla soicind',\n ss: '%d soicind',\n m: 'nóiméad',\n mm: '%d nóiméad',\n h: 'uair an chloig',\n hh: '%d uair an chloig',\n d: 'lá',\n dd: '%d lá',\n M: 'mí',\n MM: '%d míonna',\n y: 'bliain',\n yy: '%d bliain'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function ordinal(number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ga;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = ['Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd'],\n monthsShort = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh'],\n weekdays = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne'],\n weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],\n weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n var gd = moment.defineLocale('gd', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[An-diugh aig] LT',\n nextDay: '[A-màireach aig] LT',\n nextWeek: 'dddd [aig] LT',\n lastDay: '[An-dè aig] LT',\n lastWeek: 'dddd [seo chaidh] [aig] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ann an %s',\n past: 'bho chionn %s',\n s: 'beagan diogan',\n ss: '%d diogan',\n m: 'mionaid',\n mm: '%d mionaidean',\n h: 'uair',\n hh: '%d uairean',\n d: 'latha',\n dd: '%d latha',\n M: 'mìos',\n MM: '%d mìosan',\n y: 'bliadhna',\n yy: '%d bliadhna'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function ordinal(number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return gd;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var gl = moment.defineLocale('gl', {\n months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),\n monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextDay: function nextDay() {\n return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n },\n lastDay: function lastDay() {\n return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';\n },\n lastWeek: function lastWeek() {\n return '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: function future(str) {\n if (str.indexOf('un') === 0) {\n return 'n' + str;\n }\n\n return 'en ' + str;\n },\n past: 'hai %s',\n s: 'uns segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'unha hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n M: 'un mes',\n MM: '%d meses',\n y: 'un ano',\n yy: '%d anos'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return gl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Konkani Devanagari script [gom-deva]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],\n ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],\n m: ['एका मिणटान', 'एक मिनूट'],\n mm: [number + ' मिणटांनी', number + ' मिणटां'],\n h: ['एका वरान', 'एक वर'],\n hh: [number + ' वरांनी', number + ' वरां'],\n d: ['एका दिसान', 'एक दीस'],\n dd: [number + ' दिसांनी', number + ' दीस'],\n M: ['एका म्हयन्यान', 'एक म्हयनो'],\n MM: [number + ' म्हयन्यानी', number + ' म्हयने'],\n y: ['एका वर्सान', 'एक वर्स'],\n yy: [number + ' वर्सांनी', number + ' वर्सां']\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomDeva = moment.defineLocale('gom-deva', {\n months: {\n standalone: 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'),\n format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split('_'),\n isFormat: /MMMM(\\s)+D[oD]?/\n },\n monthsShort: 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),\n monthsParseExact: true,\n weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),\n weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),\n weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [वाजतां]',\n LTS: 'A h:mm:ss [वाजतां]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [वाजतां]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',\n llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]'\n },\n calendar: {\n sameDay: '[आयज] LT',\n nextDay: '[फाल्यां] LT',\n nextWeek: '[फुडलो] dddd[,] LT',\n lastDay: '[काल] LT',\n lastWeek: '[फाटलो] dddd[,] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s',\n past: '%s आदीं',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(वेर)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // the ordinal 'वेर' only applies to day of the month\n case 'D':\n return number + 'वेर';\n\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week\n doy: 3 // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n\n },\n meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'राती') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सकाळीं') {\n return hour;\n } else if (meridiem === 'दनपारां') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'सांजे') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'राती';\n } else if (hour < 12) {\n return 'सकाळीं';\n } else if (hour < 16) {\n return 'दनपारां';\n } else if (hour < 20) {\n return 'सांजे';\n } else {\n return 'राती';\n }\n }\n });\n return gomDeva;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Konkani Latin script [gom-latn]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['thoddea sekondamni', 'thodde sekond'],\n ss: [number + ' sekondamni', number + ' sekond'],\n m: ['eka mintan', 'ek minut'],\n mm: [number + ' mintamni', number + ' mintam'],\n h: ['eka voran', 'ek vor'],\n hh: [number + ' voramni', number + ' voram'],\n d: ['eka disan', 'ek dis'],\n dd: [number + ' disamni', number + ' dis'],\n M: ['eka mhoinean', 'ek mhoino'],\n MM: [number + ' mhoineamni', number + ' mhoine'],\n y: ['eka vorsan', 'ek voros'],\n yy: [number + ' vorsamni', number + ' vorsam']\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomLatn = moment.defineLocale('gom-latn', {\n months: {\n standalone: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'),\n format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split('_'),\n isFormat: /MMMM(\\s)+D[oD]?/\n },\n monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: \"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var\".split('_'),\n weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),\n weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [vazta]',\n LTS: 'A h:mm:ss [vazta]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [vazta]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',\n llll: 'ddd, D MMM YYYY, A h:mm [vazta]'\n },\n calendar: {\n sameDay: '[Aiz] LT',\n nextDay: '[Faleam] LT',\n nextWeek: '[Fuddlo] dddd[,] LT',\n lastDay: '[Kal] LT',\n lastWeek: '[Fattlo] dddd[,] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s',\n past: '%s adim',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n // the ordinal 'er' only applies to day of the month\n case 'D':\n return number + 'er';\n\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week\n doy: 3 // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n\n },\n meridiemParse: /rati|sokallim|donparam|sanje/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'rati') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'sokallim') {\n return hour;\n } else if (meridiem === 'donparam') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'sanje') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'rati';\n } else if (hour < 12) {\n return 'sokallim';\n } else if (hour < 16) {\n return 'donparam';\n } else if (hour < 20) {\n return 'sanje';\n } else {\n return 'rati';\n }\n }\n });\n return gomLatn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Gujarati [gu]\n//! author : Kaushik Thanki : https://github.com/Kaushik1987\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '૧',\n 2: '૨',\n 3: '૩',\n 4: '૪',\n 5: '૫',\n 6: '૬',\n 7: '૭',\n 8: '૮',\n 9: '૯',\n 0: '૦'\n },\n numberMap = {\n '૧': '1',\n '૨': '2',\n '૩': '3',\n '૪': '4',\n '૫': '5',\n '૬': '6',\n '૭': '7',\n '૮': '8',\n '૯': '9',\n '૦': '0'\n };\n var gu = moment.defineLocale('gu', {\n months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'),\n monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'),\n monthsParseExact: true,\n weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'),\n weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),\n weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm વાગ્યે',\n LTS: 'A h:mm:ss વાગ્યે',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm વાગ્યે',\n LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે'\n },\n calendar: {\n sameDay: '[આજ] LT',\n nextDay: '[કાલે] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ગઇકાલે] LT',\n lastWeek: '[પાછલા] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s મા',\n past: '%s પહેલા',\n s: 'અમુક પળો',\n ss: '%d સેકંડ',\n m: 'એક મિનિટ',\n mm: '%d મિનિટ',\n h: 'એક કલાક',\n hh: '%d કલાક',\n d: 'એક દિવસ',\n dd: '%d દિવસ',\n M: 'એક મહિનો',\n MM: '%d મહિનો',\n y: 'એક વર્ષ',\n yy: '%d વર્ષ'\n },\n preparse: function preparse(string) {\n return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Gujarati notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.\n meridiemParse: /રાત|બપોર|સવાર|સાંજ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'રાત') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'સવાર') {\n return hour;\n } else if (meridiem === 'બપોર') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'સાંજ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'રાત';\n } else if (hour < 10) {\n return 'સવાર';\n } else if (hour < 17) {\n return 'બપોર';\n } else if (hour < 20) {\n return 'સાંજ';\n } else {\n return 'રાત';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return gu;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var he = moment.defineLocale('he', {\n months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),\n monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [ב]MMMM YYYY',\n LLL: 'D [ב]MMMM YYYY HH:mm',\n LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',\n l: 'D/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[היום ב־]LT',\n nextDay: '[מחר ב־]LT',\n nextWeek: 'dddd [בשעה] LT',\n lastDay: '[אתמול ב־]LT',\n lastWeek: '[ביום] dddd [האחרון בשעה] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'בעוד %s',\n past: 'לפני %s',\n s: 'מספר שניות',\n ss: '%d שניות',\n m: 'דקה',\n mm: '%d דקות',\n h: 'שעה',\n hh: function hh(number) {\n if (number === 2) {\n return 'שעתיים';\n }\n\n return number + ' שעות';\n },\n d: 'יום',\n dd: function dd(number) {\n if (number === 2) {\n return 'יומיים';\n }\n\n return number + ' ימים';\n },\n M: 'חודש',\n MM: function MM(number) {\n if (number === 2) {\n return 'חודשיים';\n }\n\n return number + ' חודשים';\n },\n y: 'שנה',\n yy: function yy(number) {\n if (number === 2) {\n return 'שנתיים';\n } else if (number % 10 === 0 && number !== 10) {\n return number + ' שנה';\n }\n\n return number + ' שנים';\n }\n },\n meridiemParse: /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n isPM: function isPM(input) {\n return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 5) {\n return 'לפנות בוקר';\n } else if (hour < 10) {\n return 'בבוקר';\n } else if (hour < 12) {\n return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n } else if (hour < 18) {\n return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n } else {\n return 'בערב';\n }\n }\n });\n return he;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०'\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0'\n },\n monthsParse = [/^जन/i, /^फ़र|फर/i, /^मार्च/i, /^अप्रै/i, /^मई/i, /^जून/i, /^जुल/i, /^अग/i, /^सितं|सित/i, /^अक्टू/i, /^नव|नवं/i, /^दिसं|दिस/i],\n shortMonthsParse = [/^जन/i, /^फ़र/i, /^मार्च/i, /^अप्रै/i, /^मई/i, /^जून/i, /^जुल/i, /^अग/i, /^सित/i, /^अक्टू/i, /^नव/i, /^दिस/i];\n var hi = moment.defineLocale('hi', {\n months: {\n format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),\n standalone: 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split('_')\n },\n monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm बजे',\n LTS: 'A h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, A h:mm बजे'\n },\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: shortMonthsParse,\n monthsRegex: /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n monthsShortRegex: /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n monthsStrictRegex: /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,\n monthsShortStrictRegex: /^(जन\\.?|फ़र\\.?|मार्च?|अप्रै\\.?|मई?|जून?|जुल\\.?|अग\\.?|सित\\.?|अक्टू\\.?|नव\\.?|दिस\\.?)/i,\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[कल] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[कल] LT',\n lastWeek: '[पिछले] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s में',\n past: '%s पहले',\n s: 'कुछ ही क्षण',\n ss: '%d सेकंड',\n m: 'एक मिनट',\n mm: '%d मिनट',\n h: 'एक घंटा',\n hh: '%d घंटे',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महीने',\n MM: '%d महीने',\n y: 'एक वर्ष',\n yy: '%d वर्ष'\n },\n preparse: function preparse(string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n meridiemParse: /रात|सुबह|दोपहर|शाम/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'रात') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सुबह') {\n return hour;\n } else if (meridiem === 'दोपहर') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'शाम') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'रात';\n } else if (hour < 10) {\n return 'सुबह';\n } else if (hour < 17) {\n return 'दोपहर';\n } else if (hour < 20) {\n return 'शाम';\n } else {\n return 'रात';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return hi;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n\n return result;\n\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n\n return result;\n\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n\n return result;\n\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n\n return result;\n\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n\n return result;\n\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n\n return result;\n }\n }\n\n var hr = moment.defineLocale('hr', {\n months: {\n format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'),\n standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_')\n },\n monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM YYYY',\n LLL: 'Do MMMM YYYY H:mm',\n LLLL: 'dddd, Do MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n\n case 3:\n return '[u] [srijedu] [u] LT';\n\n case 6:\n return '[u] [subotu] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[prošlu] [nedjelju] [u] LT';\n\n case 3:\n return '[prošlu] [srijedu] [u] LT';\n\n case 6:\n return '[prošle] [subote] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return hr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n//! author : Peter Viszt : https://github.com/passatgt\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\n\n function translate(number, withoutSuffix, key, isFuture) {\n var num = number;\n\n switch (key) {\n case 's':\n return isFuture || withoutSuffix ? 'néhány másodperc' : 'néhány másodperce';\n\n case 'ss':\n return num + (isFuture || withoutSuffix) ? ' másodperc' : ' másodperce';\n\n case 'm':\n return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n\n case 'mm':\n return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n\n case 'h':\n return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n\n case 'hh':\n return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n\n case 'd':\n return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n\n case 'dd':\n return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n\n case 'M':\n return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n\n case 'MM':\n return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n\n case 'y':\n return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n\n case 'yy':\n return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n }\n\n return '';\n }\n\n function week(isFuture) {\n return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';\n }\n\n var hu = moment.defineLocale('hu', {\n months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),\n monthsShort: 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY. MMMM D.',\n LLL: 'YYYY. MMMM D. H:mm',\n LLLL: 'YYYY. MMMM D., dddd H:mm'\n },\n meridiemParse: /de|du/i,\n isPM: function isPM(input) {\n return input.charAt(1).toLowerCase() === 'u';\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 12) {\n return isLower === true ? 'de' : 'DE';\n } else {\n return isLower === true ? 'du' : 'DU';\n }\n },\n calendar: {\n sameDay: '[ma] LT[-kor]',\n nextDay: '[holnap] LT[-kor]',\n nextWeek: function nextWeek() {\n return week.call(this, true);\n },\n lastDay: '[tegnap] LT[-kor]',\n lastWeek: function lastWeek() {\n return week.call(this, false);\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s múlva',\n past: '%s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return hu;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var hyAm = moment.defineLocale('hy-am', {\n months: {\n format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'),\n standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_')\n },\n monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'),\n weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY թ.',\n LLL: 'D MMMM YYYY թ., HH:mm',\n LLLL: 'dddd, D MMMM YYYY թ., HH:mm'\n },\n calendar: {\n sameDay: '[այսօր] LT',\n nextDay: '[վաղը] LT',\n lastDay: '[երեկ] LT',\n nextWeek: function nextWeek() {\n return 'dddd [օրը ժամը] LT';\n },\n lastWeek: function lastWeek() {\n return '[անցած] dddd [օրը ժամը] LT';\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s հետո',\n past: '%s առաջ',\n s: 'մի քանի վայրկյան',\n ss: '%d վայրկյան',\n m: 'րոպե',\n mm: '%d րոպե',\n h: 'ժամ',\n hh: '%d ժամ',\n d: 'օր',\n dd: '%d օր',\n M: 'ամիս',\n MM: '%d ամիս',\n y: 'տարի',\n yy: '%d տարի'\n },\n meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n isPM: function isPM(input) {\n return /^(ցերեկվա|երեկոյան)$/.test(input);\n },\n meridiem: function meridiem(hour) {\n if (hour < 4) {\n return 'գիշերվա';\n } else if (hour < 12) {\n return 'առավոտվա';\n } else if (hour < 17) {\n return 'ցերեկվա';\n } else {\n return 'երեկոյան';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'DDD':\n case 'w':\n case 'W':\n case 'DDDo':\n if (number === 1) {\n return number + '-ին';\n }\n\n return number + '-րդ';\n\n default:\n return number;\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return hyAm;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var id = moment.defineLocale('id', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /pagi|siang|sore|malam/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'siang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sore' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'siang';\n } else if (hours < 19) {\n return 'sore';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Besok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kemarin pukul] LT',\n lastWeek: 'dddd [lalu pukul] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lalu',\n s: 'beberapa detik',\n ss: '%d detik',\n m: 'semenit',\n mm: '%d menit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun'\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return id;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function plural(n) {\n if (n % 100 === 11) {\n return true;\n } else if (n % 10 === 1) {\n return false;\n }\n\n return true;\n }\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';\n\n case 'ss':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum');\n }\n\n return result + 'sekúnda';\n\n case 'm':\n return withoutSuffix ? 'mínúta' : 'mínútu';\n\n case 'mm':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');\n } else if (withoutSuffix) {\n return result + 'mínúta';\n }\n\n return result + 'mínútu';\n\n case 'hh':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');\n }\n\n return result + 'klukkustund';\n\n case 'd':\n if (withoutSuffix) {\n return 'dagur';\n }\n\n return isFuture ? 'dag' : 'degi';\n\n case 'dd':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'dagar';\n }\n\n return result + (isFuture ? 'daga' : 'dögum');\n } else if (withoutSuffix) {\n return result + 'dagur';\n }\n\n return result + (isFuture ? 'dag' : 'degi');\n\n case 'M':\n if (withoutSuffix) {\n return 'mánuður';\n }\n\n return isFuture ? 'mánuð' : 'mánuði';\n\n case 'MM':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'mánuðir';\n }\n\n return result + (isFuture ? 'mánuði' : 'mánuðum');\n } else if (withoutSuffix) {\n return result + 'mánuður';\n }\n\n return result + (isFuture ? 'mánuð' : 'mánuði');\n\n case 'y':\n return withoutSuffix || isFuture ? 'ár' : 'ári';\n\n case 'yy':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n }\n\n return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n }\n }\n\n var is = moment.defineLocale('is', {\n months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'),\n monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'),\n weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm'\n },\n calendar: {\n sameDay: '[í dag kl.] LT',\n nextDay: '[á morgun kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[í gær kl.] LT',\n lastWeek: '[síðasta] dddd [kl.] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'eftir %s',\n past: 'fyrir %s síðan',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: 'klukkustund',\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return is;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n//! author: Marco : https://github.com/Manfre98\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var it = moment.defineLocale('it', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: function sameDay() {\n return '[Oggi a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") + ']LT';\n },\n nextDay: function nextDay() {\n return '[Domani a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") + ']LT';\n },\n nextWeek: function nextWeek() {\n return 'dddd [a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") + ']LT';\n },\n lastDay: function lastDay() {\n return '[Ieri a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") + ']LT';\n },\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[La scorsa] dddd [a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") + ']LT';\n\n default:\n return '[Lo scorso] dddd [a' + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") + ']LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'tra %s',\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n w: 'una settimana',\n ww: '%d settimane',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return it;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Italian (Switzerland) [it-ch]\n//! author : xfh : https://github.com/xfh\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var itCh = moment.defineLocale('it-ch', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Oggi alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n lastDay: '[Ieri alle] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[la scorsa] dddd [alle] LT';\n\n default:\n return '[lo scorso] dddd [alle] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: function future(s) {\n return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n },\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return itCh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ja = moment.defineLocale('ja', {\n eras: [{\n since: '2019-05-01',\n offset: 1,\n name: '令和',\n narrow: '㋿',\n abbr: 'R'\n }, {\n since: '1989-01-08',\n until: '2019-04-30',\n offset: 1,\n name: '平成',\n narrow: '㍻',\n abbr: 'H'\n }, {\n since: '1926-12-25',\n until: '1989-01-07',\n offset: 1,\n name: '昭和',\n narrow: '㍼',\n abbr: 'S'\n }, {\n since: '1912-07-30',\n until: '1926-12-24',\n offset: 1,\n name: '大正',\n narrow: '㍽',\n abbr: 'T'\n }, {\n since: '1873-01-01',\n until: '1912-07-29',\n offset: 6,\n name: '明治',\n narrow: '㍾',\n abbr: 'M'\n }, {\n since: '0001-01-01',\n until: '1873-12-31',\n offset: 1,\n name: '西暦',\n narrow: 'AD',\n abbr: 'AD'\n }, {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: '紀元前',\n narrow: 'BC',\n abbr: 'BC'\n }],\n eraYearOrdinalRegex: /(元|\\d+)年/,\n eraYearOrdinalParse: function eraYearOrdinalParse(input, match) {\n return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);\n },\n months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n weekdaysShort: '日_月_火_水_木_金_土'.split('_'),\n weekdaysMin: '日_月_火_水_木_金_土'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日 dddd HH:mm',\n l: 'YYYY/MM/DD',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日(ddd) HH:mm'\n },\n meridiemParse: /午前|午後/i,\n isPM: function isPM(input) {\n return input === '午後';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return '午前';\n } else {\n return '午後';\n }\n },\n calendar: {\n sameDay: '[今日] LT',\n nextDay: '[明日] LT',\n nextWeek: function nextWeek(now) {\n if (now.week() !== this.week()) {\n return '[来週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n lastDay: '[昨日] LT',\n lastWeek: function lastWeek(now) {\n if (this.week() !== now.week()) {\n return '[先週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}日/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'y':\n return number === 1 ? '元年' : number + '年';\n\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '数秒',\n ss: '%d秒',\n m: '1分',\n mm: '%d分',\n h: '1時間',\n hh: '%d時間',\n d: '1日',\n dd: '%d日',\n M: '1ヶ月',\n MM: '%dヶ月',\n y: '1年',\n yy: '%d年'\n }\n });\n return ja;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Javanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var jv = moment.defineLocale('jv', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /enjing|siyang|sonten|ndalu/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'enjing') {\n return hour;\n } else if (meridiem === 'siyang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'enjing';\n } else if (hours < 15) {\n return 'siyang';\n } else if (hours < 19) {\n return 'sonten';\n } else {\n return 'ndalu';\n }\n },\n calendar: {\n sameDay: '[Dinten puniko pukul] LT',\n nextDay: '[Mbenjang pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kala wingi pukul] LT',\n lastWeek: 'dddd [kepengker pukul] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'wonten ing %s',\n past: '%s ingkang kepengker',\n s: 'sawetawis detik',\n ss: '%d detik',\n m: 'setunggal menit',\n mm: '%d menit',\n h: 'setunggal jam',\n hh: '%d jam',\n d: 'sedinten',\n dd: '%d dinten',\n M: 'sewulan',\n MM: '%d wulan',\n y: 'setaun',\n yy: '%d taun'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return jv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/IrakliJani\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ka = moment.defineLocale('ka', {\n months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),\n monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n weekdays: {\n standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),\n format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'),\n isFormat: /(წინა|შემდეგ)/\n },\n weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[დღეს] LT[-ზე]',\n nextDay: '[ხვალ] LT[-ზე]',\n lastDay: '[გუშინ] LT[-ზე]',\n nextWeek: '[შემდეგ] dddd LT[-ზე]',\n lastWeek: '[წინა] dddd LT-ზე',\n sameElse: 'L'\n },\n relativeTime: {\n future: function future(s) {\n return s.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/, function ($0, $1, $2) {\n return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';\n });\n },\n past: function past(s) {\n if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {\n return s.replace(/(ი|ე)$/, 'ის წინ');\n }\n\n if (/წელი/.test(s)) {\n return s.replace(/წელი$/, 'წლის წინ');\n }\n\n return s;\n },\n s: 'რამდენიმე წამი',\n ss: '%d წამი',\n m: 'წუთი',\n mm: '%d წუთი',\n h: 'საათი',\n hh: '%d საათი',\n d: 'დღე',\n dd: '%d დღე',\n M: 'თვე',\n MM: '%d თვე',\n y: 'წელი',\n yy: '%d წელი'\n },\n dayOfMonthOrdinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n ordinal: function ordinal(number) {\n if (number === 0) {\n return number;\n }\n\n if (number === 1) {\n return number + '-ლი';\n }\n\n if (number < 20 || number <= 100 && number % 20 === 0 || number % 100 === 0) {\n return 'მე-' + number;\n }\n\n return number + '-ე';\n },\n week: {\n dow: 1,\n doy: 7\n }\n });\n return ka;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ші',\n 1: '-ші',\n 2: '-ші',\n 3: '-ші',\n 4: '-ші',\n 5: '-ші',\n 6: '-шы',\n 7: '-ші',\n 8: '-ші',\n 9: '-шы',\n 10: '-шы',\n 20: '-шы',\n 30: '-шы',\n 40: '-шы',\n 50: '-ші',\n 60: '-шы',\n 70: '-ші',\n 80: '-ші',\n 90: '-шы',\n 100: '-ші'\n };\n var kk = moment.defineLocale('kk', {\n months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'),\n monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'),\n weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Бүгін сағат] LT',\n nextDay: '[Ертең сағат] LT',\n nextWeek: 'dddd [сағат] LT',\n lastDay: '[Кеше сағат] LT',\n lastWeek: '[Өткен аптаның] dddd [сағат] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ішінде',\n past: '%s бұрын',\n s: 'бірнеше секунд',\n ss: '%d секунд',\n m: 'бір минут',\n mm: '%d минут',\n h: 'бір сағат',\n hh: '%d сағат',\n d: 'бір күн',\n dd: '%d күн',\n M: 'бір ай',\n MM: '%d ай',\n y: 'бір жыл',\n yy: '%d жыл'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n ordinal: function ordinal(number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return kk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '១',\n 2: '២',\n 3: '៣',\n 4: '៤',\n 5: '៥',\n 6: '៦',\n 7: '៧',\n 8: '៨',\n 9: '៩',\n 0: '០'\n },\n numberMap = {\n '១': '1',\n '២': '2',\n '៣': '3',\n '៤': '4',\n '៥': '5',\n '៦': '6',\n '៧': '7',\n '៨': '8',\n '៩': '9',\n '០': '0'\n };\n var km = moment.defineLocale('km', {\n months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),\n monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),\n weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n meridiemParse: /ព្រឹក|ល្ងាច/,\n isPM: function isPM(input) {\n return input === 'ល្ងាច';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ព្រឹក';\n } else {\n return 'ល្ងាច';\n }\n },\n calendar: {\n sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n nextDay: '[ស្អែក ម៉ោង] LT',\n nextWeek: 'dddd [ម៉ោង] LT',\n lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%sទៀត',\n past: '%sមុន',\n s: 'ប៉ុន្មានវិនាទី',\n ss: '%d វិនាទី',\n m: 'មួយនាទី',\n mm: '%d នាទី',\n h: 'មួយម៉ោង',\n hh: '%d ម៉ោង',\n d: 'មួយថ្ងៃ',\n dd: '%d ថ្ងៃ',\n M: 'មួយខែ',\n MM: '%d ខែ',\n y: 'មួយឆ្នាំ',\n yy: '%d ឆ្នាំ'\n },\n dayOfMonthOrdinalParse: /ទី\\d{1,2}/,\n ordinal: 'ទី%d',\n preparse: function preparse(string) {\n return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return km;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Kannada [kn]\n//! author : Rajeev Naik : https://github.com/rajeevnaikte\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '೧',\n 2: '೨',\n 3: '೩',\n 4: '೪',\n 5: '೫',\n 6: '೬',\n 7: '೭',\n 8: '೮',\n 9: '೯',\n 0: '೦'\n },\n numberMap = {\n '೧': '1',\n '೨': '2',\n '೩': '3',\n '೪': '4',\n '೫': '5',\n '೬': '6',\n '೭': '7',\n '೮': '8',\n '೯': '9',\n '೦': '0'\n };\n var kn = moment.defineLocale('kn', {\n months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'),\n monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split('_'),\n monthsParseExact: true,\n weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'),\n weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),\n weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm'\n },\n calendar: {\n sameDay: '[ಇಂದು] LT',\n nextDay: '[ನಾಳೆ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ನಿನ್ನೆ] LT',\n lastWeek: '[ಕೊನೆಯ] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ನಂತರ',\n past: '%s ಹಿಂದೆ',\n s: 'ಕೆಲವು ಕ್ಷಣಗಳು',\n ss: '%d ಸೆಕೆಂಡುಗಳು',\n m: 'ಒಂದು ನಿಮಿಷ',\n mm: '%d ನಿಮಿಷ',\n h: 'ಒಂದು ಗಂಟೆ',\n hh: '%d ಗಂಟೆ',\n d: 'ಒಂದು ದಿನ',\n dd: '%d ದಿನ',\n M: 'ಒಂದು ತಿಂಗಳು',\n MM: '%d ತಿಂಗಳು',\n y: 'ಒಂದು ವರ್ಷ',\n yy: '%d ವರ್ಷ'\n },\n preparse: function preparse(string) {\n return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'ರಾತ್ರಿ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {\n return hour;\n } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ಸಂಜೆ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ರಾತ್ರಿ';\n } else if (hour < 10) {\n return 'ಬೆಳಿಗ್ಗೆ';\n } else if (hour < 17) {\n return 'ಮಧ್ಯಾಹ್ನ';\n } else if (hour < 20) {\n return 'ಸಂಜೆ';\n } else {\n return 'ರಾತ್ರಿ';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ನೇ)/,\n ordinal: function ordinal(number) {\n return number + 'ನೇ';\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return kn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee
\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ko = moment.defineLocale('ko', {\n months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n weekdaysShort: '일_월_화_수_목_금_토'.split('_'),\n weekdaysMin: '일_월_화_수_목_금_토'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY년 MMMM D일',\n LLL: 'YYYY년 MMMM D일 A h:mm',\n LLLL: 'YYYY년 MMMM D일 dddd A h:mm',\n l: 'YYYY.MM.DD.',\n ll: 'YYYY년 MMMM D일',\n lll: 'YYYY년 MMMM D일 A h:mm',\n llll: 'YYYY년 MMMM D일 dddd A h:mm'\n },\n calendar: {\n sameDay: '오늘 LT',\n nextDay: '내일 LT',\n nextWeek: 'dddd LT',\n lastDay: '어제 LT',\n lastWeek: '지난주 dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s 후',\n past: '%s 전',\n s: '몇 초',\n ss: '%d초',\n m: '1분',\n mm: '%d분',\n h: '한 시간',\n hh: '%d시간',\n d: '하루',\n dd: '%d일',\n M: '한 달',\n MM: '%d달',\n y: '일 년',\n yy: '%d년'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(일|월|주)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '일';\n\n case 'M':\n return number + '월';\n\n case 'w':\n case 'W':\n return number + '주';\n\n default:\n return number;\n }\n },\n meridiemParse: /오전|오후/,\n isPM: function isPM(token) {\n return token === '오후';\n },\n meridiem: function meridiem(hour, minute, isUpper) {\n return hour < 12 ? '오전' : '오후';\n }\n });\n return ko;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Kurdish [ku]\n//! author : Shahram Mebashar : https://github.com/ShahramMebashar\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠'\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0'\n },\n months = ['کانونی دووەم', 'شوبات', 'ئازار', 'نیسان', 'ئایار', 'حوزەیران', 'تەمموز', 'ئاب', 'ئەیلوول', 'تشرینی یەكەم', 'تشرینی دووەم', 'كانونی یەکەم'];\n var ku = moment.defineLocale('ku', {\n months: months,\n monthsShort: months,\n weekdays: 'یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه'.split('_'),\n weekdaysShort: 'یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه'.split('_'),\n weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n meridiemParse: /ئێواره|بهیانی/,\n isPM: function isPM(input) {\n return /ئێواره/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'بهیانی';\n } else {\n return 'ئێواره';\n }\n },\n calendar: {\n sameDay: '[ئهمرۆ كاتژمێر] LT',\n nextDay: '[بهیانی كاتژمێر] LT',\n nextWeek: 'dddd [كاتژمێر] LT',\n lastDay: '[دوێنێ كاتژمێر] LT',\n lastWeek: 'dddd [كاتژمێر] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'له %s',\n past: '%s',\n s: 'چهند چركهیهك',\n ss: 'چركه %d',\n m: 'یهك خولهك',\n mm: '%d خولهك',\n h: 'یهك كاتژمێر',\n hh: '%d كاتژمێر',\n d: 'یهك ڕۆژ',\n dd: '%d ڕۆژ',\n M: 'یهك مانگ',\n MM: '%d مانگ',\n y: 'یهك ساڵ',\n yy: '%d ساڵ'\n },\n preparse: function preparse(string) {\n return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n }).replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n }).replace(/,/g, '،');\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return ku;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var suffixes = {\n 0: '-чү',\n 1: '-чи',\n 2: '-чи',\n 3: '-чү',\n 4: '-чү',\n 5: '-чи',\n 6: '-чы',\n 7: '-чи',\n 8: '-чи',\n 9: '-чу',\n 10: '-чу',\n 20: '-чы',\n 30: '-чу',\n 40: '-чы',\n 50: '-чү',\n 60: '-чы',\n 70: '-чи',\n 80: '-чи',\n 90: '-чу',\n 100: '-чү'\n };\n var ky = moment.defineLocale('ky', {\n months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),\n monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'),\n weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Бүгүн саат] LT',\n nextDay: '[Эртең саат] LT',\n nextWeek: 'dddd [саат] LT',\n lastDay: '[Кечээ саат] LT',\n lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ичинде',\n past: '%s мурун',\n s: 'бирнече секунд',\n ss: '%d секунд',\n m: 'бир мүнөт',\n mm: '%d мүнөт',\n h: 'бир саат',\n hh: '%d саат',\n d: 'бир күн',\n dd: '%d күн',\n M: 'бир ай',\n MM: '%d ай',\n y: 'бир жыл',\n yy: '%d жыл'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n ordinal: function ordinal(number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return ky;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eng Minutt', 'enger Minutt'],\n h: ['eng Stonn', 'enger Stonn'],\n d: ['een Dag', 'engem Dag'],\n M: ['ee Mount', 'engem Mount'],\n y: ['ee Joer', 'engem Joer']\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n function processFutureTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n\n if (eifelerRegelAppliesToNumber(number)) {\n return 'a ' + string;\n }\n\n return 'an ' + string;\n }\n\n function processPastTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n\n if (eifelerRegelAppliesToNumber(number)) {\n return 'viru ' + string;\n }\n\n return 'virun ' + string;\n }\n /**\n * Returns true if the word before the given number loses the '-n' ending.\n * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n *\n * @param number {integer}\n * @returns {boolean}\n */\n\n\n function eifelerRegelAppliesToNumber(number) {\n number = parseInt(number, 10);\n\n if (isNaN(number)) {\n return false;\n }\n\n if (number < 0) {\n // Negative Number --> always true\n return true;\n } else if (number < 10) {\n // Only 1 digit\n if (4 <= number && number <= 7) {\n return true;\n }\n\n return false;\n } else if (number < 100) {\n // 2 digits\n var lastDigit = number % 10,\n firstDigit = number / 10;\n\n if (lastDigit === 0) {\n return eifelerRegelAppliesToNumber(firstDigit);\n }\n\n return eifelerRegelAppliesToNumber(lastDigit);\n } else if (number < 10000) {\n // 3 or 4 digits --> recursively check first digit\n while (number >= 10) {\n number = number / 10;\n }\n\n return eifelerRegelAppliesToNumber(number);\n } else {\n // Anything larger than 4 digits: recursively check first n-3 digits\n number = number / 1000;\n return eifelerRegelAppliesToNumber(number);\n }\n }\n\n var lb = moment.defineLocale('lb', {\n months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),\n monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'),\n weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm [Auer]',\n LTS: 'H:mm:ss [Auer]',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm [Auer]',\n LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]'\n },\n calendar: {\n sameDay: '[Haut um] LT',\n sameElse: 'L',\n nextDay: '[Muer um] LT',\n nextWeek: 'dddd [um] LT',\n lastDay: '[Gëschter um] LT',\n lastWeek: function lastWeek() {\n // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n switch (this.day()) {\n case 2:\n case 4:\n return '[Leschten] dddd [um] LT';\n\n default:\n return '[Leschte] dddd [um] LT';\n }\n }\n },\n relativeTime: {\n future: processFutureTime,\n past: processPastTime,\n s: 'e puer Sekonnen',\n ss: '%d Sekonnen',\n m: processRelativeTime,\n mm: '%d Minutten',\n h: processRelativeTime,\n hh: '%d Stonnen',\n d: processRelativeTime,\n dd: '%d Deeg',\n M: processRelativeTime,\n MM: '%d Méint',\n y: processRelativeTime,\n yy: '%d Joer'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return lb;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var lo = moment.defineLocale('lo', {\n months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),\n monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),\n weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'ວັນdddd D MMMM YYYY HH:mm'\n },\n meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n isPM: function isPM(input) {\n return input === 'ຕອນແລງ';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ຕອນເຊົ້າ';\n } else {\n return 'ຕອນແລງ';\n }\n },\n calendar: {\n sameDay: '[ມື້ນີ້ເວລາ] LT',\n nextDay: '[ມື້ອື່ນເວລາ] LT',\n nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',\n lastDay: '[ມື້ວານນີ້ເວລາ] LT',\n lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ອີກ %s',\n past: '%sຜ່ານມາ',\n s: 'ບໍ່ເທົ່າໃດວິນາທີ',\n ss: '%d ວິນາທີ',\n m: '1 ນາທີ',\n mm: '%d ນາທີ',\n h: '1 ຊົ່ວໂມງ',\n hh: '%d ຊົ່ວໂມງ',\n d: '1 ມື້',\n dd: '%d ມື້',\n M: '1 ເດືອນ',\n MM: '%d ເດືອນ',\n y: '1 ປີ',\n yy: '%d ປີ'\n },\n dayOfMonthOrdinalParse: /(ທີ່)\\d{1,2}/,\n ordinal: function ordinal(number) {\n return 'ທີ່' + number;\n }\n });\n return lo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var units = {\n ss: 'sekundė_sekundžių_sekundes',\n m: 'minutė_minutės_minutę',\n mm: 'minutės_minučių_minutes',\n h: 'valanda_valandos_valandą',\n hh: 'valandos_valandų_valandas',\n d: 'diena_dienos_dieną',\n dd: 'dienos_dienų_dienas',\n M: 'mėnuo_mėnesio_mėnesį',\n MM: 'mėnesiai_mėnesių_mėnesius',\n y: 'metai_metų_metus',\n yy: 'metai_metų_metus'\n };\n\n function translateSeconds(number, withoutSuffix, key, isFuture) {\n if (withoutSuffix) {\n return 'kelios sekundės';\n } else {\n return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n }\n }\n\n function translateSingular(number, withoutSuffix, key, isFuture) {\n return withoutSuffix ? forms(key)[0] : isFuture ? forms(key)[1] : forms(key)[2];\n }\n\n function special(number) {\n return number % 10 === 0 || number > 10 && number < 20;\n }\n\n function forms(key) {\n return units[key].split('_');\n }\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n if (number === 1) {\n return result + translateSingular(number, withoutSuffix, key[0], isFuture);\n } else if (withoutSuffix) {\n return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n } else {\n if (isFuture) {\n return result + forms(key)[1];\n } else {\n return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n }\n }\n }\n\n var lt = moment.defineLocale('lt', {\n months: {\n format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),\n standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),\n isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/\n },\n monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n weekdays: {\n format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),\n standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),\n isFormat: /dddd HH:mm/\n },\n weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY [m.] MMMM D [d.]',\n LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n l: 'YYYY-MM-DD',\n ll: 'YYYY [m.] MMMM D [d.]',\n lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'\n },\n calendar: {\n sameDay: '[Šiandien] LT',\n nextDay: '[Rytoj] LT',\n nextWeek: 'dddd LT',\n lastDay: '[Vakar] LT',\n lastWeek: '[Praėjusį] dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'po %s',\n past: 'prieš %s',\n s: translateSeconds,\n ss: translate,\n m: translateSingular,\n mm: translate,\n h: translateSingular,\n hh: translate,\n d: translateSingular,\n dd: translate,\n M: translateSingular,\n MM: translate,\n y: translateSingular,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n ordinal: function ordinal(number) {\n return number + '-oji';\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return lt;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var units = {\n ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),\n m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n h: 'stundas_stundām_stunda_stundas'.split('_'),\n hh: 'stundas_stundām_stunda_stundas'.split('_'),\n d: 'dienas_dienām_diena_dienas'.split('_'),\n dd: 'dienas_dienām_diena_dienas'.split('_'),\n M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n y: 'gada_gadiem_gads_gadi'.split('_'),\n yy: 'gada_gadiem_gads_gadi'.split('_')\n };\n /**\n * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n */\n\n function format(forms, number, withoutSuffix) {\n if (withoutSuffix) {\n // E.g. \"21 minūte\", \"3 minūtes\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n } else {\n // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n }\n }\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n return number + ' ' + format(units[key], number, withoutSuffix);\n }\n\n function relativeTimeWithSingular(number, withoutSuffix, key) {\n return format(units[key], number, withoutSuffix);\n }\n\n function relativeSeconds(number, withoutSuffix) {\n return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n }\n\n var lv = moment.defineLocale('lv', {\n months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),\n monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),\n weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY.',\n LL: 'YYYY. [gada] D. MMMM',\n LLL: 'YYYY. [gada] D. MMMM, HH:mm',\n LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm'\n },\n calendar: {\n sameDay: '[Šodien pulksten] LT',\n nextDay: '[Rīt pulksten] LT',\n nextWeek: 'dddd [pulksten] LT',\n lastDay: '[Vakar pulksten] LT',\n lastWeek: '[Pagājušā] dddd [pulksten] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'pēc %s',\n past: 'pirms %s',\n s: relativeSeconds,\n ss: relativeTimeWithPlural,\n m: relativeTimeWithSingular,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithSingular,\n hh: relativeTimeWithPlural,\n d: relativeTimeWithSingular,\n dd: relativeTimeWithPlural,\n M: relativeTimeWithSingular,\n MM: relativeTimeWithPlural,\n y: relativeTimeWithSingular,\n yy: relativeTimeWithPlural\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return lv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač : https://github.com/miodragnikac\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekund', 'sekunda', 'sekundi'],\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n dd: ['dan', 'dana', 'dana'],\n MM: ['mjesec', 'mjeseca', 'mjeseci'],\n yy: ['godina', 'godine', 'godina']\n },\n correctGrammaticalCase: function correctGrammaticalCase(number, wordKey) {\n return number === 1 ? wordKey[0] : number >= 2 && number <= 4 ? wordKey[1] : wordKey[2];\n },\n translate: function translate(number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n }\n }\n };\n var me = moment.defineLocale('me', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sjutra u] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n\n case 3:\n return '[u] [srijedu] [u] LT';\n\n case 6:\n return '[u] [subotu] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function lastWeek() {\n var lastWeekDays = ['[prošle] [nedjelje] [u] LT', '[prošlog] [ponedjeljka] [u] LT', '[prošlog] [utorka] [u] LT', '[prošle] [srijede] [u] LT', '[prošlog] [četvrtka] [u] LT', '[prošlog] [petka] [u] LT', '[prošle] [subote] [u] LT'];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'dan',\n dd: translator.translate,\n M: 'mjesec',\n MM: translator.translate,\n y: 'godinu',\n yy: translator.translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return me;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan : https://github.com/johnideal\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var mi = moment.defineLocale('mi', {\n months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'),\n monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'),\n monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [i] HH:mm',\n LLLL: 'dddd, D MMMM YYYY [i] HH:mm'\n },\n calendar: {\n sameDay: '[i teie mahana, i] LT',\n nextDay: '[apopo i] LT',\n nextWeek: 'dddd [i] LT',\n lastDay: '[inanahi i] LT',\n lastWeek: 'dddd [whakamutunga i] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'i roto i %s',\n past: '%s i mua',\n s: 'te hēkona ruarua',\n ss: '%d hēkona',\n m: 'he meneti',\n mm: '%d meneti',\n h: 'te haora',\n hh: '%d haora',\n d: 'he ra',\n dd: '%d ra',\n M: 'he marama',\n MM: '%d marama',\n y: 'he tau',\n yy: '%d tau'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return mi;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n//! author : Sashko Todorov : https://github.com/bkyceh\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var mk = moment.defineLocale('mk', {\n months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'),\n monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'),\n weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[Денес во] LT',\n nextDay: '[Утре во] LT',\n nextWeek: '[Во] dddd [во] LT',\n lastDay: '[Вчера во] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Изминатата] dddd [во] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Изминатиот] dddd [во] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'за %s',\n past: 'пред %s',\n s: 'неколку секунди',\n ss: '%d секунди',\n m: 'една минута',\n mm: '%d минути',\n h: 'еден час',\n hh: '%d часа',\n d: 'еден ден',\n dd: '%d дена',\n M: 'еден месец',\n MM: '%d месеци',\n y: 'една година',\n yy: '%d години'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function ordinal(number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return mk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ml = moment.defineLocale('ml', {\n months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'),\n monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'),\n monthsParseExact: true,\n weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'),\n weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm -നു',\n LTS: 'A h:mm:ss -നു',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm -നു',\n LLLL: 'dddd, D MMMM YYYY, A h:mm -നു'\n },\n calendar: {\n sameDay: '[ഇന്ന്] LT',\n nextDay: '[നാളെ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ഇന്നലെ] LT',\n lastWeek: '[കഴിഞ്ഞ] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s കഴിഞ്ഞ്',\n past: '%s മുൻപ്',\n s: 'അൽപ നിമിഷങ്ങൾ',\n ss: '%d സെക്കൻഡ്',\n m: 'ഒരു മിനിറ്റ്',\n mm: '%d മിനിറ്റ്',\n h: 'ഒരു മണിക്കൂർ',\n hh: '%d മണിക്കൂർ',\n d: 'ഒരു ദിവസം',\n dd: '%d ദിവസം',\n M: 'ഒരു മാസം',\n MM: '%d മാസം',\n y: 'ഒരു വർഷം',\n yy: '%d വർഷം'\n },\n meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'രാത്രി' && hour >= 4 || meridiem === 'ഉച്ച കഴിഞ്ഞ്' || meridiem === 'വൈകുന്നേരം') {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'രാത്രി';\n } else if (hour < 12) {\n return 'രാവിലെ';\n } else if (hour < 17) {\n return 'ഉച്ച കഴിഞ്ഞ്';\n } else if (hour < 20) {\n return 'വൈകുന്നേരം';\n } else {\n return 'രാത്രി';\n }\n }\n });\n return ml;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Mongolian [mn]\n//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key, isFuture) {\n switch (key) {\n case 's':\n return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n\n case 'ss':\n return number + (withoutSuffix ? ' секунд' : ' секундын');\n\n case 'm':\n case 'mm':\n return number + (withoutSuffix ? ' минут' : ' минутын');\n\n case 'h':\n case 'hh':\n return number + (withoutSuffix ? ' цаг' : ' цагийн');\n\n case 'd':\n case 'dd':\n return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n\n case 'M':\n case 'MM':\n return number + (withoutSuffix ? ' сар' : ' сарын');\n\n case 'y':\n case 'yy':\n return number + (withoutSuffix ? ' жил' : ' жилийн');\n\n default:\n return number;\n }\n }\n\n var mn = moment.defineLocale('mn', {\n months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'),\n monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'),\n monthsParseExact: true,\n weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),\n weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),\n weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY оны MMMMын D',\n LLL: 'YYYY оны MMMMын D HH:mm',\n LLLL: 'dddd, YYYY оны MMMMын D HH:mm'\n },\n meridiemParse: /ҮӨ|ҮХ/i,\n isPM: function isPM(input) {\n return input === 'ҮХ';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ҮӨ';\n } else {\n return 'ҮХ';\n }\n },\n calendar: {\n sameDay: '[Өнөөдөр] LT',\n nextDay: '[Маргааш] LT',\n nextWeek: '[Ирэх] dddd LT',\n lastDay: '[Өчигдөр] LT',\n lastWeek: '[Өнгөрсөн] dddd LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s дараа',\n past: '%s өмнө',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2} өдөр/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + ' өдөр';\n\n default:\n return number;\n }\n }\n });\n return mn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०'\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0'\n };\n\n function relativeTimeMr(number, withoutSuffix, string, isFuture) {\n var output = '';\n\n if (withoutSuffix) {\n switch (string) {\n case 's':\n output = 'काही सेकंद';\n break;\n\n case 'ss':\n output = '%d सेकंद';\n break;\n\n case 'm':\n output = 'एक मिनिट';\n break;\n\n case 'mm':\n output = '%d मिनिटे';\n break;\n\n case 'h':\n output = 'एक तास';\n break;\n\n case 'hh':\n output = '%d तास';\n break;\n\n case 'd':\n output = 'एक दिवस';\n break;\n\n case 'dd':\n output = '%d दिवस';\n break;\n\n case 'M':\n output = 'एक महिना';\n break;\n\n case 'MM':\n output = '%d महिने';\n break;\n\n case 'y':\n output = 'एक वर्ष';\n break;\n\n case 'yy':\n output = '%d वर्षे';\n break;\n }\n } else {\n switch (string) {\n case 's':\n output = 'काही सेकंदां';\n break;\n\n case 'ss':\n output = '%d सेकंदां';\n break;\n\n case 'm':\n output = 'एका मिनिटा';\n break;\n\n case 'mm':\n output = '%d मिनिटां';\n break;\n\n case 'h':\n output = 'एका तासा';\n break;\n\n case 'hh':\n output = '%d तासां';\n break;\n\n case 'd':\n output = 'एका दिवसा';\n break;\n\n case 'dd':\n output = '%d दिवसां';\n break;\n\n case 'M':\n output = 'एका महिन्या';\n break;\n\n case 'MM':\n output = '%d महिन्यां';\n break;\n\n case 'y':\n output = 'एका वर्षा';\n break;\n\n case 'yy':\n output = '%d वर्षां';\n break;\n }\n }\n\n return output.replace(/%d/i, number);\n }\n\n var mr = moment.defineLocale('mr', {\n months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'),\n monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),\n monthsParseExact: true,\n weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm वाजता',\n LTS: 'A h:mm:ss वाजता',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm वाजता',\n LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता'\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[उद्या] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[काल] LT',\n lastWeek: '[मागील] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%sमध्ये',\n past: '%sपूर्वी',\n s: relativeTimeMr,\n ss: relativeTimeMr,\n m: relativeTimeMr,\n mm: relativeTimeMr,\n h: relativeTimeMr,\n hh: relativeTimeMr,\n d: relativeTimeMr,\n dd: relativeTimeMr,\n M: relativeTimeMr,\n MM: relativeTimeMr,\n y: relativeTimeMr,\n yy: relativeTimeMr\n },\n preparse: function preparse(string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {\n return hour;\n } else if (meridiem === 'दुपारी' || meridiem === 'सायंकाळी' || meridiem === 'रात्री') {\n return hour >= 12 ? hour : hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour >= 0 && hour < 6) {\n return 'पहाटे';\n } else if (hour < 12) {\n return 'सकाळी';\n } else if (hour < 17) {\n return 'दुपारी';\n } else if (hour < 20) {\n return 'सायंकाळी';\n } else {\n return 'रात्री';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return mr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ms = moment.defineLocale('ms', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return ms;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var msMy = moment.defineLocale('ms-my', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return msMy;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Maltese (Malta) [mt]\n//! author : Alessandro Maruccia : https://github.com/alesma\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var mt = moment.defineLocale('mt', {\n months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split('_'),\n monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),\n weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split('_'),\n weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),\n weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Illum fil-]LT',\n nextDay: '[Għada fil-]LT',\n nextWeek: 'dddd [fil-]LT',\n lastDay: '[Il-bieraħ fil-]LT',\n lastWeek: 'dddd [li għadda] [fil-]LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'f’ %s',\n past: '%s ilu',\n s: 'ftit sekondi',\n ss: '%d sekondi',\n m: 'minuta',\n mm: '%d minuti',\n h: 'siegħa',\n hh: '%d siegħat',\n d: 'ġurnata',\n dd: '%d ġranet',\n M: 'xahar',\n MM: '%d xhur',\n y: 'sena',\n yy: '%d sni'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return mt;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '၁',\n 2: '၂',\n 3: '၃',\n 4: '၄',\n 5: '၅',\n 6: '၆',\n 7: '၇',\n 8: '၈',\n 9: '၉',\n 0: '၀'\n },\n numberMap = {\n '၁': '1',\n '၂': '2',\n '၃': '3',\n '၄': '4',\n '၅': '5',\n '၆': '6',\n '၇': '7',\n '၈': '8',\n '၉': '9',\n '၀': '0'\n };\n var my = moment.defineLocale('my', {\n months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'),\n monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'),\n weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[ယနေ.] LT [မှာ]',\n nextDay: '[မနက်ဖြန်] LT [မှာ]',\n nextWeek: 'dddd LT [မှာ]',\n lastDay: '[မနေ.က] LT [မှာ]',\n lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'လာမည့် %s မှာ',\n past: 'လွန်ခဲ့သော %s က',\n s: 'စက္ကန်.အနည်းငယ်',\n ss: '%d စက္ကန့်',\n m: 'တစ်မိနစ်',\n mm: '%d မိနစ်',\n h: 'တစ်နာရီ',\n hh: '%d နာရီ',\n d: 'တစ်ရက်',\n dd: '%d ရက်',\n M: 'တစ်လ',\n MM: '%d လ',\n y: 'တစ်နှစ်',\n yy: '%d နှစ်'\n },\n preparse: function preparse(string) {\n return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return my;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//! Sigurd Gartmann : https://github.com/sigurdga\n//! Stephen Ramthun : https://github.com/stephenramthun\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var nb = moment.defineLocale('nb', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[forrige] dddd [kl.] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'noen sekunder',\n ss: '%d sekunder',\n m: 'ett minutt',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dager',\n w: 'en uke',\n ww: '%d uker',\n M: 'en måned',\n MM: '%d måneder',\n y: 'ett år',\n yy: '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return nb;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०'\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0'\n };\n var ne = moment.defineLocale('ne', {\n months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'),\n monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'),\n monthsParseExact: true,\n weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'),\n weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'Aको h:mm बजे',\n LTS: 'Aको h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, Aको h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे'\n },\n preparse: function preparse(string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'राति') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'बिहान') {\n return hour;\n } else if (meridiem === 'दिउँसो') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'साँझ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 3) {\n return 'राति';\n } else if (hour < 12) {\n return 'बिहान';\n } else if (hour < 16) {\n return 'दिउँसो';\n } else if (hour < 20) {\n return 'साँझ';\n } else {\n return 'राति';\n }\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[भोलि] LT',\n nextWeek: '[आउँदो] dddd[,] LT',\n lastDay: '[हिजो] LT',\n lastWeek: '[गएको] dddd[,] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%sमा',\n past: '%s अगाडि',\n s: 'केही क्षण',\n ss: '%d सेकेण्ड',\n m: 'एक मिनेट',\n mm: '%d मिनेट',\n h: 'एक घण्टा',\n hh: '%d घण्टा',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महिना',\n MM: '%d महिना',\n y: 'एक बर्ष',\n yy: '%d बर्ष'\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return ne;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i],\n monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n var nl = moment.defineLocale('nl', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n w: 'één week',\n ww: '%d weken',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function ordinal(number) {\n return number + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return nl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i],\n monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n var nlBe = moment.defineLocale('nl-be', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),\n monthsShort: function monthsShort(m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex: /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function ordinal(number) {\n return number + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return nlBe;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! authors : https://github.com/mechuwind\n//! Stephen Ramthun : https://github.com/stephenramthun\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var nn = moment.defineLocale('nn', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),\n monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),\n weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'\n },\n calendar: {\n sameDay: '[I dag klokka] LT',\n nextDay: '[I morgon klokka] LT',\n nextWeek: 'dddd [klokka] LT',\n lastDay: '[I går klokka] LT',\n lastWeek: '[Føregåande] dddd [klokka] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'om %s',\n past: '%s sidan',\n s: 'nokre sekund',\n ss: '%d sekund',\n m: 'eit minutt',\n mm: '%d minutt',\n h: 'ein time',\n hh: '%d timar',\n d: 'ein dag',\n dd: '%d dagar',\n w: 'ei veke',\n ww: '%d veker',\n M: 'ein månad',\n MM: '%d månader',\n y: 'eit år',\n yy: '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return nn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Occitan, lengadocian dialecte [oc-lnc]\n//! author : Quentin PAGÈS : https://github.com/Quenty31\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ocLnc = moment.defineLocale('oc-lnc', {\n months: {\n standalone: 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split('_'),\n format: \"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre\".split('_'),\n isFormat: /D[oD]?(\\s)+MMMM/\n },\n monthsShort: 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split('_'),\n weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',\n llll: 'ddd D MMM YYYY, H:mm'\n },\n calendar: {\n sameDay: '[uèi a] LT',\n nextDay: '[deman a] LT',\n nextWeek: 'dddd [a] LT',\n lastDay: '[ièr a] LT',\n lastWeek: 'dddd [passat a] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'unas segondas',\n ss: '%d segondas',\n m: 'una minuta',\n mm: '%d minutas',\n h: 'una ora',\n hh: '%d oras',\n d: 'un jorn',\n dd: '%d jorns',\n M: 'un mes',\n MM: '%d meses',\n y: 'un an',\n yy: '%d ans'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function ordinal(number, period) {\n var output = number === 1 ? 'r' : number === 2 ? 'n' : number === 3 ? 'r' : number === 4 ? 't' : 'è';\n\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4\n }\n });\n return ocLnc;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '੧',\n 2: '੨',\n 3: '੩',\n 4: '੪',\n 5: '੫',\n 6: '੬',\n 7: '੭',\n 8: '੮',\n 9: '੯',\n 0: '੦'\n },\n numberMap = {\n '੧': '1',\n '੨': '2',\n '੩': '3',\n '੪': '4',\n '੫': '5',\n '੬': '6',\n '੭': '7',\n '੮': '8',\n '੯': '9',\n '੦': '0'\n };\n var paIn = moment.defineLocale('pa-in', {\n // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.\n months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),\n monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),\n weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'),\n weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm ਵਜੇ',\n LTS: 'A h:mm:ss ਵਜੇ',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',\n LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'\n },\n calendar: {\n sameDay: '[ਅਜ] LT',\n nextDay: '[ਕਲ] LT',\n nextWeek: '[ਅਗਲਾ] dddd, LT',\n lastDay: '[ਕਲ] LT',\n lastWeek: '[ਪਿਛਲੇ] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s ਵਿੱਚ',\n past: '%s ਪਿਛਲੇ',\n s: 'ਕੁਝ ਸਕਿੰਟ',\n ss: '%d ਸਕਿੰਟ',\n m: 'ਇਕ ਮਿੰਟ',\n mm: '%d ਮਿੰਟ',\n h: 'ਇੱਕ ਘੰਟਾ',\n hh: '%d ਘੰਟੇ',\n d: 'ਇੱਕ ਦਿਨ',\n dd: '%d ਦਿਨ',\n M: 'ਇੱਕ ਮਹੀਨਾ',\n MM: '%d ਮਹੀਨੇ',\n y: 'ਇੱਕ ਸਾਲ',\n yy: '%d ਸਾਲ'\n },\n preparse: function preparse(string) {\n return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'ਰਾਤ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ਸਵੇਰ') {\n return hour;\n } else if (meridiem === 'ਦੁਪਹਿਰ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ਸ਼ਾਮ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ਰਾਤ';\n } else if (hour < 10) {\n return 'ਸਵੇਰ';\n } else if (hour < 17) {\n return 'ਦੁਪਹਿਰ';\n } else if (hour < 20) {\n return 'ਸ਼ਾਮ';\n } else {\n return 'ਰਾਤ';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return paIn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'),\n monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_'),\n monthsParse = [/^sty/i, /^lut/i, /^mar/i, /^kwi/i, /^maj/i, /^cze/i, /^lip/i, /^sie/i, /^wrz/i, /^paź/i, /^lis/i, /^gru/i];\n\n function plural(n) {\n return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;\n }\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n\n switch (key) {\n case 'ss':\n return result + (plural(number) ? 'sekundy' : 'sekund');\n\n case 'm':\n return withoutSuffix ? 'minuta' : 'minutę';\n\n case 'mm':\n return result + (plural(number) ? 'minuty' : 'minut');\n\n case 'h':\n return withoutSuffix ? 'godzina' : 'godzinę';\n\n case 'hh':\n return result + (plural(number) ? 'godziny' : 'godzin');\n\n case 'ww':\n return result + (plural(number) ? 'tygodnie' : 'tygodni');\n\n case 'MM':\n return result + (plural(number) ? 'miesiące' : 'miesięcy');\n\n case 'yy':\n return result + (plural(number) ? 'lata' : 'lat');\n }\n }\n\n var pl = moment.defineLocale('pl', {\n months: function months(momentToFormat, format) {\n if (!momentToFormat) {\n return monthsNominative;\n } else if (/D MMMM/.test(format)) {\n return monthsSubjective[momentToFormat.month()];\n } else {\n return monthsNominative[momentToFormat.month()];\n }\n },\n monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Dziś o] LT',\n nextDay: '[Jutro o] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[W niedzielę o] LT';\n\n case 2:\n return '[We wtorek o] LT';\n\n case 3:\n return '[W środę o] LT';\n\n case 6:\n return '[W sobotę o] LT';\n\n default:\n return '[W] dddd [o] LT';\n }\n },\n lastDay: '[Wczoraj o] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[W zeszłą niedzielę o] LT';\n\n case 3:\n return '[W zeszłą środę o] LT';\n\n case 6:\n return '[W zeszłą sobotę o] LT';\n\n default:\n return '[W zeszły] dddd [o] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: '%s temu',\n s: 'kilka sekund',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: '1 dzień',\n dd: '%d dni',\n w: 'tydzień',\n ww: translate,\n M: 'miesiąc',\n MM: translate,\n y: 'rok',\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return pl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var pt = moment.defineLocale('pt', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),\n weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function lastWeek() {\n return this.day() === 0 || this.day() === 6 ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n w: 'uma semana',\n ww: '%d semanas',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return pt;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ptBr = moment.defineLocale('pt-br', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split('_'),\n weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),\n weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function lastWeek() {\n return this.day() === 0 || this.day() === 6 ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'poucos segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n invalidDate: 'Data inválida'\n });\n return ptBr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n//! author : Emanuel Cepoi : https://github.com/cepem\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: 'secunde',\n mm: 'minute',\n hh: 'ore',\n dd: 'zile',\n ww: 'săptămâni',\n MM: 'luni',\n yy: 'ani'\n },\n separator = ' ';\n\n if (number % 100 >= 20 || number >= 100 && number % 100 === 0) {\n separator = ' de ';\n }\n\n return number + separator + format[key];\n }\n\n var ro = moment.defineLocale('ro', {\n months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),\n monthsShort: 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[azi la] LT',\n nextDay: '[mâine la] LT',\n nextWeek: 'dddd [la] LT',\n lastDay: '[ieri la] LT',\n lastWeek: '[fosta] dddd [la] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'peste %s',\n past: '%s în urmă',\n s: 'câteva secunde',\n ss: relativeTimeWithPlural,\n m: 'un minut',\n mm: relativeTimeWithPlural,\n h: 'o oră',\n hh: relativeTimeWithPlural,\n d: 'o zi',\n dd: relativeTimeWithPlural,\n w: 'o săptămână',\n ww: relativeTimeWithPlural,\n M: 'o lună',\n MM: relativeTimeWithPlural,\n y: 'un an',\n yy: relativeTimeWithPlural\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return ro;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2];\n }\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n hh: 'час_часа_часов',\n dd: 'день_дня_дней',\n ww: 'неделя_недели_недель',\n MM: 'месяц_месяца_месяцев',\n yy: 'год_года_лет'\n };\n\n if (key === 'm') {\n return withoutSuffix ? 'минута' : 'минуту';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i]; // http://new.gramota.ru/spravka/rules/139-prop : § 103\n // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n\n var ru = moment.defineLocale('ru', {\n months: {\n format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),\n standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')\n },\n monthsShort: {\n // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку?\n format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),\n standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')\n },\n weekdays: {\n standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),\n format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),\n isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/\n },\n weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n monthsRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n // копия предыдущего\n monthsShortRegex: /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n // полные названия с падежами\n monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n // Выражение, которое соответствует только сокращённым формам\n monthsShortStrictRegex: /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., H:mm',\n LLLL: 'dddd, D MMMM YYYY г., H:mm'\n },\n calendar: {\n sameDay: '[Сегодня, в] LT',\n nextDay: '[Завтра, в] LT',\n lastDay: '[Вчера, в] LT',\n nextWeek: function nextWeek(now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В следующее] dddd, [в] LT';\n\n case 1:\n case 2:\n case 4:\n return '[В следующий] dddd, [в] LT';\n\n case 3:\n case 5:\n case 6:\n return '[В следующую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n lastWeek: function lastWeek(now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В прошлое] dddd, [в] LT';\n\n case 1:\n case 2:\n case 4:\n return '[В прошлый] dddd, [в] LT';\n\n case 3:\n case 5:\n case 6:\n return '[В прошлую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'через %s',\n past: '%s назад',\n s: 'несколько секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'час',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n w: 'неделя',\n ww: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural\n },\n meridiemParse: /ночи|утра|дня|вечера/i,\n isPM: function isPM(input) {\n return /^(дня|вечера)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ночи';\n } else if (hour < 12) {\n return 'утра';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечера';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n return number + '-й';\n\n case 'D':\n return number + '-го';\n\n case 'w':\n case 'W':\n return number + '-я';\n\n default:\n return number;\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ru;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Sindhi [sd]\n//! author : Narain Sagar : https://github.com/narainsagar\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = ['جنوري', 'فيبروري', 'مارچ', 'اپريل', 'مئي', 'جون', 'جولاءِ', 'آگسٽ', 'سيپٽمبر', 'آڪٽوبر', 'نومبر', 'ڊسمبر'],\n days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];\n var sd = moment.defineLocale('sd', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm'\n },\n meridiemParse: /صبح|شام/,\n isPM: function isPM(input) {\n return 'شام' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n\n return 'شام';\n },\n calendar: {\n sameDay: '[اڄ] LT',\n nextDay: '[سڀاڻي] LT',\n nextWeek: 'dddd [اڳين هفتي تي] LT',\n lastDay: '[ڪالهه] LT',\n lastWeek: '[گزريل هفتي] dddd [تي] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s پوء',\n past: '%s اڳ',\n s: 'چند سيڪنڊ',\n ss: '%d سيڪنڊ',\n m: 'هڪ منٽ',\n mm: '%d منٽ',\n h: 'هڪ ڪلاڪ',\n hh: '%d ڪلاڪ',\n d: 'هڪ ڏينهن',\n dd: '%d ڏينهن',\n M: 'هڪ مهينو',\n MM: '%d مهينا',\n y: 'هڪ سال',\n yy: '%d سال'\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return sd;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var se = moment.defineLocale('se', {\n months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'),\n monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'),\n weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n weekdaysMin: 's_v_m_g_d_b_L'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'MMMM D. [b.] YYYY',\n LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',\n LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm'\n },\n calendar: {\n sameDay: '[otne ti] LT',\n nextDay: '[ihttin ti] LT',\n nextWeek: 'dddd [ti] LT',\n lastDay: '[ikte ti] LT',\n lastWeek: '[ovddit] dddd [ti] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s geažes',\n past: 'maŋit %s',\n s: 'moadde sekunddat',\n ss: '%d sekunddat',\n m: 'okta minuhta',\n mm: '%d minuhtat',\n h: 'okta diimmu',\n hh: '%d diimmut',\n d: 'okta beaivi',\n dd: '%d beaivvit',\n M: 'okta mánnu',\n MM: '%d mánut',\n y: 'okta jahki',\n yy: '%d jagit'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return se;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n /*jshint -W100*/\n\n var si = moment.defineLocale('si', {\n months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'),\n monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'),\n weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'),\n weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන'.split('_'),\n weekdaysMin: 'ඉ_ස_අ_බ_බ්ර_සි_සෙ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'a h:mm',\n LTS: 'a h:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY MMMM D',\n LLL: 'YYYY MMMM D, a h:mm',\n LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss'\n },\n calendar: {\n sameDay: '[අද] LT[ට]',\n nextDay: '[හෙට] LT[ට]',\n nextWeek: 'dddd LT[ට]',\n lastDay: '[ඊයේ] LT[ට]',\n lastWeek: '[පසුගිය] dddd LT[ට]',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%sකින්',\n past: '%sකට පෙර',\n s: 'තත්පර කිහිපය',\n ss: 'තත්පර %d',\n m: 'මිනිත්තුව',\n mm: 'මිනිත්තු %d',\n h: 'පැය',\n hh: 'පැය %d',\n d: 'දිනය',\n dd: 'දින %d',\n M: 'මාසය',\n MM: 'මාස %d',\n y: 'වසර',\n yy: 'වසර %d'\n },\n dayOfMonthOrdinalParse: /\\d{1,2} වැනි/,\n ordinal: function ordinal(number) {\n return number + ' වැනි';\n },\n meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n isPM: function isPM(input) {\n return input === 'ප.ව.' || input === 'පස් වරු';\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'ප.ව.' : 'පස් වරු';\n } else {\n return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n }\n }\n });\n return si;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'),\n monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\n\n function plural(n) {\n return n > 1 && n < 5;\n }\n\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';\n\n case 'ss':\n // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekúnd');\n } else {\n return result + 'sekundami';\n }\n\n case 'm':\n // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';\n\n case 'mm':\n // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minúty' : 'minút');\n } else {\n return result + 'minútami';\n }\n\n case 'h':\n // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n\n case 'hh':\n // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodín');\n } else {\n return result + 'hodinami';\n }\n\n case 'd':\n // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'deň' : 'dňom';\n\n case 'dd':\n // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dni' : 'dní');\n } else {\n return result + 'dňami';\n }\n\n case 'M':\n // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';\n\n case 'MM':\n // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'mesiace' : 'mesiacov');\n } else {\n return result + 'mesiacmi';\n }\n\n case 'y':\n // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokom';\n\n case 'yy':\n // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'rokov');\n } else {\n return result + 'rokmi';\n }\n\n }\n }\n\n var sk = moment.defineLocale('sk', {\n months: months,\n monthsShort: monthsShort,\n weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),\n weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[dnes o] LT',\n nextDay: '[zajtra o] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[v nedeľu o] LT';\n\n case 1:\n case 2:\n return '[v] dddd [o] LT';\n\n case 3:\n return '[v stredu o] LT';\n\n case 4:\n return '[vo štvrtok o] LT';\n\n case 5:\n return '[v piatok o] LT';\n\n case 6:\n return '[v sobotu o] LT';\n }\n },\n lastDay: '[včera o] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[minulú nedeľu o] LT';\n\n case 1:\n case 2:\n return '[minulý] dddd [o] LT';\n\n case 3:\n return '[minulú stredu o] LT';\n\n case 4:\n case 5:\n return '[minulý] dddd [o] LT';\n\n case 6:\n return '[minulú sobotu o] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'pred %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return sk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n\n switch (key) {\n case 's':\n return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';\n\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n\n return result;\n\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n\n return result;\n\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n\n return result;\n\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n\n return result;\n\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n\n return result;\n\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n\n return result;\n }\n }\n\n var sl = moment.defineLocale('sl', {\n months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD. MM. YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm'\n },\n calendar: {\n sameDay: '[danes ob] LT',\n nextDay: '[jutri ob] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[v] [nedeljo] [ob] LT';\n\n case 3:\n return '[v] [sredo] [ob] LT';\n\n case 6:\n return '[v] [soboto] [ob] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[v] dddd [ob] LT';\n }\n },\n lastDay: '[včeraj ob] LT',\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n return '[prejšnjo] [nedeljo] [ob] LT';\n\n case 3:\n return '[prejšnjo] [sredo] [ob] LT';\n\n case 6:\n return '[prejšnjo] [soboto] [ob] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prejšnji] dddd [ob] LT';\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'čez %s',\n past: 'pred %s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return sl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var sq = moment.defineLocale('sq', {\n months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'),\n monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'),\n weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /PD|MD/,\n isPM: function isPM(input) {\n return input.charAt(0) === 'M';\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n return hours < 12 ? 'PD' : 'MD';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Sot në] LT',\n nextDay: '[Nesër në] LT',\n nextWeek: 'dddd [në] LT',\n lastDay: '[Dje në] LT',\n lastWeek: 'dddd [e kaluar në] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'në %s',\n past: '%s më parë',\n s: 'disa sekonda',\n ss: '%d sekonda',\n m: 'një minutë',\n mm: '%d minuta',\n h: 'një orë',\n hh: '%d orë',\n d: 'një ditë',\n dd: '%d ditë',\n M: 'një muaj',\n MM: '%d muaj',\n y: 'një vit',\n yy: '%d vite'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return sq;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković : https://github.com/milan-j\n//! author : Stefan Crnjaković : https://github.com/crnjakovic\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekunda', 'sekunde', 'sekundi'],\n m: ['jedan minut', 'jedne minute'],\n mm: ['minut', 'minute', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n dd: ['dan', 'dana', 'dana'],\n MM: ['mesec', 'meseca', 'meseci'],\n yy: ['godina', 'godine', 'godina']\n },\n correctGrammaticalCase: function correctGrammaticalCase(number, wordKey) {\n return number === 1 ? wordKey[0] : number >= 2 && number <= 4 ? wordKey[1] : wordKey[2];\n },\n translate: function translate(number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n }\n }\n };\n var sr = moment.defineLocale('sr', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),\n monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),\n weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm'\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[u] [nedelju] [u] LT';\n\n case 3:\n return '[u] [sredu] [u] LT';\n\n case 6:\n return '[u] [subotu] [u] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function lastWeek() {\n var lastWeekDays = ['[prošle] [nedelje] [u] LT', '[prošlog] [ponedeljka] [u] LT', '[prošlog] [utorka] [u] LT', '[prošle] [srede] [u] LT', '[prošlog] [četvrtka] [u] LT', '[prošlog] [petka] [u] LT', '[prošle] [subote] [u] LT'];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'za %s',\n past: 'pre %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'dan',\n dd: translator.translate,\n M: 'mesec',\n MM: translator.translate,\n y: 'godinu',\n yy: translator.translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return sr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković : https://github.com/milan-j\n//! author : Stefan Crnjaković : https://github.com/crnjakovic\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['секунда', 'секунде', 'секунди'],\n m: ['један минут', 'једне минуте'],\n mm: ['минут', 'минуте', 'минута'],\n h: ['један сат', 'једног сата'],\n hh: ['сат', 'сата', 'сати'],\n dd: ['дан', 'дана', 'дана'],\n MM: ['месец', 'месеца', 'месеци'],\n yy: ['година', 'године', 'година']\n },\n correctGrammaticalCase: function correctGrammaticalCase(number, wordKey) {\n return number === 1 ? wordKey[0] : number >= 2 && number <= 4 ? wordKey[1] : wordKey[2];\n },\n translate: function translate(number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return number + ' ' + translator.correctGrammaticalCase(number, wordKey);\n }\n }\n };\n var srCyrl = moment.defineLocale('sr-cyrl', {\n months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'),\n monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n monthsParseExact: true,\n weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm'\n },\n calendar: {\n sameDay: '[данас у] LT',\n nextDay: '[сутра у] LT',\n nextWeek: function nextWeek() {\n switch (this.day()) {\n case 0:\n return '[у] [недељу] [у] LT';\n\n case 3:\n return '[у] [среду] [у] LT';\n\n case 6:\n return '[у] [суботу] [у] LT';\n\n case 1:\n case 2:\n case 4:\n case 5:\n return '[у] dddd [у] LT';\n }\n },\n lastDay: '[јуче у] LT',\n lastWeek: function lastWeek() {\n var lastWeekDays = ['[прошле] [недеље] [у] LT', '[прошлог] [понедељка] [у] LT', '[прошлог] [уторка] [у] LT', '[прошле] [среде] [у] LT', '[прошлог] [четвртка] [у] LT', '[прошлог] [петка] [у] LT', '[прошле] [суботе] [у] LT'];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'за %s',\n past: 'пре %s',\n s: 'неколико секунди',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'дан',\n dd: translator.translate,\n M: 'месец',\n MM: translator.translate,\n y: 'годину',\n yy: translator.translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 1st is the first week of the year.\n\n }\n });\n return srCyrl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies : https://github.com/nicolaidavies\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ss = moment.defineLocale('ss', {\n months: \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split('_'),\n monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'),\n weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Namuhla nga] LT',\n nextDay: '[Kusasa nga] LT',\n nextWeek: 'dddd [nga] LT',\n lastDay: '[Itolo nga] LT',\n lastWeek: 'dddd [leliphelile] [nga] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'nga %s',\n past: 'wenteka nga %s',\n s: 'emizuzwana lomcane',\n ss: '%d mzuzwana',\n m: 'umzuzu',\n mm: '%d emizuzu',\n h: 'lihora',\n hh: '%d emahora',\n d: 'lilanga',\n dd: '%d emalanga',\n M: 'inyanga',\n MM: '%d tinyanga',\n y: 'umnyaka',\n yy: '%d iminyaka'\n },\n meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 11) {\n return 'ekuseni';\n } else if (hours < 15) {\n return 'emini';\n } else if (hours < 19) {\n return 'entsambama';\n } else {\n return 'ebusuku';\n }\n },\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'ekuseni') {\n return hour;\n } else if (meridiem === 'emini') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n if (hour === 0) {\n return 0;\n }\n\n return hour + 12;\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: '%d',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ss;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var sv = moment.defineLocale('sv', {\n months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd D MMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Idag] LT',\n nextDay: '[Imorgon] LT',\n lastDay: '[Igår] LT',\n nextWeek: '[På] dddd LT',\n lastWeek: '[I] dddd[s] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'om %s',\n past: 'för %s sedan',\n s: 'några sekunder',\n ss: '%d sekunder',\n m: 'en minut',\n mm: '%d minuter',\n h: 'en timme',\n hh: '%d timmar',\n d: 'en dag',\n dd: '%d dagar',\n M: 'en månad',\n MM: '%d månader',\n y: 'ett år',\n yy: '%d år'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(\\:e|\\:a)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? ':e' : b === 1 ? ':a' : b === 2 ? ':a' : b === 3 ? ':e' : ':e';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return sv;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var sw = moment.defineLocale('sw', {\n months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'),\n weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'hh:mm A',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[leo saa] LT',\n nextDay: '[kesho saa] LT',\n nextWeek: '[wiki ijayo] dddd [saat] LT',\n lastDay: '[jana] LT',\n lastWeek: '[wiki iliyopita] dddd [saat] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s baadaye',\n past: 'tokea %s',\n s: 'hivi punde',\n ss: 'sekunde %d',\n m: 'dakika moja',\n mm: 'dakika %d',\n h: 'saa limoja',\n hh: 'masaa %d',\n d: 'siku moja',\n dd: 'siku %d',\n M: 'mwezi mmoja',\n MM: 'miezi %d',\n y: 'mwaka mmoja',\n yy: 'miaka %d'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return sw;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var symbolMap = {\n 1: '௧',\n 2: '௨',\n 3: '௩',\n 4: '௪',\n 5: '௫',\n 6: '௬',\n 7: '௭',\n 8: '௮',\n 9: '௯',\n 0: '௦'\n },\n numberMap = {\n '௧': '1',\n '௨': '2',\n '௩': '3',\n '௪': '4',\n '௫': '5',\n '௬': '6',\n '௭': '7',\n '௮': '8',\n '௯': '9',\n '௦': '0'\n };\n var ta = moment.defineLocale('ta', {\n months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),\n monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),\n weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'),\n weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'),\n weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, HH:mm',\n LLLL: 'dddd, D MMMM YYYY, HH:mm'\n },\n calendar: {\n sameDay: '[இன்று] LT',\n nextDay: '[நாளை] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[நேற்று] LT',\n lastWeek: '[கடந்த வாரம்] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s இல்',\n past: '%s முன்',\n s: 'ஒரு சில விநாடிகள்',\n ss: '%d விநாடிகள்',\n m: 'ஒரு நிமிடம்',\n mm: '%d நிமிடங்கள்',\n h: 'ஒரு மணி நேரம்',\n hh: '%d மணி நேரம்',\n d: 'ஒரு நாள்',\n dd: '%d நாட்கள்',\n M: 'ஒரு மாதம்',\n MM: '%d மாதங்கள்',\n y: 'ஒரு வருடம்',\n yy: '%d ஆண்டுகள்'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}வது/,\n ordinal: function ordinal(number) {\n return number + 'வது';\n },\n preparse: function preparse(string) {\n return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function postformat(string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // refer http://ta.wikipedia.org/s/1er1\n meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 2) {\n return ' யாமம்';\n } else if (hour < 6) {\n return ' வைகறை'; // வைகறை\n } else if (hour < 10) {\n return ' காலை'; // காலை\n } else if (hour < 14) {\n return ' நண்பகல்'; // நண்பகல்\n } else if (hour < 18) {\n return ' எற்பாடு'; // எற்பாடு\n } else if (hour < 22) {\n return ' மாலை'; // மாலை\n } else {\n return ' யாமம்';\n }\n },\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'யாமம்') {\n return hour < 2 ? hour : hour + 12;\n } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n return hour;\n } else if (meridiem === 'நண்பகல்') {\n return hour >= 10 ? hour : hour + 12;\n } else {\n return hour + 12;\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return ta;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var te = moment.defineLocale('te', {\n months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'),\n monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'),\n monthsParseExact: true,\n weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'),\n weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm'\n },\n calendar: {\n sameDay: '[నేడు] LT',\n nextDay: '[రేపు] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[నిన్న] LT',\n lastWeek: '[గత] dddd, LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s లో',\n past: '%s క్రితం',\n s: 'కొన్ని క్షణాలు',\n ss: '%d సెకన్లు',\n m: 'ఒక నిమిషం',\n mm: '%d నిమిషాలు',\n h: 'ఒక గంట',\n hh: '%d గంటలు',\n d: 'ఒక రోజు',\n dd: '%d రోజులు',\n M: 'ఒక నెల',\n MM: '%d నెలలు',\n y: 'ఒక సంవత్సరం',\n yy: '%d సంవత్సరాలు'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}వ/,\n ordinal: '%dవ',\n meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'రాత్రి') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ఉదయం') {\n return hour;\n } else if (meridiem === 'మధ్యాహ్నం') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'సాయంత్రం') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'రాత్రి';\n } else if (hour < 10) {\n return 'ఉదయం';\n } else if (hour < 17) {\n return 'మధ్యాహ్నం';\n } else if (hour < 20) {\n return 'సాయంత్రం';\n } else {\n return 'రాత్రి';\n }\n },\n week: {\n dow: 0,\n // Sunday is the first day of the week.\n doy: 6 // The week that contains Jan 6th is the first week of the year.\n\n }\n });\n return te;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Tetun Dili (East Timor) [tet]\n//! author : Joshua Brooks : https://github.com/joshbrooks\n//! author : Onorio De J. Afonso : https://github.com/marobo\n//! author : Sonia Simoes : https://github.com/soniasimoes\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var tet = moment.defineLocale('tet', {\n months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split('_'),\n monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),\n weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),\n weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Ohin iha] LT',\n nextDay: '[Aban iha] LT',\n nextWeek: 'dddd [iha] LT',\n lastDay: '[Horiseik iha] LT',\n lastWeek: 'dddd [semana kotuk] [iha] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'iha %s',\n past: '%s liuba',\n s: 'segundu balun',\n ss: 'segundu %d',\n m: 'minutu ida',\n mm: 'minutu %d',\n h: 'oras ida',\n hh: 'oras %d',\n d: 'loron ida',\n dd: 'loron %d',\n M: 'fulan ida',\n MM: 'fulan %d',\n y: 'tinan ida',\n yy: 'tinan %d'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return tet;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Tajik [tg]\n//! author : Orif N. Jr. : https://github.com/orif-jr\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ум',\n 1: '-ум',\n 2: '-юм',\n 3: '-юм',\n 4: '-ум',\n 5: '-ум',\n 6: '-ум',\n 7: '-ум',\n 8: '-ум',\n 9: '-ум',\n 10: '-ум',\n 12: '-ум',\n 13: '-ум',\n 20: '-ум',\n 30: '-юм',\n 40: '-ум',\n 50: '-ум',\n 60: '-ум',\n 70: '-ум',\n 80: '-ум',\n 90: '-ум',\n 100: '-ум'\n };\n var tg = moment.defineLocale('tg', {\n months: {\n format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split('_'),\n standalone: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_')\n },\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split('_'),\n weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),\n weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Имрӯз соати] LT',\n nextDay: '[Фардо соати] LT',\n lastDay: '[Дирӯз соати] LT',\n nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',\n lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'баъди %s',\n past: '%s пеш',\n s: 'якчанд сония',\n m: 'як дақиқа',\n mm: '%d дақиқа',\n h: 'як соат',\n hh: '%d соат',\n d: 'як рӯз',\n dd: '%d рӯз',\n M: 'як моҳ',\n MM: '%d моҳ',\n y: 'як сол',\n yy: '%d сол'\n },\n meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'шаб') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'субҳ') {\n return hour;\n } else if (meridiem === 'рӯз') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'бегоҳ') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'шаб';\n } else if (hour < 11) {\n return 'субҳ';\n } else if (hour < 16) {\n return 'рӯз';\n } else if (hour < 19) {\n return 'бегоҳ';\n } else {\n return 'шаб';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ум|юм)/,\n ordinal: function ordinal(number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 1th is the first week of the year.\n\n }\n });\n return tg;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var th = moment.defineLocale('th', {\n months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),\n monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),\n monthsParseExact: true,\n weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'),\n // yes, three characters difference\n weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY เวลา H:mm',\n LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm'\n },\n meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n isPM: function isPM(input) {\n return input === 'หลังเที่ยง';\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'ก่อนเที่ยง';\n } else {\n return 'หลังเที่ยง';\n }\n },\n calendar: {\n sameDay: '[วันนี้ เวลา] LT',\n nextDay: '[พรุ่งนี้ เวลา] LT',\n nextWeek: 'dddd[หน้า เวลา] LT',\n lastDay: '[เมื่อวานนี้ เวลา] LT',\n lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'อีก %s',\n past: '%sที่แล้ว',\n s: 'ไม่กี่วินาที',\n ss: '%d วินาที',\n m: '1 นาที',\n mm: '%d นาที',\n h: '1 ชั่วโมง',\n hh: '%d ชั่วโมง',\n d: '1 วัน',\n dd: '%d วัน',\n w: '1 สัปดาห์',\n ww: '%d สัปดาห์',\n M: '1 เดือน',\n MM: '%d เดือน',\n y: '1 ปี',\n yy: '%d ปี'\n }\n });\n return th;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Turkmen [tk]\n//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inji\",\n 5: \"'inji\",\n 8: \"'inji\",\n 70: \"'inji\",\n 80: \"'inji\",\n 2: \"'nji\",\n 7: \"'nji\",\n 20: \"'nji\",\n 50: \"'nji\",\n 3: \"'ünji\",\n 4: \"'ünji\",\n 100: \"'ünji\",\n 6: \"'njy\",\n 9: \"'unjy\",\n 10: \"'unjy\",\n 30: \"'unjy\",\n 60: \"'ynjy\",\n 90: \"'ynjy\"\n };\n var tk = moment.defineLocale('tk', {\n months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split('_'),\n monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),\n weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split('_'),\n weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),\n weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[bugün sagat] LT',\n nextDay: '[ertir sagat] LT',\n nextWeek: '[indiki] dddd [sagat] LT',\n lastDay: '[düýn] LT',\n lastWeek: '[geçen] dddd [sagat] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s soň',\n past: '%s öň',\n s: 'birnäçe sekunt',\n m: 'bir minut',\n mm: '%d minut',\n h: 'bir sagat',\n hh: '%d sagat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir aý',\n MM: '%d aý',\n y: 'bir ýyl',\n yy: '%d ýyl'\n },\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'unjy\";\n }\n\n var a = number % 10,\n b = number % 100 - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return tk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var tlPh = moment.defineLocale('tl-ph', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm'\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function ordinal(number) {\n return number;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return tlPh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\n function translateFuture(output) {\n var time = output;\n time = output.indexOf('jaj') !== -1 ? time.slice(0, -3) + 'leS' : output.indexOf('jar') !== -1 ? time.slice(0, -3) + 'waQ' : output.indexOf('DIS') !== -1 ? time.slice(0, -3) + 'nem' : time + ' pIq';\n return time;\n }\n\n function translatePast(output) {\n var time = output;\n time = output.indexOf('jaj') !== -1 ? time.slice(0, -3) + 'Hu’' : output.indexOf('jar') !== -1 ? time.slice(0, -3) + 'wen' : output.indexOf('DIS') !== -1 ? time.slice(0, -3) + 'ben' : time + ' ret';\n return time;\n }\n\n function translate(number, withoutSuffix, string, isFuture) {\n var numberNoun = numberAsNoun(number);\n\n switch (string) {\n case 'ss':\n return numberNoun + ' lup';\n\n case 'mm':\n return numberNoun + ' tup';\n\n case 'hh':\n return numberNoun + ' rep';\n\n case 'dd':\n return numberNoun + ' jaj';\n\n case 'MM':\n return numberNoun + ' jar';\n\n case 'yy':\n return numberNoun + ' DIS';\n }\n }\n\n function numberAsNoun(number) {\n var hundred = Math.floor(number % 1000 / 100),\n ten = Math.floor(number % 100 / 10),\n one = number % 10,\n word = '';\n\n if (hundred > 0) {\n word += numbersNouns[hundred] + 'vatlh';\n }\n\n if (ten > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';\n }\n\n if (one > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[one];\n }\n\n return word === '' ? 'pagh' : word;\n }\n\n var tlh = moment.defineLocale('tlh', {\n months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'),\n monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'),\n monthsParseExact: true,\n weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[DaHjaj] LT',\n nextDay: '[wa’leS] LT',\n nextWeek: 'LLL',\n lastDay: '[wa’Hu’] LT',\n lastWeek: 'LLL',\n sameElse: 'L'\n },\n relativeTime: {\n future: translateFuture,\n past: translatePast,\n s: 'puS lup',\n ss: translate,\n m: 'wa’ tup',\n mm: translate,\n h: 'wa’ rep',\n hh: translate,\n d: 'wa’ jaj',\n dd: translate,\n M: 'wa’ jar',\n MM: translate,\n y: 'wa’ DIS',\n yy: translate\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return tlh;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//! Burak Yiğit Kaya: https://github.com/BYK\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inci\",\n 5: \"'inci\",\n 8: \"'inci\",\n 70: \"'inci\",\n 80: \"'inci\",\n 2: \"'nci\",\n 7: \"'nci\",\n 20: \"'nci\",\n 50: \"'nci\",\n 3: \"'üncü\",\n 4: \"'üncü\",\n 100: \"'üncü\",\n 6: \"'ncı\",\n 9: \"'uncu\",\n 10: \"'uncu\",\n 30: \"'uncu\",\n 60: \"'ıncı\",\n 90: \"'ıncı\"\n };\n var tr = moment.defineLocale('tr', {\n months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),\n monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),\n weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),\n weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'öö' : 'ÖÖ';\n } else {\n return isLower ? 'ös' : 'ÖS';\n }\n },\n meridiemParse: /öö|ÖÖ|ös|ÖS/,\n isPM: function isPM(input) {\n return input === 'ös' || input === 'ÖS';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[yarın saat] LT',\n nextWeek: '[gelecek] dddd [saat] LT',\n lastDay: '[dün] LT',\n lastWeek: '[geçen] dddd [saat] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s önce',\n s: 'birkaç saniye',\n ss: '%d saniye',\n m: 'bir dakika',\n mm: '%d dakika',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n w: 'bir hafta',\n ww: '%d hafta',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir yıl',\n yy: '%d yıl'\n },\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'ıncı\";\n }\n\n var a = number % 10,\n b = number % 100 - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return tr;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n // This is currently too difficult (maybe even impossible) to add.\n\n var tzl = moment.defineLocale('tzl', {\n months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'),\n monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM [dallas] YYYY',\n LLL: 'D. MMMM [dallas] YYYY HH.mm',\n LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm'\n },\n meridiemParse: /d\\'o|d\\'a/i,\n isPM: function isPM(input) {\n return \"d'o\" === input.toLowerCase();\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? \"d'o\" : \"D'O\";\n } else {\n return isLower ? \"d'a\" : \"D'A\";\n }\n },\n calendar: {\n sameDay: '[oxhi à] LT',\n nextDay: '[demà à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[ieiri à] LT',\n lastWeek: '[sür el] dddd [lasteu à] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'osprei %s',\n past: 'ja%s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['viensas secunds', \"'iensas secunds\"],\n ss: [number + ' secunds', '' + number + ' secunds'],\n m: [\"'n míut\", \"'iens míut\"],\n mm: [number + ' míuts', '' + number + ' míuts'],\n h: [\"'n þora\", \"'iensa þora\"],\n hh: [number + ' þoras', '' + number + ' þoras'],\n d: [\"'n ziua\", \"'iensa ziua\"],\n dd: [number + ' ziuas', '' + number + ' ziuas'],\n M: [\"'n mes\", \"'iens mes\"],\n MM: [number + ' mesen', '' + number + ' mesen'],\n y: [\"'n ar\", \"'iens ar\"],\n yy: [number + ' ars', '' + number + ' ars']\n };\n return isFuture ? format[key][0] : withoutSuffix ? format[key][0] : format[key][1];\n }\n\n return tzl;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var tzm = moment.defineLocale('tzm', {\n months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),\n monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),\n weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n nextWeek: 'dddd [ⴴ] LT',\n lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n lastWeek: 'dddd [ⴴ] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n past: 'ⵢⴰⵏ %s',\n s: 'ⵉⵎⵉⴽ',\n ss: '%d ⵉⵎⵉⴽ',\n m: 'ⵎⵉⵏⵓⴺ',\n mm: '%d ⵎⵉⵏⵓⴺ',\n h: 'ⵙⴰⵄⴰ',\n hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n d: 'ⴰⵙⵙ',\n dd: '%d oⵙⵙⴰⵏ',\n M: 'ⴰⵢoⵓⵔ',\n MM: '%d ⵉⵢⵢⵉⵔⵏ',\n y: 'ⴰⵙⴳⴰⵙ',\n yy: '%d ⵉⵙⴳⴰⵙⵏ'\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return tzm;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var tzmLatn = moment.defineLocale('tzm-latn', {\n months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),\n monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),\n weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[asdkh g] LT',\n nextDay: '[aska g] LT',\n nextWeek: 'dddd [g] LT',\n lastDay: '[assant g] LT',\n lastWeek: 'dddd [g] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'dadkh s yan %s',\n past: 'yan %s',\n s: 'imik',\n ss: '%d imik',\n m: 'minuḍ',\n mm: '%d minuḍ',\n h: 'saɛa',\n hh: '%d tassaɛin',\n d: 'ass',\n dd: '%d ossan',\n M: 'ayowr',\n MM: '%d iyyirn',\n y: 'asgas',\n yy: '%d isgasn'\n },\n week: {\n dow: 6,\n // Saturday is the first day of the week.\n doy: 12 // The week that contains Jan 12th is the first week of the year.\n\n }\n });\n return tzmLatn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Uyghur (China) [ug-cn]\n//! author: boyaq : https://github.com/boyaq\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var ugCn = moment.defineLocale('ug-cn', {\n months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split('_'),\n monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split('_'),\n weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split('_'),\n weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',\n LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm'\n },\n meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === 'يېرىم كېچە' || meridiem === 'سەھەر' || meridiem === 'چۈشتىن بۇرۇن') {\n return hour;\n } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {\n return hour + 12;\n } else {\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return 'يېرىم كېچە';\n } else if (hm < 900) {\n return 'سەھەر';\n } else if (hm < 1130) {\n return 'چۈشتىن بۇرۇن';\n } else if (hm < 1230) {\n return 'چۈش';\n } else if (hm < 1800) {\n return 'چۈشتىن كېيىن';\n } else {\n return 'كەچ';\n }\n },\n calendar: {\n sameDay: '[بۈگۈن سائەت] LT',\n nextDay: '[ئەتە سائەت] LT',\n nextWeek: '[كېلەركى] dddd [سائەت] LT',\n lastDay: '[تۆنۈگۈن] LT',\n lastWeek: '[ئالدىنقى] dddd [سائەت] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s كېيىن',\n past: '%s بۇرۇن',\n s: 'نەچچە سېكونت',\n ss: '%d سېكونت',\n m: 'بىر مىنۇت',\n mm: '%d مىنۇت',\n h: 'بىر سائەت',\n hh: '%d سائەت',\n d: 'بىر كۈن',\n dd: '%d كۈن',\n M: 'بىر ئاي',\n MM: '%d ئاي',\n y: 'بىر يىل',\n yy: '%d يىل'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '-كۈنى';\n\n case 'w':\n case 'W':\n return number + '-ھەپتە';\n\n default:\n return number;\n }\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 1st is the first week of the year.\n\n }\n });\n return ugCn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2];\n }\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',\n mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n dd: 'день_дні_днів',\n MM: 'місяць_місяці_місяців',\n yy: 'рік_роки_років'\n };\n\n if (key === 'm') {\n return withoutSuffix ? 'хвилина' : 'хвилину';\n } else if (key === 'h') {\n return withoutSuffix ? 'година' : 'годину';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n function weekdaysCaseReplace(m, format) {\n var weekdays = {\n nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),\n accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),\n genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')\n },\n nounCase;\n\n if (m === true) {\n return weekdays['nominative'].slice(1, 7).concat(weekdays['nominative'].slice(0, 1));\n }\n\n if (!m) {\n return weekdays['nominative'];\n }\n\n nounCase = /(\\[[ВвУу]\\]) ?dddd/.test(format) ? 'accusative' : /\\[?(?:минулої|наступної)? ?\\] ?dddd/.test(format) ? 'genitive' : 'nominative';\n return weekdays[nounCase][m.day()];\n }\n\n function processHoursFunction(str) {\n return function () {\n return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n };\n }\n\n var uk = moment.defineLocale('uk', {\n months: {\n format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),\n standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')\n },\n monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),\n weekdays: weekdaysCaseReplace,\n weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY р.',\n LLL: 'D MMMM YYYY р., HH:mm',\n LLLL: 'dddd, D MMMM YYYY р., HH:mm'\n },\n calendar: {\n sameDay: processHoursFunction('[Сьогодні '),\n nextDay: processHoursFunction('[Завтра '),\n lastDay: processHoursFunction('[Вчора '),\n nextWeek: processHoursFunction('[У] dddd ['),\n lastWeek: function lastWeek() {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return processHoursFunction('[Минулої] dddd [').call(this);\n\n case 1:\n case 2:\n case 4:\n return processHoursFunction('[Минулого] dddd [').call(this);\n }\n },\n sameElse: 'L'\n },\n relativeTime: {\n future: 'за %s',\n past: '%s тому',\n s: 'декілька секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'годину',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n M: 'місяць',\n MM: relativeTimeWithPlural,\n y: 'рік',\n yy: relativeTimeWithPlural\n },\n // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n meridiemParse: /ночі|ранку|дня|вечора/,\n isPM: function isPM(input) {\n return /^(дня|вечора)$/.test(input);\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 4) {\n return 'ночі';\n } else if (hour < 12) {\n return 'ранку';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечора';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return number + '-й';\n\n case 'D':\n return number + '-го';\n\n default:\n return number;\n }\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return uk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Urdu [ur]\n//! author : Sawood Alam : https://github.com/ibnesayeed\n//! author : Zack : https://github.com/ZackVision\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var months = ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'],\n days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];\n var ur = moment.defineLocale('ur', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm'\n },\n meridiemParse: /صبح|شام/,\n isPM: function isPM(input) {\n return 'شام' === input;\n },\n meridiem: function meridiem(hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n\n return 'شام';\n },\n calendar: {\n sameDay: '[آج بوقت] LT',\n nextDay: '[کل بوقت] LT',\n nextWeek: 'dddd [بوقت] LT',\n lastDay: '[گذشتہ روز بوقت] LT',\n lastWeek: '[گذشتہ] dddd [بوقت] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s بعد',\n past: '%s قبل',\n s: 'چند سیکنڈ',\n ss: '%d سیکنڈ',\n m: 'ایک منٹ',\n mm: '%d منٹ',\n h: 'ایک گھنٹہ',\n hh: '%d گھنٹے',\n d: 'ایک دن',\n dd: '%d دن',\n M: 'ایک ماہ',\n MM: '%d ماہ',\n y: 'ایک سال',\n yy: '%d سال'\n },\n preparse: function preparse(string) {\n return string.replace(/،/g, ',');\n },\n postformat: function postformat(string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return ur;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var uz = moment.defineLocale('uz', {\n months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm'\n },\n calendar: {\n sameDay: '[Бугун соат] LT [да]',\n nextDay: '[Эртага] LT [да]',\n nextWeek: 'dddd [куни соат] LT [да]',\n lastDay: '[Кеча соат] LT [да]',\n lastWeek: '[Утган] dddd [куни соат] LT [да]',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'Якин %s ичида',\n past: 'Бир неча %s олдин',\n s: 'фурсат',\n ss: '%d фурсат',\n m: 'бир дакика',\n mm: '%d дакика',\n h: 'бир соат',\n hh: '%d соат',\n d: 'бир кун',\n dd: '%d кун',\n M: 'бир ой',\n MM: '%d ой',\n y: 'бир йил',\n yy: '%d йил'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return uz;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Uzbek Latin [uz-latn]\n//! author : Rasulbek Mirzayev : github.com/Rasulbeeek\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var uzLatn = moment.defineLocale('uz-latn', {\n months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'),\n monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),\n weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'),\n weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),\n weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm'\n },\n calendar: {\n sameDay: '[Bugun soat] LT [da]',\n nextDay: '[Ertaga] LT [da]',\n nextWeek: 'dddd [kuni soat] LT [da]',\n lastDay: '[Kecha soat] LT [da]',\n lastWeek: \"[O'tgan] dddd [kuni soat] LT [da]\",\n sameElse: 'L'\n },\n relativeTime: {\n future: 'Yaqin %s ichida',\n past: 'Bir necha %s oldin',\n s: 'soniya',\n ss: '%d soniya',\n m: 'bir daqiqa',\n mm: '%d daqiqa',\n h: 'bir soat',\n hh: '%d soat',\n d: 'bir kun',\n dd: '%d kun',\n M: 'bir oy',\n MM: '%d oy',\n y: 'bir yil',\n yy: '%d yil'\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 7 // The week that contains Jan 7th is the first week of the year.\n\n }\n });\n return uzLatn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n//! author : Chien Kira : https://github.com/chienkira\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var vi = moment.defineLocale('vi', {\n months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),\n monthsShort: 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split('_'),\n monthsParseExact: true,\n weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),\n weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /sa|ch/i,\n isPM: function isPM(input) {\n return /^ch$/i.test(input);\n },\n meridiem: function meridiem(hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'sa' : 'SA';\n } else {\n return isLower ? 'ch' : 'CH';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [năm] YYYY',\n LLL: 'D MMMM [năm] YYYY HH:mm',\n LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',\n l: 'DD/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[Hôm nay lúc] LT',\n nextDay: '[Ngày mai lúc] LT',\n nextWeek: 'dddd [tuần tới lúc] LT',\n lastDay: '[Hôm qua lúc] LT',\n lastWeek: 'dddd [tuần trước lúc] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: '%s tới',\n past: '%s trước',\n s: 'vài giây',\n ss: '%d giây',\n m: 'một phút',\n mm: '%d phút',\n h: 'một giờ',\n hh: '%d giờ',\n d: 'một ngày',\n dd: '%d ngày',\n w: 'một tuần',\n ww: '%d tuần',\n M: 'một tháng',\n MM: '%d tháng',\n y: 'một năm',\n yy: '%d năm'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function ordinal(number) {\n return number;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return vi;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var xPseudo = moment.defineLocale('x-pseudo', {\n months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'),\n monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'),\n monthsParseExact: true,\n weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'),\n weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm'\n },\n calendar: {\n sameDay: '[T~ódá~ý át] LT',\n nextDay: '[T~ómó~rró~w át] LT',\n nextWeek: 'dddd [át] LT',\n lastDay: '[Ý~ést~érdá~ý át] LT',\n lastWeek: '[L~ást] dddd [át] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'í~ñ %s',\n past: '%s á~gó',\n s: 'á ~féw ~sécó~ñds',\n ss: '%d s~écóñ~ds',\n m: 'á ~míñ~úté',\n mm: '%d m~íñú~tés',\n h: 'á~ñ hó~úr',\n hh: '%d h~óúrs',\n d: 'á ~dáý',\n dd: '%d d~áýs',\n M: 'á ~móñ~th',\n MM: '%d m~óñt~hs',\n y: 'á ~ýéár',\n yy: '%d ý~éárs'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function ordinal(number) {\n var b = number % 10,\n output = ~~(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';\n return number + output;\n },\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return xPseudo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Yoruba Nigeria [yo]\n//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var yo = moment.defineLocale('yo', {\n months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'),\n monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A'\n },\n calendar: {\n sameDay: '[Ònì ni] LT',\n nextDay: '[Ọ̀la ni] LT',\n nextWeek: \"dddd [Ọsẹ̀ tón'bọ] [ni] LT\",\n lastDay: '[Àna ni] LT',\n lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n sameElse: 'L'\n },\n relativeTime: {\n future: 'ní %s',\n past: '%s kọjá',\n s: 'ìsẹjú aayá die',\n ss: 'aayá %d',\n m: 'ìsẹjú kan',\n mm: 'ìsẹjú %d',\n h: 'wákati kan',\n hh: 'wákati %d',\n d: 'ọjọ́ kan',\n dd: 'ọjọ́ %d',\n M: 'osù kan',\n MM: 'osù %d',\n y: 'ọdún kan',\n yy: 'ọdún %d'\n },\n dayOfMonthOrdinalParse: /ọjọ́\\s\\d{1,2}/,\n ordinal: 'ọjọ́ %d',\n week: {\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return yo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n//! author : uu109 : https://github.com/uu109\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var zhCn = moment.defineLocale('zh-cn', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日Ah点mm分',\n LLLL: 'YYYY年M月D日ddddAh点mm分',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n } else {\n // '中午'\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: function nextWeek(now) {\n if (now.week() !== this.week()) {\n return '[下]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n lastDay: '[昨天]LT',\n lastWeek: function lastWeek(now) {\n if (this.week() !== now.week()) {\n return '[上]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n case 'M':\n return number + '月';\n\n case 'w':\n case 'W':\n return number + '周';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s后',\n past: '%s前',\n s: '几秒',\n ss: '%d 秒',\n m: '1 分钟',\n mm: '%d 分钟',\n h: '1 小时',\n hh: '%d 小时',\n d: '1 天',\n dd: '%d 天',\n w: '1 周',\n ww: '%d 周',\n M: '1 个月',\n MM: '%d 个月',\n y: '1 年',\n yy: '%d 年'\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1,\n // Monday is the first day of the week.\n doy: 4 // The week that contains Jan 4th is the first week of the year.\n\n }\n });\n return zhCn;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n//! author : Anthony : https://github.com/anthonylau\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var zhHk = moment.defineLocale('zh-hk', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1200) {\n return '上午';\n } else if (hm === 1200) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: '[下]ddddLT',\n lastDay: '[昨天]LT',\n lastWeek: '[上]ddddLT',\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n case 'M':\n return number + '月';\n\n case 'w':\n case 'W':\n return number + '週';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年'\n }\n });\n return zhHk;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Chinese (Macau) [zh-mo]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Tan Yuanhong : https://github.com/le0tan\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var zhMo = moment.defineLocale('zh-mo', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'D/M/YYYY',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n case 'M':\n return number + '月';\n\n case 'w':\n case 'W':\n return number + '週';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s內',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年'\n }\n });\n return zhMo;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n;\n\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment);\n})(this, function (moment) {\n 'use strict'; //! moment.js locale configuration\n\n var zhTw = moment.defineLocale('zh-tw', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm'\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function meridiemHour(hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function meridiem(hour, minute, isLower) {\n var hm = hour * 100 + minute;\n\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L'\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function ordinal(number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n\n case 'M':\n return number + '月';\n\n case 'w':\n case 'W':\n return number + '週';\n\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年'\n }\n });\n return zhTw;\n});","\"use strict\";\n/**\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nvar __exportStar = this && this.__exportStar || function (m, exports) {\n for (var p in m) {\n if (p !== \"default\" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);\n }\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.version = void 0; // Cannot be `import` as it's not under TS root dir\n\nexports.version = require(\"../package.json\").version;\n\nvar autocomplete_1 = require(\"./places/autocomplete\");\n\nObject.defineProperty(exports, \"PlaceAutocompleteType\", {\n enumerable: true,\n get: function get() {\n return autocomplete_1.PlaceAutocompleteType;\n }\n});\n\n__exportStar(require(\"./common\"), exports);\n\n__exportStar(require(\"./client\"), exports);","\"use strict\";\n/**\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.placeAutocomplete = exports.defaultUrl = exports.defaultParamsSerializer = exports.PlaceAutocompleteType = void 0;\n\nvar serialize_1 = require(\"../serialize\");\n\nvar client_1 = require(\"../client\");\n\nvar PlaceAutocompleteType;\n\n(function (PlaceAutocompleteType) {\n /**\n * instructs the Place Autocomplete service to return only geocoding results, rather than business results.\n * Generally, you use this request to disambiguate results where the location specified may be indeterminate.\n */\n PlaceAutocompleteType[\"geocode\"] = \"geocode\";\n /**\n * instructs the Place Autocomplete service to return only geocoding results with a precise address.\n * Generally, you use this request when you know the user will be looking for a fully specified address.\n */\n\n PlaceAutocompleteType[\"address\"] = \"address\";\n /** instructs the Place Autocomplete service to return only business results. */\n\n PlaceAutocompleteType[\"establishment\"] = \"establishment\";\n /**\n * the `(regions)` type collection instructs the Places service to return any result matching the following types:\n * - `locality`\n * - `sublocality`\n * - `postal_code`\n * - `country`\n * - `administrative_area_level_1`\n * - `administrative_area_level_2`\n */\n\n PlaceAutocompleteType[\"regions\"] = \"(regions)\";\n /** the (cities) type collection instructs the Places service to return results that match `locality` or `administrative_area_level_3`. */\n\n PlaceAutocompleteType[\"cities\"] = \"(cities)\";\n})(PlaceAutocompleteType = exports.PlaceAutocompleteType || (exports.PlaceAutocompleteType = {}));\n\nexports.defaultParamsSerializer = serialize_1.serializer({\n location: serialize_1.latLngToString,\n origin: serialize_1.latLngToString\n});\nexports.defaultUrl = \"https://maps.googleapis.com/maps/api/place/autocomplete/json\";\n\nfunction placeAutocomplete(_a) {\n var axiosInstance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : client_1.defaultAxiosInstance;\n\n var params = _a.params,\n _a$method = _a.method,\n method = _a$method === void 0 ? \"get\" : _a$method,\n _a$url = _a.url,\n url = _a$url === void 0 ? exports.defaultUrl : _a$url,\n _a$paramsSerializer = _a.paramsSerializer,\n paramsSerializer = _a$paramsSerializer === void 0 ? exports.defaultParamsSerializer : _a$paramsSerializer,\n config = __rest(_a, [\"params\", \"method\", \"url\", \"paramsSerializer\"]);\n\n return axiosInstance(Object.assign({\n params: params,\n method: method,\n url: url,\n paramsSerializer: paramsSerializer\n }, config));\n}\n\nexports.placeAutocomplete = placeAutocomplete;","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n return fn.apply(thisArg, args);\n };\n};","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']');\n}\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\n\n\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};","'use strict';\n\nvar utils = require('./../utils');\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\n\n\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n return data;\n};","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};","// shim for using process in browser\nvar process = module.exports = {}; // cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\n\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\n\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n})();\n\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n } // if setTimeout wasn't available but was latter defined\n\n\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\n\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n } // if clearTimeout wasn't available but was latter defined\n\n\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n}\n\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n\n draining = false;\n\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n var len = queue.length;\n\n while (len) {\n currentQueue = queue;\n queue = [];\n\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n\n queueIndex = -1;\n len = queue.length;\n }\n\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n\n queue.push(new Item(fun, args));\n\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n}; // v8 likes predictible objects\n\n\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\n\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\n\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) {\n return [];\n};\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () {\n return '/';\n};\n\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\nprocess.umask = function () {\n return 0;\n};","'use strict';\n\nvar utils = require('./../utils');\n\nvar settle = require('./../core/settle');\n\nvar cookies = require('./../helpers/cookies');\n\nvar buildURL = require('./../helpers/buildURL');\n\nvar buildFullPath = require('../core/buildFullPath');\n\nvar parseHeaders = require('./../helpers/parseHeaders');\n\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\n\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest(); // HTTP basic authentication\n\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); // Set the request timeout in MS\n\n request.timeout = config.timeout; // Listen for ready state\n\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n } // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n\n\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n } // Prepare the response\n\n\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n settle(resolve, reject, response); // Clean up request\n\n request = null;\n }; // Handle browser request cancellation (as opposed to a manual cancellation)\n\n\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request)); // Clean up request\n\n request = null;\n }; // Handle low level network errors\n\n\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request)); // Clean up request\n\n request = null;\n }; // Handle timeout\n\n\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', request)); // Clean up request\n\n request = null;\n }; // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n } // Add headers to the request\n\n\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n } // Add withCredentials to request if needed\n\n\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n } // Add responseType to request if needed\n\n\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n } // Handle progress if needed\n\n\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n } // Not all browsers support upload events\n\n\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel); // Clean up request\n\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n } // Send the request\n\n\n request.send(requestData);\n });\n};","'use strict';\n\nvar createError = require('./createError');\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\n\n\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response));\n }\n};","'use strict';\n\nvar enhanceError = require('./enhanceError');\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\n\n\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};","'use strict';\n\nvar utils = require('../utils');\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\n\n\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = ['baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress', 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent', 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n var axiosKeys = valueFromConfig2Keys.concat(mergeDeepPropertiesKeys).concat(defaultToConfig2Keys).concat(directMergeKeys);\n var otherKeys = Object.keys(config1).concat(Object.keys(config2)).filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n utils.forEach(otherKeys, mergeDeepProperties);\n return config;\n};","'use strict';\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\n\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\nmodule.exports = Cancel;","\"use strict\";\n/**\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.RadioType = exports.LocationType = exports.GeocodingAddressComponentType = exports.VehicleType = exports.Maneuver = exports.AddressType = exports.GeocodedWaypointStatus = exports.DirectionsReponseStatus = exports.DirectionsResponseStatus = exports.TransitRoutingPreference = exports.TransitMode = exports.TrafficModel = exports.UnitSystem = exports.TravelRestriction = exports.TravelMode = exports.Language = exports.AspectRatingType = exports.PlaceType2 = exports.PlaceType1 = exports.PlaceInputType = exports.PlaceIdScope = exports.Status = void 0;\nvar Status;\n\n(function (Status) {\n /** indicates the response contains a valid result. */\n Status[\"OK\"] = \"OK\";\n /** indicates that the provided request was invalid. */\n\n Status[\"INVALID_REQUEST\"] = \"INVALID_REQUEST\";\n /**\n * indicates that too many `waypoints` were provided in the request. For applications using the Directions API as a web service,\n * or the [directions service in the Maps JavaScript API](https://developers.google.com/maps/documentation/javascript/directions),\n * the maximum allowed number of `waypoints` is 23, plus the origin and destination.\n */\n\n Status[\"MAX_WAYPOINTS_EXCEEDED\"] = \"MAX_WAYPOINTS_EXCEEDED\";\n /**\n * indicates the requested route is too long and cannot be processed.\n * This error occurs when more complex directions are returned.\n * Try reducing the number of waypoints, turns, or instructions.\n */\n\n Status[\"MAX_ROUTE_LENGTH_EXCEEDED\"] = \"MAX_ROUTE_LENGTH_EXCEEDED\";\n /**\n * indicates any of the following:\n * - The API key is missing or invalid.\n * - Billing has not been enabled on your account.\n * - A self-imposed usage cap has been exceeded.\n * - The provided method of payment is no longer valid (for example, a credit card has expired).\n * See the [Maps FAQ](https://developers.google.com/maps/faq#over-limit-key-error) to learn how to fix this.\n */\n\n Status[\"OVER_DAILY_LIMIT\"] = \"OVER_DAILY_LIMIT\";\n /** indicates the service has received too many requests from your application within the allowed time period. */\n\n Status[\"OVER_QUERY_LIMIT\"] = \"OVER_QUERY_LIMIT\";\n /** indicates that the service denied use of the Distance Matrix service by your application. */\n\n Status[\"REQUEST_DENIED\"] = \"REQUEST_DENIED\";\n /** indicates a Distance Matrix request could not be processed due to a server error. The request may succeed if you try again. */\n\n Status[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n /** indicates that the request was successful but returned no results. */\n\n Status[\"ZERO_RESULTS\"] = \"ZERO_RESULTS\";\n /** indicates that the referenced location (place_id) was not found in the Places database. */\n\n Status[\"NOT_FOUND\"] = \"NOT_FOUND\";\n})(Status = exports.Status || (exports.Status = {}));\n\nvar PlaceIdScope;\n\n(function (PlaceIdScope) {\n /**\n * The place ID is recognised by your application only.\n * This is because your application added the place, and the place has not yet passed the moderation process.\n */\n PlaceIdScope[\"APP\"] = \"APP\";\n /** The place ID is available to other applications and on Google Maps. */\n\n PlaceIdScope[\"GOOGLE\"] = \"GOOGLE\";\n})(PlaceIdScope = exports.PlaceIdScope || (exports.PlaceIdScope = {}));\n\nvar PlaceInputType;\n\n(function (PlaceInputType) {\n PlaceInputType[\"textQuery\"] = \"textquery\";\n PlaceInputType[\"phoneNumber\"] = \"phonenumber\";\n})(PlaceInputType = exports.PlaceInputType || (exports.PlaceInputType = {}));\n/**\n * Table 1: Types supported in place search and addition\n *\n * You can use the following values in the types filter for place searches and when adding a place.\n *\n * @see https://developers.google.com/places/web-service/supported_types#table1\n */\n\n\nvar PlaceType1;\n\n(function (PlaceType1) {\n PlaceType1[\"accounting\"] = \"accounting\";\n PlaceType1[\"airport\"] = \"airport\";\n PlaceType1[\"amusement_park\"] = \"amusement_park\";\n PlaceType1[\"aquarium\"] = \"aquarium\";\n PlaceType1[\"art_gallery\"] = \"art_gallery\";\n PlaceType1[\"atm\"] = \"atm\";\n PlaceType1[\"bakery\"] = \"bakery\";\n PlaceType1[\"bank\"] = \"bank\";\n PlaceType1[\"bar\"] = \"bar\";\n PlaceType1[\"beauty_salon\"] = \"beauty_salon\";\n PlaceType1[\"bicycle_store\"] = \"bicycle_store\";\n PlaceType1[\"book_store\"] = \"book_store\";\n PlaceType1[\"bowling_alley\"] = \"bowling_alley\";\n PlaceType1[\"bus_station\"] = \"bus_station\";\n PlaceType1[\"cafe\"] = \"cafe\";\n PlaceType1[\"campground\"] = \"campground\";\n PlaceType1[\"car_dealer\"] = \"car_dealer\";\n PlaceType1[\"car_rental\"] = \"car_rental\";\n PlaceType1[\"car_repair\"] = \"car_repair\";\n PlaceType1[\"car_wash\"] = \"car_wash\";\n PlaceType1[\"casino\"] = \"casino\";\n PlaceType1[\"cemetery\"] = \"cemetery\";\n PlaceType1[\"church\"] = \"church\";\n PlaceType1[\"city_hall\"] = \"city_hall\";\n PlaceType1[\"clothing_store\"] = \"clothing_store\";\n PlaceType1[\"convenience_store\"] = \"convenience_store\";\n PlaceType1[\"courthouse\"] = \"courthouse\";\n PlaceType1[\"dentist\"] = \"dentist\";\n PlaceType1[\"department_store\"] = \"department_store\";\n PlaceType1[\"doctor\"] = \"doctor\";\n PlaceType1[\"electrician\"] = \"electrician\";\n PlaceType1[\"electronics_store\"] = \"electronics_store\";\n PlaceType1[\"embassy\"] = \"embassy\";\n PlaceType1[\"fire_station\"] = \"fire_station\";\n PlaceType1[\"florist\"] = \"florist\";\n PlaceType1[\"funeral_home\"] = \"funeral_home\";\n PlaceType1[\"furniture_store\"] = \"furniture_store\";\n PlaceType1[\"gas_station\"] = \"gas_station\";\n PlaceType1[\"gym\"] = \"gym\";\n PlaceType1[\"hair_care\"] = \"hair_care\";\n PlaceType1[\"hardware_store\"] = \"hardware_store\";\n PlaceType1[\"hindu_temple\"] = \"hindu_temple\";\n PlaceType1[\"home_goods_store\"] = \"home_goods_store\";\n PlaceType1[\"hospital\"] = \"hospital\";\n PlaceType1[\"insurance_agency\"] = \"insurance_agency\";\n PlaceType1[\"jewelry_store\"] = \"jewelry_store\";\n PlaceType1[\"laundry\"] = \"laundry\";\n PlaceType1[\"lawyer\"] = \"lawyer\";\n PlaceType1[\"library\"] = \"library\";\n PlaceType1[\"liquor_store\"] = \"liquor_store\";\n PlaceType1[\"local_government_office\"] = \"local_government_office\";\n PlaceType1[\"locksmith\"] = \"locksmith\";\n PlaceType1[\"lodging\"] = \"lodging\";\n PlaceType1[\"meal_delivery\"] = \"meal_delivery\";\n PlaceType1[\"meal_takeaway\"] = \"meal_takeaway\";\n PlaceType1[\"mosque\"] = \"mosque\";\n PlaceType1[\"movie_rental\"] = \"movie_rental\";\n PlaceType1[\"movie_theater\"] = \"movie_theater\";\n PlaceType1[\"moving_company\"] = \"moving_company\";\n PlaceType1[\"museum\"] = \"museum\";\n PlaceType1[\"night_club\"] = \"night_club\";\n PlaceType1[\"painter\"] = \"painter\";\n PlaceType1[\"park\"] = \"park\";\n PlaceType1[\"parking\"] = \"parking\";\n PlaceType1[\"pet_store\"] = \"pet_store\";\n PlaceType1[\"pharmacy\"] = \"pharmacy\";\n PlaceType1[\"physiotherapist\"] = \"physiotherapist\";\n PlaceType1[\"plumber\"] = \"plumber\";\n PlaceType1[\"police\"] = \"police\";\n PlaceType1[\"post_office\"] = \"post_office\";\n PlaceType1[\"real_estate_agency\"] = \"real_estate_agency\";\n PlaceType1[\"restaurant\"] = \"restaurant\";\n PlaceType1[\"roofing_contractor\"] = \"roofing_contractor\";\n PlaceType1[\"rv_park\"] = \"rv_park\";\n PlaceType1[\"school\"] = \"school\";\n PlaceType1[\"shoe_store\"] = \"shoe_store\";\n PlaceType1[\"shopping_mall\"] = \"shopping_mall\";\n PlaceType1[\"spa\"] = \"spa\";\n PlaceType1[\"stadium\"] = \"stadium\";\n PlaceType1[\"storage\"] = \"storage\";\n PlaceType1[\"store\"] = \"store\";\n PlaceType1[\"subway_station\"] = \"subway_station\";\n PlaceType1[\"supermarket\"] = \"supermarket\";\n PlaceType1[\"synagogue\"] = \"synagogue\";\n PlaceType1[\"taxi_stand\"] = \"taxi_stand\";\n PlaceType1[\"train_station\"] = \"train_station\";\n PlaceType1[\"transit_station\"] = \"transit_station\";\n PlaceType1[\"travel_agency\"] = \"travel_agency\";\n PlaceType1[\"veterinary_care\"] = \"veterinary_care\";\n PlaceType1[\"zoo\"] = \"zoo\";\n})(PlaceType1 = exports.PlaceType1 || (exports.PlaceType1 = {}));\n/**\n * Table 2: Additional types returned by the Places service\n *\n * The following types may be returned in the results of a place search, in addition to the types in table 1 above.\n * For more details on these types, refer to [Address Types](https://developers.google.com/maps/documentation/geocoding/intro#Types)\n * in Geocoding Responses.\n *\n * @see https://developers.google.com/places/web-service/supported_types#table2\n */\n\n\nvar PlaceType2;\n\n(function (PlaceType2) {\n PlaceType2[\"administrative_area_level_1\"] = \"administrative_area_level_1\";\n PlaceType2[\"administrative_area_level_2\"] = \"administrative_area_level_2\";\n PlaceType2[\"administrative_area_level_3\"] = \"administrative_area_level_3\";\n PlaceType2[\"administrative_area_level_4\"] = \"administrative_area_level_4\";\n PlaceType2[\"administrative_area_level_5\"] = \"administrative_area_level_5\";\n PlaceType2[\"colloquial_area\"] = \"colloquial_area\";\n PlaceType2[\"country\"] = \"country\";\n PlaceType2[\"establishment\"] = \"establishment\";\n PlaceType2[\"finance\"] = \"finance\";\n PlaceType2[\"floor\"] = \"floor\";\n PlaceType2[\"food\"] = \"food\";\n PlaceType2[\"general_contractor\"] = \"general_contractor\";\n PlaceType2[\"geocode\"] = \"geocode\";\n PlaceType2[\"health\"] = \"health\";\n PlaceType2[\"intersection\"] = \"intersection\";\n PlaceType2[\"locality\"] = \"locality\";\n PlaceType2[\"natural_feature\"] = \"natural_feature\";\n PlaceType2[\"neighborhood\"] = \"neighborhood\";\n PlaceType2[\"place_of_worship\"] = \"place_of_worship\";\n PlaceType2[\"political\"] = \"political\";\n PlaceType2[\"point_of_interest\"] = \"point_of_interest\";\n PlaceType2[\"post_box\"] = \"post_box\";\n PlaceType2[\"postal_code\"] = \"postal_code\";\n PlaceType2[\"postal_code_prefix\"] = \"postal_code_prefix\";\n PlaceType2[\"postal_code_suffix\"] = \"postal_code_suffix\";\n PlaceType2[\"postal_town\"] = \"postal_town\";\n PlaceType2[\"premise\"] = \"premise\";\n PlaceType2[\"room\"] = \"room\";\n PlaceType2[\"route\"] = \"route\";\n PlaceType2[\"street_address\"] = \"street_address\";\n PlaceType2[\"street_number\"] = \"street_number\";\n PlaceType2[\"sublocality\"] = \"sublocality\";\n PlaceType2[\"sublocality_level_4\"] = \"sublocality_level_4\";\n PlaceType2[\"sublocality_level_5\"] = \"sublocality_level_5\";\n PlaceType2[\"sublocality_level_3\"] = \"sublocality_level_3\";\n PlaceType2[\"sublocality_level_2\"] = \"sublocality_level_2\";\n PlaceType2[\"sublocality_level_1\"] = \"sublocality_level_1\";\n PlaceType2[\"subpremise\"] = \"subpremise\";\n})(PlaceType2 = exports.PlaceType2 || (exports.PlaceType2 = {}));\n\nvar AspectRatingType;\n\n(function (AspectRatingType) {\n AspectRatingType[\"appeal\"] = \"appeal\";\n AspectRatingType[\"atmosphere\"] = \"atmosphere\";\n AspectRatingType[\"decor\"] = \"decor\";\n AspectRatingType[\"facilities\"] = \"facilities\";\n AspectRatingType[\"food\"] = \"food\";\n AspectRatingType[\"overall\"] = \"overall\";\n AspectRatingType[\"quality\"] = \"quality\";\n AspectRatingType[\"service\"] = \"service\";\n})(AspectRatingType = exports.AspectRatingType || (exports.AspectRatingType = {}));\n/**\n * By default the API will attempt to load the most appropriate language based on the users location or browser settings.\n * Some APIs allow you to explicitly set a language when you make a request\n *\n * @see https://developers.google.com/maps/faq#languagesupport\n */\n\n\nvar Language;\n\n(function (Language) {\n /** Arabic */\n Language[\"ar\"] = \"ar\";\n /** Belarusian */\n\n Language[\"be\"] = \"be\";\n /** Bulgarian */\n\n Language[\"bg\"] = \"bg\";\n /** Bengali */\n\n Language[\"bn\"] = \"bn\";\n /** Catalan */\n\n Language[\"ca\"] = \"ca\";\n /** Czech */\n\n Language[\"cs\"] = \"cs\";\n /** Danish */\n\n Language[\"da\"] = \"da\";\n /** German */\n\n Language[\"de\"] = \"de\";\n /** Greek */\n\n Language[\"el\"] = \"el\";\n /** English */\n\n Language[\"en\"] = \"en\";\n /** English (Australian) */\n\n Language[\"en_Au\"] = \"en-Au\";\n /** English (Great Britain) */\n\n Language[\"en_GB\"] = \"en-GB\";\n /** Spanish */\n\n Language[\"es\"] = \"es\";\n /** Basque */\n\n Language[\"eu\"] = \"eu\";\n /** Farsi */\n\n Language[\"fa\"] = \"fa\";\n /** Finnish */\n\n Language[\"fi\"] = \"fi\";\n /** Filipino */\n\n Language[\"fil\"] = \"fil\";\n /** French */\n\n Language[\"fr\"] = \"fr\";\n /** Galician */\n\n Language[\"gl\"] = \"gl\";\n /** Gujarati */\n\n Language[\"gu\"] = \"gu\";\n /** Hindi */\n\n Language[\"hi\"] = \"hi\";\n /** Croatian */\n\n Language[\"hr\"] = \"hr\";\n /** Hungarian */\n\n Language[\"hu\"] = \"hu\";\n /** Indonesian */\n\n Language[\"id\"] = \"id\";\n /** Italian */\n\n Language[\"it\"] = \"it\";\n /** Hebrew */\n\n Language[\"iw\"] = \"iw\";\n /** Japanese */\n\n Language[\"ja\"] = \"ja\";\n /** Kazakh */\n\n Language[\"kk\"] = \"kk\";\n /** Kannada */\n\n Language[\"kn\"] = \"kn\";\n /** Korean */\n\n Language[\"ko\"] = \"ko\";\n /** Kyrgyz */\n\n Language[\"ky\"] = \"ky\";\n /** Lithuanian */\n\n Language[\"lt\"] = \"lt\";\n /** Latvian */\n\n Language[\"lv\"] = \"lv\";\n /** Macedonian */\n\n Language[\"mk\"] = \"mk\";\n /** Malayalam */\n\n Language[\"ml\"] = \"ml\";\n /** Marathi */\n\n Language[\"mr\"] = \"mr\";\n /** Burmese */\n\n Language[\"my\"] = \"my\";\n /** Dutch */\n\n Language[\"nl\"] = \"nl\";\n /** Norwegian */\n\n Language[\"no\"] = \"no\";\n /** Punjabi */\n\n Language[\"pa\"] = \"pa\";\n /** Polish */\n\n Language[\"pl\"] = \"pl\";\n /** Portuguese */\n\n Language[\"pt\"] = \"pt\";\n /** Portuguese (Brazil) */\n\n Language[\"pt_BR\"] = \"pt-BR\";\n /** Portuguese (Portugal) */\n\n Language[\"pt_PT\"] = \"pt-PT\";\n /** Romanian */\n\n Language[\"ro\"] = \"ro\";\n /** Russian */\n\n Language[\"ru\"] = \"ru\";\n /** Slovak */\n\n Language[\"sk\"] = \"sk\";\n /** Slovenian */\n\n Language[\"sl\"] = \"sl\";\n /** Albanian */\n\n Language[\"sq\"] = \"sq\";\n /** Serbian */\n\n Language[\"sr\"] = \"sr\";\n /** Swedish */\n\n Language[\"sv\"] = \"sv\";\n /** Tamil */\n\n Language[\"ta\"] = \"ta\";\n /** Telugu */\n\n Language[\"te\"] = \"te\";\n /** Thai */\n\n Language[\"th\"] = \"th\";\n /** Tagalog */\n\n Language[\"tl\"] = \"tl\";\n /** Turkish */\n\n Language[\"tr\"] = \"tr\";\n /** Ukrainian */\n\n Language[\"uk\"] = \"uk\";\n /** Uzbek */\n\n Language[\"uz\"] = \"uz\";\n /** Vietnamese */\n\n Language[\"vi\"] = \"vi\";\n /** Chinese (Simlified) */\n\n Language[\"zh_CN\"] = \"zh-CN\";\n /** Chinese (Traditional) */\n\n Language[\"zh_TW\"] = \"zh-TW\";\n})(Language = exports.Language || (exports.Language = {}));\n/**\n * When you calculate directions, you may specify the transportation mode to use.\n * By default, directions are calculated as `driving` directions.\n *\n * **Note:** Both walking and bicycling directions may sometimes not include clear pedestrian or bicycling paths,\n * so these directions will return warnings in the returned result which you must display to the user.\n */\n\n\nvar TravelMode;\n\n(function (TravelMode) {\n /** (default) indicates standard driving directions using the road network. */\n TravelMode[\"driving\"] = \"driving\";\n /** requests walking directions via pedestrian paths & sidewalks (where available). */\n\n TravelMode[\"walking\"] = \"walking\";\n /** requests bicycling directions via bicycle paths & preferred streets (where available). */\n\n TravelMode[\"bicycling\"] = \"bicycling\";\n /**\n * requests directions via public transit routes (where available).\n * If you set the mode to transit, you can optionally specify either a departure_time or an arrival_time.\n * If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time).\n * You can also optionally include a transit_mode and/or a transit_routing_preference.\n */\n\n TravelMode[\"transit\"] = \"transit\";\n})(TravelMode = exports.TravelMode || (exports.TravelMode = {}));\n\nvar TravelRestriction;\n\n(function (TravelRestriction) {\n /** indicates that the calculated route should avoid toll roads/bridges. */\n TravelRestriction[\"tolls\"] = \"tolls\";\n /** indicates that the calculated route should avoid highways. */\n\n TravelRestriction[\"highways\"] = \"highways\";\n /** indicates that the calculated route should avoid ferries. */\n\n TravelRestriction[\"ferries\"] = \"ferries\";\n /**\n * indicates that the calculated route should avoid indoor steps for walking and transit directions.\n * Only requests that include an API key or a Google Maps APIs Premium Plan client ID will receive indoor steps by default.\n */\n\n TravelRestriction[\"indoor\"] = \"indoor\";\n})(TravelRestriction = exports.TravelRestriction || (exports.TravelRestriction = {}));\n/**\n * Directions results contain text within distance fields that may be displayed to the user to indicate the distance of\n * a particular \"step\" of the route. By default, this text uses the unit system of the origin's country or region.\n */\n\n\nvar UnitSystem;\n\n(function (UnitSystem) {\n /** specifies usage of the metric system. Textual distances are returned using kilometers and meters. */\n UnitSystem[\"metric\"] = \"metric\";\n /** specifies usage of the Imperial (English) system. Textual distances are returned using miles and feet. */\n\n UnitSystem[\"imperial\"] = \"imperial\";\n})(UnitSystem = exports.UnitSystem || (exports.UnitSystem = {}));\n\nvar TrafficModel;\n\n(function (TrafficModel) {\n /**\n * indicates that the returned `duration_in_traffic` should be the best estimate of travel time given what is known about\n * both historical traffic conditions and live traffic. Live traffic becomes more important the closer the `departure_time` is to now.\n */\n TrafficModel[\"best_guess\"] = \"best_guess\";\n /**\n * indicates that the returned `duration_in_traffic` should be longer than the actual travel time on most days,\n * though occasional days with particularly bad traffic conditions may exceed this value.\n */\n\n TrafficModel[\"pessimistic\"] = \"pessimistic\";\n /**\n * indicates that the returned `duration_in_traffic` should be shorter than the actual travel time on most days,\n * though occasional days with particularly good traffic conditions may be faster than this value.\n */\n\n TrafficModel[\"optimistic\"] = \"optimistic\";\n})(TrafficModel = exports.TrafficModel || (exports.TrafficModel = {}));\n\nvar TransitMode;\n\n(function (TransitMode) {\n /** indicates that the calculated route should prefer travel by bus. */\n TransitMode[\"bus\"] = \"bus\";\n /** indicates that the calculated route should prefer travel by subway. */\n\n TransitMode[\"subway\"] = \"subway\";\n /** indicates that the calculated route should prefer travel by train. */\n\n TransitMode[\"train\"] = \"train\";\n /** indicates that the calculated route should prefer travel by tram and light rail. */\n\n TransitMode[\"tram\"] = \"tram\";\n /**\n * indicates that the calculated route should prefer travel by train, tram, light rail, and subway.\n * This is equivalent to `transit_mode=train|tram|subway`\n */\n\n TransitMode[\"rail\"] = \"rail\";\n})(TransitMode = exports.TransitMode || (exports.TransitMode = {}));\n\nvar TransitRoutingPreference;\n\n(function (TransitRoutingPreference) {\n /** indicates that the calculated route should prefer limited amounts of walking. */\n TransitRoutingPreference[\"less_walking\"] = \"less_walking\";\n /** indicates that the calculated route should prefer a limited number of transfers. */\n\n TransitRoutingPreference[\"fewer_transfers\"] = \"fewer_transfers\";\n})(TransitRoutingPreference = exports.TransitRoutingPreference || (exports.TransitRoutingPreference = {}));\n/**\n * The `status` field within the Directions response object contains the status of the request, and may contain debugging information\n * to help you track down why the Directions service failed.\n */\n\n\nvar DirectionsResponseStatus;\n\n(function (DirectionsResponseStatus) {\n /** indicates the response contains a valid `result`. */\n DirectionsResponseStatus[\"OK\"] = \"OK\";\n /** indicates at least one of the locations specified in the request's origin, destination, or waypoints could not be geocoded. */\n\n DirectionsResponseStatus[\"NOT_FOUND\"] = \"NOT_FOUND\";\n /** indicates no route could be found between the origin and destination. */\n\n DirectionsResponseStatus[\"ZERO_RESULTS\"] = \"ZERO_RESULTS\";\n /**\n * indicates that too many `waypoints` were provided in the request. For applications using the Directions API as a web service,\n * or the [directions service in the Maps JavaScript API](https://developers.google.com/maps/documentation/javascript/directions),\n * the maximum allowed number of `waypoints` is 23, plus the origin and destination.\n */\n\n DirectionsResponseStatus[\"MAX_WAYPOINTS_EXCEEDED\"] = \"MAX_WAYPOINTS_EXCEEDED\";\n /**\n * indicates the requested route is too long and cannot be processed.\n * This error occurs when more complex directions are returned.\n * Try reducing the number of waypoints, turns, or instructions.\n */\n\n DirectionsResponseStatus[\"MAX_ROUTE_LENGTH_EXCEEDED\"] = \"MAX_ROUTE_LENGTH_EXCEEDED\";\n /** indicates that the provided request was invalid. Common causes of this status include an invalid parameter or parameter value. */\n\n DirectionsResponseStatus[\"INVALID_REQUEST\"] = \"INVALID_REQUEST\";\n /**\n * indicates any of the following:\n * - The API key is missing or invalid.\n * - Billing has not been enabled on your account.\n * - A self-imposed usage cap has been exceeded.\n * - The provided method of payment is no longer valid (for example, a credit card has expired).\n * See the [Maps FAQ](https://developers.google.com/maps/faq#over-limit-key-error) to learn how to fix this.\n */\n\n DirectionsResponseStatus[\"OVER_DAILY_LIMIT\"] = \"OVER_DAILY_LIMIT\";\n /** indicates the service has received too many requests from your application within the allowed time period. */\n\n DirectionsResponseStatus[\"OVER_QUERY_LIMIT\"] = \"OVER_QUERY_LIMIT\";\n /** indicates that the service denied use of the directions service by your application. */\n\n DirectionsResponseStatus[\"REQUEST_DENIED\"] = \"REQUEST_DENIED\";\n /** indicates a directions request could not be processed due to a server error. The request may succeed if you try again. */\n\n DirectionsResponseStatus[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n})(DirectionsResponseStatus = exports.DirectionsResponseStatus || (exports.DirectionsResponseStatus = {}));\n/**\n * The `status` field within the Directions response object contains the status of the request, and may contain debugging information\n * to help you track down why the Directions service failed.\n * @deprecated\n */\n\n\nvar DirectionsReponseStatus;\n\n(function (DirectionsReponseStatus) {\n /** indicates the response contains a valid `result`. */\n DirectionsReponseStatus[\"OK\"] = \"OK\";\n /** indicates at least one of the locations specified in the request's origin, destination, or waypoints could not be geocoded. */\n\n DirectionsReponseStatus[\"NOT_FOUND\"] = \"NOT_FOUND\";\n /** indicates no route could be found between the origin and destination. */\n\n DirectionsReponseStatus[\"ZERO_RESULTS\"] = \"ZERO_RESULTS\";\n /**\n * indicates that too many `waypoints` were provided in the request. For applications using the Directions API as a web service,\n * or the [directions service in the Maps JavaScript API](https://developers.google.com/maps/documentation/javascript/directions),\n * the maximum allowed number of `waypoints` is 23, plus the origin and destination.\n */\n\n DirectionsReponseStatus[\"MAX_WAYPOINTS_EXCEEDED\"] = \"MAX_WAYPOINTS_EXCEEDED\";\n /**\n * indicates the requested route is too long and cannot be processed.\n * This error occurs when more complex directions are returned.\n * Try reducing the number of waypoints, turns, or instructions.\n */\n\n DirectionsReponseStatus[\"MAX_ROUTE_LENGTH_EXCEEDED\"] = \"MAX_ROUTE_LENGTH_EXCEEDED\";\n /** indicates that the provided request was invalid. Common causes of this status include an invalid parameter or parameter value. */\n\n DirectionsReponseStatus[\"INVALID_REQUEST\"] = \"INVALID_REQUEST\";\n /**\n * indicates any of the following:\n * - The API key is missing or invalid.\n * - Billing has not been enabled on your account.\n * - A self-imposed usage cap has been exceeded.\n * - The provided method of payment is no longer valid (for example, a credit card has expired).\n * See the [Maps FAQ](https://developers.google.com/maps/faq#over-limit-key-error) to learn how to fix this.\n */\n\n DirectionsReponseStatus[\"OVER_DAILY_LIMIT\"] = \"OVER_DAILY_LIMIT\";\n /** indicates the service has received too many requests from your application within the allowed time period. */\n\n DirectionsReponseStatus[\"OVER_QUERY_LIMIT\"] = \"OVER_QUERY_LIMIT\";\n /** indicates that the service denied use of the directions service by your application. */\n\n DirectionsReponseStatus[\"REQUEST_DENIED\"] = \"REQUEST_DENIED\";\n /** indicates a directions request could not be processed due to a server error. The request may succeed if you try again. */\n\n DirectionsReponseStatus[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n})(DirectionsReponseStatus = exports.DirectionsReponseStatus || (exports.DirectionsReponseStatus = {}));\n\nvar GeocodedWaypointStatus;\n\n(function (GeocodedWaypointStatus) {\n /** indicates that no errors occurred; the address was successfully parsed and at least one geocode was returned. */\n GeocodedWaypointStatus[\"OK\"] = \"OK\";\n /**\n * indicates that the geocode was successful but returned no results.\n * This may occur if the geocoder was passed a non-existent `address`.\n */\n\n GeocodedWaypointStatus[\"ZERO_RESULTS\"] = \"ZERO_RESULTS\";\n})(GeocodedWaypointStatus = exports.GeocodedWaypointStatus || (exports.GeocodedWaypointStatus = {}));\n\nvar AddressType;\n\n(function (AddressType) {\n /** indicates a precise street address. */\n AddressType[\"street_address\"] = \"street_address\";\n /** indicates a named route (such as \"US 101\"). */\n\n AddressType[\"route\"] = \"route\";\n /** indicates a major intersection, usually of two major roads. */\n\n AddressType[\"intersection\"] = \"intersection\";\n /** indicates a political entity. Usually, this type indicates a polygon of some civil administration. */\n\n AddressType[\"political\"] = \"political\";\n /** indicates the national political entity, and is typically the highest order type returned by the Geocoder. */\n\n AddressType[\"country\"] = \"country\";\n /**\n * indicates a first-order civil entity below the country level. Within the United States, these administrative levels are states.\n * Not all nations exhibit these administrative levels. In most cases, `administrative_area_level_1` short names will closely match\n * ISO 3166-2 subdivisions and other widely circulated lists; however this is not guaranteed as our geocoding results are based\n * on a variety of signals and location data.\n */\n\n AddressType[\"administrative_area_level_1\"] = \"administrative_area_level_1\";\n /**\n * indicates a second-order civil entity below the country level. Within the United States, these administrative levels are counties.\n * Not all nations exhibit these administrative levels.\n */\n\n AddressType[\"administrative_area_level_2\"] = \"administrative_area_level_2\";\n /**\n * indicates a third-order civil entity below the country level. This type indicates a minor civil division.\n * Not all nations exhibit these administrative levels.\n */\n\n AddressType[\"administrative_area_level_3\"] = \"administrative_area_level_3\";\n /**\n * indicates a fourth-order civil entity below the country level. This type indicates a minor civil division.\n * Not all nations exhibit these administrative levels.\n */\n\n AddressType[\"administrative_area_level_4\"] = \"administrative_area_level_4\";\n /**\n * indicates a fifth-order civil entity below the country level. This type indicates a minor civil division.\n * Not all nations exhibit these administrative levels.\n */\n\n AddressType[\"administrative_area_level_5\"] = \"administrative_area_level_5\";\n /** indicates a commonly-used alternative name for the entity. */\n\n AddressType[\"colloquial_area\"] = \"colloquial_area\";\n /** indicates an incorporated city or town political entity. */\n\n AddressType[\"locality\"] = \"locality\";\n /**\n * indicates a specific type of Japanese locality, to facilitate distinction between multiple locality components within a\n * Japanese address.\n */\n\n AddressType[\"ward\"] = \"ward\";\n /**\n * indicates a first-order civil entity below a locality. For some locations may receive one of the additional types:\n * `sublocality_level_1` to `sublocality_level_5`. Each sublocality level is a civil entity. Larger numbers indicate a smaller\n * geographic area.\n */\n\n AddressType[\"sublocality\"] = \"sublocality\";\n AddressType[\"sublocality_level_1\"] = \"sublocality_level_1\";\n AddressType[\"sublocality_level_2\"] = \"sublocality_level_2\";\n AddressType[\"sublocality_level_3\"] = \"sublocality_level_3\";\n AddressType[\"sublocality_level_4\"] = \"sublocality_level_4\";\n AddressType[\"sublocality_level_5\"] = \"sublocality_level_5\";\n /** indicates a named neighborhood */\n\n AddressType[\"neighborhood\"] = \"neighborhood\";\n /** indicates a named location, usually a building or collection of buildings with a common name */\n\n AddressType[\"premise\"] = \"premise\";\n /**\n * indicates a first-order entity below a named location, usually a singular building within a collection of buildings with a\n * common name.\n */\n\n AddressType[\"subpremise\"] = \"subpremise\";\n /** indicates a postal code as used to address postal mail within the country. */\n\n AddressType[\"postal_code\"] = \"postal_code\";\n /** indicates a prominent natural feature. */\n\n AddressType[\"natural_feature\"] = \"natural_feature\";\n /** indicates an airport. */\n\n AddressType[\"airport\"] = \"airport\";\n /** indicates a named park. */\n\n AddressType[\"park\"] = \"park\";\n /**\n * indicates a named point of interest. Typically, these \"POI\"s are prominent local entities that don't easily fit in another category,\n * such as \"Empire State Building\" or \"Statue of Liberty\".\n */\n\n AddressType[\"point_of_interest\"] = \"point_of_interest\";\n AddressType[\"establishment\"] = \"establishment\";\n})(AddressType = exports.AddressType || (exports.AddressType = {}));\n\nvar Maneuver;\n\n(function (Maneuver) {\n Maneuver[\"turn_slight_left\"] = \"turn-slight-left\";\n Maneuver[\"turn_sharp_left\"] = \"turn-sharp-left\";\n Maneuver[\"uturn_left\"] = \"uturn-left\";\n Maneuver[\"turn_left\"] = \"turn-left\";\n Maneuver[\"turn_slight_right\"] = \"turn-slight-right\";\n Maneuver[\"turn_sharp_right\"] = \"turn-sharp-right\";\n Maneuver[\"uturn_right\"] = \"uturn-right\";\n Maneuver[\"turn_right\"] = \"turn-right\";\n Maneuver[\"straight\"] = \"straight\";\n Maneuver[\"ramp_left\"] = \"ramp-left\";\n Maneuver[\"ramp_right\"] = \"ramp-right\";\n Maneuver[\"merge\"] = \"merge\";\n Maneuver[\"fork_left\"] = \"fork-left\";\n Maneuver[\"fork_right\"] = \"fork-right\";\n Maneuver[\"ferry\"] = \"ferry\";\n Maneuver[\"ferry_train\"] = \"ferry-train\";\n Maneuver[\"roundabout_left\"] = \"roundabout-left\";\n Maneuver[\"roundabout_right\"] = \"roundabout-right\";\n})(Maneuver = exports.Maneuver || (exports.Maneuver = {}));\n/** @see https://developers.google.com/maps/documentation/directions/intro#VehicleType. */\n\n\nvar VehicleType;\n\n(function (VehicleType) {\n /** Rail. */\n VehicleType[\"RAIL\"] = \"RAIL\";\n /** Light rail transit. */\n\n VehicleType[\"METRO_RAIL\"] = \"METRO_RAIL\";\n /** Underground light rail. */\n\n VehicleType[\"SUBWAY\"] = \"SUBWAY\";\n /** Above ground light rail. */\n\n VehicleType[\"TRAM\"] = \"TRAM\";\n /** Monorail. */\n\n VehicleType[\"MONORAIL\"] = \"MONORAIL\";\n /** Heavy rail. */\n\n VehicleType[\"HEAVY_RAIL\"] = \"HEAVY_RAIL\";\n /** Commuter rail. */\n\n VehicleType[\"COMMUTER_TRAIN\"] = \"COMMUTER_TRAIN\";\n /** High speed train. */\n\n VehicleType[\"HIGH_SPEED_TRAIN\"] = \"HIGH_SPEED_TRAIN\";\n /** Bus. */\n\n VehicleType[\"BUS\"] = \"BUS\";\n /** Intercity bus. */\n\n VehicleType[\"INTERCITY_BUS\"] = \"INTERCITY_BUS\";\n /** Trolleybus. */\n\n VehicleType[\"TROLLEYBUS\"] = \"TROLLEYBUS\";\n /** Share taxi is a kind of bus with the ability to drop off and pick up passengers anywhere on its route. */\n\n VehicleType[\"SHARE_TAXI\"] = \"SHARE_TAXI\";\n /** Ferry. */\n\n VehicleType[\"FERRY\"] = \"FERRY\";\n /** A vehicle that operates on a cable, usually on the ground. Aerial cable cars may be of the type `GONDOLA_LIFT`. */\n\n VehicleType[\"CABLE_CAR\"] = \"CABLE_CAR\";\n /** An aerial cable car. */\n\n VehicleType[\"GONDOLA_LIFT\"] = \"GONDOLA_LIFT\";\n /**\n * A vehicle that is pulled up a steep incline by a cable.\n * A Funicular typically consists of two cars, with each car acting as a counterweight for the other.\n */\n\n VehicleType[\"FUNICULAR\"] = \"FUNICULAR\";\n /** All other vehicles will return this type. */\n\n VehicleType[\"OTHER\"] = \"OTHER\";\n})(VehicleType = exports.VehicleType || (exports.VehicleType = {}));\n\nvar GeocodingAddressComponentType;\n\n(function (GeocodingAddressComponentType) {\n /** indicates the floor of a building address. */\n GeocodingAddressComponentType[\"floor\"] = \"floor\";\n /** typically indicates a place that has not yet been categorized. */\n\n GeocodingAddressComponentType[\"establishment\"] = \"establishment\";\n /** indicates a named point of interest. */\n\n GeocodingAddressComponentType[\"point_of_interest\"] = \"point_of_interest\";\n /** indicates a parking lot or parking structure. */\n\n GeocodingAddressComponentType[\"parking\"] = \"parking\";\n /** indicates a specific postal box. */\n\n GeocodingAddressComponentType[\"post_box\"] = \"post_box\";\n /** indicates a grouping of geographic areas, such as locality and sublocality, used for mailing addresses in some countries. */\n\n GeocodingAddressComponentType[\"postal_town\"] = \"postal_town\";\n /** indicates the room of a building address. */\n\n GeocodingAddressComponentType[\"room\"] = \"room\";\n /** indicates the precise street number. */\n\n GeocodingAddressComponentType[\"street_number\"] = \"street_number\";\n /** indicate the location of a bus. */\n\n GeocodingAddressComponentType[\"bus_station\"] = \"bus_station\";\n /** indicate the location of a train. */\n\n GeocodingAddressComponentType[\"train_station\"] = \"train_station\";\n /** indicate the location of a public transit stop. */\n\n GeocodingAddressComponentType[\"transit_station\"] = \"transit_station\";\n})(GeocodingAddressComponentType = exports.GeocodingAddressComponentType || (exports.GeocodingAddressComponentType = {}));\n\nvar LocationType;\n\n(function (LocationType) {\n /**\n * indicates that the returned result is a precise geocode for which we have location information\n * accurate down to street address precision\n */\n LocationType[\"ROOFTOP\"] = \"ROOFTOP\";\n /**\n * indicates that the returned result reflects an approximation (usually on a road) interpolated between two precise points\n * (such as intersections). Interpolated results are generally returned when rooftop geocodes are unavailable for a street address.\n */\n\n LocationType[\"RANGE_INTERPOLATED\"] = \"RANGE_INTERPOLATED\";\n /**\n * indicates that the returned result is the geometric center of a result such as a polyline\n * (for example, a street) or polygon (region).\n */\n\n LocationType[\"GEOMETRIC_CENTER\"] = \"GEOMETRIC_CENTER\";\n /** indicates that the returned result is approximate. */\n\n LocationType[\"APPROXIMATE\"] = \"APPROXIMATE\";\n})(LocationType = exports.LocationType || (exports.LocationType = {}));\n\nvar RadioType;\n\n(function (RadioType) {\n RadioType[\"lte\"] = \"lte\";\n RadioType[\"gsm\"] = \"gsm\";\n RadioType[\"cdma\"] = \"cdma\";\n RadioType[\"wcdma\"] = \"wcdma\";\n})(RadioType = exports.RadioType || (exports.RadioType = {}));","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar global = typeof globalThis !== 'undefined' && globalThis || typeof self !== 'undefined' && self || typeof global !== 'undefined' && global;\nvar support = {\n searchParams: 'URLSearchParams' in global,\n iterable: 'Symbol' in global && 'iterator' in Symbol,\n blob: 'FileReader' in global && 'Blob' in global && function () {\n try {\n new Blob();\n return true;\n } catch (e) {\n return false;\n }\n }(),\n formData: 'FormData' in global,\n arrayBuffer: 'ArrayBuffer' in global\n};\n\nfunction isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj);\n}\n\nif (support.arrayBuffer) {\n var viewClasses = ['[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', '[object Int16Array]', '[object Uint16Array]', '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', '[object Float64Array]'];\n\n var isArrayBufferView = ArrayBuffer.isView || function (obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1;\n };\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n\n if (/[^a-z0-9\\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {\n throw new TypeError('Invalid character in header field name: \"' + name + '\"');\n }\n\n return name.toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n\n return value;\n} // Build a destructive iterator for the value list\n\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function next() {\n var value = items.shift();\n return {\n done: value === undefined,\n value: value\n };\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n\n return iterator;\n}\n\nexport function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function (value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function (header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function (name) {\n this.append(name, headers[name]);\n }, this);\n }\n}\n\nHeaders.prototype.append = function (name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n};\n\nHeaders.prototype['delete'] = function (name) {\n delete this.map[normalizeName(name)];\n};\n\nHeaders.prototype.get = function (name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null;\n};\n\nHeaders.prototype.has = function (name) {\n return this.map.hasOwnProperty(normalizeName(name));\n};\n\nHeaders.prototype.set = function (name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n};\n\nHeaders.prototype.forEach = function (callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n};\n\nHeaders.prototype.keys = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push(name);\n });\n return iteratorFor(items);\n};\n\nHeaders.prototype.values = function () {\n var items = [];\n this.forEach(function (value) {\n items.push(value);\n });\n return iteratorFor(items);\n};\n\nHeaders.prototype.entries = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items);\n};\n\nif (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n}\n\nfunction consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'));\n }\n\n body.bodyUsed = true;\n}\n\nfunction fileReaderReady(reader) {\n return new Promise(function (resolve, reject) {\n reader.onload = function () {\n resolve(reader.result);\n };\n\n reader.onerror = function () {\n reject(reader.error);\n };\n });\n}\n\nfunction readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise;\n}\n\nfunction readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise;\n}\n\nfunction readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n\n return chars.join('');\n}\n\nfunction bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0);\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer;\n }\n}\n\nfunction Body() {\n this.bodyUsed = false;\n\n this._initBody = function (body) {\n /*\n fetch-mock wraps the Response object in an ES6 Proxy to\n provide useful test harness features such as flush. However, on\n ES5 browsers without fetch or Proxy support pollyfills must be used;\n the proxy-pollyfill is unable to proxy an attribute unless it exists\n on the object before the Proxy is created. This change ensures\n Response.bodyUsed exists on the instance, while maintaining the\n semantic of setting Request.bodyUsed in the constructor before\n _initBody is called.\n */\n this.bodyUsed = this.bodyUsed;\n this._bodyInit = body;\n\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer); // IE 10-11 can't handle a DataView body.\n\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function () {\n var rejected = consumed(this);\n\n if (rejected) {\n return rejected;\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob);\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]));\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob');\n } else {\n return Promise.resolve(new Blob([this._bodyText]));\n }\n };\n\n this.arrayBuffer = function () {\n if (this._bodyArrayBuffer) {\n var isConsumed = consumed(this);\n\n if (isConsumed) {\n return isConsumed;\n }\n\n if (ArrayBuffer.isView(this._bodyArrayBuffer)) {\n return Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset, this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength));\n } else {\n return Promise.resolve(this._bodyArrayBuffer);\n }\n } else {\n return this.blob().then(readBlobAsArrayBuffer);\n }\n };\n }\n\n this.text = function () {\n var rejected = consumed(this);\n\n if (rejected) {\n return rejected;\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob);\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer));\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text');\n } else {\n return Promise.resolve(this._bodyText);\n }\n };\n\n if (support.formData) {\n this.formData = function () {\n return this.text().then(decode);\n };\n }\n\n this.json = function () {\n return this.text().then(JSON.parse);\n };\n\n return this;\n} // HTTP methods whose capitalization should be normalized\n\n\nvar methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\nfunction normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method;\n}\n\nexport function Request(input, options) {\n if (!(this instanceof Request)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.');\n }\n\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read');\n }\n\n this.url = input.url;\n this.credentials = input.credentials;\n\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests');\n }\n\n this._initBody(body);\n\n if (this.method === 'GET' || this.method === 'HEAD') {\n if (options.cache === 'no-store' || options.cache === 'no-cache') {\n // Search for a '_' parameter in the query string\n var reParamSearch = /([?&])_=[^&]*/;\n\n if (reParamSearch.test(this.url)) {\n // If it already exists then set the value with the current time\n this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());\n } else {\n // Otherwise add a new '_' parameter to the end with the current time\n var reQueryString = /\\?/;\n this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();\n }\n }\n }\n}\n\nRequest.prototype.clone = function () {\n return new Request(this, {\n body: this._bodyInit\n });\n};\n\nfunction decode(body) {\n var form = new FormData();\n body.trim().split('&').forEach(function (bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form;\n}\n\nfunction parseHeaders(rawHeaders) {\n var headers = new Headers(); // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' '); // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill\n // https://github.com/github/fetch/issues/748\n // https://github.com/zloirock/core-js/issues/751\n\n preProcessedHeaders.split('\\r').map(function (header) {\n return header.indexOf('\\n') === 0 ? header.substr(1, header.length) : header;\n }).forEach(function (line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers;\n}\n\nBody.call(Request.prototype);\nexport function Response(bodyInit, options) {\n if (!(this instanceof Response)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.');\n }\n\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = options.statusText === undefined ? '' : '' + options.statusText;\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n\n this._initBody(bodyInit);\n}\nBody.call(Response.prototype);\n\nResponse.prototype.clone = function () {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n });\n};\n\nResponse.error = function () {\n var response = new Response(null, {\n status: 0,\n statusText: ''\n });\n response.type = 'error';\n return response;\n};\n\nvar redirectStatuses = [301, 302, 303, 307, 308];\n\nResponse.redirect = function (url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code');\n }\n\n return new Response(null, {\n status: status,\n headers: {\n location: url\n }\n });\n};\n\nexport var DOMException = global.DOMException;\n\ntry {\n new DOMException();\n} catch (err) {\n DOMException = function DOMException(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n\n DOMException.prototype = Object.create(Error.prototype);\n DOMException.prototype.constructor = DOMException;\n}\n\nexport function fetch(input, init) {\n return new Promise(function (resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new DOMException('Aborted', 'AbortError'));\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function () {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n setTimeout(function () {\n resolve(new Response(body, options));\n }, 0);\n };\n\n xhr.onerror = function () {\n setTimeout(function () {\n reject(new TypeError('Network request failed'));\n }, 0);\n };\n\n xhr.ontimeout = function () {\n setTimeout(function () {\n reject(new TypeError('Network request failed'));\n }, 0);\n };\n\n xhr.onabort = function () {\n setTimeout(function () {\n reject(new DOMException('Aborted', 'AbortError'));\n }, 0);\n };\n\n function fixUrl(url) {\n try {\n return url === '' && global.location.href ? global.location.href : url;\n } catch (e) {\n return url;\n }\n }\n\n xhr.open(request.method, fixUrl(request.url), true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr) {\n if (support.blob) {\n xhr.responseType = 'blob';\n } else if (support.arrayBuffer && request.headers.get('Content-Type') && request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1) {\n xhr.responseType = 'arraybuffer';\n }\n }\n\n if (init && _typeof(init.headers) === 'object' && !(init.headers instanceof Headers)) {\n Object.getOwnPropertyNames(init.headers).forEach(function (name) {\n xhr.setRequestHeader(name, normalizeValue(init.headers[name]));\n });\n } else {\n request.headers.forEach(function (value, name) {\n xhr.setRequestHeader(name, value);\n });\n }\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function () {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n });\n}\nfetch.polyfill = true;\n\nif (!global.fetch) {\n global.fetch = fetch;\n global.Headers = Headers;\n global.Request = Request;\n global.Response = Response;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = (typeof global === \"undefined\" ? \"undefined\" : _typeof(global)) == 'object' && global && global.Object === Object && global;\nmodule.exports = freeGlobal;","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n/** Used to resolve the decompiled source of functions. */\n\nvar funcToString = funcProto.toString;\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n\n try {\n return func + '';\n } catch (e) {}\n }\n\n return '';\n}\n\nmodule.exports = toSource;","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while (fromRight ? index-- : ++index < length) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n\n return -1;\n}\n\nmodule.exports = baseFindIndex;","var apply = require('./_apply');\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\n\nvar nativeMax = Math.max;\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? func.length - 1 : start, 0);\n return function () {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n\n index = -1;\n var otherArgs = Array(start + 1);\n\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n\n\nvar setToString = shortOut(baseSetToString);\nmodule.exports = setToString;","var getNative = require('./_getNative');\n\nvar defineProperty = function () {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}();\n\nmodule.exports = defineProperty;","var root = require('./_root');\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n\n\nvar now = function now() {\n return root.Date.now();\n};\n\nmodule.exports = now;","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n/** Used as references for various `Number` constants. */\n\n\nvar NAN = 0 / 0;\n/** Used to detect bad signed hexadecimal string values. */\n\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n/** Used to detect binary string values. */\n\nvar reIsBinary = /^0b[01]+$/i;\n/** Used to detect octal string values. */\n\nvar reIsOctal = /^0o[0-7]+$/i;\n/** Built-in method references without a dependency on `root`. */\n\nvar freeParseInt = parseInt;\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n\n if (isSymbol(value)) {\n return NAN;\n }\n\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? other + '' : other;\n }\n\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;\n}\n\nmodule.exports = toNumber;","/*\nCopyright (c) 2012-2014 Chris Pettitt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\nmodule.exports = {\n graphlib: require(\"./lib/graphlib\"),\n layout: require(\"./lib/layout\"),\n debug: require(\"./lib/debug\"),\n util: {\n time: require(\"./lib/util\").time,\n notime: require(\"./lib/util\").notime\n },\n version: require(\"./lib/version\")\n};","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n/** Used to compose bitmasks for cloning. */\n\n\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n/** `Object#toString` result references. */\n\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n/** Used to identify `toStringTag` values supported by `_.clone`. */\n\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n\n if (result !== undefined) {\n return result;\n }\n\n if (!isObject(value)) {\n return value;\n }\n\n var isArr = isArray(value);\n\n if (isArr) {\n result = initCloneArray(value);\n\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n\n if (tag == objectTag || tag == argsTag || isFunc && !object) {\n result = isFlat || isFunc ? {} : initCloneObject(value);\n\n if (!isDeep) {\n return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n\n result = initCloneByTag(value, tag, isDeep);\n }\n } // Check for circular references and return its corresponding clone.\n\n\n stack || (stack = new Stack());\n var stacked = stack.get(value);\n\n if (stacked) {\n return stacked;\n }\n\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function (subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function (subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function (subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n } // Recursively populate clone (susceptible to call stack limits).\n\n\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers.\n isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays.\n isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties.\n isIndex(key, length)))) {\n result.push(key);\n }\n }\n\n return result;\n}\n\nmodule.exports = arrayLikeKeys;","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar root = require('./_root');\n/** Detect free variable `exports`. */\n\n\nvar freeExports = (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;\n/** Detect free variable `module`. */\n\nvar freeModule = freeExports && (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) == 'object' && module && !module.nodeType && module;\n/** Detect the popular CommonJS extension `module.exports`. */\n\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n/** Built-in value references. */\n\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n array || (array = Array(length));\n\n while (++index < length) {\n array[index] = source[index];\n }\n\n return array;\n}\n\nmodule.exports = copyArray;","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n\n return result;\n}\n\nmodule.exports = arrayFilter;","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\n\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function (object) {\n var result = [];\n\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n\n return result;\n};\nmodule.exports = getSymbolsIn;","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n\n\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n\n\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;","var getNative = require('./_getNative'),\n root = require('./_root');\n/* Built-in method references that are verified to be native. */\n\n\nvar Set = getNative(root, 'Set');\nmodule.exports = Set;","var root = require('./_root');\n/** Built-in value references. */\n\n\nvar Uint8Array = root.Uint8Array;\nmodule.exports = Uint8Array;","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n\n\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n\n\nfunction initCloneObject(object) {\n return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};\n}\n\nmodule.exports = initCloneObject;","var isObject = require('./isObject');\n/** Built-in value references. */\n\n\nvar objectCreate = Object.create;\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n\nvar baseCreate = function () {\n function object() {}\n\n return function (proto) {\n if (!isObject(proto)) {\n return {};\n }\n\n if (objectCreate) {\n return objectCreate(proto);\n }\n\n object.prototype = proto;\n var result = new object();\n object.prototype = undefined;\n return result;\n };\n}();\n\nmodule.exports = baseCreate;","var arrayEach = require('./_arrayEach'),\n baseEach = require('./_baseEach'),\n castFunction = require('./_castFunction'),\n isArray = require('./isArray');\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n\n\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nmodule.exports = forEach;","var identity = require('./identity');\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n\n\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nmodule.exports = castFunction;","var arrayFilter = require('./_arrayFilter'),\n baseFilter = require('./_baseFilter'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n\n\nfunction filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = filter;","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n\n\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n\n if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {\n return value !== value && other !== other;\n }\n\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n/** Used to compose bitmasks for value comparisons. */\n\n\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n } // Check that cyclic values are equal.\n\n\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n\n var index = -1,\n result = true,\n seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;\n stack.set(array, other);\n stack.set(other, array); // Ignore non-index properties.\n\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);\n }\n\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n\n result = false;\n break;\n } // Recursively compare arrays (susceptible to call stack limits).\n\n\n if (seen) {\n if (!arraySome(other, function (othValue, othIndex) {\n if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n result = false;\n break;\n }\n }\n\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;","var isObject = require('./isObject');\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n\n\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function (object) {\n if (object == null) {\n return false;\n }\n\n return object[key] === srcValue && (srcValue !== undefined || key in Object(object));\n };\n}\n\nmodule.exports = matchesStrictComparable;","var baseToString = require('./_baseToString');\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n\n\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n\n\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n\n\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n\n object = object[key];\n }\n\n if (result || ++index != length) {\n return result;\n }\n\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function (object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;","/**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\nfunction isUndefined(value) {\n return value === undefined;\n}\n\nmodule.exports = isUndefined;","var arrayMap = require('./_arrayMap'),\n baseIteratee = require('./_baseIteratee'),\n baseMap = require('./_baseMap'),\n isArray = require('./isArray');\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n\n\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nmodule.exports = map;","var baseEach = require('./_baseEach'),\n isArrayLike = require('./isArrayLike');\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n\n\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n baseEach(collection, function (value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;","var arrayReduce = require('./_arrayReduce'),\n baseEach = require('./_baseEach'),\n baseIteratee = require('./_baseIteratee'),\n baseReduce = require('./_baseReduce'),\n isArray = require('./isArray');\n/**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n\n\nfunction reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n}\n\nmodule.exports = reduce;","var baseValues = require('./_baseValues'),\n keys = require('./keys');\n/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n\n\nfunction values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n}\n\nmodule.exports = values;","var _ = require(\"../lodash\");\n\nvar PriorityQueue = require(\"../data/priority-queue\");\n\nmodule.exports = dijkstra;\n\nvar DEFAULT_WEIGHT_FUNC = _.constant(1);\n\nfunction dijkstra(g, source, weightFn, edgeFn) {\n return runDijkstra(g, String(source), weightFn || DEFAULT_WEIGHT_FUNC, edgeFn || function (v) {\n return g.outEdges(v);\n });\n}\n\nfunction runDijkstra(g, source, weightFn, edgeFn) {\n var results = {};\n var pq = new PriorityQueue();\n var v, vEntry;\n\n var updateNeighbors = function updateNeighbors(edge) {\n var w = edge.v !== v ? edge.v : edge.w;\n var wEntry = results[w];\n var weight = weightFn(edge);\n var distance = vEntry.distance + weight;\n\n if (weight < 0) {\n throw new Error(\"dijkstra does not allow negative edge weights. \" + \"Bad edge: \" + edge + \" Weight: \" + weight);\n }\n\n if (distance < wEntry.distance) {\n wEntry.distance = distance;\n wEntry.predecessor = v;\n pq.decrease(w, distance);\n }\n };\n\n g.nodes().forEach(function (v) {\n var distance = v === source ? 0 : Number.POSITIVE_INFINITY;\n results[v] = {\n distance: distance\n };\n pq.add(v, distance);\n });\n\n while (pq.size() > 0) {\n v = pq.removeMin();\n vEntry = results[v];\n\n if (vEntry.distance === Number.POSITIVE_INFINITY) {\n break;\n }\n\n edgeFn(v).forEach(updateNeighbors);\n }\n\n return results;\n}","var _ = require(\"../lodash\");\n\nmodule.exports = PriorityQueue;\n/**\n * A min-priority queue data structure. This algorithm is derived from Cormen,\n * et al., \"Introduction to Algorithms\". The basic idea of a min-priority\n * queue is that you can efficiently (in O(1) time) get the smallest key in\n * the queue. Adding and removing elements takes O(log n) time. A key can\n * have its priority decreased in O(log n) time.\n */\n\nfunction PriorityQueue() {\n this._arr = [];\n this._keyIndices = {};\n}\n/**\n * Returns the number of elements in the queue. Takes `O(1)` time.\n */\n\n\nPriorityQueue.prototype.size = function () {\n return this._arr.length;\n};\n/**\n * Returns the keys that are in the queue. Takes `O(n)` time.\n */\n\n\nPriorityQueue.prototype.keys = function () {\n return this._arr.map(function (x) {\n return x.key;\n });\n};\n/**\n * Returns `true` if **key** is in the queue and `false` if not.\n */\n\n\nPriorityQueue.prototype.has = function (key) {\n return _.has(this._keyIndices, key);\n};\n/**\n * Returns the priority for **key**. If **key** is not present in the queue\n * then this function returns `undefined`. Takes `O(1)` time.\n *\n * @param {Object} key\n */\n\n\nPriorityQueue.prototype.priority = function (key) {\n var index = this._keyIndices[key];\n\n if (index !== undefined) {\n return this._arr[index].priority;\n }\n};\n/**\n * Returns the key for the minimum element in this queue. If the queue is\n * empty this function throws an Error. Takes `O(1)` time.\n */\n\n\nPriorityQueue.prototype.min = function () {\n if (this.size() === 0) {\n throw new Error(\"Queue underflow\");\n }\n\n return this._arr[0].key;\n};\n/**\n * Inserts a new key into the priority queue. If the key already exists in\n * the queue this function returns `false`; otherwise it will return `true`.\n * Takes `O(n)` time.\n *\n * @param {Object} key the key to add\n * @param {Number} priority the initial priority for the key\n */\n\n\nPriorityQueue.prototype.add = function (key, priority) {\n var keyIndices = this._keyIndices;\n key = String(key);\n\n if (!_.has(keyIndices, key)) {\n var arr = this._arr;\n var index = arr.length;\n keyIndices[key] = index;\n arr.push({\n key: key,\n priority: priority\n });\n\n this._decrease(index);\n\n return true;\n }\n\n return false;\n};\n/**\n * Removes and returns the smallest key in the queue. Takes `O(log n)` time.\n */\n\n\nPriorityQueue.prototype.removeMin = function () {\n this._swap(0, this._arr.length - 1);\n\n var min = this._arr.pop();\n\n delete this._keyIndices[min.key];\n\n this._heapify(0);\n\n return min.key;\n};\n/**\n * Decreases the priority for **key** to **priority**. If the new priority is\n * greater than the previous priority, this function will throw an Error.\n *\n * @param {Object} key the key for which to raise priority\n * @param {Number} priority the new priority for the key\n */\n\n\nPriorityQueue.prototype.decrease = function (key, priority) {\n var index = this._keyIndices[key];\n\n if (priority > this._arr[index].priority) {\n throw new Error(\"New priority is greater than current priority. \" + \"Key: \" + key + \" Old: \" + this._arr[index].priority + \" New: \" + priority);\n }\n\n this._arr[index].priority = priority;\n\n this._decrease(index);\n};\n\nPriorityQueue.prototype._heapify = function (i) {\n var arr = this._arr;\n var l = 2 * i;\n var r = l + 1;\n var largest = i;\n\n if (l < arr.length) {\n largest = arr[l].priority < arr[largest].priority ? l : largest;\n\n if (r < arr.length) {\n largest = arr[r].priority < arr[largest].priority ? r : largest;\n }\n\n if (largest !== i) {\n this._swap(i, largest);\n\n this._heapify(largest);\n }\n }\n};\n\nPriorityQueue.prototype._decrease = function (index) {\n var arr = this._arr;\n var priority = arr[index].priority;\n var parent;\n\n while (index !== 0) {\n parent = index >> 1;\n\n if (arr[parent].priority < priority) {\n break;\n }\n\n this._swap(index, parent);\n\n index = parent;\n }\n};\n\nPriorityQueue.prototype._swap = function (i, j) {\n var arr = this._arr;\n var keyIndices = this._keyIndices;\n var origArrI = arr[i];\n var origArrJ = arr[j];\n arr[i] = origArrJ;\n arr[j] = origArrI;\n keyIndices[origArrJ.key] = i;\n keyIndices[origArrI.key] = j;\n};","var _ = require(\"../lodash\");\n\nmodule.exports = tarjan;\n\nfunction tarjan(g) {\n var index = 0;\n var stack = [];\n var visited = {}; // node id -> { onStack, lowlink, index }\n\n var results = [];\n\n function dfs(v) {\n var entry = visited[v] = {\n onStack: true,\n lowlink: index,\n index: index++\n };\n stack.push(v);\n g.successors(v).forEach(function (w) {\n if (!_.has(visited, w)) {\n dfs(w);\n entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink);\n } else if (visited[w].onStack) {\n entry.lowlink = Math.min(entry.lowlink, visited[w].index);\n }\n });\n\n if (entry.lowlink === entry.index) {\n var cmpt = [];\n var w;\n\n do {\n w = stack.pop();\n visited[w].onStack = false;\n cmpt.push(w);\n } while (v !== w);\n\n results.push(cmpt);\n }\n }\n\n g.nodes().forEach(function (v) {\n if (!_.has(visited, v)) {\n dfs(v);\n }\n });\n return results;\n}","var _ = require(\"../lodash\");\n\nmodule.exports = topsort;\ntopsort.CycleException = CycleException;\n\nfunction topsort(g) {\n var visited = {};\n var stack = {};\n var results = [];\n\n function visit(node) {\n if (_.has(stack, node)) {\n throw new CycleException();\n }\n\n if (!_.has(visited, node)) {\n stack[node] = true;\n visited[node] = true;\n\n _.each(g.predecessors(node), visit);\n\n delete stack[node];\n results.push(node);\n }\n }\n\n _.each(g.sinks(), visit);\n\n if (_.size(visited) !== g.nodeCount()) {\n throw new CycleException();\n }\n\n return results;\n}\n\nfunction CycleException() {}\n\nCycleException.prototype = new Error(); // must be an instance of Error to pass testing","var _ = require(\"../lodash\");\n\nmodule.exports = dfs;\n/*\n * A helper that preforms a pre- or post-order traversal on the input graph\n * and returns the nodes in the order they were visited. If the graph is\n * undirected then this algorithm will navigate using neighbors. If the graph\n * is directed then this algorithm will navigate using successors.\n *\n * Order must be one of \"pre\" or \"post\".\n */\n\nfunction dfs(g, vs, order) {\n if (!_.isArray(vs)) {\n vs = [vs];\n }\n\n var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g);\n var acc = [];\n var visited = {};\n\n _.each(vs, function (v) {\n if (!g.hasNode(v)) {\n throw new Error(\"Graph does not have node: \" + v);\n }\n\n doDfs(g, v, order === \"post\", visited, navigation, acc);\n });\n\n return acc;\n}\n\nfunction doDfs(g, v, postorder, visited, navigation, acc) {\n if (!_.has(visited, v)) {\n visited[v] = true;\n\n if (!postorder) {\n acc.push(v);\n }\n\n _.each(navigation(v), function (w) {\n doDfs(g, w, postorder, visited, navigation, acc);\n });\n\n if (postorder) {\n acc.push(v);\n }\n }\n}","var baseRest = require('./_baseRest'),\n eq = require('./eq'),\n isIterateeCall = require('./_isIterateeCall'),\n keysIn = require('./keysIn');\n/** Used for built-in method references. */\n\n\nvar objectProto = Object.prototype;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n\nvar defaults = baseRest(function (object, sources) {\n object = Object(object);\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n});\nmodule.exports = defaults;","var toNumber = require('./toNumber');\n/** Used as references for various `Number` constants. */\n\n\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n\n value = toNumber(value);\n\n if (value === INFINITY || value === -INFINITY) {\n var sign = value < 0 ? -1 : 1;\n return sign * MAX_INTEGER;\n }\n\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;","var baseFlatten = require('./_baseFlatten');\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n\n\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n\n\nfunction assignMergeValue(object, key, value) {\n if (value !== undefined && !eq(object[key], value) || value === undefined && !(key in object)) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignMergeValue;","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n/** `Object#toString` result references. */\n\n\nvar objectTag = '[object Object]';\n/** Used for built-in method references. */\n\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n/** Used to resolve the decompiled source of functions. */\n\nvar funcToString = funcProto.toString;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/** Used to infer the `Object` constructor. */\n\nvar objectCtorString = funcToString.call(Object);\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n\n var proto = getPrototype(value);\n\n if (proto === null) {\n return true;\n }\n\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nmodule.exports = safeGet;","/**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\nfunction baseLt(value, other) {\n return value < other;\n}\n\nmodule.exports = baseLt;","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n\n\nvar pick = flatRest(function (object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\nmodule.exports = pick;","var createRange = require('./_createRange');\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\n\n\nvar range = createRange();\nmodule.exports = range;","var toString = require('./toString');\n/** Used to generate unique IDs. */\n\n\nvar idCounter = 0;\n/**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\n\nfunction uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n}\n\nmodule.exports = uniqueId;","\"use strict\";\n\nvar _ = require(\"../lodash\");\n\nvar Graph = require(\"../graphlib\").Graph;\n\nvar slack = require(\"./util\").slack;\n\nmodule.exports = feasibleTree;\n/*\n * Constructs a spanning tree with tight edges and adjusted the input node's\n * ranks to achieve this. A tight edge is one that is has a length that matches\n * its \"minlen\" attribute.\n *\n * The basic structure for this function is derived from Gansner, et al., \"A\n * Technique for Drawing Directed Graphs.\"\n *\n * Pre-conditions:\n *\n * 1. Graph must be a DAG.\n * 2. Graph must be connected.\n * 3. Graph must have at least one node.\n * 5. Graph nodes must have been previously assigned a \"rank\" property that\n * respects the \"minlen\" property of incident edges.\n * 6. Graph edges must have a \"minlen\" property.\n *\n * Post-conditions:\n *\n * - Graph nodes will have their rank adjusted to ensure that all edges are\n * tight.\n *\n * Returns a tree (undirected graph) that is constructed using only \"tight\"\n * edges.\n */\n\nfunction feasibleTree(g) {\n var t = new Graph({\n directed: false\n }); // Choose arbitrary node from which to start our tree\n\n var start = g.nodes()[0];\n var size = g.nodeCount();\n t.setNode(start, {});\n var edge, delta;\n\n while (tightTree(t, g) < size) {\n edge = findMinSlackEdge(t, g);\n delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge);\n shiftRanks(t, g, delta);\n }\n\n return t;\n}\n/*\n * Finds a maximal tree of tight edges and returns the number of nodes in the\n * tree.\n */\n\n\nfunction tightTree(t, g) {\n function dfs(v) {\n _.forEach(g.nodeEdges(v), function (e) {\n var edgeV = e.v,\n w = v === edgeV ? e.w : edgeV;\n\n if (!t.hasNode(w) && !slack(g, e)) {\n t.setNode(w, {});\n t.setEdge(v, w, {});\n dfs(w);\n }\n });\n }\n\n _.forEach(t.nodes(), dfs);\n\n return t.nodeCount();\n}\n/*\n * Finds the edge with the smallest slack that is incident on tree and returns\n * it.\n */\n\n\nfunction findMinSlackEdge(t, g) {\n return _.minBy(g.edges(), function (e) {\n if (t.hasNode(e.v) !== t.hasNode(e.w)) {\n return slack(g, e);\n }\n });\n}\n\nfunction shiftRanks(t, g, delta) {\n _.forEach(t.nodes(), function (v) {\n g.node(v).rank += delta;\n });\n}","/* global window */\nvar dagre;\n\nif (typeof require === \"function\") {\n try {\n dagre = require(\"dagre\");\n } catch (e) {// continue regardless of error\n }\n}\n\nif (!dagre) {\n dagre = window.dagre;\n}\n\nmodule.exports = dagre;","module.exports = intersectNode;\n\nfunction intersectNode(node, point) {\n return node.intersect(point);\n}","var intersectEllipse = require(\"./intersect-ellipse\");\n\nmodule.exports = intersectCircle;\n\nfunction intersectCircle(node, rx, point) {\n return intersectEllipse(node, rx, rx, point);\n}","/* eslint \"no-console\": off */\nvar intersectLine = require(\"./intersect-line\");\n\nmodule.exports = intersectPolygon;\n/*\n * Returns the point ({x, y}) at which the point argument intersects with the\n * node argument assuming that it has the shape specified by polygon.\n */\n\nfunction intersectPolygon(node, polyPoints, point) {\n var x1 = node.x;\n var y1 = node.y;\n var intersections = [];\n var minX = Number.POSITIVE_INFINITY;\n var minY = Number.POSITIVE_INFINITY;\n polyPoints.forEach(function (entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n var left = x1 - node.width / 2 - minX;\n var top = y1 - node.height / 2 - minY;\n\n for (var i = 0; i < polyPoints.length; i++) {\n var p1 = polyPoints[i];\n var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n var intersect = intersectLine(node, point, {\n x: left + p1.x,\n y: top + p1.y\n }, {\n x: left + p2.x,\n y: top + p2.y\n });\n\n if (intersect) {\n intersections.push(intersect);\n }\n }\n\n if (!intersections.length) {\n console.log(\"NO INTERSECTION FOUND, RETURN NODE CENTER\", node);\n return node;\n }\n\n if (intersections.length > 1) {\n // More intersections, find the one nearest to edge end point\n intersections.sort(function (p, q) {\n var pdx = p.x - point.x;\n var pdy = p.y - point.y;\n var distp = Math.sqrt(pdx * pdx + pdy * pdy);\n var qdx = q.x - point.x;\n var qdy = q.y - point.y;\n var distq = Math.sqrt(qdx * qdx + qdy * qdy);\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n\n return intersections[0];\n}","module.exports = intersectRect;\n\nfunction intersectRect(node, point) {\n var x = node.x;\n var y = node.y; // Rectangle intersection algorithm from:\n // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n\n var dx = point.x - x;\n var dy = point.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n var sx, sy;\n\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n\n sx = dy === 0 ? 0 : h * dx / dy;\n sy = h;\n } else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n\n sx = w;\n sy = dx === 0 ? 0 : w * dy / dx;\n }\n\n return {\n x: x + sx,\n y: y + sy\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar util = require(\"../util\");\n\nmodule.exports = addHtmlLabel;\n\nfunction addHtmlLabel(root, node) {\n var fo = root.append(\"foreignObject\").attr(\"width\", \"100000\");\n var div = fo.append(\"xhtml:div\");\n div.attr(\"xmlns\", \"http://www.w3.org/1999/xhtml\");\n var label = node.label;\n\n switch (_typeof(label)) {\n case \"function\":\n div.insert(label);\n break;\n\n case \"object\":\n // Currently we assume this is a DOM object.\n div.insert(function () {\n return label;\n });\n break;\n\n default:\n div.html(label);\n }\n\n util.applyStyle(div, node.labelStyle);\n div.style(\"display\", \"inline-block\"); // Fix for firefox\n\n div.style(\"white-space\", \"nowrap\");\n var client = div.node().getBoundingClientRect();\n fo.attr(\"width\", client.width).attr(\"height\", client.height);\n return fo;\n}","\"use strict\";\n/* IMPORT */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar utils_1 = require(\"../utils\");\n\nvar reusable_1 = require(\"../channels/reusable\");\n\nvar consts_1 = require(\"../consts\");\n/* HEX */\n\n\nvar Hex = {\n /* VARIABLES */\n re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,\n\n /* API */\n parse: function parse(color) {\n if (color.charCodeAt(0) !== 35) return; // '#'\n\n var match = color.match(Hex.re);\n if (!match) return;\n var hex = match[1],\n dec = parseInt(hex, 16),\n length = hex.length,\n hasAlpha = length % 4 === 0,\n isFullLength = length > 4,\n multiplier = isFullLength ? 1 : 17,\n bits = isFullLength ? 8 : 4,\n bitsOffset = hasAlpha ? 0 : -1,\n mask = isFullLength ? 255 : 15;\n return reusable_1[\"default\"].set({\n r: (dec >> bits * (bitsOffset + 3) & mask) * multiplier,\n g: (dec >> bits * (bitsOffset + 2) & mask) * multiplier,\n b: (dec >> bits * (bitsOffset + 1) & mask) * multiplier,\n a: hasAlpha ? (dec & mask) * multiplier / 255 : 1\n }, color);\n },\n stringify: function stringify(channels) {\n if (channels.a < 1) {\n // #RRGGBBAA\n return \"#\" + consts_1.DEC2HEX[Math.round(channels.r)] + consts_1.DEC2HEX[Math.round(channels.g)] + consts_1.DEC2HEX[Math.round(channels.b)] + utils_1[\"default\"].unit.frac2hex(channels.a);\n } else {\n // #RRGGBB\n return \"#\" + consts_1.DEC2HEX[Math.round(channels.r)] + consts_1.DEC2HEX[Math.round(channels.g)] + consts_1.DEC2HEX[Math.round(channels.b)];\n }\n }\n};\n/* EXPORT */\n\nexports[\"default\"] = Hex;","\"use strict\";\n/* IMPORT */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar utils_1 = require(\"../utils\");\n\nvar reusable_1 = require(\"../channels/reusable\");\n\nvar color_1 = require(\"../color\");\n/* HSLA */\n\n\nfunction hsla(h, s, l, a) {\n if (a === void 0) {\n a = 1;\n }\n\n var channels = reusable_1[\"default\"].set({\n h: utils_1[\"default\"].channel.clamp.h(h),\n s: utils_1[\"default\"].channel.clamp.s(s),\n l: utils_1[\"default\"].channel.clamp.l(l),\n a: utils_1[\"default\"].channel.clamp.a(a)\n });\n return color_1[\"default\"].stringify(channels);\n}\n/* EXPORT */\n\n\nexports[\"default\"] = hsla;","\"use strict\";\n/* IMPORT */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar channel_1 = require(\"./channel\");\n/* ALPHA */\n\n\nfunction alpha(color) {\n return channel_1[\"default\"](color, 'a');\n}\n/* EXPORT */\n\n\nexports[\"default\"] = alpha;","\"use strict\";\n/* IMPORT */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar utils_1 = require(\"../utils\");\n\nvar color_1 = require(\"../color\");\n/* LUMINANCE */\n//SOURCE: https://planetcalc.com/7779\n\n\nfunction luminance(color) {\n var _a = color_1[\"default\"].parse(color),\n r = _a.r,\n g = _a.g,\n b = _a.b,\n luminance = .2126 * utils_1[\"default\"].channel.toLinear(r) + .7152 * utils_1[\"default\"].channel.toLinear(g) + .0722 * utils_1[\"default\"].channel.toLinear(b);\n\n return utils_1[\"default\"].lang.round(luminance);\n}\n/* EXPORT */\n\n\nexports[\"default\"] = luminance;","\"use strict\";\n/* IMPORT */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar luminance_1 = require(\"./luminance\");\n/* IS LIGHT */\n\n\nfunction isLight(color) {\n return luminance_1[\"default\"](color) >= .5;\n}\n/* EXPORT */\n\n\nexports[\"default\"] = isLight;","\"use strict\";\n/* IMPORT */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar adjust_channel_1 = require(\"./adjust_channel\");\n/* OPACIFY */\n\n\nfunction opacify(color, amount) {\n return adjust_channel_1[\"default\"](color, 'a', amount);\n}\n/* EXPORT */\n\n\nexports[\"default\"] = opacify;","\"use strict\";\n/* IMPORT */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar adjust_channel_1 = require(\"./adjust_channel\");\n/* TRANSPARENTIZE */\n\n\nfunction transparentize(color, amount) {\n return adjust_channel_1[\"default\"](color, 'a', -amount);\n}\n/* EXPORT */\n\n\nexports[\"default\"] = transparentize;","\"use strict\";\n/* IMPORT */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar color_1 = require(\"../color\");\n\nvar change_1 = require(\"./change\");\n/* ADJUST */\n\n\nfunction adjust(color, channels) {\n var ch = color_1[\"default\"].parse(color),\n changes = {};\n\n for (var c in channels) {\n if (!channels[c]) continue;\n changes[c] = ch[c] + channels[c];\n }\n\n return change_1[\"default\"](color, changes);\n}\n/* EXPORT */\n\n\nexports[\"default\"] = adjust;","\"use strict\";\n/* IMPORT */\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar color_1 = require(\"../color\");\n\nvar rgba_1 = require(\"./rgba\");\n/* MIX */\n//SOURCE: https://github.com/sass/dart-sass/blob/7457d2e9e7e623d9844ffd037a070cf32d39c348/lib/src/functions/color.dart#L718-L756\n\n\nfunction mix(color1, color2, weight) {\n if (weight === void 0) {\n weight = 50;\n }\n\n var _a = color_1[\"default\"].parse(color1),\n r1 = _a.r,\n g1 = _a.g,\n b1 = _a.b,\n a1 = _a.a,\n _b = color_1[\"default\"].parse(color2),\n r2 = _b.r,\n g2 = _b.g,\n b2 = _b.b,\n a2 = _b.a,\n weightScale = weight / 100,\n weightNormalized = weightScale * 2 - 1,\n alphaDelta = a1 - a2,\n weight1combined = weightNormalized * alphaDelta === -1 ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta),\n weight1 = (weight1combined + 1) / 2,\n weight2 = 1 - weight1,\n r = r1 * weight1 + r2 * weight2,\n g = g1 * weight1 + g2 * weight2,\n b = b1 * weight1 + b2 * weight2,\n a = a1 * weightScale + a2 * (1 - weightScale);\n\n return rgba_1[\"default\"](r, g, b, a);\n}\n/* EXPORT */\n\n\nexports[\"default\"] = mix;","export var name = \"d3\";\nexport var version = \"5.16.0\";\nexport var description = \"Data-Driven Documents\";\nexport var keywords = [\"dom\", \"visualization\", \"svg\", \"animation\", \"canvas\"];\nexport var homepage = \"https://d3js.org\";\nexport var license = \"BSD-3-Clause\";\nexport var author = {\n \"name\": \"Mike Bostock\",\n \"url\": \"https://bost.ocks.org/mike\"\n};\nexport var main = \"dist/d3.node.js\";\nexport var unpkg = \"dist/d3.min.js\";\nexport var jsdelivr = \"dist/d3.min.js\";\nexport var module = \"index.js\";\nexport var repository = {\n \"type\": \"git\",\n \"url\": \"https://github.com/d3/d3.git\"\n};\nexport var files = [\"dist/**/*.js\", \"index.js\"];\nexport var scripts = {\n \"pretest\": \"rimraf dist && mkdir dist && json2module package.json > dist/package.js && rollup -c\",\n \"test\": \"tape 'test/**/*-test.js'\",\n \"prepublishOnly\": \"yarn test\",\n \"postpublish\": \"git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3/dist/d3.js d3.v5.js && cp ../d3/dist/d3.min.js d3.v5.min.js && git add d3.v5.js d3.v5.min.js && git commit -m \\\"d3 ${npm_package_version}\\\" && git push && cd - && cd ../d3-bower && git pull && cp ../d3/LICENSE ../d3/README.md ../d3/dist/d3.js ../d3/dist/d3.min.js . && git add -- LICENSE README.md d3.js d3.min.js && git commit -m \\\"${npm_package_version}\\\" && git tag -am \\\"${npm_package_version}\\\" v${npm_package_version} && git push && git push --tags && cd - && zip -j dist/d3.zip -- LICENSE README.md API.md CHANGES.md dist/d3.js dist/d3.min.js\"\n};\nexport var devDependencies = {\n \"json2module\": \"0.0\",\n \"rimraf\": \"2\",\n \"rollup\": \"1\",\n \"rollup-plugin-ascii\": \"0.0\",\n \"rollup-plugin-node-resolve\": \"3\",\n \"rollup-plugin-terser\": \"5\",\n \"tape\": \"4\"\n};\nexport var dependencies = {\n \"d3-array\": \"1\",\n \"d3-axis\": \"1\",\n \"d3-brush\": \"1\",\n \"d3-chord\": \"1\",\n \"d3-collection\": \"1\",\n \"d3-color\": \"1\",\n \"d3-contour\": \"1\",\n \"d3-dispatch\": \"1\",\n \"d3-drag\": \"1\",\n \"d3-dsv\": \"1\",\n \"d3-ease\": \"1\",\n \"d3-fetch\": \"1\",\n \"d3-force\": \"1\",\n \"d3-format\": \"1\",\n \"d3-geo\": \"1\",\n \"d3-hierarchy\": \"1\",\n \"d3-interpolate\": \"1\",\n \"d3-path\": \"1\",\n \"d3-polygon\": \"1\",\n \"d3-quadtree\": \"1\",\n \"d3-random\": \"1\",\n \"d3-scale\": \"2\",\n \"d3-scale-chromatic\": \"1\",\n \"d3-selection\": \"1\",\n \"d3-shape\": \"1\",\n \"d3-time\": \"1\",\n \"d3-time-format\": \"2\",\n \"d3-timer\": \"1\",\n \"d3-transition\": \"1\",\n \"d3-voronoi\": \"1\",\n \"d3-zoom\": \"1\"\n};","export default function (a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}","import ascending from \"./ascending\";\nexport default function (compare) {\n if (compare.length === 1) compare = ascendingComparator(compare);\n return {\n left: function left(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;else hi = mid;\n }\n\n return lo;\n },\n right: function right(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;else lo = mid + 1;\n }\n\n return lo;\n }\n };\n}\n\nfunction ascendingComparator(f) {\n return function (d, x) {\n return ascending(f(d), x);\n };\n}","import ascending from \"./ascending\";\nimport bisector from \"./bisector\";\nvar ascendingBisect = bisector(ascending);\nexport var bisectRight = ascendingBisect.right;\nexport var bisectLeft = ascendingBisect.left;\nexport default bisectRight;","export default function (array, f) {\n if (f == null) f = pair;\n var i = 0,\n n = array.length - 1,\n p = array[0],\n pairs = new Array(n < 0 ? 0 : n);\n\n while (i < n) {\n pairs[i] = f(p, p = array[++i]);\n }\n\n return pairs;\n}\nexport function pair(a, b) {\n return [a, b];\n}","import { pair } from \"./pairs\";\nexport default function (values0, values1, reduce) {\n var n0 = values0.length,\n n1 = values1.length,\n values = new Array(n0 * n1),\n i0,\n i1,\n i,\n value0;\n if (reduce == null) reduce = pair;\n\n for (i0 = i = 0; i0 < n0; ++i0) {\n for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) {\n values[i] = reduce(value0, values1[i1]);\n }\n }\n\n return values;\n}","export default function (a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}","export default function (x) {\n return x === null ? NaN : +x;\n}","import number from \"./number\";\nexport default function (values, valueof) {\n var n = values.length,\n m = 0,\n i = -1,\n mean = 0,\n value,\n delta,\n sum = 0;\n\n if (valueof == null) {\n while (++i < n) {\n if (!isNaN(value = number(values[i]))) {\n delta = value - mean;\n mean += delta / ++m;\n sum += delta * (value - mean);\n }\n }\n } else {\n while (++i < n) {\n if (!isNaN(value = number(valueof(values[i], i, values)))) {\n delta = value - mean;\n mean += delta / ++m;\n sum += delta * (value - mean);\n }\n }\n }\n\n if (m > 1) return sum / (m - 1);\n}","import variance from \"./variance\";\nexport default function (array, f) {\n var v = variance(array, f);\n return v ? Math.sqrt(v) : v;\n}","export default function (values, valueof) {\n var n = values.length,\n i = -1,\n value,\n min,\n max;\n\n if (valueof == null) {\n while (++i < n) {\n // Find the first comparable value.\n if ((value = values[i]) != null && value >= value) {\n min = max = value;\n\n while (++i < n) {\n // Compare the remaining values.\n if ((value = values[i]) != null) {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n }\n } else {\n while (++i < n) {\n // Find the first comparable value.\n if ((value = valueof(values[i], i, values)) != null && value >= value) {\n min = max = value;\n\n while (++i < n) {\n // Compare the remaining values.\n if ((value = valueof(values[i], i, values)) != null) {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n }\n }\n\n return [min, max];\n}","var array = Array.prototype;\nexport var slice = array.slice;\nexport var map = array.map;","export default function (x) {\n return function () {\n return x;\n };\n}","export default function (x) {\n return x;\n}","export default function (start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}","var e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\nexport default function (start, stop, count) {\n var reverse,\n i = -1,\n n,\n ticks,\n step;\n stop = +stop, start = +start, count = +count;\n if (start === stop && count > 0) return [start];\n if (reverse = stop < start) n = start, start = stop, stop = n;\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n if (step > 0) {\n start = Math.ceil(start / step);\n stop = Math.floor(stop / step);\n ticks = new Array(n = Math.ceil(stop - start + 1));\n\n while (++i < n) {\n ticks[i] = (start + i) * step;\n }\n } else {\n start = Math.floor(start * step);\n stop = Math.ceil(stop * step);\n ticks = new Array(n = Math.ceil(start - stop + 1));\n\n while (++i < n) {\n ticks[i] = (start - i) / step;\n }\n }\n\n if (reverse) ticks.reverse();\n return ticks;\n}\nexport function tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log(step) / Math.LN10),\n error = step / Math.pow(10, power);\n return power >= 0 ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\nexport function tickStep(start, stop, count) {\n var step0 = Math.abs(stop - start) / Math.max(0, count),\n step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n error = step0 / step1;\n if (error >= e10) step1 *= 10;else if (error >= e5) step1 *= 5;else if (error >= e2) step1 *= 2;\n return stop < start ? -step1 : step1;\n}","export default function (values) {\n return Math.ceil(Math.log(values.length) / Math.LN2) + 1;\n}","import { slice } from \"./array\";\nimport bisect from \"./bisect\";\nimport constant from \"./constant\";\nimport extent from \"./extent\";\nimport identity from \"./identity\";\nimport range from \"./range\";\nimport { tickStep } from \"./ticks\";\nimport sturges from \"./threshold/sturges\";\nexport default function () {\n var value = identity,\n domain = extent,\n threshold = sturges;\n\n function histogram(data) {\n var i,\n n = data.length,\n x,\n values = new Array(n);\n\n for (i = 0; i < n; ++i) {\n values[i] = value(data[i], i, data);\n }\n\n var xz = domain(values),\n x0 = xz[0],\n x1 = xz[1],\n tz = threshold(values, x0, x1); // Convert number of thresholds into uniform thresholds.\n\n if (!Array.isArray(tz)) {\n tz = tickStep(x0, x1, tz);\n tz = range(Math.ceil(x0 / tz) * tz, x1, tz); // exclusive\n } // Remove any thresholds outside the domain.\n\n\n var m = tz.length;\n\n while (tz[0] <= x0) {\n tz.shift(), --m;\n }\n\n while (tz[m - 1] > x1) {\n tz.pop(), --m;\n }\n\n var bins = new Array(m + 1),\n bin; // Initialize bins.\n\n for (i = 0; i <= m; ++i) {\n bin = bins[i] = [];\n bin.x0 = i > 0 ? tz[i - 1] : x0;\n bin.x1 = i < m ? tz[i] : x1;\n } // Assign data to bins by value, ignoring any outside the domain.\n\n\n for (i = 0; i < n; ++i) {\n x = values[i];\n\n if (x0 <= x && x <= x1) {\n bins[bisect(tz, x, 0, m)].push(data[i]);\n }\n }\n\n return bins;\n }\n\n histogram.value = function (_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(_), histogram) : value;\n };\n\n histogram.domain = function (_) {\n return arguments.length ? (domain = typeof _ === \"function\" ? _ : constant([_[0], _[1]]), histogram) : domain;\n };\n\n histogram.thresholds = function (_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold;\n };\n\n return histogram;\n}","import number from \"./number\";\nexport default function (values, p, valueof) {\n if (valueof == null) valueof = number;\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = +valueof(values[i0], i0, values),\n value1 = +valueof(values[i0 + 1], i0 + 1, values);\n return value0 + (value1 - value0) * (i - i0);\n}","import { map } from \"../array\";\nimport ascending from \"../ascending\";\nimport number from \"../number\";\nimport quantile from \"../quantile\";\nexport default function (values, min, max) {\n values = map.call(values, number).sort(ascending);\n return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(values.length, -1 / 3)));\n}","import deviation from \"../deviation\";\nexport default function (values, min, max) {\n return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(values.length, -1 / 3)));\n}","export default function (values, valueof) {\n var n = values.length,\n i = -1,\n value,\n max;\n\n if (valueof == null) {\n while (++i < n) {\n // Find the first comparable value.\n if ((value = values[i]) != null && value >= value) {\n max = value;\n\n while (++i < n) {\n // Compare the remaining values.\n if ((value = values[i]) != null && value > max) {\n max = value;\n }\n }\n }\n }\n } else {\n while (++i < n) {\n // Find the first comparable value.\n if ((value = valueof(values[i], i, values)) != null && value >= value) {\n max = value;\n\n while (++i < n) {\n // Compare the remaining values.\n if ((value = valueof(values[i], i, values)) != null && value > max) {\n max = value;\n }\n }\n }\n }\n }\n\n return max;\n}","import number from \"./number\";\nexport default function (values, valueof) {\n var n = values.length,\n m = n,\n i = -1,\n value,\n sum = 0;\n\n if (valueof == null) {\n while (++i < n) {\n if (!isNaN(value = number(values[i]))) sum += value;else --m;\n }\n } else {\n while (++i < n) {\n if (!isNaN(value = number(valueof(values[i], i, values)))) sum += value;else --m;\n }\n }\n\n if (m) return sum / m;\n}","import ascending from \"./ascending\";\nimport number from \"./number\";\nimport quantile from \"./quantile\";\nexport default function (values, valueof) {\n var n = values.length,\n i = -1,\n value,\n numbers = [];\n\n if (valueof == null) {\n while (++i < n) {\n if (!isNaN(value = number(values[i]))) {\n numbers.push(value);\n }\n }\n } else {\n while (++i < n) {\n if (!isNaN(value = number(valueof(values[i], i, values)))) {\n numbers.push(value);\n }\n }\n }\n\n return quantile(numbers.sort(ascending), 0.5);\n}","export default function (arrays) {\n var n = arrays.length,\n m,\n i = -1,\n j = 0,\n merged,\n array;\n\n while (++i < n) {\n j += arrays[i].length;\n }\n\n merged = new Array(j);\n\n while (--n >= 0) {\n array = arrays[n];\n m = array.length;\n\n while (--m >= 0) {\n merged[--j] = array[m];\n }\n }\n\n return merged;\n}","export default function (values, valueof) {\n var n = values.length,\n i = -1,\n value,\n min;\n\n if (valueof == null) {\n while (++i < n) {\n // Find the first comparable value.\n if ((value = values[i]) != null && value >= value) {\n min = value;\n\n while (++i < n) {\n // Compare the remaining values.\n if ((value = values[i]) != null && min > value) {\n min = value;\n }\n }\n }\n }\n } else {\n while (++i < n) {\n // Find the first comparable value.\n if ((value = valueof(values[i], i, values)) != null && value >= value) {\n min = value;\n\n while (++i < n) {\n // Compare the remaining values.\n if ((value = valueof(values[i], i, values)) != null && min > value) {\n min = value;\n }\n }\n }\n }\n }\n\n return min;\n}","export default function (array, indexes) {\n var i = indexes.length,\n permutes = new Array(i);\n\n while (i--) {\n permutes[i] = array[indexes[i]];\n }\n\n return permutes;\n}","import ascending from \"./ascending\";\nexport default function (values, compare) {\n if (!(n = values.length)) return;\n var n,\n i = 0,\n j = 0,\n xi,\n xj = values[j];\n if (compare == null) compare = ascending;\n\n while (++i < n) {\n if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) {\n xj = xi, j = i;\n }\n }\n\n if (compare(xj, xj) === 0) return j;\n}","export default function (array, i0, i1) {\n var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0),\n t,\n i;\n\n while (m) {\n i = Math.random() * m-- | 0;\n t = array[m + i0];\n array[m + i0] = array[i + i0];\n array[i + i0] = t;\n }\n\n return array;\n}","export default function (values, valueof) {\n var n = values.length,\n i = -1,\n value,\n sum = 0;\n\n if (valueof == null) {\n while (++i < n) {\n if (value = +values[i]) sum += value; // Note: zero and null are equivalent.\n }\n } else {\n while (++i < n) {\n if (value = +valueof(values[i], i, values)) sum += value;\n }\n }\n\n return sum;\n}","import min from \"./min\";\nexport default function (matrix) {\n if (!(n = matrix.length)) return [];\n\n for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) {\n for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n row[j] = matrix[j][i];\n }\n }\n\n return transpose;\n}\n\nfunction length(d) {\n return d.length;\n}","import transpose from \"./transpose\";\nexport default function () {\n return transpose(arguments);\n}","export var slice = Array.prototype.slice;","export default function (x) {\n return x;\n}","import { slice } from \"./array\";\nimport identity from \"./identity\";\nvar top = 1,\n right = 2,\n bottom = 3,\n left = 4,\n epsilon = 1e-6;\n\nfunction translateX(x) {\n return \"translate(\" + (x + 0.5) + \",0)\";\n}\n\nfunction translateY(y) {\n return \"translate(0,\" + (y + 0.5) + \")\";\n}\n\nfunction number(scale) {\n return function (d) {\n return +scale(d);\n };\n}\n\nfunction center(scale) {\n var offset = Math.max(0, scale.bandwidth() - 1) / 2; // Adjust for 0.5px offset.\n\n if (scale.round()) offset = Math.round(offset);\n return function (d) {\n return +scale(d) + offset;\n };\n}\n\nfunction entering() {\n return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n var tickArguments = [],\n tickValues = null,\n tickFormat = null,\n tickSizeInner = 6,\n tickSizeOuter = 6,\n tickPadding = 3,\n k = orient === top || orient === left ? -1 : 1,\n x = orient === left || orient === right ? \"x\" : \"y\",\n transform = orient === top || orient === bottom ? translateX : translateY;\n\n function axis(context) {\n var values = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain() : tickValues,\n format = tickFormat == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity : tickFormat,\n spacing = Math.max(tickSizeInner, 0) + tickPadding,\n range = scale.range(),\n range0 = +range[0] + 0.5,\n range1 = +range[range.length - 1] + 0.5,\n position = (scale.bandwidth ? center : number)(scale.copy()),\n selection = context.selection ? context.selection() : context,\n path = selection.selectAll(\".domain\").data([null]),\n tick = selection.selectAll(\".tick\").data(values, scale).order(),\n tickExit = tick.exit(),\n tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n line = tick.select(\"line\"),\n text = tick.select(\"text\");\n path = path.merge(path.enter().insert(\"path\", \".tick\").attr(\"class\", \"domain\").attr(\"stroke\", \"currentColor\"));\n tick = tick.merge(tickEnter);\n line = line.merge(tickEnter.append(\"line\").attr(\"stroke\", \"currentColor\").attr(x + \"2\", k * tickSizeInner));\n text = text.merge(tickEnter.append(\"text\").attr(\"fill\", \"currentColor\").attr(x, k * spacing).attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n if (context !== selection) {\n path = path.transition(context);\n tick = tick.transition(context);\n line = line.transition(context);\n text = text.transition(context);\n tickExit = tickExit.transition(context).attr(\"opacity\", epsilon).attr(\"transform\", function (d) {\n return isFinite(d = position(d)) ? transform(d) : this.getAttribute(\"transform\");\n });\n tickEnter.attr(\"opacity\", epsilon).attr(\"transform\", function (d) {\n var p = this.parentNode.__axis;\n return transform(p && isFinite(p = p(d)) ? p : position(d));\n });\n }\n\n tickExit.remove();\n path.attr(\"d\", orient === left || orient == right ? tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H0.5V\" + range1 + \"H\" + k * tickSizeOuter : \"M0.5,\" + range0 + \"V\" + range1 : tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V0.5H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",0.5H\" + range1);\n tick.attr(\"opacity\", 1).attr(\"transform\", function (d) {\n return transform(position(d));\n });\n line.attr(x + \"2\", k * tickSizeInner);\n text.attr(x, k * spacing).text(format);\n selection.filter(entering).attr(\"fill\", \"none\").attr(\"font-size\", 10).attr(\"font-family\", \"sans-serif\").attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n selection.each(function () {\n this.__axis = position;\n });\n }\n\n axis.scale = function (_) {\n return arguments.length ? (scale = _, axis) : scale;\n };\n\n axis.ticks = function () {\n return tickArguments = slice.call(arguments), axis;\n };\n\n axis.tickArguments = function (_) {\n return arguments.length ? (tickArguments = _ == null ? [] : slice.call(_), axis) : tickArguments.slice();\n };\n\n axis.tickValues = function (_) {\n return arguments.length ? (tickValues = _ == null ? null : slice.call(_), axis) : tickValues && tickValues.slice();\n };\n\n axis.tickFormat = function (_) {\n return arguments.length ? (tickFormat = _, axis) : tickFormat;\n };\n\n axis.tickSize = function (_) {\n return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeInner = function (_) {\n return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeOuter = function (_) {\n return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n };\n\n axis.tickPadding = function (_) {\n return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n };\n\n return axis;\n}\n\nexport function axisTop(scale) {\n return axis(top, scale);\n}\nexport function axisRight(scale) {\n return axis(right, scale);\n}\nexport function axisBottom(scale) {\n return axis(bottom, scale);\n}\nexport function axisLeft(scale) {\n return axis(left, scale);\n}","var noop = {\n value: function value() {}\n};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || t in _ || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function (t) {\n var name = \"\",\n i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {\n type: t,\n name: name\n };\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function on(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length; // If no callback was specified, return the callback of the given type and name.\n\n if (arguments.length < 2) {\n while (++i < n) {\n if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n }\n\n return;\n } // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n\n\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);else if (callback == null) for (t in _) {\n _[t] = set(_[t], typename.name, null);\n }\n }\n\n return this;\n },\n copy: function copy() {\n var copy = {},\n _ = this._;\n\n for (var t in _) {\n copy[t] = _[t].slice();\n }\n\n return new Dispatch(copy);\n },\n call: function call(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) {\n args[i] = arguments[i + 2];\n }\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) {\n t[i].value.apply(that, args);\n }\n },\n apply: function apply(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) {\n t[i].value.apply(that, args);\n }\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n\n if (callback != null) type.push({\n name: name,\n value: callback\n });\n return type;\n}\n\nexport default dispatch;","function none() {}\n\nexport default function (selector) {\n return selector == null ? none : function () {\n return this.querySelector(selector);\n };\n}","function empty() {\n return [];\n}\n\nexport default function (selector) {\n return selector == null ? empty : function () {\n return this.querySelectorAll(selector);\n };\n}","export default function (selector) {\n return function () {\n return this.matches(selector);\n };\n}","export default function (update) {\n return new Array(update.length);\n}","import sparse from \"./sparse\";\nimport { Selection } from \"./index\";\nexport default function () {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function appendChild(child) {\n return this._parent.insertBefore(child, this._next);\n },\n insertBefore: function insertBefore(child, next) {\n return this._parent.insertBefore(child, next);\n },\n querySelector: function querySelector(selector) {\n return this._parent.querySelector(selector);\n },\n querySelectorAll: function querySelectorAll(selector) {\n return this._parent.querySelectorAll(selector);\n }\n};","import { Selection } from \"./index\";\nimport { EnterNode } from \"./enter\";\nimport constant from \"../constant\";\nvar keyPrefix = \"$\"; // Protect against keys like “__proto__”.\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length; // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n } // Put any non-null nodes that don’t fit into exit.\n\n\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = {},\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue; // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);\n\n if (keyValue in nodeByKeyValue) {\n exit[i] = node;\n } else {\n nodeByKeyValue[keyValue] = node;\n }\n }\n } // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n\n\n for (i = 0; i < dataLength; ++i) {\n keyValue = keyPrefix + key.call(parent, data[i], i, data);\n\n if (node = nodeByKeyValue[keyValue]) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue[keyValue] = null;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n } // Add any remaining nodes that were not bound to data to exit.\n\n\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && nodeByKeyValue[keyValues[i]] === node) {\n exit[i] = node;\n }\n }\n}\n\nexport default function (value, key) {\n if (!value) {\n data = new Array(this.size()), j = -1;\n this.each(function (d) {\n data[++j] = d;\n });\n return data;\n }\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = value.call(parent, parent && parent.__data__, j, parents),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n\n while (!(next = updateGroup[i1]) && ++i1 < dataLength) {\n ;\n }\n\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}","import { Selection } from \"./index\";\nexport default function (compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}","export default function () {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}","export var xhtml = \"http://www.w3.org/1999/xhtml\";\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};","import namespaces from \"./namespaces\";\nexport default function (name) {\n var prefix = name += \"\",\n i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {\n space: namespaces[prefix],\n local: name\n } : name;\n}","import namespace from \"../namespace\";\n\nfunction attrRemove(name) {\n return function () {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function () {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function () {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function () {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function () {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function () {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function (name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname);\n }\n\n return this.each((value == null ? fullname.local ? attrRemoveNS : attrRemove : typeof value === \"function\" ? fullname.local ? attrFunctionNS : attrFunction : fullname.local ? attrConstantNS : attrConstant)(fullname, value));\n}","export default function (node) {\n return node.ownerDocument && node.ownerDocument.defaultView || // node is a Node\n node.document && node // node is a Window\n || node.defaultView; // node is a Document\n}","import defaultView from \"../window\";\n\nfunction styleRemove(name) {\n return function () {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function () {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function () {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function (name, value, priority) {\n return arguments.length > 1 ? this.each((value == null ? styleRemove : typeof value === \"function\" ? styleFunction : styleConstant)(name, value, priority == null ? \"\" : priority)) : styleValue(this.node(), name);\n}\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name) || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}","function propertyRemove(name) {\n return function () {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function () {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function () {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];else this[name] = v;\n };\n}\n\nexport default function (name, value) {\n return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === \"function\" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name];\n}","function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function add(name) {\n var i = this._names.indexOf(name);\n\n if (i < 0) {\n this._names.push(name);\n\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function remove(name) {\n var i = this._names.indexOf(name);\n\n if (i >= 0) {\n this._names.splice(i, 1);\n\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function contains(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node),\n i = -1,\n n = names.length;\n\n while (++i < n) {\n list.add(names[i]);\n }\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node),\n i = -1,\n n = names.length;\n\n while (++i < n) {\n list.remove(names[i]);\n }\n}\n\nfunction classedTrue(names) {\n return function () {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function () {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function () {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function (name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()),\n i = -1,\n n = names.length;\n\n while (++i < n) {\n if (!list.contains(names[i])) return false;\n }\n\n return true;\n }\n\n return this.each((typeof value === \"function\" ? classedFunction : value ? classedTrue : classedFalse)(names, value));\n}","function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function () {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function () {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function (value) {\n return arguments.length ? this.each(value == null ? textRemove : (typeof value === \"function\" ? textFunction : textConstant)(value)) : this.node().textContent;\n}","function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function () {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function () {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function (value) {\n return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === \"function\" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML;\n}","function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function () {\n return this.each(raise);\n}","function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function () {\n return this.each(lower);\n}","import namespace from \"./namespace\";\nimport { xhtml } from \"./namespaces\";\n\nfunction creatorInherit(name) {\n return function () {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml ? document.createElement(name) : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function () {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function (name) {\n var fullname = namespace(name);\n return (fullname.local ? creatorFixed : creatorInherit)(fullname);\n}","import creator from \"../creator\";\nimport selector from \"../selector\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function (name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function () {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}","function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function () {\n return this.each(remove);\n}","function selection_cloneShallow() {\n var clone = this.cloneNode(false),\n parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true),\n parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function (deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}","var filterEvents = {};\nexport var event = null;\n\nif (typeof document !== \"undefined\") {\n var element = document.documentElement;\n\n if (!(\"onmouseenter\" in element)) {\n filterEvents = {\n mouseenter: \"mouseover\",\n mouseleave: \"mouseout\"\n };\n }\n}\n\nfunction filterContextListener(listener, index, group) {\n listener = contextListener(listener, index, group);\n return function (event) {\n var related = event.relatedTarget;\n\n if (!related || related !== this && !(related.compareDocumentPosition(this) & 8)) {\n listener.call(this, event);\n }\n };\n}\n\nfunction contextListener(listener, index, group) {\n return function (event1) {\n var event0 = event; // Events can be reentrant (e.g., focus).\n\n event = event1;\n\n try {\n listener.call(this, this.__data__, index, group);\n } finally {\n event = event0;\n }\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function (t) {\n var name = \"\",\n i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {\n type: t,\n name: name\n };\n });\n}\n\nfunction onRemove(typename) {\n return function () {\n var on = this.__on;\n if (!on) return;\n\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.capture);\n } else {\n on[++i] = o;\n }\n }\n\n if (++i) on.length = i;else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, capture) {\n var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;\n return function (d, i, group) {\n var on = this.__on,\n o,\n listener = wrap(value, i, group);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.capture);\n this.addEventListener(o.type, o.listener = listener, o.capture = capture);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, capture);\n o = {\n type: typename.type,\n name: typename.name,\n value: value,\n listener: listener,\n capture: capture\n };\n if (!on) this.__on = [o];else on.push(o);\n };\n}\n\nexport default function (typename, value, capture) {\n var typenames = parseTypenames(typename + \"\"),\n i,\n n = typenames.length,\n t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n if (capture == null) capture = false;\n\n for (i = 0; i < n; ++i) {\n this.each(on(typenames[i], value, capture));\n }\n\n return this;\n}\nexport function customEvent(event1, listener, that, args) {\n var event0 = event;\n event1.sourceEvent = event;\n event = event1;\n\n try {\n return listener.apply(that, args);\n } finally {\n event = event0;\n }\n}","import defaultView from \"../window\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function () {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function () {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function (type, params) {\n return this.each((typeof params === \"function\" ? dispatchFunction : dispatchConstant)(type, params));\n}","import selection_select from \"./select\";\nimport selection_selectAll from \"./selectAll\";\nimport selection_filter from \"./filter\";\nimport selection_data from \"./data\";\nimport selection_enter from \"./enter\";\nimport selection_exit from \"./exit\";\nimport selection_join from \"./join\";\nimport selection_merge from \"./merge\";\nimport selection_order from \"./order\";\nimport selection_sort from \"./sort\";\nimport selection_call from \"./call\";\nimport selection_nodes from \"./nodes\";\nimport selection_node from \"./node\";\nimport selection_size from \"./size\";\nimport selection_empty from \"./empty\";\nimport selection_each from \"./each\";\nimport selection_attr from \"./attr\";\nimport selection_style from \"./style\";\nimport selection_property from \"./property\";\nimport selection_classed from \"./classed\";\nimport selection_text from \"./text\";\nimport selection_html from \"./html\";\nimport selection_raise from \"./raise\";\nimport selection_lower from \"./lower\";\nimport selection_append from \"./append\";\nimport selection_insert from \"./insert\";\nimport selection_remove from \"./remove\";\nimport selection_clone from \"./clone\";\nimport selection_datum from \"./datum\";\nimport selection_on from \"./on\";\nimport selection_dispatch from \"./dispatch\";\nexport var root = [null];\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch\n};\nexport default selection;","import { Selection } from \"./index\";\nimport selector from \"../selector\";\nexport default function (select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}","import { Selection } from \"./index\";\nimport selectorAll from \"../selectorAll\";\nexport default function (select) {\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}","import { Selection } from \"./index\";\nimport matcher from \"../matcher\";\nexport default function (match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}","export default function (x) {\n return function () {\n return x;\n };\n}","import sparse from \"./sparse\";\nimport { Selection } from \"./index\";\nexport default function () {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}","export default function (onenter, onupdate, onexit) {\n var enter = this.enter(),\n update = this,\n exit = this.exit();\n enter = typeof onenter === \"function\" ? onenter(enter) : enter.append(onenter + \"\");\n if (onupdate != null) update = onupdate(update);\n if (onexit == null) exit.remove();else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}","import { Selection } from \"./index\";\nexport default function (selection) {\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}","export default function () {\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}","export default function () {\n var nodes = new Array(this.size()),\n i = -1;\n this.each(function () {\n nodes[++i] = this;\n });\n return nodes;\n}","export default function () {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}","export default function () {\n var size = 0;\n this.each(function () {\n ++size;\n });\n return size;\n}","export default function () {\n return !this.node();\n}","export default function (callback) {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}","import creator from \"../creator\";\nexport default function (name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function () {\n return this.appendChild(create.apply(this, arguments));\n });\n}","export default function (value) {\n return arguments.length ? this.property(\"__data__\", value) : this.node().__data__;\n}","import { Selection, root } from \"./selection/index\";\nexport default function (selector) {\n return typeof selector === \"string\" ? new Selection([[document.querySelector(selector)]], [document.documentElement]) : new Selection([[selector]], root);\n}","import { event } from \"d3-selection\";\nexport function nopropagation() {\n event.stopImmediatePropagation();\n}\nexport default function () {\n event.preventDefault();\n event.stopImmediatePropagation();\n}","import { select } from \"d3-selection\";\nimport noevent from \"./noevent.js\";\nexport default function (view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, true);\n\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, true);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n}\nexport function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n\n if (noclick) {\n selection.on(\"click.drag\", noevent, true);\n setTimeout(function () {\n selection.on(\"click.drag\", null);\n }, 0);\n }\n\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n}","export default function (constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n\n for (var key in definition) {\n prototype[key] = definition[key];\n }\n\n return prototype;\n}","import define, { extend } from \"./define.js\";\nexport function Color() {}\nvar _darker = 0.7;\nexport { _darker as darker };\n\nvar _brighter = 1 / _darker;\n\nexport { _brighter as brighter };\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\ndefine(Color, color, {\n copy: function copy(channels) {\n return Object.assign(new this.constructor(), this, channels);\n },\n displayable: function displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex,\n // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb(m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, (m & 0xf) << 4 | m & 0xf, 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba(m >> 12 & 0xf | m >> 8 & 0xf0, m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, ((m & 0xf) << 4 | m & 0xf) / 0xff) // #f000\n : null // invalid hex\n ) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0) : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb();\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\ndefine(Rgb, rgb, extend(Color, {\n brighter: function brighter(k) {\n k = k == null ? _brighter : Math.pow(_brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function darker(k) {\n k = k == null ? _darker : Math.pow(_darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function rgb() {\n return this;\n },\n displayable: function displayable() {\n return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;\n },\n hex: rgb_formatHex,\n // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n var a = this.opacity;\n a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \" + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \" + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;else if (l <= 0 || l >= 1) h = s = NaN;else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl();\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;else if (g === max) h = (b - r) / s + 2;else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n\n return new Hsl(h, s, l, o.opacity);\n}\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter: function brighter(k) {\n k = k == null ? _brighter : Math.pow(_brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function darker(k) {\n k = k == null ? _darker : Math.pow(_darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function rgb() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);\n },\n displayable: function displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;\n },\n formatHsl: function formatHsl() {\n var a = this.opacity;\n a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\") + (this.h || 0) + \", \" + (this.s || 0) * 100 + \"%, \" + (this.l || 0) * 100 + \"%\" + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n}));\n/* From FvD 13.37, CSS Color Module Level 3 */\n\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;\n}","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1,\n t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6;\n}\nexport default function (values) {\n var n = values.length - 1;\n return function (t) {\n var i = t <= 0 ? t = 0 : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}","import { basis } from \"./basis.js\";\nexport default function (values) {\n var n = values.length;\n return function (t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}","export default function (x) {\n return function () {\n return x;\n };\n}","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function (t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function (t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function (a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}","import { rgb as colorRgb } from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, { gamma } from \"./color.js\";\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function (t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function (colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i,\n color;\n\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function (t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);","export default function (a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function (t) {\n for (i = 0; i < n; ++i) {\n c[i] = a[i] * (1 - t) + b[i] * t;\n }\n\n return c;\n };\n}\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}","import value from \"./value.js\";\nimport numberArray, { isNumberArray } from \"./numberArray.js\";\nexport default function (a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) {\n x[i] = value(a[i], b[i]);\n }\n\n for (; i < nb; ++i) {\n c[i] = b[i];\n }\n\n return function (t) {\n for (i = 0; i < na; ++i) {\n c[i] = x[i](t);\n }\n\n return c;\n };\n}","export default function (a, b) {\n var d = new Date();\n return a = +a, b = +b, function (t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}","export default function (a, b) {\n return a = +a, b = +b, function (t) {\n return a * (1 - t) + b * t;\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport value from \"./value.js\";\nexport default function (a, b) {\n var i = {},\n c = {},\n k;\n if (a === null || _typeof(a) !== \"object\") a = {};\n if (b === null || _typeof(b) !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function (t) {\n for (k in i) {\n c[k] = i[k](t);\n }\n\n return c;\n };\n}","import number from \"./number.js\";\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function () {\n return b;\n };\n}\n\nfunction one(b) {\n return function (t) {\n return b(t) + \"\";\n };\n}\n\nexport default function (a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0,\n // scan index for next number in b\n am,\n // current match in a\n bm,\n // current match in b\n bs,\n // string preceding current number in b, if any\n i = -1,\n // index in s\n s = [],\n // string constants and placeholders\n q = []; // number interpolators\n // Coerce inputs to strings.\n\n a = a + \"\", b = b + \"\"; // Interpolate pairs of numbers in a & b.\n\n while ((am = reA.exec(a)) && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) {\n // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n if ((am = am[0]) === (bm = bm[0])) {\n // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else {\n // interpolate non-matching numbers\n s[++i] = null;\n q.push({\n i: i,\n x: number(am, bm)\n });\n }\n\n bi = reB.lastIndex;\n } // Add remains of b.\n\n\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n } // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n\n\n return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) {\n for (var i = 0, o; i < b; ++i) {\n s[(o = q[i]).i] = o.x(t);\n }\n\n return s.join(\"\");\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport { color } from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport { genericArray } from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, { isNumberArray } from \"./numberArray.js\";\nexport default function (a, b) {\n var t = _typeof(b),\n c;\n\n return b == null || t === \"boolean\" ? constant(b) : (t === \"number\" ? number : t === \"string\" ? (c = color(b)) ? (b = c, rgb) : string : b instanceof color ? rgb : b instanceof Date ? date : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object : number)(a, b);\n}","import { event } from \"./selection/on\";\nexport default function () {\n var current = event,\n source;\n\n while (source = current.sourceEvent) {\n current = source;\n }\n\n return current;\n}","export default function (node, event) {\n var svg = node.ownerSVGElement || node;\n\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n}","import sourceEvent from \"./sourceEvent\";\nimport point from \"./point\";\nexport default function (node, touches, identifier) {\n if (arguments.length < 3) identifier = touches, touches = sourceEvent().changedTouches;\n\n for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) {\n if ((touch = touches[i]).identifier === identifier) {\n return point(node, touch);\n }\n }\n\n return null;\n}","import sourceEvent from \"./sourceEvent\";\nimport point from \"./point\";\nexport default function (node) {\n var event = sourceEvent();\n if (event.changedTouches) event = event.changedTouches[0];\n return point(node, event);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar frame = 0,\n // is an animation frame pending?\ntimeout = 0,\n // is a timeout pending?\ninterval = 0,\n // are any timers active?\npokeDelay = 1000,\n // how frequently we check for clock skew\ntaskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = (typeof performance === \"undefined\" ? \"undefined\" : _typeof(performance)) === \"object\" && performance.now ? performance : Date,\n setFrame = (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {\n setTimeout(f, 17);\n};\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call = this._time = this._next = null;\n}\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function restart(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;else taskHead = this;\n taskTail = this;\n }\n\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function stop() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\nexport function timer(callback, delay, time) {\n var t = new Timer();\n t.restart(callback, delay, time);\n return t;\n}\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n\n var t = taskHead,\n e;\n\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n t = t._next;\n }\n\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(),\n delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0,\n t1 = taskHead,\n t2,\n time = Infinity;\n\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}","import { Timer } from \"./timer.js\";\nexport default function (callback, delay, time) {\n var t = new Timer();\n delay = delay == null ? 0 : +delay;\n t.restart(function (elapsed) {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}","import { dispatch } from \"d3-dispatch\";\nimport { timer, timeout } from \"d3-timer\";\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\nexport default function (node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index,\n // For context during callback.\n group: group,\n // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\n\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween; // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time); // If the elapsed delay is less than our first sleep, start immediately.\n\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n\n function start(elapsed) {\n var i, j, n, o; // If the state is not SCHEDULED, then we previously errored on start.\n\n if (self.state !== SCHEDULED) return stop();\n\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue; // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n\n if (o.state === STARTED) return timeout(start); // Interrupt the active transition, if any.\n\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n } // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n } // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n\n\n timeout(function () {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n }); // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n\n self.state = STARTED; // Initialize the tween, deleting null tween.\n\n tween = new Array(n = self.tween.length);\n\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n\n tween.length = j + 1;\n }\n\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n\n while (++i < n) {\n tween[i].call(node, t);\n } // Dispatch the end event.\n\n\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n\n for (var i in schedules) {\n return;\n } // eslint-disable-line no-unused-vars\n\n\n delete node.__transition;\n }\n}","import { STARTING, ENDING, ENDED } from \"./transition/schedule.js\";\nexport default function (node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n if (!schedules) return;\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) {\n empty = false;\n continue;\n }\n\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n\n if (empty) delete node.__transition;\n}","import decompose, { identity } from \"./decompose.js\";\nvar cssNode, cssRoot, cssView, svgNode;\nexport function parseCss(value) {\n if (value === \"none\") return identity;\n if (!cssNode) cssNode = document.createElement(\"DIV\"), cssRoot = document.documentElement, cssView = document.defaultView;\n cssNode.style.transform = value;\n value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue(\"transform\");\n cssRoot.removeChild(cssNode);\n value = value.slice(7, -1).split(\",\");\n return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);\n}\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}","var degrees = 180 / Math.PI;\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\nexport default function (a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}","import number from \"../number.js\";\nimport { parseCss, parseSvg } from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({\n i: i - 4,\n x: number(xa, xb)\n }, {\n i: i - 2,\n x: number(ya, yb)\n });\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360;else if (b - a > 180) a += 360; // shortest path\n\n q.push({\n i: s.push(pop(s) + \"rotate(\", null, degParen) - 2,\n x: number(a, b)\n });\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({\n i: s.push(pop(s) + \"skewX(\", null, degParen) - 2,\n x: number(a, b)\n });\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({\n i: i - 4,\n x: number(xa, xb)\n }, {\n i: i - 2,\n x: number(ya, yb)\n });\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function (a, b) {\n var s = [],\n // string constants and placeholders\n q = []; // number interpolators\n\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n\n return function (t) {\n var i = -1,\n n = q.length,\n o;\n\n while (++i < n) {\n s[(o = q[i]).i] = o.x(t);\n }\n\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");","import { get, set } from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function () {\n var schedule = set(this, id),\n tween = schedule.tween; // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n\n schedule.tween = tween1;\n };\n}\n\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error();\n return function () {\n var schedule = set(this, id),\n tween = schedule.tween; // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n\n for (var t = {\n name: name,\n value: value\n }, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n\n if (i === n) tween1.push(t);\n }\n\n schedule.tween = tween1;\n };\n}\n\nexport default function (name, value) {\n var id = this._id;\n name += \"\";\n\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n\n return null;\n }\n\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n transition.each(function () {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n return function (node) {\n return get(node, id).value[name];\n };\n}","import { color } from \"d3-color\";\nimport { interpolateNumber, interpolateRgb, interpolateString } from \"d3-interpolate\";\nexport default function (a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber : b instanceof color ? interpolateRgb : (c = color(b)) ? (b = c, interpolateRgb) : interpolateString)(a, b);\n}","import { interpolateTransformSvg as interpolateTransform } from \"d3-interpolate\";\nimport { namespace } from \"d3-selection\";\nimport { tweenValue } from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n return function () {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function () {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function () {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function () {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrFunction(name, interpolate, value) {\n var string00, string10, interpolate0;\n return function () {\n var string0,\n value1 = value(this),\n string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00, string10, interpolate0;\n return function () {\n var string0,\n value1 = value(this),\n string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nexport default function (name, value) {\n var fullname = namespace(name),\n i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value)) : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}","import { namespace } from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n return function (t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n return function (t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\n\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n\n tween._value = value;\n return tween;\n}\n\nfunction attrTween(name, value) {\n var t0, i0;\n\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n\n tween._value = value;\n return tween;\n}\n\nexport default function (name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error();\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}","import { get, init } from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n return function () {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\n\nfunction delayConstant(id, value) {\n return value = +value, function () {\n init(this, id).delay = value;\n };\n}\n\nexport default function (value) {\n var id = this._id;\n return arguments.length ? this.each((typeof value === \"function\" ? delayFunction : delayConstant)(id, value)) : get(this.node(), id).delay;\n}","import { get, set } from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n return function () {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\n\nfunction durationConstant(id, value) {\n return value = +value, function () {\n set(this, id).duration = value;\n };\n}\n\nexport default function (value) {\n var id = this._id;\n return arguments.length ? this.each((typeof value === \"function\" ? durationFunction : durationConstant)(id, value)) : get(this.node(), id).duration;\n}","import { get, set } from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error();\n return function () {\n set(this, id).ease = value;\n };\n}\n\nexport default function (value) {\n var id = this._id;\n return arguments.length ? this.each(easeConstant(id, value)) : get(this.node(), id).ease;\n}","import { get, set, init } from \"./schedule.js\";\n\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function (t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\n\nfunction onFunction(id, name, listener) {\n var on0,\n on1,\n sit = start(name) ? init : set;\n return function () {\n var schedule = sit(this, id),\n on = schedule.on; // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n schedule.on = on1;\n };\n}\n\nexport default function (name, listener) {\n var id = this._id;\n return arguments.length < 2 ? get(this.node(), id).on.on(name) : this.each(onFunction(id, name, listener));\n}","function removeFunction(id) {\n return function () {\n var parent = this.parentNode;\n\n for (var i in this.__transition) {\n if (+i !== id) return;\n }\n\n if (parent) parent.removeChild(this);\n };\n}\n\nexport default function () {\n return this.on(\"end.remove\", removeFunction(this._id));\n}","import { selection } from \"d3-selection\";\nvar Selection = selection.prototype.constructor;\nexport default function () {\n return new Selection(this._groups, this._parents);\n}","import { interpolateTransformCss as interpolateTransform } from \"d3-interpolate\";\nimport { style } from \"d3-selection\";\nimport { set } from \"./schedule.js\";\nimport { tweenValue } from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n var string00, string10, interpolate0;\n return function () {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\n\nfunction styleRemove(name) {\n return function () {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function () {\n var string0 = style(this, name);\n return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction styleFunction(name, interpolate, value) {\n var string00, string10, interpolate0;\n return function () {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction styleMaybeRemove(id, name) {\n var on0,\n on1,\n listener0,\n key = \"style.\" + name,\n event = \"end.\" + key,\n remove;\n return function () {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined; // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n schedule.on = on1;\n };\n}\n\nexport default function (name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this.styleTween(name, styleNull(name, i)).on(\"end.style.\" + name, styleRemove(name)) : typeof value === \"function\" ? this.styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant(name, i, value), priority).on(\"end.style.\" + name, null);\n}","function styleInterpolate(name, i, priority) {\n return function (t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\n\nfunction styleTween(name, value, priority) {\n var t, i0;\n\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n\n tween._value = value;\n return tween;\n}\n\nexport default function (name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error();\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}","function textInterpolate(i) {\n return function (t) {\n this.textContent = i.call(this, t);\n };\n}\n\nfunction textTween(value) {\n var t0, i0;\n\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n\n tween._value = value;\n return tween;\n}\n\nexport default function (value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error();\n return this.tween(key, textTween(value));\n}","import { selection } from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\nvar id = 0;\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\nexport default function transition(name) {\n return selection().transition(name);\n}\nexport function newId() {\n return ++id;\n}\nvar selection_prototype = selection.prototype;\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n end: transition_end\n};","export function cubicIn(t) {\n return t * t * t;\n}\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}","import { selector } from \"d3-selection\";\nimport { Transition } from \"./index.js\";\nimport schedule, { get } from \"./schedule.js\";\nexport default function (select) {\n var name = this._name,\n id = this._id;\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n\n return new Transition(subgroups, this._parents, name, id);\n}","import { selectorAll } from \"d3-selection\";\nimport { Transition } from \"./index.js\";\nimport schedule, { get } from \"./schedule.js\";\nexport default function (select) {\n var name = this._name,\n id = this._id;\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n\n return new Transition(subgroups, parents, name, id);\n}","import { matcher } from \"d3-selection\";\nimport { Transition } from \"./index.js\";\nexport default function (match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Transition(subgroups, this._parents, this._name, this._id);\n}","import { Transition } from \"./index.js\";\nexport default function (transition) {\n if (transition._id !== this._id) throw new Error();\n\n for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Transition(merges, this._parents, this._name, this._id);\n}","import { Transition, newId } from \"./index.js\";\nimport schedule, { get } from \"./schedule.js\";\nexport default function () {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id1);\n}","import { tweenValue } from \"./tween.js\";\n\nfunction textConstant(value) {\n return function () {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function () {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\n\nexport default function (value) {\n return this.tween(\"text\", typeof value === \"function\" ? textFunction(tweenValue(this, \"text\", value)) : textConstant(value == null ? \"\" : value + \"\"));\n}","import { set } from \"./schedule.js\";\nexport default function () {\n var on0,\n on1,\n that = this,\n id = that._id,\n size = that.size();\n return new Promise(function (resolve, reject) {\n var cancel = {\n value: reject\n },\n end = {\n value: function value() {\n if (--size === 0) resolve();\n }\n };\n that.each(function () {\n var schedule = set(this, id),\n on = schedule.on; // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n\n if (on !== on0) {\n on1 = (on0 = on).copy();\n\n on1._.cancel.push(cancel);\n\n on1._.interrupt.push(cancel);\n\n on1._.end.push(end);\n }\n\n schedule.on = on1;\n });\n });\n}","import { Transition, newId } from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport { easeCubicInOut } from \"d3-ease\";\nimport { now } from \"d3-timer\";\nvar defaultTiming = {\n time: null,\n // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n var timing;\n\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n return defaultTiming.time = now(), defaultTiming;\n }\n }\n\n return timing;\n}\n\nexport default function (name) {\n var id, timing;\n\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id);\n}","import { selection } from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;","import interrupt from \"../interrupt.js\";\nexport default function (name) {\n return this.each(function () {\n interrupt(this, name);\n });\n}","import { Transition } from \"./transition/index.js\";\nimport { SCHEDULED } from \"./transition/schedule.js\";\nvar root = [null];\nexport default function (node, name) {\n var schedules = node.__transition,\n schedule,\n i;\n\n if (schedules) {\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).state > SCHEDULED && schedule.name === name) {\n return new Transition([[node]], root, name, +i);\n }\n }\n }\n\n return null;\n}","export default function (x) {\n return function () {\n return x;\n };\n}","export default function (target, type, selection) {\n this.target = target;\n this.type = type;\n this.selection = selection;\n}","import { event } from \"d3-selection\";\nexport function nopropagation() {\n event.stopImmediatePropagation();\n}\nexport default function () {\n event.preventDefault();\n event.stopImmediatePropagation();\n}","import { dispatch } from \"d3-dispatch\";\nimport { dragDisable, dragEnable } from \"d3-drag\";\nimport { interpolate } from \"d3-interpolate\";\nimport { customEvent, event, touch, mouse, select } from \"d3-selection\";\nimport { interrupt } from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport BrushEvent from \"./event.js\";\nimport noevent, { nopropagation } from \"./noevent.js\";\nvar MODE_DRAG = {\n name: \"drag\"\n},\n MODE_SPACE = {\n name: \"space\"\n},\n MODE_HANDLE = {\n name: \"handle\"\n},\n MODE_CENTER = {\n name: \"center\"\n};\n\nfunction number1(e) {\n return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n return [number1(e[0]), number1(e[1])];\n}\n\nfunction toucher(identifier) {\n return function (target) {\n return touch(target, event.touches, identifier);\n };\n}\n\nvar X = {\n name: \"x\",\n handles: [\"w\", \"e\"].map(type),\n input: function input(x, e) {\n return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]];\n },\n output: function output(xy) {\n return xy && [xy[0][0], xy[1][0]];\n }\n};\nvar Y = {\n name: \"y\",\n handles: [\"n\", \"s\"].map(type),\n input: function input(y, e) {\n return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]];\n },\n output: function output(xy) {\n return xy && [xy[0][1], xy[1][1]];\n }\n};\nvar XY = {\n name: \"xy\",\n handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n input: function input(xy) {\n return xy == null ? null : number2(xy);\n },\n output: function output(xy) {\n return xy;\n }\n};\nvar cursors = {\n overlay: \"crosshair\",\n selection: \"move\",\n n: \"ns-resize\",\n e: \"ew-resize\",\n s: \"ns-resize\",\n w: \"ew-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n se: \"nwse-resize\",\n sw: \"nesw-resize\"\n};\nvar flipX = {\n e: \"w\",\n w: \"e\",\n nw: \"ne\",\n ne: \"nw\",\n se: \"sw\",\n sw: \"se\"\n};\nvar flipY = {\n n: \"s\",\n s: \"n\",\n nw: \"sw\",\n ne: \"se\",\n se: \"ne\",\n sw: \"nw\"\n};\nvar signsX = {\n overlay: +1,\n selection: +1,\n n: null,\n e: +1,\n s: null,\n w: -1,\n nw: -1,\n ne: +1,\n se: +1,\n sw: -1\n};\nvar signsY = {\n overlay: +1,\n selection: +1,\n n: -1,\n e: null,\n s: +1,\n w: null,\n nw: -1,\n ne: -1,\n se: +1,\n sw: +1\n};\n\nfunction type(t) {\n return {\n type: t\n };\n} // Ignore right-click, since that should open the context menu.\n\n\nfunction defaultFilter() {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n var svg = this.ownerSVGElement || this;\n\n if (svg.hasAttribute(\"viewBox\")) {\n svg = svg.viewBox.baseVal;\n return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n }\n\n return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n} // Like d3.local, but with the name “__brush” rather than auto-generated.\n\n\nfunction local(node) {\n while (!node.__brush) {\n if (!(node = node.parentNode)) return;\n }\n\n return node.__brush;\n}\n\nfunction empty(extent) {\n return extent[0][0] === extent[1][0] || extent[0][1] === extent[1][1];\n}\n\nexport function brushSelection(node) {\n var state = node.__brush;\n return state ? state.dim.output(state.selection) : null;\n}\nexport function brushX() {\n return brush(X);\n}\nexport function brushY() {\n return brush(Y);\n}\nexport default function () {\n return brush(XY);\n}\n\nfunction brush(dim) {\n var extent = defaultExtent,\n filter = defaultFilter,\n touchable = defaultTouchable,\n keys = true,\n listeners = dispatch(\"start\", \"brush\", \"end\"),\n handleSize = 6,\n touchending;\n\n function brush(group) {\n var overlay = group.property(\"__brush\", initialize).selectAll(\".overlay\").data([type(\"overlay\")]);\n overlay.enter().append(\"rect\").attr(\"class\", \"overlay\").attr(\"pointer-events\", \"all\").attr(\"cursor\", cursors.overlay).merge(overlay).each(function () {\n var extent = local(this).extent;\n select(this).attr(\"x\", extent[0][0]).attr(\"y\", extent[0][1]).attr(\"width\", extent[1][0] - extent[0][0]).attr(\"height\", extent[1][1] - extent[0][1]);\n });\n group.selectAll(\".selection\").data([type(\"selection\")]).enter().append(\"rect\").attr(\"class\", \"selection\").attr(\"cursor\", cursors.selection).attr(\"fill\", \"#777\").attr(\"fill-opacity\", 0.3).attr(\"stroke\", \"#fff\").attr(\"shape-rendering\", \"crispEdges\");\n var handle = group.selectAll(\".handle\").data(dim.handles, function (d) {\n return d.type;\n });\n handle.exit().remove();\n handle.enter().append(\"rect\").attr(\"class\", function (d) {\n return \"handle handle--\" + d.type;\n }).attr(\"cursor\", function (d) {\n return cursors[d.type];\n });\n group.each(redraw).attr(\"fill\", \"none\").attr(\"pointer-events\", \"all\").on(\"mousedown.brush\", started).filter(touchable).on(\"touchstart.brush\", started).on(\"touchmove.brush\", touchmoved).on(\"touchend.brush touchcancel.brush\", touchended).style(\"touch-action\", \"none\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n brush.move = function (group, selection) {\n if (group.selection) {\n group.on(\"start.brush\", function () {\n emitter(this, arguments).beforestart().start();\n }).on(\"interrupt.brush end.brush\", function () {\n emitter(this, arguments).end();\n }).tween(\"brush\", function () {\n var that = this,\n state = that.__brush,\n emit = emitter(that, arguments),\n selection0 = state.selection,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n i = interpolate(selection0, selection1);\n\n function tween(t) {\n state.selection = t === 1 && selection1 === null ? null : i(t);\n redraw.call(that);\n emit.brush();\n }\n\n return selection0 !== null && selection1 !== null ? tween : tween(1);\n });\n } else {\n group.each(function () {\n var that = this,\n args = arguments,\n state = that.__brush,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n emit = emitter(that, args).beforestart();\n interrupt(that);\n state.selection = selection1 === null ? null : selection1;\n redraw.call(that);\n emit.start().brush().end();\n });\n }\n };\n\n brush.clear = function (group) {\n brush.move(group, null);\n };\n\n function redraw() {\n var group = select(this),\n selection = local(this).selection;\n\n if (selection) {\n group.selectAll(\".selection\").style(\"display\", null).attr(\"x\", selection[0][0]).attr(\"y\", selection[0][1]).attr(\"width\", selection[1][0] - selection[0][0]).attr(\"height\", selection[1][1] - selection[0][1]);\n group.selectAll(\".handle\").style(\"display\", null).attr(\"x\", function (d) {\n return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2;\n }).attr(\"y\", function (d) {\n return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2;\n }).attr(\"width\", function (d) {\n return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize;\n }).attr(\"height\", function (d) {\n return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize;\n });\n } else {\n group.selectAll(\".selection,.handle\").style(\"display\", \"none\").attr(\"x\", null).attr(\"y\", null).attr(\"width\", null).attr(\"height\", null);\n }\n }\n\n function emitter(that, args, clean) {\n var emit = that.__brush.emitter;\n return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n }\n\n function Emitter(that, args, clean) {\n this.that = that;\n this.args = args;\n this.state = that.__brush;\n this.active = 0;\n this.clean = clean;\n }\n\n Emitter.prototype = {\n beforestart: function beforestart() {\n if (++this.active === 1) this.state.emitter = this, this.starting = true;\n return this;\n },\n start: function start() {\n if (this.starting) this.starting = false, this.emit(\"start\");else this.emit(\"brush\");\n return this;\n },\n brush: function brush() {\n this.emit(\"brush\");\n return this;\n },\n end: function end() {\n if (--this.active === 0) delete this.state.emitter, this.emit(\"end\");\n return this;\n },\n emit: function emit(type) {\n customEvent(new BrushEvent(brush, type, dim.output(this.state.selection)), listeners.apply, listeners, [type, this.that, this.args]);\n }\n };\n\n function started() {\n if (touchending && !event.touches) return;\n if (!filter.apply(this, arguments)) return;\n var that = this,\n type = event.target.__data__.type,\n mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : keys && event.altKey ? MODE_CENTER : MODE_HANDLE,\n signX = dim === Y ? null : signsX[type],\n signY = dim === X ? null : signsY[type],\n state = local(that),\n extent = state.extent,\n selection = state.selection,\n W = extent[0][0],\n w0,\n w1,\n N = extent[0][1],\n n0,\n n1,\n E = extent[1][0],\n e0,\n e1,\n S = extent[1][1],\n s0,\n s1,\n dx = 0,\n dy = 0,\n moving,\n shifting = signX && signY && keys && event.shiftKey,\n lockX,\n lockY,\n pointer = event.touches ? toucher(event.changedTouches[0].identifier) : mouse,\n point0 = pointer(that),\n point = point0,\n emit = emitter(that, arguments, true).beforestart();\n\n if (type === \"overlay\") {\n if (selection) moving = true;\n state.selection = selection = [[w0 = dim === Y ? W : point0[0], n0 = dim === X ? N : point0[1]], [e0 = dim === Y ? E : w0, s0 = dim === X ? S : n0]];\n } else {\n w0 = selection[0][0];\n n0 = selection[0][1];\n e0 = selection[1][0];\n s0 = selection[1][1];\n }\n\n w1 = w0;\n n1 = n0;\n e1 = e0;\n s1 = s0;\n var group = select(that).attr(\"pointer-events\", \"none\");\n var overlay = group.selectAll(\".overlay\").attr(\"cursor\", cursors[type]);\n\n if (event.touches) {\n emit.moved = moved;\n emit.ended = ended;\n } else {\n var view = select(event.view).on(\"mousemove.brush\", moved, true).on(\"mouseup.brush\", ended, true);\n if (keys) view.on(\"keydown.brush\", keydowned, true).on(\"keyup.brush\", keyupped, true);\n dragDisable(event.view);\n }\n\n nopropagation();\n interrupt(that);\n redraw.call(that);\n emit.start();\n\n function moved() {\n var point1 = pointer(that);\n\n if (shifting && !lockX && !lockY) {\n if (Math.abs(point1[0] - point[0]) > Math.abs(point1[1] - point[1])) lockY = true;else lockX = true;\n }\n\n point = point1;\n moving = true;\n noevent();\n move();\n }\n\n function move() {\n var t;\n dx = point[0] - point0[0];\n dy = point[1] - point0[1];\n\n switch (mode) {\n case MODE_SPACE:\n case MODE_DRAG:\n {\n if (signX) dx = Math.max(W - w0, Math.min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n if (signY) dy = Math.max(N - n0, Math.min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n break;\n }\n\n case MODE_HANDLE:\n {\n if (signX < 0) dx = Math.max(W - w0, Math.min(E - w0, dx)), w1 = w0 + dx, e1 = e0;else if (signX > 0) dx = Math.max(W - e0, Math.min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n if (signY < 0) dy = Math.max(N - n0, Math.min(S - n0, dy)), n1 = n0 + dy, s1 = s0;else if (signY > 0) dy = Math.max(N - s0, Math.min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n break;\n }\n\n case MODE_CENTER:\n {\n if (signX) w1 = Math.max(W, Math.min(E, w0 - dx * signX)), e1 = Math.max(W, Math.min(E, e0 + dx * signX));\n if (signY) n1 = Math.max(N, Math.min(S, n0 - dy * signY)), s1 = Math.max(N, Math.min(S, s0 + dy * signY));\n break;\n }\n }\n\n if (e1 < w1) {\n signX *= -1;\n t = w0, w0 = e0, e0 = t;\n t = w1, w1 = e1, e1 = t;\n if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n }\n\n if (s1 < n1) {\n signY *= -1;\n t = n0, n0 = s0, s0 = t;\n t = n1, n1 = s1, s1 = t;\n if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n }\n\n if (state.selection) selection = state.selection; // May be set by brush.move!\n\n if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n if (selection[0][0] !== w1 || selection[0][1] !== n1 || selection[1][0] !== e1 || selection[1][1] !== s1) {\n state.selection = [[w1, n1], [e1, s1]];\n redraw.call(that);\n emit.brush();\n }\n }\n\n function ended() {\n nopropagation();\n\n if (event.touches) {\n if (event.touches.length) return;\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function () {\n touchending = null;\n }, 500); // Ghost clicks are delayed!\n } else {\n dragEnable(event.view, moving);\n view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n }\n\n group.attr(\"pointer-events\", \"all\");\n overlay.attr(\"cursor\", cursors.overlay);\n if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n\n if (empty(selection)) state.selection = null, redraw.call(that);\n emit.end();\n }\n\n function keydowned() {\n switch (event.keyCode) {\n case 16:\n {\n // SHIFT\n shifting = signX && signY;\n break;\n }\n\n case 18:\n {\n // ALT\n if (mode === MODE_HANDLE) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n move();\n }\n\n break;\n }\n\n case 32:\n {\n // SPACE; takes priority over ALT\n if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n if (signX < 0) e0 = e1 - dx;else if (signX > 0) w0 = w1 - dx;\n if (signY < 0) s0 = s1 - dy;else if (signY > 0) n0 = n1 - dy;\n mode = MODE_SPACE;\n overlay.attr(\"cursor\", cursors.selection);\n move();\n }\n\n break;\n }\n\n default:\n return;\n }\n\n noevent();\n }\n\n function keyupped() {\n switch (event.keyCode) {\n case 16:\n {\n // SHIFT\n if (shifting) {\n lockX = lockY = shifting = false;\n move();\n }\n\n break;\n }\n\n case 18:\n {\n // ALT\n if (mode === MODE_CENTER) {\n if (signX < 0) e0 = e1;else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1;else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n move();\n }\n\n break;\n }\n\n case 32:\n {\n // SPACE\n if (mode === MODE_SPACE) {\n if (event.altKey) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n } else {\n if (signX < 0) e0 = e1;else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1;else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n }\n\n overlay.attr(\"cursor\", cursors[type]);\n move();\n }\n\n break;\n }\n\n default:\n return;\n }\n\n noevent();\n }\n }\n\n function touchmoved() {\n emitter(this, arguments).moved();\n }\n\n function touchended() {\n emitter(this, arguments).ended();\n }\n\n function initialize() {\n var state = this.__brush || {\n selection: null\n };\n state.extent = number2(extent.apply(this, arguments));\n state.dim = dim;\n return state;\n }\n\n brush.extent = function (_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant(number2(_)), brush) : extent;\n };\n\n brush.filter = function (_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), brush) : filter;\n };\n\n brush.touchable = function (_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), brush) : touchable;\n };\n\n brush.handleSize = function (_) {\n return arguments.length ? (handleSize = +_, brush) : handleSize;\n };\n\n brush.keyModifiers = function (_) {\n return arguments.length ? (keys = !!_, brush) : keys;\n };\n\n brush.on = function () {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? brush : value;\n };\n\n return brush;\n}","export var cos = Math.cos;\nexport var sin = Math.sin;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = pi * 2;\nexport var max = Math.max;","import { range } from \"d3-array\";\nimport { max, tau } from \"./math\";\n\nfunction compareValue(compare) {\n return function (a, b) {\n return compare(a.source.value + a.target.value, b.source.value + b.target.value);\n };\n}\n\nexport default function () {\n var padAngle = 0,\n sortGroups = null,\n sortSubgroups = null,\n sortChords = null;\n\n function chord(matrix) {\n var n = matrix.length,\n groupSums = [],\n groupIndex = range(n),\n subgroupIndex = [],\n chords = [],\n groups = chords.groups = new Array(n),\n subgroups = new Array(n * n),\n k,\n x,\n x0,\n dx,\n i,\n j; // Compute the sum.\n\n k = 0, i = -1;\n\n while (++i < n) {\n x = 0, j = -1;\n\n while (++j < n) {\n x += matrix[i][j];\n }\n\n groupSums.push(x);\n subgroupIndex.push(range(n));\n k += x;\n } // Sort groups…\n\n\n if (sortGroups) groupIndex.sort(function (a, b) {\n return sortGroups(groupSums[a], groupSums[b]);\n }); // Sort subgroups…\n\n if (sortSubgroups) subgroupIndex.forEach(function (d, i) {\n d.sort(function (a, b) {\n return sortSubgroups(matrix[i][a], matrix[i][b]);\n });\n }); // Convert the sum to scaling factor for [0, 2pi].\n // TODO Allow start and end angle to be specified?\n // TODO Allow padding to be specified as percentage?\n\n k = max(0, tau - padAngle * n) / k;\n dx = k ? padAngle : tau / n; // Compute the start and end angle for each group and subgroup.\n // Note: Opera has a bug reordering object literal properties!\n\n x = 0, i = -1;\n\n while (++i < n) {\n x0 = x, j = -1;\n\n while (++j < n) {\n var di = groupIndex[i],\n dj = subgroupIndex[di][j],\n v = matrix[di][dj],\n a0 = x,\n a1 = x += v * k;\n subgroups[dj * n + di] = {\n index: di,\n subindex: dj,\n startAngle: a0,\n endAngle: a1,\n value: v\n };\n }\n\n groups[di] = {\n index: di,\n startAngle: x0,\n endAngle: x,\n value: groupSums[di]\n };\n x += dx;\n } // Generate chords for each (non-empty) subgroup-subgroup link.\n\n\n i = -1;\n\n while (++i < n) {\n j = i - 1;\n\n while (++j < n) {\n var source = subgroups[j * n + i],\n target = subgroups[i * n + j];\n\n if (source.value || target.value) {\n chords.push(source.value < target.value ? {\n source: target,\n target: source\n } : {\n source: source,\n target: target\n });\n }\n }\n }\n\n return sortChords ? chords.sort(sortChords) : chords;\n }\n\n chord.padAngle = function (_) {\n return arguments.length ? (padAngle = max(0, _), chord) : padAngle;\n };\n\n chord.sortGroups = function (_) {\n return arguments.length ? (sortGroups = _, chord) : sortGroups;\n };\n\n chord.sortSubgroups = function (_) {\n return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups;\n };\n\n chord.sortChords = function (_) {\n return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._;\n };\n\n return chord;\n}","export var slice = Array.prototype.slice;","export default function (x) {\n return function () {\n return x;\n };\n}","var pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n\n this._ = \"\";\n}\n\nfunction path() {\n return new Path();\n}\n\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: function moveTo(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n },\n closePath: function closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n },\n lineTo: function lineTo(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n quadraticCurveTo: function quadraticCurveTo(x1, y1, x, y) {\n this._ += \"Q\" + +x1 + \",\" + +y1 + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n bezierCurveTo: function bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + +x1 + \",\" + +y1 + \",\" + +x2 + \",\" + +y2 + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n arcTo: function arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01; // Is the radius negative? Error.\n\n if (r < 0) throw new Error(\"negative radius: \" + r); // Is this path empty? Move to (x1,y1).\n\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n } // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon)) ; // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n } // Otherwise, draw an arc!\n else {\n var x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21; // If the start tangent is not coincident with (x0,y0), line to.\n\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + +(y01 * x20 > x01 * y20) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n },\n arc: function arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n var dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0; // Is the radius negative? Error.\n\n if (r < 0) throw new Error(\"negative radius: \" + r); // Is this path empty? Move to (x0,y0).\n\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n } // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n } // Is this arc empty? We’re done.\n\n\n if (!r) return; // Does the angle go the wrong way? Flip the direction.\n\n if (da < 0) da = da % tau + tau; // Is this a complete circle? Draw two arcs to complete the circle.\n\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n } // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + +(da >= pi) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n },\n rect: function rect(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + +w + \"v\" + +h + \"h\" + -w + \"Z\";\n },\n toString: function toString() {\n return this._;\n }\n};\nexport default path;","import { slice } from \"./array\";\nimport constant from \"./constant\";\nimport { cos, halfPi, sin } from \"./math\";\nimport { path } from \"d3-path\";\n\nfunction defaultSource(d) {\n return d.source;\n}\n\nfunction defaultTarget(d) {\n return d.target;\n}\n\nfunction defaultRadius(d) {\n return d.radius;\n}\n\nfunction defaultStartAngle(d) {\n return d.startAngle;\n}\n\nfunction defaultEndAngle(d) {\n return d.endAngle;\n}\n\nexport default function () {\n var source = defaultSource,\n target = defaultTarget,\n radius = defaultRadius,\n startAngle = defaultStartAngle,\n endAngle = defaultEndAngle,\n context = null;\n\n function ribbon() {\n var buffer,\n argv = slice.call(arguments),\n s = source.apply(this, argv),\n t = target.apply(this, argv),\n sr = +radius.apply(this, (argv[0] = s, argv)),\n sa0 = startAngle.apply(this, argv) - halfPi,\n sa1 = endAngle.apply(this, argv) - halfPi,\n sx0 = sr * cos(sa0),\n sy0 = sr * sin(sa0),\n tr = +radius.apply(this, (argv[0] = t, argv)),\n ta0 = startAngle.apply(this, argv) - halfPi,\n ta1 = endAngle.apply(this, argv) - halfPi;\n if (!context) context = buffer = path();\n context.moveTo(sx0, sy0);\n context.arc(0, 0, sr, sa0, sa1);\n\n if (sa0 !== ta0 || sa1 !== ta1) {\n // TODO sr !== tr?\n context.quadraticCurveTo(0, 0, tr * cos(ta0), tr * sin(ta0));\n context.arc(0, 0, tr, ta0, ta1);\n }\n\n context.quadraticCurveTo(0, 0, sx0, sy0);\n context.closePath();\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n ribbon.radius = function (_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), ribbon) : radius;\n };\n\n ribbon.startAngle = function (_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), ribbon) : startAngle;\n };\n\n ribbon.endAngle = function (_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), ribbon) : endAngle;\n };\n\n ribbon.source = function (_) {\n return arguments.length ? (source = _, ribbon) : source;\n };\n\n ribbon.target = function (_) {\n return arguments.length ? (target = _, ribbon) : target;\n };\n\n ribbon.context = function (_) {\n return arguments.length ? (context = _ == null ? null : _, ribbon) : context;\n };\n\n return ribbon;\n}","export var prefix = \"$\";\n\nfunction Map() {}\n\nMap.prototype = map.prototype = {\n constructor: Map,\n has: function has(key) {\n return prefix + key in this;\n },\n get: function get(key) {\n return this[prefix + key];\n },\n set: function set(key, value) {\n this[prefix + key] = value;\n return this;\n },\n remove: function remove(key) {\n var property = prefix + key;\n return property in this && delete this[property];\n },\n clear: function clear() {\n for (var property in this) {\n if (property[0] === prefix) delete this[property];\n }\n },\n keys: function keys() {\n var keys = [];\n\n for (var property in this) {\n if (property[0] === prefix) keys.push(property.slice(1));\n }\n\n return keys;\n },\n values: function values() {\n var values = [];\n\n for (var property in this) {\n if (property[0] === prefix) values.push(this[property]);\n }\n\n return values;\n },\n entries: function entries() {\n var entries = [];\n\n for (var property in this) {\n if (property[0] === prefix) entries.push({\n key: property.slice(1),\n value: this[property]\n });\n }\n\n return entries;\n },\n size: function size() {\n var size = 0;\n\n for (var property in this) {\n if (property[0] === prefix) ++size;\n }\n\n return size;\n },\n empty: function empty() {\n for (var property in this) {\n if (property[0] === prefix) return false;\n }\n\n return true;\n },\n each: function each(f) {\n for (var property in this) {\n if (property[0] === prefix) f(this[property], property.slice(1), this);\n }\n }\n};\n\nfunction map(object, f) {\n var map = new Map(); // Copy constructor.\n\n if (object instanceof Map) object.each(function (value, key) {\n map.set(key, value);\n }); // Index array by numeric index or specified key function.\n else if (Array.isArray(object)) {\n var i = -1,\n n = object.length,\n o;\n if (f == null) while (++i < n) {\n map.set(i, object[i]);\n } else while (++i < n) {\n map.set(f(o = object[i], i, object), o);\n }\n } // Convert object to map.\n else if (object) for (var key in object) {\n map.set(key, object[key]);\n }\n return map;\n}\n\nexport default map;","import map from \"./map\";\nexport default function () {\n var keys = [],\n _sortKeys = [],\n _sortValues,\n _rollup,\n nest;\n\n function apply(array, depth, createResult, setResult) {\n if (depth >= keys.length) {\n if (_sortValues != null) array.sort(_sortValues);\n return _rollup != null ? _rollup(array) : array;\n }\n\n var i = -1,\n n = array.length,\n key = keys[depth++],\n keyValue,\n value,\n valuesByKey = map(),\n values,\n result = createResult();\n\n while (++i < n) {\n if (values = valuesByKey.get(keyValue = key(value = array[i]) + \"\")) {\n values.push(value);\n } else {\n valuesByKey.set(keyValue, [value]);\n }\n }\n\n valuesByKey.each(function (values, key) {\n setResult(result, key, apply(values, depth, createResult, setResult));\n });\n return result;\n }\n\n function _entries(map, depth) {\n if (++depth > keys.length) return map;\n var array,\n sortKey = _sortKeys[depth - 1];\n if (_rollup != null && depth >= keys.length) array = map.entries();else array = [], map.each(function (v, k) {\n array.push({\n key: k,\n values: _entries(v, depth)\n });\n });\n return sortKey != null ? array.sort(function (a, b) {\n return sortKey(a.key, b.key);\n }) : array;\n }\n\n return nest = {\n object: function object(array) {\n return apply(array, 0, createObject, setObject);\n },\n map: function map(array) {\n return apply(array, 0, createMap, setMap);\n },\n entries: function entries(array) {\n return _entries(apply(array, 0, createMap, setMap), 0);\n },\n key: function key(d) {\n keys.push(d);\n return nest;\n },\n sortKeys: function sortKeys(order) {\n _sortKeys[keys.length - 1] = order;\n return nest;\n },\n sortValues: function sortValues(order) {\n _sortValues = order;\n return nest;\n },\n rollup: function rollup(f) {\n _rollup = f;\n return nest;\n }\n };\n}\n\nfunction createObject() {\n return {};\n}\n\nfunction setObject(object, key, value) {\n object[key] = value;\n}\n\nfunction createMap() {\n return map();\n}\n\nfunction setMap(map, key, value) {\n map.set(key, value);\n}","import { default as map, prefix } from \"./map\";\n\nfunction Set() {}\n\nvar proto = map.prototype;\nSet.prototype = set.prototype = {\n constructor: Set,\n has: proto.has,\n add: function add(value) {\n value += \"\";\n this[prefix + value] = value;\n return this;\n },\n remove: proto.remove,\n clear: proto.clear,\n values: proto.keys,\n size: proto.size,\n empty: proto.empty,\n each: proto.each\n};\n\nfunction set(object, f) {\n var set = new Set(); // Copy constructor.\n\n if (object instanceof Set) object.each(function (value) {\n set.add(value);\n }); // Otherwise, assume it’s an array.\n else if (object) {\n var i = -1,\n n = object.length;\n if (f == null) while (++i < n) {\n set.add(object[i]);\n } else while (++i < n) {\n set.add(f(object[i], i, object));\n }\n }\n return set;\n}\n\nexport default set;","export default function (map) {\n var keys = [];\n\n for (var key in map) {\n keys.push(key);\n }\n\n return keys;\n}","export default function (map) {\n var values = [];\n\n for (var key in map) {\n values.push(map[key]);\n }\n\n return values;\n}","export default function (map) {\n var entries = [];\n\n for (var key in map) {\n entries.push({\n key: key,\n value: map[key]\n });\n }\n\n return entries;\n}","export var deg2rad = Math.PI / 180;\nexport var rad2deg = 180 / Math.PI;","import define, { extend } from \"./define.js\";\nimport { Color, rgbConvert, Rgb } from \"./color.js\";\nimport { deg2rad, rad2deg } from \"./math.js\"; // https://observablehq.com/@mbostock/lab-and-rgb\n\nvar K = 18,\n Xn = 0.96422,\n Yn = 1,\n Zn = 0.82521,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n if (o instanceof Hcl) return hcl2lab(o);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = rgb2lrgb(o.r),\n g = rgb2lrgb(o.g),\n b = rgb2lrgb(o.b),\n y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn),\n x,\n z;\n if (r === g && g === b) x = z = y;else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\nexport default function lab(l, a, b, opacity) {\n return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\nexport function Lab(l, a, b, opacity) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n this.opacity = +opacity;\n}\ndefine(Lab, lab, extend(Color, {\n brighter: function brighter(k) {\n return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n darker: function darker(k) {\n return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n rgb: function rgb() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n x = Xn * lab2xyz(x);\n y = Yn * lab2xyz(y);\n z = Zn * lab2xyz(z);\n return new Rgb(lrgb2rgb(3.1338561 * x - 1.6168667 * y - 0.4906146 * z), lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), lrgb2rgb(0.0719453 * x - 0.2289914 * y + 1.4052427 * z), this.opacity);\n }\n}));\n\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n if (!(o instanceof Lab)) o = labConvert(o);\n if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n var h = Math.atan2(o.b, o.a) * rad2deg;\n return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\nexport function hcl(h, c, l, opacity) {\n return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\nexport function Hcl(h, c, l, opacity) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n var h = o.h * deg2rad;\n return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n brighter: function brighter(k) {\n return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n },\n darker: function darker(k) {\n return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n },\n rgb: function rgb() {\n return hcl2lab(this).rgb();\n }\n}));","import define, { extend } from \"./define.js\";\nimport { Color, rgbConvert, Rgb, darker as _darker, brighter as _brighter } from \"./color.js\";\nimport { deg2rad, rad2deg } from \"./math.js\";\nvar A = -0.14861,\n B = +1.78277,\n C = -0.29227,\n D = -0.90649,\n E = +1.97294,\n ED = E * D,\n EB = E * B,\n BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n bl = b - l,\n k = (E * (g - l) - C * bl) / D,\n s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)),\n // NaN if l=0 or l=1\n h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;\n return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nexport default function cubehelix(h, s, l, opacity) {\n return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\nexport function Cubehelix(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\ndefine(Cubehelix, cubehelix, extend(Color, {\n brighter: function brighter(k) {\n k = k == null ? _brighter : Math.pow(_brighter, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function darker(k) {\n k = k == null ? _darker : Math.pow(_darker, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function rgb() {\n var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,\n l = +this.l,\n a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n cosh = Math.cos(h),\n sinh = Math.sin(h);\n return new Rgb(255 * (l + a * (A * cosh + B * sinh)), 255 * (l + a * (C * cosh + D * sinh)), 255 * (l + a * (E * cosh)), this.opacity);\n }\n}));","var array = Array.prototype;\nexport var slice = array.slice;","export default function (a, b) {\n return a - b;\n}","export default function (x) {\n return function () {\n return x;\n };\n}","export default function (ring, hole) {\n var i = -1,\n n = hole.length,\n c;\n\n while (++i < n) {\n if (c = ringContains(ring, hole[i])) return c;\n }\n\n return 0;\n}\n\nfunction ringContains(ring, point) {\n var x = point[0],\n y = point[1],\n contains = -1;\n\n for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {\n var pi = ring[i],\n xi = pi[0],\n yi = pi[1],\n pj = ring[j],\n xj = pj[0],\n yj = pj[1];\n if (segmentContains(pi, pj, point)) return 0;\n if (yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi) contains = -contains;\n }\n\n return contains;\n}\n\nfunction segmentContains(a, b, c) {\n var i;\n return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]);\n}\n\nfunction collinear(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]);\n}\n\nfunction within(p, q, r) {\n return p <= q && q <= r || r <= q && q <= p;\n}","export default function () {}","import { extent, thresholdSturges, tickStep, range } from \"d3-array\";\nimport { slice } from \"./array\";\nimport ascending from \"./ascending\";\nimport area from \"./area\";\nimport constant from \"./constant\";\nimport contains from \"./contains\";\nimport noop from \"./noop\";\nvar cases = [[], [[[1.0, 1.5], [0.5, 1.0]]], [[[1.5, 1.0], [1.0, 1.5]]], [[[1.5, 1.0], [0.5, 1.0]]], [[[1.0, 0.5], [1.5, 1.0]]], [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]], [[[1.0, 0.5], [1.0, 1.5]]], [[[1.0, 0.5], [0.5, 1.0]]], [[[0.5, 1.0], [1.0, 0.5]]], [[[1.0, 1.5], [1.0, 0.5]]], [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]], [[[1.5, 1.0], [1.0, 0.5]]], [[[0.5, 1.0], [1.5, 1.0]]], [[[1.0, 1.5], [1.5, 1.0]]], [[[0.5, 1.0], [1.0, 1.5]]], []];\nexport default function () {\n var dx = 1,\n dy = 1,\n threshold = thresholdSturges,\n smooth = smoothLinear;\n\n function contours(values) {\n var tz = threshold(values); // Convert number of thresholds into uniform thresholds.\n\n if (!Array.isArray(tz)) {\n var domain = extent(values),\n start = domain[0],\n stop = domain[1];\n tz = tickStep(start, stop, tz);\n tz = range(Math.floor(start / tz) * tz, Math.floor(stop / tz) * tz, tz);\n } else {\n tz = tz.slice().sort(ascending);\n }\n\n return tz.map(function (value) {\n return contour(values, value);\n });\n } // Accumulate, smooth contour rings, assign holes to exterior rings.\n // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js\n\n\n function contour(values, value) {\n var polygons = [],\n holes = [];\n isorings(values, value, function (ring) {\n smooth(ring, values, value);\n if (area(ring) > 0) polygons.push([ring]);else holes.push(ring);\n });\n holes.forEach(function (hole) {\n for (var i = 0, n = polygons.length, polygon; i < n; ++i) {\n if (contains((polygon = polygons[i])[0], hole) !== -1) {\n polygon.push(hole);\n return;\n }\n }\n });\n return {\n type: \"MultiPolygon\",\n value: value,\n coordinates: polygons\n };\n } // Marching squares with isolines stitched into rings.\n // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js\n\n\n function isorings(values, value, callback) {\n var fragmentByStart = new Array(),\n fragmentByEnd = new Array(),\n x,\n y,\n t0,\n t1,\n t2,\n t3; // Special case for the first row (y = -1, t2 = t3 = 0).\n\n x = y = -1;\n t1 = values[0] >= value;\n cases[t1 << 1].forEach(stitch);\n\n while (++x < dx - 1) {\n t0 = t1, t1 = values[x + 1] >= value;\n cases[t0 | t1 << 1].forEach(stitch);\n }\n\n cases[t1 << 0].forEach(stitch); // General case for the intermediate rows.\n\n while (++y < dy - 1) {\n x = -1;\n t1 = values[y * dx + dx] >= value;\n t2 = values[y * dx] >= value;\n cases[t1 << 1 | t2 << 2].forEach(stitch);\n\n while (++x < dx - 1) {\n t0 = t1, t1 = values[y * dx + dx + x + 1] >= value;\n t3 = t2, t2 = values[y * dx + x + 1] >= value;\n cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);\n }\n\n cases[t1 | t2 << 3].forEach(stitch);\n } // Special case for the last row (y = dy - 1, t0 = t1 = 0).\n\n\n x = -1;\n t2 = values[y * dx] >= value;\n cases[t2 << 2].forEach(stitch);\n\n while (++x < dx - 1) {\n t3 = t2, t2 = values[y * dx + x + 1] >= value;\n cases[t2 << 2 | t3 << 3].forEach(stitch);\n }\n\n cases[t2 << 3].forEach(stitch);\n\n function stitch(line) {\n var start = [line[0][0] + x, line[0][1] + y],\n end = [line[1][0] + x, line[1][1] + y],\n startIndex = index(start),\n endIndex = index(end),\n f,\n g;\n\n if (f = fragmentByEnd[startIndex]) {\n if (g = fragmentByStart[endIndex]) {\n delete fragmentByEnd[f.end];\n delete fragmentByStart[g.start];\n\n if (f === g) {\n f.ring.push(end);\n callback(f.ring);\n } else {\n fragmentByStart[f.start] = fragmentByEnd[g.end] = {\n start: f.start,\n end: g.end,\n ring: f.ring.concat(g.ring)\n };\n }\n } else {\n delete fragmentByEnd[f.end];\n f.ring.push(end);\n fragmentByEnd[f.end = endIndex] = f;\n }\n } else if (f = fragmentByStart[endIndex]) {\n if (g = fragmentByEnd[startIndex]) {\n delete fragmentByStart[f.start];\n delete fragmentByEnd[g.end];\n\n if (f === g) {\n f.ring.push(end);\n callback(f.ring);\n } else {\n fragmentByStart[g.start] = fragmentByEnd[f.end] = {\n start: g.start,\n end: f.end,\n ring: g.ring.concat(f.ring)\n };\n }\n } else {\n delete fragmentByStart[f.start];\n f.ring.unshift(start);\n fragmentByStart[f.start = startIndex] = f;\n }\n } else {\n fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {\n start: startIndex,\n end: endIndex,\n ring: [start, end]\n };\n }\n }\n }\n\n function index(point) {\n return point[0] * 2 + point[1] * (dx + 1) * 4;\n }\n\n function smoothLinear(ring, values, value) {\n ring.forEach(function (point) {\n var x = point[0],\n y = point[1],\n xt = x | 0,\n yt = y | 0,\n v0,\n v1 = values[yt * dx + xt];\n\n if (x > 0 && x < dx && xt === x) {\n v0 = values[yt * dx + xt - 1];\n point[0] = x + (value - v0) / (v1 - v0) - 0.5;\n }\n\n if (y > 0 && y < dy && yt === y) {\n v0 = values[(yt - 1) * dx + xt];\n point[1] = y + (value - v0) / (v1 - v0) - 0.5;\n }\n });\n }\n\n contours.contour = contour;\n\n contours.size = function (_) {\n if (!arguments.length) return [dx, dy];\n\n var _0 = Math.ceil(_[0]),\n _1 = Math.ceil(_[1]);\n\n if (!(_0 > 0) || !(_1 > 0)) throw new Error(\"invalid size\");\n return dx = _0, dy = _1, contours;\n };\n\n contours.thresholds = function (_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), contours) : threshold;\n };\n\n contours.smooth = function (_) {\n return arguments.length ? (smooth = _ ? smoothLinear : noop, contours) : smooth === smoothLinear;\n };\n\n return contours;\n}","export default function (ring) {\n var i = 0,\n n = ring.length,\n area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];\n\n while (++i < n) {\n area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];\n }\n\n return area;\n}","// TODO Optimize edge cases.\n// TODO Optimize index calculation.\n// TODO Optimize arguments.\nexport function blurX(source, target, r) {\n var n = source.width,\n m = source.height,\n w = (r << 1) + 1;\n\n for (var j = 0; j < m; ++j) {\n for (var i = 0, sr = 0; i < n + r; ++i) {\n if (i < n) {\n sr += source.data[i + j * n];\n }\n\n if (i >= r) {\n if (i >= w) {\n sr -= source.data[i - w + j * n];\n }\n\n target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w);\n }\n }\n }\n} // TODO Optimize edge cases.\n// TODO Optimize index calculation.\n// TODO Optimize arguments.\n\nexport function blurY(source, target, r) {\n var n = source.width,\n m = source.height,\n w = (r << 1) + 1;\n\n for (var i = 0; i < n; ++i) {\n for (var j = 0, sr = 0; j < m + r; ++j) {\n if (j < m) {\n sr += source.data[i + j * n];\n }\n\n if (j >= r) {\n if (j >= w) {\n sr -= source.data[i + (j - w) * n];\n }\n\n target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w);\n }\n }\n }\n}","import { max, range, tickStep } from \"d3-array\";\nimport { slice } from \"./array\";\nimport { blurX, blurY } from \"./blur\";\nimport constant from \"./constant\";\nimport contours from \"./contours\";\n\nfunction defaultX(d) {\n return d[0];\n}\n\nfunction defaultY(d) {\n return d[1];\n}\n\nfunction defaultWeight() {\n return 1;\n}\n\nexport default function () {\n var x = defaultX,\n y = defaultY,\n weight = defaultWeight,\n dx = 960,\n dy = 500,\n r = 20,\n // blur radius\n k = 2,\n // log2(grid cell size)\n o = r * 3,\n // grid offset, to pad for blur\n n = dx + o * 2 >> k,\n // grid width\n m = dy + o * 2 >> k,\n // grid height\n threshold = constant(20);\n\n function density(data) {\n var values0 = new Float32Array(n * m),\n values1 = new Float32Array(n * m);\n data.forEach(function (d, i, data) {\n var xi = +x(d, i, data) + o >> k,\n yi = +y(d, i, data) + o >> k,\n wi = +weight(d, i, data);\n\n if (xi >= 0 && xi < n && yi >= 0 && yi < m) {\n values0[xi + yi * n] += wi;\n }\n }); // TODO Optimize.\n\n blurX({\n width: n,\n height: m,\n data: values0\n }, {\n width: n,\n height: m,\n data: values1\n }, r >> k);\n blurY({\n width: n,\n height: m,\n data: values1\n }, {\n width: n,\n height: m,\n data: values0\n }, r >> k);\n blurX({\n width: n,\n height: m,\n data: values0\n }, {\n width: n,\n height: m,\n data: values1\n }, r >> k);\n blurY({\n width: n,\n height: m,\n data: values1\n }, {\n width: n,\n height: m,\n data: values0\n }, r >> k);\n blurX({\n width: n,\n height: m,\n data: values0\n }, {\n width: n,\n height: m,\n data: values1\n }, r >> k);\n blurY({\n width: n,\n height: m,\n data: values1\n }, {\n width: n,\n height: m,\n data: values0\n }, r >> k);\n var tz = threshold(values0); // Convert number of thresholds into uniform thresholds.\n\n if (!Array.isArray(tz)) {\n var stop = max(values0);\n tz = tickStep(0, stop, tz);\n tz = range(0, Math.floor(stop / tz) * tz, tz);\n tz.shift();\n }\n\n return contours().thresholds(tz).size([n, m])(values0).map(transform);\n }\n\n function transform(geometry) {\n geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel.\n\n geometry.coordinates.forEach(transformPolygon);\n return geometry;\n }\n\n function transformPolygon(coordinates) {\n coordinates.forEach(transformRing);\n }\n\n function transformRing(coordinates) {\n coordinates.forEach(transformPoint);\n } // TODO Optimize.\n\n\n function transformPoint(coordinates) {\n coordinates[0] = coordinates[0] * Math.pow(2, k) - o;\n coordinates[1] = coordinates[1] * Math.pow(2, k) - o;\n }\n\n function resize() {\n o = r * 3;\n n = dx + o * 2 >> k;\n m = dy + o * 2 >> k;\n return density;\n }\n\n density.x = function (_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), density) : x;\n };\n\n density.y = function (_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), density) : y;\n };\n\n density.weight = function (_) {\n return arguments.length ? (weight = typeof _ === \"function\" ? _ : constant(+_), density) : weight;\n };\n\n density.size = function (_) {\n if (!arguments.length) return [dx, dy];\n\n var _0 = Math.ceil(_[0]),\n _1 = Math.ceil(_[1]);\n\n if (!(_0 >= 0) && !(_0 >= 0)) throw new Error(\"invalid size\");\n return dx = _0, dy = _1, resize();\n };\n\n density.cellSize = function (_) {\n if (!arguments.length) return 1 << k;\n if (!((_ = +_) >= 1)) throw new Error(\"invalid cell size\");\n return k = Math.floor(Math.log(_) / Math.LN2), resize();\n };\n\n density.thresholds = function (_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), density) : threshold;\n };\n\n density.bandwidth = function (_) {\n if (!arguments.length) return Math.sqrt(r * (r + 1));\n if (!((_ = +_) >= 0)) throw new Error(\"invalid bandwidth\");\n return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize();\n };\n\n return density;\n}","export default function (x) {\n return function () {\n return x;\n };\n}","export default function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) {\n this.target = target;\n this.type = type;\n this.subject = subject;\n this.identifier = id;\n this.active = active;\n this.x = x;\n this.y = y;\n this.dx = dx;\n this.dy = dy;\n this._ = dispatch;\n}\n\nDragEvent.prototype.on = function () {\n var value = this._.on.apply(this._, arguments);\n\n return value === this._ ? this : value;\n};","import { dispatch } from \"d3-dispatch\";\nimport { event, customEvent, select, mouse, touch } from \"d3-selection\";\nimport nodrag, { yesdrag } from \"./nodrag.js\";\nimport noevent, { nopropagation } from \"./noevent.js\";\nimport constant from \"./constant.js\";\nimport DragEvent from \"./event.js\"; // Ignore right-click, since that should open the context menu.\n\nfunction defaultFilter() {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultContainer() {\n return this.parentNode;\n}\n\nfunction defaultSubject(d) {\n return d == null ? {\n x: event.x,\n y: event.y\n } : d;\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\n\nexport default function () {\n var filter = defaultFilter,\n container = defaultContainer,\n subject = defaultSubject,\n touchable = defaultTouchable,\n gestures = {},\n listeners = dispatch(\"start\", \"drag\", \"end\"),\n active = 0,\n mousedownx,\n mousedowny,\n mousemoving,\n touchending,\n clickDistance2 = 0;\n\n function drag(selection) {\n selection.on(\"mousedown.drag\", mousedowned).filter(touchable).on(\"touchstart.drag\", touchstarted).on(\"touchmove.drag\", touchmoved).on(\"touchend.drag touchcancel.drag\", touchended).style(\"touch-action\", \"none\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n function mousedowned() {\n if (touchending || !filter.apply(this, arguments)) return;\n var gesture = beforestart(\"mouse\", container.apply(this, arguments), mouse, this, arguments);\n if (!gesture) return;\n select(event.view).on(\"mousemove.drag\", mousemoved, true).on(\"mouseup.drag\", mouseupped, true);\n nodrag(event.view);\n nopropagation();\n mousemoving = false;\n mousedownx = event.clientX;\n mousedowny = event.clientY;\n gesture(\"start\");\n }\n\n function mousemoved() {\n noevent();\n\n if (!mousemoving) {\n var dx = event.clientX - mousedownx,\n dy = event.clientY - mousedowny;\n mousemoving = dx * dx + dy * dy > clickDistance2;\n }\n\n gestures.mouse(\"drag\");\n }\n\n function mouseupped() {\n select(event.view).on(\"mousemove.drag mouseup.drag\", null);\n yesdrag(event.view, mousemoving);\n noevent();\n gestures.mouse(\"end\");\n }\n\n function touchstarted() {\n if (!filter.apply(this, arguments)) return;\n var touches = event.changedTouches,\n c = container.apply(this, arguments),\n n = touches.length,\n i,\n gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = beforestart(touches[i].identifier, c, touch, this, arguments)) {\n nopropagation();\n gesture(\"start\");\n }\n }\n }\n\n function touchmoved() {\n var touches = event.changedTouches,\n n = touches.length,\n i,\n gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n noevent();\n gesture(\"drag\");\n }\n }\n }\n\n function touchended() {\n var touches = event.changedTouches,\n n = touches.length,\n i,\n gesture;\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function () {\n touchending = null;\n }, 500); // Ghost clicks are delayed!\n\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n nopropagation();\n gesture(\"end\");\n }\n }\n }\n\n function beforestart(id, container, point, that, args) {\n var p = point(container, id),\n s,\n dx,\n dy,\n sublisteners = listeners.copy();\n if (!customEvent(new DragEvent(drag, \"beforestart\", s, id, active, p[0], p[1], 0, 0, sublisteners), function () {\n if ((event.subject = s = subject.apply(that, args)) == null) return false;\n dx = s.x - p[0] || 0;\n dy = s.y - p[1] || 0;\n return true;\n })) return;\n return function gesture(type) {\n var p0 = p,\n n;\n\n switch (type) {\n case \"start\":\n gestures[id] = gesture, n = active++;\n break;\n\n case \"end\":\n delete gestures[id], --active;\n // nobreak\n\n case \"drag\":\n p = point(container, id), n = active;\n break;\n }\n\n customEvent(new DragEvent(drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]);\n };\n }\n\n drag.filter = function (_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), drag) : filter;\n };\n\n drag.container = function (_) {\n return arguments.length ? (container = typeof _ === \"function\" ? _ : constant(_), drag) : container;\n };\n\n drag.subject = function (_) {\n return arguments.length ? (subject = typeof _ === \"function\" ? _ : constant(_), drag) : subject;\n };\n\n drag.touchable = function (_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), drag) : touchable;\n };\n\n drag.on = function () {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? drag : value;\n };\n\n drag.clickDistance = function (_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n };\n\n return drag;\n}","var EOL = {},\n EOF = {},\n QUOTE = 34,\n NEWLINE = 10,\n RETURN = 13;\n\nfunction objectConverter(columns) {\n return new Function(\"d\", \"return {\" + columns.map(function (name, i) {\n return JSON.stringify(name) + \": d[\" + i + \"] || \\\"\\\"\";\n }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n var object = objectConverter(columns);\n return function (row, i) {\n return f(object(row), i, columns);\n };\n} // Compute unique columns in order of discovery.\n\n\nfunction inferColumns(rows) {\n var columnSet = Object.create(null),\n columns = [];\n rows.forEach(function (row) {\n for (var column in row) {\n if (!(column in columnSet)) {\n columns.push(columnSet[column] = column);\n }\n }\n });\n return columns;\n}\n\nfunction pad(value, width) {\n var s = value + \"\",\n length = s.length;\n return length < width ? new Array(width - length + 1).join(0) + s : s;\n}\n\nfunction formatYear(year) {\n return year < 0 ? \"-\" + pad(-year, 6) : year > 9999 ? \"+\" + pad(year, 6) : pad(year, 4);\n}\n\nfunction formatDate(date) {\n var hours = date.getUTCHours(),\n minutes = date.getUTCMinutes(),\n seconds = date.getUTCSeconds(),\n milliseconds = date.getUTCMilliseconds();\n return isNaN(date) ? \"Invalid Date\" : formatYear(date.getUTCFullYear(), 4) + \"-\" + pad(date.getUTCMonth() + 1, 2) + \"-\" + pad(date.getUTCDate(), 2) + (milliseconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \".\" + pad(milliseconds, 3) + \"Z\" : seconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \"Z\" : minutes || hours ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \"Z\" : \"\");\n}\n\nexport default function (delimiter) {\n var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n DELIMITER = delimiter.charCodeAt(0);\n\n function parse(text, f) {\n var convert,\n columns,\n rows = parseRows(text, function (row, i) {\n if (convert) return convert(row, i - 1);\n columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n });\n rows.columns = columns || [];\n return rows;\n }\n\n function parseRows(text, f) {\n var rows = [],\n // output rows\n N = text.length,\n I = 0,\n // current character index\n n = 0,\n // current line number\n t,\n // current token\n eof = N <= 0,\n // current token followed by EOF?\n eol = false; // current token followed by EOL?\n // Strip the trailing newline.\n\n if (text.charCodeAt(N - 1) === NEWLINE) --N;\n if (text.charCodeAt(N - 1) === RETURN) --N;\n\n function token() {\n if (eof) return EOF;\n if (eol) return eol = false, EOL; // Unescape quotes.\n\n var i,\n j = I,\n c;\n\n if (text.charCodeAt(j) === QUOTE) {\n while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE) {\n ;\n }\n\n if ((i = I) >= N) eof = true;else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;else if (c === RETURN) {\n eol = true;\n if (text.charCodeAt(I) === NEWLINE) ++I;\n }\n return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n } // Find next delimiter or newline.\n\n\n while (I < N) {\n if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;else if (c === RETURN) {\n eol = true;\n if (text.charCodeAt(I) === NEWLINE) ++I;\n } else if (c !== DELIMITER) continue;\n return text.slice(j, i);\n } // Return last token before EOF.\n\n\n return eof = true, text.slice(j, N);\n }\n\n while ((t = token()) !== EOF) {\n var row = [];\n\n while (t !== EOL && t !== EOF) {\n row.push(t), t = token();\n }\n\n if (f && (row = f(row, n++)) == null) continue;\n rows.push(row);\n }\n\n return rows;\n }\n\n function preformatBody(rows, columns) {\n return rows.map(function (row) {\n return columns.map(function (column) {\n return formatValue(row[column]);\n }).join(delimiter);\n });\n }\n\n function format(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join(\"\\n\");\n }\n\n function formatBody(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return preformatBody(rows, columns).join(\"\\n\");\n }\n\n function formatRows(rows) {\n return rows.map(formatRow).join(\"\\n\");\n }\n\n function formatRow(row) {\n return row.map(formatValue).join(delimiter);\n }\n\n function formatValue(value) {\n return value == null ? \"\" : value instanceof Date ? formatDate(value) : reFormat.test(value += \"\") ? \"\\\"\" + value.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\" : value;\n }\n\n return {\n parse: parse,\n parseRows: parseRows,\n format: format,\n formatBody: formatBody,\n formatRows: formatRows,\n formatRow: formatRow,\n formatValue: formatValue\n };\n}","import dsv from \"./dsv.js\";\nvar csv = dsv(\",\");\nexport var csvParse = csv.parse;\nexport var csvParseRows = csv.parseRows;\nexport var csvFormat = csv.format;\nexport var csvFormatBody = csv.formatBody;\nexport var csvFormatRows = csv.formatRows;\nexport var csvFormatRow = csv.formatRow;\nexport var csvFormatValue = csv.formatValue;","import dsv from \"./dsv.js\";\nvar tsv = dsv(\"\\t\");\nexport var tsvParse = tsv.parse;\nexport var tsvParseRows = tsv.parseRows;\nexport var tsvFormat = tsv.format;\nexport var tsvFormatBody = tsv.formatBody;\nexport var tsvFormatRows = tsv.formatRows;\nexport var tsvFormatRow = tsv.formatRow;\nexport var tsvFormatValue = tsv.formatValue;","export default function autoType(object) {\n for (var key in object) {\n var value = object[key].trim(),\n number,\n m;\n if (!value) value = null;else if (value === \"true\") value = true;else if (value === \"false\") value = false;else if (value === \"NaN\") value = NaN;else if (!isNaN(number = +value)) value = number;else if (m = value.match(/^([-+]\\d{2})?\\d{4}(-\\d{2}(-\\d{2})?)?(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{3})?)?(Z|[-+]\\d{2}:\\d{2})?)?$/)) {\n if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, \"/\").replace(/T/, \" \");\n value = new Date(value);\n } else continue;\n object[key] = value;\n }\n\n return object;\n} // https://github.com/d3/d3-dsv/issues/45\n\nvar fixtz = new Date(\"2019-01-01T00:00\").getHours() || new Date(\"2019-07-01T00:00\").getHours();","export function linear(t) {\n return +t;\n}","export function quadIn(t) {\n return t * t;\n}\nexport function quadOut(t) {\n return t * (2 - t);\n}\nexport function quadInOut(t) {\n return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;\n}","var exponent = 3;\nexport var polyIn = function custom(e) {\n e = +e;\n\n function polyIn(t) {\n return Math.pow(t, e);\n }\n\n polyIn.exponent = custom;\n return polyIn;\n}(exponent);\nexport var polyOut = function custom(e) {\n e = +e;\n\n function polyOut(t) {\n return 1 - Math.pow(1 - t, e);\n }\n\n polyOut.exponent = custom;\n return polyOut;\n}(exponent);\nexport var polyInOut = function custom(e) {\n e = +e;\n\n function polyInOut(t) {\n return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n }\n\n polyInOut.exponent = custom;\n return polyInOut;\n}(exponent);","var pi = Math.PI,\n halfPi = pi / 2;\nexport function sinIn(t) {\n return +t === 1 ? 1 : 1 - Math.cos(t * halfPi);\n}\nexport function sinOut(t) {\n return Math.sin(t * halfPi);\n}\nexport function sinInOut(t) {\n return (1 - Math.cos(pi * t)) / 2;\n}","// tpmt is two power minus ten times t scaled to [0,1]\nexport function tpmt(x) {\n return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;\n}","import { tpmt } from \"./math.js\";\nexport function expIn(t) {\n return tpmt(1 - +t);\n}\nexport function expOut(t) {\n return 1 - tpmt(t);\n}\nexport function expInOut(t) {\n return ((t *= 2) <= 1 ? tpmt(1 - t) : 2 - tpmt(t - 1)) / 2;\n}","export function circleIn(t) {\n return 1 - Math.sqrt(1 - t * t);\n}\nexport function circleOut(t) {\n return Math.sqrt(1 - --t * t);\n}\nexport function circleInOut(t) {\n return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\n}","var b1 = 4 / 11,\n b2 = 6 / 11,\n b3 = 8 / 11,\n b4 = 3 / 4,\n b5 = 9 / 11,\n b6 = 10 / 11,\n b7 = 15 / 16,\n b8 = 21 / 22,\n b9 = 63 / 64,\n b0 = 1 / b1 / b1;\nexport function bounceIn(t) {\n return 1 - bounceOut(1 - t);\n}\nexport function bounceOut(t) {\n return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\n}\nexport function bounceInOut(t) {\n return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}","var overshoot = 1.70158;\nexport var backIn = function custom(s) {\n s = +s;\n\n function backIn(t) {\n return (t = +t) * t * (s * (t - 1) + t);\n }\n\n backIn.overshoot = custom;\n return backIn;\n}(overshoot);\nexport var backOut = function custom(s) {\n s = +s;\n\n function backOut(t) {\n return --t * t * ((t + 1) * s + t) + 1;\n }\n\n backOut.overshoot = custom;\n return backOut;\n}(overshoot);\nexport var backInOut = function custom(s) {\n s = +s;\n\n function backInOut(t) {\n return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n }\n\n backInOut.overshoot = custom;\n return backInOut;\n}(overshoot);","import { tpmt } from \"./math.js\";\nvar tau = 2 * Math.PI,\n amplitude = 1,\n period = 0.3;\nexport var elasticIn = function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticIn(t) {\n return a * tpmt(- --t) * Math.sin((s - t) / p);\n }\n\n elasticIn.amplitude = function (a) {\n return custom(a, p * tau);\n };\n\n elasticIn.period = function (p) {\n return custom(a, p);\n };\n\n return elasticIn;\n}(amplitude, period);\nexport var elasticOut = function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticOut(t) {\n return 1 - a * tpmt(t = +t) * Math.sin((t + s) / p);\n }\n\n elasticOut.amplitude = function (a) {\n return custom(a, p * tau);\n };\n\n elasticOut.period = function (p) {\n return custom(a, p);\n };\n\n return elasticOut;\n}(amplitude, period);\nexport var elasticInOut = function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticInOut(t) {\n return ((t = t * 2 - 1) < 0 ? a * tpmt(-t) * Math.sin((s - t) / p) : 2 - a * tpmt(t) * Math.sin((s + t) / p)) / 2;\n }\n\n elasticInOut.amplitude = function (a) {\n return custom(a, p * tau);\n };\n\n elasticInOut.period = function (p) {\n return custom(a, p);\n };\n\n return elasticInOut;\n}(amplitude, period);","function responseBlob(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n return response.blob();\n}\n\nexport default function (input, init) {\n return fetch(input, init).then(responseBlob);\n}","function responseArrayBuffer(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n return response.arrayBuffer();\n}\n\nexport default function (input, init) {\n return fetch(input, init).then(responseArrayBuffer);\n}","function responseText(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n return response.text();\n}\n\nexport default function (input, init) {\n return fetch(input, init).then(responseText);\n}","import { csvParse, dsvFormat, tsvParse } from \"d3-dsv\";\nimport text from \"./text.js\";\n\nfunction dsvParse(parse) {\n return function (input, init, row) {\n if (arguments.length === 2 && typeof init === \"function\") row = init, init = undefined;\n return text(input, init).then(function (response) {\n return parse(response, row);\n });\n };\n}\n\nexport default function dsv(delimiter, input, init, row) {\n if (arguments.length === 3 && typeof init === \"function\") row = init, init = undefined;\n var format = dsvFormat(delimiter);\n return text(input, init).then(function (response) {\n return format.parse(response, row);\n });\n}\nexport var csv = dsvParse(csvParse);\nexport var tsv = dsvParse(tsvParse);","export default function (input, init) {\n return new Promise(function (resolve, reject) {\n var image = new Image();\n\n for (var key in init) {\n image[key] = init[key];\n }\n\n image.onerror = reject;\n\n image.onload = function () {\n resolve(image);\n };\n\n image.src = input;\n });\n}","function responseJson(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n if (response.status === 204 || response.status === 205) return;\n return response.json();\n}\n\nexport default function (input, init) {\n return fetch(input, init).then(responseJson);\n}","import text from \"./text.js\";\n\nfunction parser(type) {\n return function (input, init) {\n return text(input, init).then(function (text) {\n return new DOMParser().parseFromString(text, type);\n });\n };\n}\n\nexport default parser(\"application/xml\");\nexport var html = parser(\"text/html\");\nexport var svg = parser(\"image/svg+xml\");","export default function (x, y) {\n var nodes;\n if (x == null) x = 0;\n if (y == null) y = 0;\n\n function force() {\n var i,\n n = nodes.length,\n node,\n sx = 0,\n sy = 0;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i], sx += node.x, sy += node.y;\n }\n\n for (sx = sx / n - x, sy = sy / n - y, i = 0; i < n; ++i) {\n node = nodes[i], node.x -= sx, node.y -= sy;\n }\n }\n\n force.initialize = function (_) {\n nodes = _;\n };\n\n force.x = function (_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function (_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n return force;\n}","export default function (x) {\n return function () {\n return x;\n };\n}","export default function () {\n return (Math.random() - 0.5) * 1e-6;\n}","export default function (d) {\n var x = +this._x.call(null, d),\n y = +this._y.call(null, d);\n return add(this.cover(x, y), x, y, d);\n}\n\nfunction add(tree, x, y, d) {\n if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {\n data: d\n },\n x0 = tree._x0,\n y0 = tree._y0,\n x1 = tree._x1,\n y1 = tree._y1,\n xm,\n ym,\n xp,\n yp,\n right,\n bottom,\n i,\n j; // If the tree is empty, initialize the root as a leaf.\n\n if (!node) return tree._root = leaf, tree; // Find the existing leaf for the new point, or add it.\n\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm;else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym;else y1 = ym;\n if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n } // Is the new point is exactly coincident with the existing point?\n\n\n xp = +tree._x.call(null, node.data);\n yp = +tree._y.call(null, node.data);\n if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; // Otherwise, split the leaf node until the old and new point are separated.\n\n do {\n parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm;else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym;else y1 = ym;\n } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | xp >= xm));\n\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var d,\n i,\n n = data.length,\n x,\n y,\n xz = new Array(n),\n yz = new Array(n),\n x0 = Infinity,\n y0 = Infinity,\n x1 = -Infinity,\n y1 = -Infinity; // Compute the points and their extent.\n\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n xz[i] = x;\n yz[i] = y;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n } // If there were no (valid) points, abort.\n\n\n if (x0 > x1 || y0 > y1) return this; // Expand the tree to cover the new points.\n\n this.cover(x0, y0).cover(x1, y1); // Add the new points.\n\n for (i = 0; i < n; ++i) {\n add(this, xz[i], yz[i], data[i]);\n }\n\n return this;\n}","export default function (x, y) {\n if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n var x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1; // If the quadtree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing quadrant boundaries don’t change due to floating point error!\n\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n y1 = (y0 = Math.floor(y)) + 1;\n } // Otherwise, double repeatedly to cover.\n else {\n var z = x1 - x0,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n i = (y < y0) << 1 | x < x0;\n parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n\n switch (i) {\n case 0:\n x1 = x0 + z, y1 = y0 + z;\n break;\n\n case 1:\n x0 = x1 - z, y1 = y0 + z;\n break;\n\n case 2:\n x1 = x0 + z, y0 = y1 - z;\n break;\n\n case 3:\n x0 = x1 - z, y0 = y1 - z;\n break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n return this;\n}","export default function (node, x0, y0, x1, y1) {\n this.node = node;\n this.x0 = x0;\n this.y0 = y0;\n this.x1 = x1;\n this.y1 = y1;\n}","export function defaultX(d) {\n return d[0];\n}\nexport default function (_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}","export function defaultY(d) {\n return d[1];\n}\nexport default function (_) {\n return arguments.length ? (this._y = _, this) : this._y;\n}","import tree_add, { addAll as tree_addAll } from \"./add.js\";\nimport tree_cover from \"./cover.js\";\nimport tree_data from \"./data.js\";\nimport tree_extent from \"./extent.js\";\nimport tree_find from \"./find.js\";\nimport tree_remove, { removeAll as tree_removeAll } from \"./remove.js\";\nimport tree_root from \"./root.js\";\nimport tree_size from \"./size.js\";\nimport tree_visit from \"./visit.js\";\nimport tree_visitAfter from \"./visitAfter.js\";\nimport tree_x, { defaultX } from \"./x.js\";\nimport tree_y, { defaultY } from \"./y.js\";\nexport default function quadtree(nodes, x, y) {\n var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n this._x = x;\n this._y = y;\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {\n data: leaf.data\n },\n next = copy;\n\n while (leaf = leaf.next) {\n next = next.next = {\n data: leaf.data\n };\n }\n\n return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function () {\n var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n node = this._root,\n nodes,\n child;\n if (!node) return copy;\n if (!node.length) return copy._root = leaf_copy(node), copy;\n nodes = [{\n source: node,\n target: copy._root = new Array(4)\n }];\n\n while (node = nodes.pop()) {\n for (var i = 0; i < 4; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({\n source: child,\n target: node.target[i] = new Array(4)\n });else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;","import constant from \"./constant\";\nimport jiggle from \"./jiggle\";\nimport { quadtree } from \"d3-quadtree\";\n\nfunction x(d) {\n return d.x + d.vx;\n}\n\nfunction y(d) {\n return d.y + d.vy;\n}\n\nexport default function (radius) {\n var nodes,\n radii,\n strength = 1,\n iterations = 1;\n if (typeof radius !== \"function\") radius = constant(radius == null ? 1 : +radius);\n\n function force() {\n var i,\n n = nodes.length,\n tree,\n node,\n xi,\n yi,\n ri,\n ri2;\n\n for (var k = 0; k < iterations; ++k) {\n tree = quadtree(nodes, x, y).visitAfter(prepare);\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n ri = radii[node.index], ri2 = ri * ri;\n xi = node.x + node.vx;\n yi = node.y + node.vy;\n tree.visit(apply);\n }\n }\n\n function apply(quad, x0, y0, x1, y1) {\n var data = quad.data,\n rj = quad.r,\n r = ri + rj;\n\n if (data) {\n if (data.index > node.index) {\n var x = xi - data.x - data.vx,\n y = yi - data.y - data.vy,\n l = x * x + y * y;\n\n if (l < r * r) {\n if (x === 0) x = jiggle(), l += x * x;\n if (y === 0) y = jiggle(), l += y * y;\n l = (r - (l = Math.sqrt(l))) / l * strength;\n node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));\n node.vy += (y *= l) * r;\n data.vx -= x * (r = 1 - r);\n data.vy -= y * r;\n }\n }\n\n return;\n }\n\n return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;\n }\n }\n\n function prepare(quad) {\n if (quad.data) return quad.r = radii[quad.data.index];\n\n for (var i = quad.r = 0; i < 4; ++i) {\n if (quad[i] && quad[i].r > quad.r) {\n quad.r = quad[i].r;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i,\n n = nodes.length,\n node;\n radii = new Array(n);\n\n for (i = 0; i < n; ++i) {\n node = nodes[i], radii[node.index] = +radius(node, i, nodes);\n }\n }\n\n force.initialize = function (_) {\n nodes = _;\n initialize();\n };\n\n force.iterations = function (_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function (_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n force.radius = function (_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n return force;\n}","export default function () {\n var data = [];\n this.visit(function (node) {\n if (!node.length) do {\n data.push(node.data);\n } while (node = node.next);\n });\n return data;\n}","export default function (_) {\n return arguments.length ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n}","import Quad from \"./quad.js\";\nexport default function (x, y, radius) {\n var data,\n x0 = this._x0,\n y0 = this._y0,\n x1,\n y1,\n x2,\n y2,\n x3 = this._x1,\n y3 = this._y1,\n quads = [],\n node = this._root,\n q,\n i;\n if (node) quads.push(new Quad(node, x0, y0, x3, y3));\n if (radius == null) radius = Infinity;else {\n x0 = x - radius, y0 = y - radius;\n x3 = x + radius, y3 = y + radius;\n radius *= radius;\n }\n\n while (q = quads.pop()) {\n // Stop searching if this quadrant can’t contain a closer node.\n if (!(node = q.node) || (x1 = q.x0) > x3 || (y1 = q.y0) > y3 || (x2 = q.x1) < x0 || (y2 = q.y1) < y0) continue; // Bisect the current quadrant.\n\n if (node.length) {\n var xm = (x1 + x2) / 2,\n ym = (y1 + y2) / 2;\n quads.push(new Quad(node[3], xm, ym, x2, y2), new Quad(node[2], x1, ym, xm, y2), new Quad(node[1], xm, y1, x2, ym), new Quad(node[0], x1, y1, xm, ym)); // Visit the closest quadrant first.\n\n if (i = (y >= ym) << 1 | x >= xm) {\n q = quads[quads.length - 1];\n quads[quads.length - 1] = quads[quads.length - 1 - i];\n quads[quads.length - 1 - i] = q;\n }\n } // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var dx = x - +this._x.call(null, node.data),\n dy = y - +this._y.call(null, node.data),\n d2 = dx * dx + dy * dy;\n\n if (d2 < radius) {\n var d = Math.sqrt(radius = d2);\n x0 = x - d, y0 = y - d;\n x3 = x + d, y3 = y + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}","export default function (d) {\n if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1,\n x,\n y,\n xm,\n ym,\n right,\n bottom,\n i,\n j; // If the tree is empty, initialize the root as a leaf.\n\n if (!node) return this; // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm;else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym;else y1 = ym;\n if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n if (!node.length) break;\n if (parent[i + 1 & 3] || parent[i + 2 & 3] || parent[i + 3 & 3]) retainer = parent, j = i;\n } // Find the point to remove.\n\n while (node.data !== d) {\n if (!(previous = node, node = node.next)) return this;\n }\n\n if (next = node.next) delete node.next; // If there are multiple coincident points, remove just the point.\n\n if (previous) return next ? previous.next = next : delete previous.next, this; // If this is the root point, remove it.\n\n if (!parent) return this._root = next, this; // Remove this leaf.\n\n next ? parent[i] = next : delete parent[i]; // If the parent now contains exactly one leaf, collapse superfluous parents.\n\n if ((node = parent[0] || parent[1] || parent[2] || parent[3]) && node === (parent[3] || parent[2] || parent[1] || parent[0]) && !node.length) {\n if (retainer) retainer[j] = node;else this._root = node;\n }\n\n return this;\n}\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) {\n this.remove(data[i]);\n }\n\n return this;\n}","export default function () {\n return this._root;\n}","export default function () {\n var size = 0;\n this.visit(function (node) {\n if (!node.length) do {\n ++size;\n } while (node = node.next);\n });\n return size;\n}","import Quad from \"./quad.js\";\nexport default function (callback) {\n var quads = [],\n q,\n node = this._root,\n child,\n x0,\n y0,\n x1,\n y1;\n if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));\n\n while (q = quads.pop()) {\n if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n var xm = (x0 + x1) / 2,\n ym = (y0 + y1) / 2;\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n }\n }\n\n return this;\n}","import Quad from \"./quad.js\";\nexport default function (callback) {\n var quads = [],\n next = [],\n q;\n if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));\n\n while (q = quads.pop()) {\n var node = q.node;\n\n if (node.length) {\n var child,\n x0 = q.x0,\n y0 = q.y0,\n x1 = q.x1,\n y1 = q.y1,\n xm = (x0 + x1) / 2,\n ym = (y0 + y1) / 2;\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n }\n\n next.push(q);\n }\n\n while (q = next.pop()) {\n callback(q.node, q.x0, q.y0, q.x1, q.y1);\n }\n\n return this;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport constant from \"./constant\";\nimport jiggle from \"./jiggle\";\nimport { map } from \"d3-collection\";\n\nfunction index(d) {\n return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n var node = nodeById.get(nodeId);\n if (!node) throw new Error(\"missing: \" + nodeId);\n return node;\n}\n\nexport default function (links) {\n var id = index,\n strength = defaultStrength,\n strengths,\n distance = constant(30),\n distances,\n nodes,\n count,\n bias,\n iterations = 1;\n if (links == null) links = [];\n\n function defaultStrength(link) {\n return 1 / Math.min(count[link.source.index], count[link.target.index]);\n }\n\n function force(alpha) {\n for (var k = 0, n = links.length; k < iterations; ++k) {\n for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {\n link = links[i], source = link.source, target = link.target;\n x = target.x + target.vx - source.x - source.vx || jiggle();\n y = target.y + target.vy - source.y - source.vy || jiggle();\n l = Math.sqrt(x * x + y * y);\n l = (l - distances[i]) / l * alpha * strengths[i];\n x *= l, y *= l;\n target.vx -= x * (b = bias[i]);\n target.vy -= y * b;\n source.vx += x * (b = 1 - b);\n source.vy += y * b;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i,\n n = nodes.length,\n m = links.length,\n nodeById = map(nodes, id),\n link;\n\n for (i = 0, count = new Array(n); i < m; ++i) {\n link = links[i], link.index = i;\n if (_typeof(link.source) !== \"object\") link.source = find(nodeById, link.source);\n if (_typeof(link.target) !== \"object\") link.target = find(nodeById, link.target);\n count[link.source.index] = (count[link.source.index] || 0) + 1;\n count[link.target.index] = (count[link.target.index] || 0) + 1;\n }\n\n for (i = 0, bias = new Array(m); i < m; ++i) {\n link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n }\n\n strengths = new Array(m), initializeStrength();\n distances = new Array(m), initializeDistance();\n }\n\n function initializeStrength() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n strengths[i] = +strength(links[i], i, links);\n }\n }\n\n function initializeDistance() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n distances[i] = +distance(links[i], i, links);\n }\n }\n\n force.initialize = function (_) {\n nodes = _;\n initialize();\n };\n\n force.links = function (_) {\n return arguments.length ? (links = _, initialize(), force) : links;\n };\n\n force.id = function (_) {\n return arguments.length ? (id = _, force) : id;\n };\n\n force.iterations = function (_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function (_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initializeStrength(), force) : strength;\n };\n\n force.distance = function (_) {\n return arguments.length ? (distance = typeof _ === \"function\" ? _ : constant(+_), initializeDistance(), force) : distance;\n };\n\n return force;\n}","import { dispatch } from \"d3-dispatch\";\nimport { map } from \"d3-collection\";\nimport { timer } from \"d3-timer\";\nexport function x(d) {\n return d.x;\n}\nexport function y(d) {\n return d.y;\n}\nvar initialRadius = 10,\n initialAngle = Math.PI * (3 - Math.sqrt(5));\nexport default function (_nodes) {\n var simulation,\n _alpha = 1,\n _alphaMin = 0.001,\n _alphaDecay = 1 - Math.pow(_alphaMin, 1 / 300),\n _alphaTarget = 0,\n _velocityDecay = 0.6,\n forces = map(),\n stepper = timer(step),\n event = dispatch(\"tick\", \"end\");\n\n if (_nodes == null) _nodes = [];\n\n function step() {\n tick();\n event.call(\"tick\", simulation);\n\n if (_alpha < _alphaMin) {\n stepper.stop();\n event.call(\"end\", simulation);\n }\n }\n\n function tick(iterations) {\n var i,\n n = _nodes.length,\n node;\n if (iterations === undefined) iterations = 1;\n\n for (var k = 0; k < iterations; ++k) {\n _alpha += (_alphaTarget - _alpha) * _alphaDecay;\n forces.each(function (force) {\n force(_alpha);\n });\n\n for (i = 0; i < n; ++i) {\n node = _nodes[i];\n if (node.fx == null) node.x += node.vx *= _velocityDecay;else node.x = node.fx, node.vx = 0;\n if (node.fy == null) node.y += node.vy *= _velocityDecay;else node.y = node.fy, node.vy = 0;\n }\n }\n\n return simulation;\n }\n\n function initializeNodes() {\n for (var i = 0, n = _nodes.length, node; i < n; ++i) {\n node = _nodes[i], node.index = i;\n if (node.fx != null) node.x = node.fx;\n if (node.fy != null) node.y = node.fy;\n\n if (isNaN(node.x) || isNaN(node.y)) {\n var radius = initialRadius * Math.sqrt(i),\n angle = i * initialAngle;\n node.x = radius * Math.cos(angle);\n node.y = radius * Math.sin(angle);\n }\n\n if (isNaN(node.vx) || isNaN(node.vy)) {\n node.vx = node.vy = 0;\n }\n }\n }\n\n function initializeForce(force) {\n if (force.initialize) force.initialize(_nodes);\n return force;\n }\n\n initializeNodes();\n return simulation = {\n tick: tick,\n restart: function restart() {\n return stepper.restart(step), simulation;\n },\n stop: function stop() {\n return stepper.stop(), simulation;\n },\n nodes: function nodes(_) {\n return arguments.length ? (_nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : _nodes;\n },\n alpha: function alpha(_) {\n return arguments.length ? (_alpha = +_, simulation) : _alpha;\n },\n alphaMin: function alphaMin(_) {\n return arguments.length ? (_alphaMin = +_, simulation) : _alphaMin;\n },\n alphaDecay: function alphaDecay(_) {\n return arguments.length ? (_alphaDecay = +_, simulation) : +_alphaDecay;\n },\n alphaTarget: function alphaTarget(_) {\n return arguments.length ? (_alphaTarget = +_, simulation) : _alphaTarget;\n },\n velocityDecay: function velocityDecay(_) {\n return arguments.length ? (_velocityDecay = 1 - _, simulation) : 1 - _velocityDecay;\n },\n force: function force(name, _) {\n return arguments.length > 1 ? (_ == null ? forces.remove(name) : forces.set(name, initializeForce(_)), simulation) : forces.get(name);\n },\n find: function find(x, y, radius) {\n var i = 0,\n n = _nodes.length,\n dx,\n dy,\n d2,\n node,\n closest;\n if (radius == null) radius = Infinity;else radius *= radius;\n\n for (i = 0; i < n; ++i) {\n node = _nodes[i];\n dx = x - node.x;\n dy = y - node.y;\n d2 = dx * dx + dy * dy;\n if (d2 < radius) closest = node, radius = d2;\n }\n\n return closest;\n },\n on: function on(name, _) {\n return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n }\n };\n}","import constant from \"./constant\";\nimport jiggle from \"./jiggle\";\nimport { quadtree } from \"d3-quadtree\";\nimport { x, y } from \"./simulation\";\nexport default function () {\n var nodes,\n node,\n alpha,\n strength = constant(-30),\n strengths,\n distanceMin2 = 1,\n distanceMax2 = Infinity,\n theta2 = 0.81;\n\n function force(_) {\n var i,\n n = nodes.length,\n tree = quadtree(nodes, x, y).visitAfter(accumulate);\n\n for (alpha = _, i = 0; i < n; ++i) {\n node = nodes[i], tree.visit(apply);\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i,\n n = nodes.length,\n node;\n strengths = new Array(n);\n\n for (i = 0; i < n; ++i) {\n node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n }\n }\n\n function accumulate(quad) {\n var strength = 0,\n q,\n c,\n weight = 0,\n x,\n y,\n i; // For internal nodes, accumulate forces from child quadrants.\n\n if (quad.length) {\n for (x = y = i = 0; i < 4; ++i) {\n if ((q = quad[i]) && (c = Math.abs(q.value))) {\n strength += q.value, weight += c, x += c * q.x, y += c * q.y;\n }\n }\n\n quad.x = x / weight;\n quad.y = y / weight;\n } // For leaf nodes, accumulate forces from coincident quadrants.\n else {\n q = quad;\n q.x = q.data.x;\n q.y = q.data.y;\n\n do {\n strength += strengths[q.data.index];\n } while (q = q.next);\n }\n\n quad.value = strength;\n }\n\n function apply(quad, x1, _, x2) {\n if (!quad.value) return true;\n var x = quad.x - node.x,\n y = quad.y - node.y,\n w = x2 - x1,\n l = x * x + y * y; // Apply the Barnes-Hut approximation if possible.\n // Limit forces for very close nodes; randomize direction if coincident.\n\n if (w * w / theta2 < l) {\n if (l < distanceMax2) {\n if (x === 0) x = jiggle(), l += x * x;\n if (y === 0) y = jiggle(), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n node.vx += x * quad.value * alpha / l;\n node.vy += y * quad.value * alpha / l;\n }\n\n return true;\n } // Otherwise, process points directly.\n else if (quad.length || l >= distanceMax2) return; // Limit forces for very close nodes; randomize direction if coincident.\n\n\n if (quad.data !== node || quad.next) {\n if (x === 0) x = jiggle(), l += x * x;\n if (y === 0) y = jiggle(), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n }\n\n do {\n if (quad.data !== node) {\n w = strengths[quad.data.index] * alpha / l;\n node.vx += x * w;\n node.vy += y * w;\n }\n } while (quad = quad.next);\n }\n\n force.initialize = function (_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function (_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.distanceMin = function (_) {\n return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n };\n\n force.distanceMax = function (_) {\n return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n };\n\n force.theta = function (_) {\n return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n };\n\n return force;\n}","import constant from \"./constant\";\nexport default function (radius, x, y) {\n var nodes,\n strength = constant(0.1),\n strengths,\n radiuses;\n if (typeof radius !== \"function\") radius = constant(+radius);\n if (x == null) x = 0;\n if (y == null) y = 0;\n\n function force(alpha) {\n for (var i = 0, n = nodes.length; i < n; ++i) {\n var node = nodes[i],\n dx = node.x - x || 1e-6,\n dy = node.y - y || 1e-6,\n r = Math.sqrt(dx * dx + dy * dy),\n k = (radiuses[i] - r) * strengths[i] * alpha / r;\n node.vx += dx * k;\n node.vy += dy * k;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i,\n n = nodes.length;\n strengths = new Array(n);\n radiuses = new Array(n);\n\n for (i = 0; i < n; ++i) {\n radiuses[i] = +radius(nodes[i], i, nodes);\n strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function (_) {\n nodes = _, initialize();\n };\n\n force.strength = function (_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.radius = function (_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n force.x = function (_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function (_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n return force;\n}","import constant from \"./constant\";\nexport default function (x) {\n var strength = constant(0.1),\n nodes,\n strengths,\n xz;\n if (typeof x !== \"function\") x = constant(x == null ? 0 : +x);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i,\n n = nodes.length;\n strengths = new Array(n);\n xz = new Array(n);\n\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function (_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function (_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.x = function (_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : x;\n };\n\n return force;\n}","import constant from \"./constant\";\nexport default function (y) {\n var strength = constant(0.1),\n nodes,\n strengths,\n yz;\n if (typeof y !== \"function\") y = constant(y == null ? 0 : +y);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i,\n n = nodes.length;\n strengths = new Array(n);\n yz = new Array(n);\n\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function (_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function (_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.y = function (_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : y;\n };\n\n return force;\n}","export default function (x) {\n return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString(\"en\").replace(/,/g, \"\") : x.toString(10);\n} // Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\n\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\n var i,\n coefficient = x.slice(0, i); // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\n return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport default function (x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function () {\n return this.fill + this.align + this.sign + this.symbol + (this.zero ? \"0\" : \"\") + (this.width === undefined ? \"\" : Math.max(1, this.width | 0)) + (this.comma ? \",\" : \"\") + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0)) + (this.trim ? \"~\" : \"\") + this.type;\n};","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function (s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\":\n i0 = i1 = i;\n break;\n\n case \"0\":\n if (i0 === 0) i0 = i;\n i1 = i;\n break;\n\n default:\n if (!+s[i]) break out;\n if (i0 > 0) i0 = 0;\n break;\n }\n }\n\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport var prefixExponent;\nexport default function (x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join(\"0\") : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i) : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}","import formatLocale from \"./locale.js\";\nvar locale;\nexport var format;\nexport var formatPrefix;\ndefaultLocale({\n decimal: \".\",\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"],\n minus: \"-\"\n});\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport default function (x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\nexport default {\n \"%\": function _(x, p) {\n return (x * 100).toFixed(p);\n },\n \"b\": function b(x) {\n return Math.round(x).toString(2);\n },\n \"c\": function c(x) {\n return x + \"\";\n },\n \"d\": formatDecimal,\n \"e\": function e(x, p) {\n return x.toExponential(p);\n },\n \"f\": function f(x, p) {\n return x.toFixed(p);\n },\n \"g\": function g(x, p) {\n return x.toPrecision(p);\n },\n \"o\": function o(x) {\n return Math.round(x).toString(8);\n },\n \"p\": function p(x, _p) {\n return formatRounded(x * 100, _p);\n },\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": function X(x) {\n return Math.round(x).toString(16).toUpperCase();\n },\n \"x\": function x(_x) {\n return Math.round(_x).toString(16);\n }\n};","export default function (x) {\n return x;\n}","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport { prefixExponent } from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\nvar map = Array.prototype.map,\n prefixes = [\"y\", \"z\", \"a\", \"f\", \"p\", \"n\", \"µ\", \"m\", \"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\", \"Z\", \"Y\"];\nexport default function (locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"-\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type; // The \"n\" type is an alias for \",g\".\n\n if (type === \"n\") comma = true, type = \"g\"; // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\"; // If zero fill is specified, padding goes after sign and before digits.\n\n if (zero || fill === \"0\" && align === \"=\") zero = true, fill = \"0\", align = \"=\"; // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\"; // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type); // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n\n precision = precision === undefined ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i,\n n,\n c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value; // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n\n var valueNegative = value < 0 || 1 / value < 0; // Perform the initial formatting.\n\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision); // Trim insignificant zeros.\n\n if (trim) value = formatTrim(value); // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false; // Compute the prefix and suffix.\n\n valuePrefix = (valueNegative ? sign === \"(\" ? sign : minus : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\"); // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n\n if (maybeSuffix) {\n i = -1, n = value.length;\n\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n } // If the fill character is not \"0\", grouping is applied before padding.\n\n\n if (comma && !zero) value = group(value, Infinity); // Compute the padding.\n\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\"; // If the fill character is \"0\", grouping is applied after padding.\n\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\"; // Reconstruct the final output based on the desired alignment.\n\n switch (align) {\n case \"<\":\n value = valuePrefix + value + valueSuffix + padding;\n break;\n\n case \"=\":\n value = valuePrefix + padding + value + valueSuffix;\n break;\n\n case \"^\":\n value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);\n break;\n\n default:\n value = padding + valuePrefix + value + valueSuffix;\n break;\n }\n\n return numerals(value);\n }\n\n format.toString = function () {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function (value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}","export default function (grouping, thousands) {\n return function (value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}","export default function (numerals) {\n return function (value) {\n return value.replace(/[0-9]/g, function (i) {\n return numerals[+i];\n });\n };\n}","import exponent from \"./exponent.js\";\nexport default function (step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}","import exponent from \"./exponent.js\";\nexport default function (step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}","import exponent from \"./exponent.js\";\nexport default function (step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}","// Adds floating point numbers with twice the normal precision.\n// Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and\n// Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3)\n// 305–363 (1997).\n// Code adapted from GeographicLib by Charles F. F. Karney,\n// http://geographiclib.sourceforge.net/\nexport default function () {\n return new Adder();\n}\n\nfunction Adder() {\n this.reset();\n}\n\nAdder.prototype = {\n constructor: Adder,\n reset: function reset() {\n this.s = // rounded value\n this.t = 0; // exact error\n },\n add: function add(y) {\n _add(temp, y, this.t);\n\n _add(this, temp.s, this.s);\n\n if (this.s) this.t += temp.t;else this.s = temp.t;\n },\n valueOf: function valueOf() {\n return this.s;\n }\n};\nvar temp = new Adder();\n\nfunction _add(adder, a, b) {\n var x = adder.s = a + b,\n bv = x - a,\n av = x - bv;\n adder.t = a - av + (b - bv);\n}","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function (x) {\n return x > 0 ? 1 : x < 0 ? -1 : 0;\n};\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\nexport function asin(x) {\n return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\nexport function haversin(x) {\n return (x = sin(x / 2)) * x;\n}","export default function noop() {}","function streamGeometry(geometry, stream) {\n if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n streamGeometryType[geometry.type](geometry, stream);\n }\n}\n\nvar streamObjectType = {\n Feature: function Feature(object, stream) {\n streamGeometry(object.geometry, stream);\n },\n FeatureCollection: function FeatureCollection(object, stream) {\n var features = object.features,\n i = -1,\n n = features.length;\n\n while (++i < n) {\n streamGeometry(features[i].geometry, stream);\n }\n }\n};\nvar streamGeometryType = {\n Sphere: function Sphere(object, stream) {\n stream.sphere();\n },\n Point: function Point(object, stream) {\n object = object.coordinates;\n stream.point(object[0], object[1], object[2]);\n },\n MultiPoint: function MultiPoint(object, stream) {\n var coordinates = object.coordinates,\n i = -1,\n n = coordinates.length;\n\n while (++i < n) {\n object = coordinates[i], stream.point(object[0], object[1], object[2]);\n }\n },\n LineString: function LineString(object, stream) {\n streamLine(object.coordinates, stream, 0);\n },\n MultiLineString: function MultiLineString(object, stream) {\n var coordinates = object.coordinates,\n i = -1,\n n = coordinates.length;\n\n while (++i < n) {\n streamLine(coordinates[i], stream, 0);\n }\n },\n Polygon: function Polygon(object, stream) {\n streamPolygon(object.coordinates, stream);\n },\n MultiPolygon: function MultiPolygon(object, stream) {\n var coordinates = object.coordinates,\n i = -1,\n n = coordinates.length;\n\n while (++i < n) {\n streamPolygon(coordinates[i], stream);\n }\n },\n GeometryCollection: function GeometryCollection(object, stream) {\n var geometries = object.geometries,\n i = -1,\n n = geometries.length;\n\n while (++i < n) {\n streamGeometry(geometries[i], stream);\n }\n }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n var i = -1,\n n = coordinates.length - closed,\n coordinate;\n stream.lineStart();\n\n while (++i < n) {\n coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n }\n\n stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n var i = -1,\n n = coordinates.length;\n stream.polygonStart();\n\n while (++i < n) {\n streamLine(coordinates[i], stream, 1);\n }\n\n stream.polygonEnd();\n}\n\nexport default function (object, stream) {\n if (object && streamObjectType.hasOwnProperty(object.type)) {\n streamObjectType[object.type](object, stream);\n } else {\n streamGeometry(object, stream);\n }\n}","import adder from \"./adder.js\";\nimport { atan2, cos, quarterPi, radians, sin, tau } from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\nexport var areaRingSum = adder();\nvar areaSum = adder(),\n lambda00,\n phi00,\n lambda0,\n cosPhi0,\n sinPhi0;\nexport var areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function polygonStart() {\n areaRingSum.reset();\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function polygonEnd() {\n var areaRing = +areaRingSum;\n areaSum.add(areaRing < 0 ? tau + areaRing : areaRing);\n this.lineStart = this.lineEnd = this.point = noop;\n },\n sphere: function sphere() {\n areaSum.add(tau);\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaRingEnd() {\n areaPoint(lambda00, phi00);\n}\n\nfunction areaPointFirst(lambda, phi) {\n areaStream.point = areaPoint;\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n lambda0 = lambda, cosPhi0 = cos(phi = phi / 2 + quarterPi), sinPhi0 = sin(phi);\n}\n\nfunction areaPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n phi = phi / 2 + quarterPi; // half the angular distance from south pole\n // Spherical excess E for a spherical triangle with vertices: south pole,\n // previous point, current point. Uses a formula derived from Cagnoli’s\n // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n\n var dLambda = lambda - lambda0,\n sdLambda = dLambda >= 0 ? 1 : -1,\n adLambda = sdLambda * dLambda,\n cosPhi = cos(phi),\n sinPhi = sin(phi),\n k = sinPhi0 * sinPhi,\n u = cosPhi0 * cosPhi + k * cos(adLambda),\n v = k * sdLambda * sin(adLambda);\n areaRingSum.add(atan2(v, u)); // Advance the previous points.\n\n lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;\n}\n\nexport default function (object) {\n areaSum.reset();\n stream(object, areaStream);\n return areaSum * 2;\n}","import { asin, atan2, cos, sin, sqrt } from \"./math.js\";\nexport function spherical(cartesian) {\n return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\nexport function cartesian(spherical) {\n var lambda = spherical[0],\n phi = spherical[1],\n cosPhi = cos(phi);\n return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\nexport function cartesianDot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\nexport function cartesianCross(a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n} // TODO return a\n\nexport function cartesianAddInPlace(a, b) {\n a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\nexport function cartesianScale(vector, k) {\n return [vector[0] * k, vector[1] * k, vector[2] * k];\n} // TODO return d\n\nexport function cartesianNormalizeInPlace(d) {\n var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n d[0] /= l, d[1] /= l, d[2] /= l;\n}","import adder from \"./adder.js\";\nimport { areaStream, areaRingSum } from \"./area.js\";\nimport { cartesian, cartesianCross, cartesianNormalizeInPlace, spherical } from \"./cartesian.js\";\nimport { abs, degrees, epsilon, radians } from \"./math.js\";\nimport stream from \"./stream.js\";\nvar lambda0,\n phi0,\n lambda1,\n phi1,\n // bounds\nlambda2,\n // previous lambda-coordinate\nlambda00,\n phi00,\n // first point\np0,\n // previous 3D point\ndeltaSum = adder(),\n ranges,\n range;\nvar boundsStream = {\n point: boundsPoint,\n lineStart: boundsLineStart,\n lineEnd: boundsLineEnd,\n polygonStart: function polygonStart() {\n boundsStream.point = boundsRingPoint;\n boundsStream.lineStart = boundsRingStart;\n boundsStream.lineEnd = boundsRingEnd;\n deltaSum.reset();\n areaStream.polygonStart();\n },\n polygonEnd: function polygonEnd() {\n areaStream.polygonEnd();\n boundsStream.point = boundsPoint;\n boundsStream.lineStart = boundsLineStart;\n boundsStream.lineEnd = boundsLineEnd;\n if (areaRingSum < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);else if (deltaSum > epsilon) phi1 = 90;else if (deltaSum < -epsilon) phi0 = -90;\n range[0] = lambda0, range[1] = lambda1;\n },\n sphere: function sphere() {\n lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n }\n};\n\nfunction boundsPoint(lambda, phi) {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n}\n\nfunction linePoint(lambda, phi) {\n var p = cartesian([lambda * radians, phi * radians]);\n\n if (p0) {\n var normal = cartesianCross(p0, p),\n equatorial = [normal[1], -normal[0], 0],\n inflection = cartesianCross(equatorial, normal);\n cartesianNormalizeInPlace(inflection);\n inflection = spherical(inflection);\n var delta = lambda - lambda2,\n sign = delta > 0 ? 1 : -1,\n lambdai = inflection[0] * degrees * sign,\n phii,\n antimeridian = abs(delta) > 180;\n\n if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = inflection[1] * degrees;\n if (phii > phi1) phi1 = phii;\n } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = -inflection[1] * degrees;\n if (phii < phi0) phi0 = phii;\n } else {\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n }\n\n if (antimeridian) {\n if (lambda < lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n } else {\n if (lambda1 >= lambda0) {\n if (lambda < lambda0) lambda0 = lambda;\n if (lambda > lambda1) lambda1 = lambda;\n } else {\n if (lambda > lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n }\n }\n } else {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n }\n\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n p0 = p, lambda2 = lambda;\n}\n\nfunction boundsLineStart() {\n boundsStream.point = linePoint;\n}\n\nfunction boundsLineEnd() {\n range[0] = lambda0, range[1] = lambda1;\n boundsStream.point = boundsPoint;\n p0 = null;\n}\n\nfunction boundsRingPoint(lambda, phi) {\n if (p0) {\n var delta = lambda - lambda2;\n deltaSum.add(abs(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);\n } else {\n lambda00 = lambda, phi00 = phi;\n }\n\n areaStream.point(lambda, phi);\n linePoint(lambda, phi);\n}\n\nfunction boundsRingStart() {\n areaStream.lineStart();\n}\n\nfunction boundsRingEnd() {\n boundsRingPoint(lambda00, phi00);\n areaStream.lineEnd();\n if (abs(deltaSum) > epsilon) lambda0 = -(lambda1 = 180);\n range[0] = lambda0, range[1] = lambda1;\n p0 = null;\n} // Finds the left-right distance between two longitudes.\n// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want\n// the distance between ±180° to be 360°.\n\n\nfunction angle(lambda0, lambda1) {\n return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;\n}\n\nfunction rangeCompare(a, b) {\n return a[0] - b[0];\n}\n\nfunction rangeContains(range, x) {\n return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n}\n\nexport default function (feature) {\n var i, n, a, b, merged, deltaMax, delta;\n phi1 = lambda1 = -(lambda0 = phi0 = Infinity);\n ranges = [];\n stream(feature, boundsStream); // First, sort ranges by their minimum longitudes.\n\n if (n = ranges.length) {\n ranges.sort(rangeCompare); // Then, merge any ranges that overlap.\n\n for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {\n b = ranges[i];\n\n if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {\n if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n } else {\n merged.push(a = b);\n }\n } // Finally, find the largest gap between the merged ranges.\n // The final bounding box will be the inverse of this gap.\n\n\n for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {\n b = merged[i];\n if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];\n }\n }\n\n ranges = range = null;\n return lambda0 === Infinity || phi0 === Infinity ? [[NaN, NaN], [NaN, NaN]] : [[lambda0, phi0], [lambda1, phi1]];\n}","import { asin, atan2, cos, degrees, epsilon, epsilon2, radians, sin, sqrt } from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\nvar W0, W1, X0, Y0, Z0, X1, Y1, Z1, X2, Y2, Z2, lambda00, phi00, // first point\nx0, y0, z0; // previous point\n\nvar centroidStream = {\n sphere: noop,\n point: centroidPoint,\n lineStart: centroidLineStart,\n lineEnd: centroidLineEnd,\n polygonStart: function polygonStart() {\n centroidStream.lineStart = centroidRingStart;\n centroidStream.lineEnd = centroidRingEnd;\n },\n polygonEnd: function polygonEnd() {\n centroidStream.lineStart = centroidLineStart;\n centroidStream.lineEnd = centroidLineEnd;\n }\n}; // Arithmetic mean of Cartesian vectors.\n\nfunction centroidPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi);\n centroidPointCartesian(cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi));\n}\n\nfunction centroidPointCartesian(x, y, z) {\n ++W0;\n X0 += (x - X0) / W0;\n Y0 += (y - Y0) / W0;\n Z0 += (z - Z0) / W0;\n}\n\nfunction centroidLineStart() {\n centroidStream.point = centroidLinePointFirst;\n}\n\nfunction centroidLinePointFirst(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi);\n x0 = cosPhi * cos(lambda);\n y0 = cosPhi * sin(lambda);\n z0 = sin(phi);\n centroidStream.point = centroidLinePoint;\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLinePoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi),\n x = cosPhi * cos(lambda),\n y = cosPhi * sin(lambda),\n z = sin(phi),\n w = atan2(sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);\n W1 += w;\n X1 += w * (x0 + (x0 = x));\n Y1 += w * (y0 + (y0 = y));\n Z1 += w * (z0 + (z0 = z));\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLineEnd() {\n centroidStream.point = centroidPoint;\n} // See J. E. Brock, The Inertia Tensor for a Spherical Triangle,\n// J. Applied Mechanics 42, 239 (1975).\n\n\nfunction centroidRingStart() {\n centroidStream.point = centroidRingPointFirst;\n}\n\nfunction centroidRingEnd() {\n centroidRingPoint(lambda00, phi00);\n centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingPointFirst(lambda, phi) {\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n centroidStream.point = centroidRingPoint;\n var cosPhi = cos(phi);\n x0 = cosPhi * cos(lambda);\n y0 = cosPhi * sin(lambda);\n z0 = sin(phi);\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidRingPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi),\n x = cosPhi * cos(lambda),\n y = cosPhi * sin(lambda),\n z = sin(phi),\n cx = y0 * z - z0 * y,\n cy = z0 * x - x0 * z,\n cz = x0 * y - y0 * x,\n m = sqrt(cx * cx + cy * cy + cz * cz),\n w = asin(m),\n // line weight = angle\n v = m && -w / m; // area weight multiplier\n\n X2 += v * cx;\n Y2 += v * cy;\n Z2 += v * cz;\n W1 += w;\n X1 += w * (x0 + (x0 = x));\n Y1 += w * (y0 + (y0 = y));\n Z1 += w * (z0 + (z0 = z));\n centroidPointCartesian(x0, y0, z0);\n}\n\nexport default function (object) {\n W0 = W1 = X0 = Y0 = Z0 = X1 = Y1 = Z1 = X2 = Y2 = Z2 = 0;\n stream(object, centroidStream);\n var x = X2,\n y = Y2,\n z = Z2,\n m = x * x + y * y + z * z; // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid.\n\n if (m < epsilon2) {\n x = X1, y = Y1, z = Z1; // If the feature has zero length, fall back to arithmetic mean of point vectors.\n\n if (W1 < epsilon) x = X0, y = Y0, z = Z0;\n m = x * x + y * y + z * z; // If the feature still has an undefined ccentroid, then return.\n\n if (m < epsilon2) return [NaN, NaN];\n }\n\n return [atan2(y, x) * degrees, asin(z / sqrt(m)) * degrees];\n}","export default function (x) {\n return function () {\n return x;\n };\n}","export default function (a, b) {\n function compose(x, y) {\n return x = a(x, y), b(x[0], x[1]);\n }\n\n if (a.invert && b.invert) compose.invert = function (x, y) {\n return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n };\n return compose;\n}","import compose from \"./compose.js\";\nimport { abs, asin, atan2, cos, degrees, pi, radians, sin, tau } from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n return [abs(lambda) > pi ? lambda + Math.round(-lambda / tau) * tau : lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n return (deltaLambda %= tau) ? deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma)) : rotationLambda(deltaLambda) : deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma) : rotationIdentity;\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n return function (lambda, phi) {\n return lambda += deltaLambda, [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi];\n };\n}\n\nfunction rotationLambda(deltaLambda) {\n var rotation = forwardRotationLambda(deltaLambda);\n rotation.invert = forwardRotationLambda(-deltaLambda);\n return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n var cosDeltaPhi = cos(deltaPhi),\n sinDeltaPhi = sin(deltaPhi),\n cosDeltaGamma = cos(deltaGamma),\n sinDeltaGamma = sin(deltaGamma);\n\n function rotation(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaPhi + x * sinDeltaPhi;\n return [atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi), asin(k * cosDeltaGamma + y * sinDeltaGamma)];\n }\n\n rotation.invert = function (lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaGamma - y * sinDeltaGamma;\n return [atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi), asin(k * cosDeltaPhi - x * sinDeltaPhi)];\n };\n\n return rotation;\n}\n\nexport default function (rotate) {\n rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n function forward(coordinates) {\n coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n }\n\n forward.invert = function (coordinates) {\n coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n };\n\n return forward;\n}","import { cartesian, cartesianNormalizeInPlace, spherical } from \"./cartesian.js\";\nimport constant from \"./constant.js\";\nimport { acos, cos, degrees, epsilon, radians, sin, tau } from \"./math.js\";\nimport { rotateRadians } from \"./rotation.js\"; // Generates a circle centered at [0°, 0°], with a given radius and precision.\n\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n if (!delta) return;\n var cosRadius = cos(radius),\n sinRadius = sin(radius),\n step = direction * delta;\n\n if (t0 == null) {\n t0 = radius + direction * tau;\n t1 = radius - step / 2;\n } else {\n t0 = circleRadius(cosRadius, t0);\n t1 = circleRadius(cosRadius, t1);\n if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n }\n\n for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n stream.point(point[0], point[1]);\n }\n} // Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\n\nfunction circleRadius(cosRadius, point) {\n point = cartesian(point), point[0] -= cosRadius;\n cartesianNormalizeInPlace(point);\n var radius = acos(-point[1]);\n return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function () {\n var center = constant([0, 0]),\n radius = constant(90),\n precision = constant(6),\n ring,\n rotate,\n stream = {\n point: point\n };\n\n function point(x, y) {\n ring.push(x = rotate(x, y));\n x[0] *= degrees, x[1] *= degrees;\n }\n\n function circle() {\n var c = center.apply(this, arguments),\n r = radius.apply(this, arguments) * radians,\n p = precision.apply(this, arguments) * radians;\n ring = [];\n rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n circleStream(stream, r, p, 1);\n c = {\n type: \"Polygon\",\n coordinates: [ring]\n };\n ring = rotate = null;\n return c;\n }\n\n circle.center = function (_) {\n return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n };\n\n circle.radius = function (_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n };\n\n circle.precision = function (_) {\n return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n };\n\n return circle;\n}","import noop from \"../noop.js\";\nexport default function () {\n var lines = [],\n line;\n return {\n point: function point(x, y, m) {\n line.push([x, y, m]);\n },\n lineStart: function lineStart() {\n lines.push(line = []);\n },\n lineEnd: noop,\n rejoin: function rejoin() {\n if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n },\n result: function result() {\n var result = lines;\n lines = [];\n line = null;\n return result;\n }\n };\n}","import { abs, epsilon } from \"./math.js\";\nexport default function (a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}","import pointEqual from \"../pointEqual.js\";\nimport { epsilon } from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n this.x = point;\n this.z = points;\n this.o = other; // another intersection\n\n this.e = entry; // is an entry?\n\n this.v = false; // visited\n\n this.n = this.p = null; // next & previous\n} // A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\n\n\nexport default function (segments, compareIntersection, startInside, interpolate, stream) {\n var subject = [],\n clip = [],\n i,\n n;\n segments.forEach(function (segment) {\n if ((n = segment.length - 1) <= 0) return;\n var n,\n p0 = segment[0],\n p1 = segment[n],\n x;\n\n if (pointEqual(p0, p1)) {\n if (!p0[2] && !p1[2]) {\n stream.lineStart();\n\n for (i = 0; i < n; ++i) {\n stream.point((p0 = segment[i])[0], p0[1]);\n }\n\n stream.lineEnd();\n return;\n } // handle degenerate cases by moving the point\n\n\n p1[0] += 2 * epsilon;\n }\n\n subject.push(x = new Intersection(p0, segment, null, true));\n clip.push(x.o = new Intersection(p0, null, x, false));\n subject.push(x = new Intersection(p1, segment, null, false));\n clip.push(x.o = new Intersection(p1, null, x, true));\n });\n if (!subject.length) return;\n clip.sort(compareIntersection);\n link(subject);\n link(clip);\n\n for (i = 0, n = clip.length; i < n; ++i) {\n clip[i].e = startInside = !startInside;\n }\n\n var start = subject[0],\n points,\n point;\n\n while (1) {\n // Find first unvisited intersection.\n var current = start,\n isSubject = true;\n\n while (current.v) {\n if ((current = current.n) === start) return;\n }\n\n points = current.z;\n stream.lineStart();\n\n do {\n current.v = current.o.v = true;\n\n if (current.e) {\n if (isSubject) {\n for (i = 0, n = points.length; i < n; ++i) {\n stream.point((point = points[i])[0], point[1]);\n }\n } else {\n interpolate(current.x, current.n.x, 1, stream);\n }\n\n current = current.n;\n } else {\n if (isSubject) {\n points = current.p.z;\n\n for (i = points.length - 1; i >= 0; --i) {\n stream.point((point = points[i])[0], point[1]);\n }\n } else {\n interpolate(current.x, current.p.x, -1, stream);\n }\n\n current = current.p;\n }\n\n current = current.o;\n points = current.z;\n isSubject = !isSubject;\n } while (!current.v);\n\n stream.lineEnd();\n }\n}\n\nfunction link(array) {\n if (!(n = array.length)) return;\n var n,\n i = 0,\n a = array[0],\n b;\n\n while (++i < n) {\n a.n = b = array[i];\n b.p = a;\n a = b;\n }\n\n a.n = b = array[0];\n b.p = a;\n}","import adder from \"./adder.js\";\nimport { cartesian, cartesianCross, cartesianNormalizeInPlace } from \"./cartesian.js\";\nimport { abs, asin, atan2, cos, epsilon, halfPi, pi, quarterPi, sign, sin, tau } from \"./math.js\";\nvar sum = adder();\n\nfunction longitude(point) {\n if (abs(point[0]) <= pi) return point[0];else return sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function (polygon, point) {\n var lambda = longitude(point),\n phi = point[1],\n sinPhi = sin(phi),\n normal = [sin(lambda), -cos(lambda), 0],\n angle = 0,\n winding = 0;\n sum.reset();\n if (sinPhi === 1) phi = halfPi + epsilon;else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n if (!(m = (ring = polygon[i]).length)) continue;\n var ring,\n m,\n point0 = ring[m - 1],\n lambda0 = longitude(point0),\n phi0 = point0[1] / 2 + quarterPi,\n sinPhi0 = sin(phi0),\n cosPhi0 = cos(phi0);\n\n for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n var point1 = ring[j],\n lambda1 = longitude(point1),\n phi1 = point1[1] / 2 + quarterPi,\n sinPhi1 = sin(phi1),\n cosPhi1 = cos(phi1),\n delta = lambda1 - lambda0,\n sign = delta >= 0 ? 1 : -1,\n absDelta = sign * delta,\n antimeridian = absDelta > pi,\n k = sinPhi0 * sinPhi1;\n sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n angle += antimeridian ? delta + sign * tau : delta; // Are the longitudes either side of the point’s meridian (lambda),\n // and are the latitudes smaller than the parallel (phi)?\n\n if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n var arc = cartesianCross(cartesian(point0), cartesian(point1));\n cartesianNormalizeInPlace(arc);\n var intersection = cartesianCross(normal, arc);\n cartesianNormalizeInPlace(intersection);\n var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n\n if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n winding += antimeridian ^ delta >= 0 ? 1 : -1;\n }\n }\n }\n } // First, determine whether the South pole is inside or outside:\n //\n // It is inside if:\n // * the polygon winds around it in a clockwise direction.\n // * the polygon does not (cumulatively) wind around it, but has a negative\n // (counter-clockwise) area.\n //\n // Second, count the (signed) number of times a segment crosses a lambda\n // from the point to the South pole. If it is zero, then the point is the\n // same side as the South pole.\n\n\n return (angle < -epsilon || angle < epsilon && sum < -epsilon) ^ winding & 1;\n}","import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport { epsilon, halfPi } from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport { merge } from \"d3-array\";\nexport default function (pointVisible, clipLine, interpolate, start) {\n return function (sink) {\n var line = clipLine(sink),\n ringBuffer = clipBuffer(),\n ringSink = clipLine(ringBuffer),\n polygonStarted = false,\n polygon,\n segments,\n ring;\n var clip = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function polygonStart() {\n clip.point = pointRing;\n clip.lineStart = ringStart;\n clip.lineEnd = ringEnd;\n segments = [];\n polygon = [];\n },\n polygonEnd: function polygonEnd() {\n clip.point = point;\n clip.lineStart = lineStart;\n clip.lineEnd = lineEnd;\n segments = merge(segments);\n var startInside = polygonContains(polygon, start);\n\n if (segments.length) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n } else if (startInside) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n }\n\n if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n segments = polygon = null;\n },\n sphere: function sphere() {\n sink.polygonStart();\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n sink.polygonEnd();\n }\n };\n\n function point(lambda, phi) {\n if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n }\n\n function pointLine(lambda, phi) {\n line.point(lambda, phi);\n }\n\n function lineStart() {\n clip.point = pointLine;\n line.lineStart();\n }\n\n function lineEnd() {\n clip.point = point;\n line.lineEnd();\n }\n\n function pointRing(lambda, phi) {\n ring.push([lambda, phi]);\n ringSink.point(lambda, phi);\n }\n\n function ringStart() {\n ringSink.lineStart();\n ring = [];\n }\n\n function ringEnd() {\n pointRing(ring[0][0], ring[0][1]);\n ringSink.lineEnd();\n var clean = ringSink.clean(),\n ringSegments = ringBuffer.result(),\n i,\n n = ringSegments.length,\n m,\n segment,\n point;\n ring.pop();\n polygon.push(ring);\n ring = null;\n if (!n) return; // No intersections.\n\n if (clean & 1) {\n segment = ringSegments[0];\n\n if ((m = segment.length - 1) > 0) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n\n for (i = 0; i < m; ++i) {\n sink.point((point = segment[i])[0], point[1]);\n }\n\n sink.lineEnd();\n }\n\n return;\n } // Rejoin connected segments.\n // TODO reuse ringBuffer.rejoin()?\n\n\n if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n segments.push(ringSegments.filter(validSegment));\n }\n\n return clip;\n };\n}\n\nfunction validSegment(segment) {\n return segment.length > 1;\n} // Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\n\n\nfunction compareIntersection(a, b) {\n return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1]) - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}","import clip from \"./index.js\";\nimport { abs, atan, cos, epsilon, halfPi, pi, sin } from \"../math.js\";\nexport default clip(function () {\n return true;\n}, clipAntimeridianLine, clipAntimeridianInterpolate, [-pi, -halfPi]); // Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\n\nfunction clipAntimeridianLine(stream) {\n var lambda0 = NaN,\n phi0 = NaN,\n sign0 = NaN,\n _clean; // no intersections\n\n\n return {\n lineStart: function lineStart() {\n stream.lineStart();\n _clean = 1;\n },\n point: function point(lambda1, phi1) {\n var sign1 = lambda1 > 0 ? pi : -pi,\n delta = abs(lambda1 - lambda0);\n\n if (abs(delta - pi) < epsilon) {\n // line crosses a pole\n stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n stream.point(lambda1, phi0);\n _clean = 0;\n } else if (sign0 !== sign1 && delta >= pi) {\n // line crosses antimeridian\n if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n\n if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n _clean = 0;\n }\n\n stream.point(lambda0 = lambda1, phi0 = phi1);\n sign0 = sign1;\n },\n lineEnd: function lineEnd() {\n stream.lineEnd();\n lambda0 = phi0 = NaN;\n },\n clean: function clean() {\n return 2 - _clean; // if intersections, rejoin first and last segments\n }\n };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n var cosPhi0,\n cosPhi1,\n sinLambda0Lambda1 = sin(lambda0 - lambda1);\n return abs(sinLambda0Lambda1) > epsilon ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1) - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0)) / (cosPhi0 * cosPhi1 * sinLambda0Lambda1)) : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n var phi;\n\n if (from == null) {\n phi = direction * halfPi;\n stream.point(-pi, phi);\n stream.point(0, phi);\n stream.point(pi, phi);\n stream.point(pi, 0);\n stream.point(pi, -phi);\n stream.point(0, -phi);\n stream.point(-pi, -phi);\n stream.point(-pi, 0);\n stream.point(-pi, phi);\n } else if (abs(from[0] - to[0]) > epsilon) {\n var lambda = from[0] < to[0] ? pi : -pi;\n phi = direction * lambda / 2;\n stream.point(-lambda, phi);\n stream.point(0, phi);\n stream.point(lambda, phi);\n } else {\n stream.point(to[0], to[1]);\n }\n}","import { cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical } from \"../cartesian.js\";\nimport { circleStream } from \"../circle.js\";\nimport { abs, cos, epsilon, pi, radians, sqrt } from \"../math.js\";\nimport pointEqual from \"../pointEqual.js\";\nimport clip from \"./index.js\";\nexport default function (radius) {\n var cr = cos(radius),\n delta = 6 * radians,\n smallRadius = cr > 0,\n notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }\n\n function visible(lambda, phi) {\n return cos(lambda) * cos(phi) > cr;\n } // Takes a line and cuts into visible segments. Return values used for polygon\n // clipping: 0 - there were intersections or the line was empty; 1 - no\n // intersections 2 - there were intersections, and the first and last segments\n // should be rejoined.\n\n\n function clipLine(stream) {\n var point0, // previous point\n c0, // code for previous point\n v0, // visibility of previous point\n v00, // visibility of first point\n _clean; // no intersections\n\n\n return {\n lineStart: function lineStart() {\n v00 = v0 = false;\n _clean = 1;\n },\n point: function point(lambda, phi) {\n var point1 = [lambda, phi],\n point2,\n v = visible(lambda, phi),\n c = smallRadius ? v ? 0 : code(lambda, phi) : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n if (!point0 && (v00 = v0 = v)) stream.lineStart();\n\n if (v !== v0) {\n point2 = intersect(point0, point1);\n if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2)) point1[2] = 1;\n }\n\n if (v !== v0) {\n _clean = 0;\n\n if (v) {\n // outside going in\n stream.lineStart();\n point2 = intersect(point1, point0);\n stream.point(point2[0], point2[1]);\n } else {\n // inside going out\n point2 = intersect(point0, point1);\n stream.point(point2[0], point2[1], 2);\n stream.lineEnd();\n }\n\n point0 = point2;\n } else if (notHemisphere && point0 && smallRadius ^ v) {\n var t; // If the codes for two points are different, or are both zero,\n // and there this segment intersects with the small circle.\n\n if (!(c & c0) && (t = intersect(point1, point0, true))) {\n _clean = 0;\n\n if (smallRadius) {\n stream.lineStart();\n stream.point(t[0][0], t[0][1]);\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n } else {\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n stream.lineStart();\n stream.point(t[0][0], t[0][1], 3);\n }\n }\n }\n\n if (v && (!point0 || !pointEqual(point0, point1))) {\n stream.point(point1[0], point1[1]);\n }\n\n point0 = point1, v0 = v, c0 = c;\n },\n lineEnd: function lineEnd() {\n if (v0) stream.lineEnd();\n point0 = null;\n },\n // Rejoin first and last segments if there were intersections and the first\n // and last points were visible.\n clean: function clean() {\n return _clean | (v00 && v0) << 1;\n }\n };\n } // Intersects the great circle between a and b with the clip circle.\n\n\n function intersect(a, b, two) {\n var pa = cartesian(a),\n pb = cartesian(b); // We have two planes, n1.p = d1 and n2.p = d2.\n // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).\n\n var n1 = [1, 0, 0],\n // normal\n n2 = cartesianCross(pa, pb),\n n2n2 = cartesianDot(n2, n2),\n n1n2 = n2[0],\n // cartesianDot(n1, n2),\n determinant = n2n2 - n1n2 * n1n2; // Two polar points.\n\n if (!determinant) return !two && a;\n var c1 = cr * n2n2 / determinant,\n c2 = -cr * n1n2 / determinant,\n n1xn2 = cartesianCross(n1, n2),\n A = cartesianScale(n1, c1),\n B = cartesianScale(n2, c2);\n cartesianAddInPlace(A, B); // Solve |p(t)|^2 = 1.\n\n var u = n1xn2,\n w = cartesianDot(A, u),\n uu = cartesianDot(u, u),\n t2 = w * w - uu * (cartesianDot(A, A) - 1);\n if (t2 < 0) return;\n var t = sqrt(t2),\n q = cartesianScale(u, (-w - t) / uu);\n cartesianAddInPlace(q, A);\n q = spherical(q);\n if (!two) return q; // Two intersection points.\n\n var lambda0 = a[0],\n lambda1 = b[0],\n phi0 = a[1],\n phi1 = b[1],\n z;\n if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n var delta = lambda1 - lambda0,\n polar = abs(delta - pi) < epsilon,\n meridian = polar || delta < epsilon;\n if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z; // Check that the first point is between a and b.\n\n if (meridian ? polar ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1) : phi0 <= q[1] && q[1] <= phi1 : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n var q1 = cartesianScale(u, (-w + t) / uu);\n cartesianAddInPlace(q1, A);\n return [q, spherical(q1)];\n }\n } // Generates a 4-bit vector representing the location of a point relative to\n // the small circle's bounding box.\n\n\n function code(lambda, phi) {\n var r = smallRadius ? radius : pi - radius,\n code = 0;\n if (lambda < -r) code |= 1; // left\n else if (lambda > r) code |= 2; // right\n\n if (phi < -r) code |= 4; // below\n else if (phi > r) code |= 8; // above\n\n return code;\n }\n\n return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}","import { abs, epsilon } from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport { merge } from \"d3-array\";\nvar clipMax = 1e9,\n clipMin = -clipMax; // TODO Use d3-polygon’s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n function visible(x, y) {\n return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n }\n\n function interpolate(from, to, direction, stream) {\n var a = 0,\n a1 = 0;\n\n if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoint(from, to) < 0 ^ direction > 0) {\n do {\n stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n } while ((a = (a + direction + 4) % 4) !== a1);\n } else {\n stream.point(to[0], to[1]);\n }\n }\n\n function corner(p, direction) {\n return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3 : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1 : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n }\n\n function compareIntersection(a, b) {\n return comparePoint(a.x, b.x);\n }\n\n function comparePoint(a, b) {\n var ca = corner(a, 1),\n cb = corner(b, 1);\n return ca !== cb ? ca - cb : ca === 0 ? b[1] - a[1] : ca === 1 ? a[0] - b[0] : ca === 2 ? a[1] - b[1] : b[0] - a[0];\n }\n\n return function (stream) {\n var activeStream = stream,\n bufferStream = clipBuffer(),\n segments,\n polygon,\n ring,\n x__,\n y__,\n v__,\n // first point\n x_,\n y_,\n v_,\n // previous point\n first,\n clean;\n var clipStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: polygonStart,\n polygonEnd: polygonEnd\n };\n\n function point(x, y) {\n if (visible(x, y)) activeStream.point(x, y);\n }\n\n function polygonInside() {\n var winding = 0;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n\n if (a1 <= y1) {\n if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding;\n } else {\n if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding;\n }\n }\n }\n\n return winding;\n } // Buffer geometry within a polygon and then clip it en masse.\n\n\n function polygonStart() {\n activeStream = bufferStream, segments = [], polygon = [], clean = true;\n }\n\n function polygonEnd() {\n var startInside = polygonInside(),\n cleanInside = clean && startInside,\n visible = (segments = merge(segments)).length;\n\n if (cleanInside || visible) {\n stream.polygonStart();\n\n if (cleanInside) {\n stream.lineStart();\n interpolate(null, null, 1, stream);\n stream.lineEnd();\n }\n\n if (visible) {\n clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n }\n\n stream.polygonEnd();\n }\n\n activeStream = stream, segments = polygon = ring = null;\n }\n\n function lineStart() {\n clipStream.point = linePoint;\n if (polygon) polygon.push(ring = []);\n first = true;\n v_ = false;\n x_ = y_ = NaN;\n } // TODO rather than special-case polygons, simply handle them separately.\n // Ideally, coincident intersection points should be jittered to avoid\n // clipping issues.\n\n\n function lineEnd() {\n if (segments) {\n linePoint(x__, y__);\n if (v__ && v_) bufferStream.rejoin();\n segments.push(bufferStream.result());\n }\n\n clipStream.point = point;\n if (v_) activeStream.lineEnd();\n }\n\n function linePoint(x, y) {\n var v = visible(x, y);\n if (polygon) ring.push([x, y]);\n\n if (first) {\n x__ = x, y__ = y, v__ = v;\n first = false;\n\n if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n }\n } else {\n if (v && v_) activeStream.point(x, y);else {\n var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n\n if (clipLine(a, b, x0, y0, x1, y1)) {\n if (!v_) {\n activeStream.lineStart();\n activeStream.point(a[0], a[1]);\n }\n\n activeStream.point(b[0], b[1]);\n if (!v) activeStream.lineEnd();\n clean = false;\n } else if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n clean = false;\n }\n }\n }\n\n x_ = x, y_ = y, v_ = v;\n }\n\n return clipStream;\n };\n}","export default function (a, b, x0, y0, x1, y1) {\n var ax = a[0],\n ay = a[1],\n bx = b[0],\n by = b[1],\n t0 = 0,\n t1 = 1,\n dx = bx - ax,\n dy = by - ay,\n r;\n r = x0 - ax;\n if (!dx && r > 0) return;\n r /= dx;\n\n if (dx < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dx > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = x1 - ax;\n if (!dx && r < 0) return;\n r /= dx;\n\n if (dx < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dx > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n r = y0 - ay;\n if (!dy && r > 0) return;\n r /= dy;\n\n if (dy < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dy > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = y1 - ay;\n if (!dy && r < 0) return;\n r /= dy;\n\n if (dy < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dy > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n return true;\n}","import clipRectangle from \"./rectangle.js\";\nexport default function () {\n var x0 = 0,\n y0 = 0,\n x1 = 960,\n y1 = 500,\n cache,\n cacheStream,\n clip;\n return clip = {\n stream: function stream(_stream) {\n return cache && cacheStream === _stream ? cache : cache = clipRectangle(x0, y0, x1, y1)(cacheStream = _stream);\n },\n extent: function extent(_) {\n return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]];\n }\n };\n}","import adder from \"./adder.js\";\nimport { abs, atan2, cos, radians, sin, sqrt } from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\nvar lengthSum = adder(),\n lambda0,\n sinPhi0,\n cosPhi0;\nvar lengthStream = {\n sphere: noop,\n point: noop,\n lineStart: lengthLineStart,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop\n};\n\nfunction lengthLineStart() {\n lengthStream.point = lengthPointFirst;\n lengthStream.lineEnd = lengthLineEnd;\n}\n\nfunction lengthLineEnd() {\n lengthStream.point = lengthStream.lineEnd = noop;\n}\n\nfunction lengthPointFirst(lambda, phi) {\n lambda *= radians, phi *= radians;\n lambda0 = lambda, sinPhi0 = sin(phi), cosPhi0 = cos(phi);\n lengthStream.point = lengthPoint;\n}\n\nfunction lengthPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var sinPhi = sin(phi),\n cosPhi = cos(phi),\n delta = abs(lambda - lambda0),\n cosDelta = cos(delta),\n sinDelta = sin(delta),\n x = cosPhi * sinDelta,\n y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,\n z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;\n lengthSum.add(atan2(sqrt(x * x + y * y), z));\n lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;\n}\n\nexport default function (object) {\n lengthSum.reset();\n stream(object, lengthStream);\n return +lengthSum;\n}","import length from \"./length.js\";\nvar coordinates = [null, null],\n object = {\n type: \"LineString\",\n coordinates: coordinates\n};\nexport default function (a, b) {\n coordinates[0] = a;\n coordinates[1] = b;\n return length(object);\n}","import { default as polygonContains } from \"./polygonContains.js\";\nimport { default as distance } from \"./distance.js\";\nimport { epsilon2, radians } from \"./math.js\";\nvar containsObjectType = {\n Feature: function Feature(object, point) {\n return containsGeometry(object.geometry, point);\n },\n FeatureCollection: function FeatureCollection(object, point) {\n var features = object.features,\n i = -1,\n n = features.length;\n\n while (++i < n) {\n if (containsGeometry(features[i].geometry, point)) return true;\n }\n\n return false;\n }\n};\nvar containsGeometryType = {\n Sphere: function Sphere() {\n return true;\n },\n Point: function Point(object, point) {\n return containsPoint(object.coordinates, point);\n },\n MultiPoint: function MultiPoint(object, point) {\n var coordinates = object.coordinates,\n i = -1,\n n = coordinates.length;\n\n while (++i < n) {\n if (containsPoint(coordinates[i], point)) return true;\n }\n\n return false;\n },\n LineString: function LineString(object, point) {\n return containsLine(object.coordinates, point);\n },\n MultiLineString: function MultiLineString(object, point) {\n var coordinates = object.coordinates,\n i = -1,\n n = coordinates.length;\n\n while (++i < n) {\n if (containsLine(coordinates[i], point)) return true;\n }\n\n return false;\n },\n Polygon: function Polygon(object, point) {\n return containsPolygon(object.coordinates, point);\n },\n MultiPolygon: function MultiPolygon(object, point) {\n var coordinates = object.coordinates,\n i = -1,\n n = coordinates.length;\n\n while (++i < n) {\n if (containsPolygon(coordinates[i], point)) return true;\n }\n\n return false;\n },\n GeometryCollection: function GeometryCollection(object, point) {\n var geometries = object.geometries,\n i = -1,\n n = geometries.length;\n\n while (++i < n) {\n if (containsGeometry(geometries[i], point)) return true;\n }\n\n return false;\n }\n};\n\nfunction containsGeometry(geometry, point) {\n return geometry && containsGeometryType.hasOwnProperty(geometry.type) ? containsGeometryType[geometry.type](geometry, point) : false;\n}\n\nfunction containsPoint(coordinates, point) {\n return distance(coordinates, point) === 0;\n}\n\nfunction containsLine(coordinates, point) {\n var ao, bo, ab;\n\n for (var i = 0, n = coordinates.length; i < n; i++) {\n bo = distance(coordinates[i], point);\n if (bo === 0) return true;\n\n if (i > 0) {\n ab = distance(coordinates[i], coordinates[i - 1]);\n if (ab > 0 && ao <= ab && bo <= ab && (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < epsilon2 * ab) return true;\n }\n\n ao = bo;\n }\n\n return false;\n}\n\nfunction containsPolygon(coordinates, point) {\n return !!polygonContains(coordinates.map(ringRadians), pointRadians(point));\n}\n\nfunction ringRadians(ring) {\n return ring = ring.map(pointRadians), ring.pop(), ring;\n}\n\nfunction pointRadians(point) {\n return [point[0] * radians, point[1] * radians];\n}\n\nexport default function (object, point) {\n return (object && containsObjectType.hasOwnProperty(object.type) ? containsObjectType[object.type] : containsGeometry)(object, point);\n}","import { range } from \"d3-array\";\nimport { abs, ceil, epsilon } from \"./math.js\";\n\nfunction graticuleX(y0, y1, dy) {\n var y = range(y0, y1 - epsilon, dy).concat(y1);\n return function (x) {\n return y.map(function (y) {\n return [x, y];\n });\n };\n}\n\nfunction graticuleY(x0, x1, dx) {\n var x = range(x0, x1 - epsilon, dx).concat(x1);\n return function (y) {\n return x.map(function (x) {\n return [x, y];\n });\n };\n}\n\nexport default function graticule() {\n var x1,\n x0,\n X1,\n X0,\n y1,\n y0,\n Y1,\n Y0,\n dx = 10,\n dy = dx,\n DX = 90,\n DY = 360,\n x,\n y,\n X,\n Y,\n precision = 2.5;\n\n function graticule() {\n return {\n type: \"MultiLineString\",\n coordinates: lines()\n };\n }\n\n function lines() {\n return range(ceil(X0 / DX) * DX, X1, DX).map(X).concat(range(ceil(Y0 / DY) * DY, Y1, DY).map(Y)).concat(range(ceil(x0 / dx) * dx, x1, dx).filter(function (x) {\n return abs(x % DX) > epsilon;\n }).map(x)).concat(range(ceil(y0 / dy) * dy, y1, dy).filter(function (y) {\n return abs(y % DY) > epsilon;\n }).map(y));\n }\n\n graticule.lines = function () {\n return lines().map(function (coordinates) {\n return {\n type: \"LineString\",\n coordinates: coordinates\n };\n });\n };\n\n graticule.outline = function () {\n return {\n type: \"Polygon\",\n coordinates: [X(X0).concat(Y(Y1).slice(1), X(X1).reverse().slice(1), Y(Y0).reverse().slice(1))]\n };\n };\n\n graticule.extent = function (_) {\n if (!arguments.length) return graticule.extentMinor();\n return graticule.extentMajor(_).extentMinor(_);\n };\n\n graticule.extentMajor = function (_) {\n if (!arguments.length) return [[X0, Y0], [X1, Y1]];\n X0 = +_[0][0], X1 = +_[1][0];\n Y0 = +_[0][1], Y1 = +_[1][1];\n if (X0 > X1) _ = X0, X0 = X1, X1 = _;\n if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;\n return graticule.precision(precision);\n };\n\n graticule.extentMinor = function (_) {\n if (!arguments.length) return [[x0, y0], [x1, y1]];\n x0 = +_[0][0], x1 = +_[1][0];\n y0 = +_[0][1], y1 = +_[1][1];\n if (x0 > x1) _ = x0, x0 = x1, x1 = _;\n if (y0 > y1) _ = y0, y0 = y1, y1 = _;\n return graticule.precision(precision);\n };\n\n graticule.step = function (_) {\n if (!arguments.length) return graticule.stepMinor();\n return graticule.stepMajor(_).stepMinor(_);\n };\n\n graticule.stepMajor = function (_) {\n if (!arguments.length) return [DX, DY];\n DX = +_[0], DY = +_[1];\n return graticule;\n };\n\n graticule.stepMinor = function (_) {\n if (!arguments.length) return [dx, dy];\n dx = +_[0], dy = +_[1];\n return graticule;\n };\n\n graticule.precision = function (_) {\n if (!arguments.length) return precision;\n precision = +_;\n x = graticuleX(y0, y1, 90);\n y = graticuleY(x0, x1, precision);\n X = graticuleX(Y0, Y1, 90);\n Y = graticuleY(X0, X1, precision);\n return graticule;\n };\n\n return graticule.extentMajor([[-180, -90 + epsilon], [180, 90 - epsilon]]).extentMinor([[-180, -80 - epsilon], [180, 80 + epsilon]]);\n}\nexport function graticule10() {\n return graticule()();\n}","import { asin, atan2, cos, degrees, haversin, radians, sin, sqrt } from \"./math.js\";\nexport default function (a, b) {\n var x0 = a[0] * radians,\n y0 = a[1] * radians,\n x1 = b[0] * radians,\n y1 = b[1] * radians,\n cy0 = cos(y0),\n sy0 = sin(y0),\n cy1 = cos(y1),\n sy1 = sin(y1),\n kx0 = cy0 * cos(x0),\n ky0 = cy0 * sin(x0),\n kx1 = cy1 * cos(x1),\n ky1 = cy1 * sin(x1),\n d = 2 * asin(sqrt(haversin(y1 - y0) + cy0 * cy1 * haversin(x1 - x0))),\n k = sin(d);\n var interpolate = d ? function (t) {\n var B = sin(t *= d) / k,\n A = sin(d - t) / k,\n x = A * kx0 + B * kx1,\n y = A * ky0 + B * ky1,\n z = A * sy0 + B * sy1;\n return [atan2(y, x) * degrees, atan2(z, sqrt(x * x + y * y)) * degrees];\n } : function () {\n return [x0 * degrees, y0 * degrees];\n };\n interpolate.distance = d;\n return interpolate;\n}","import adder from \"../adder.js\";\nimport { abs } from \"../math.js\";\nimport noop from \"../noop.js\";\nvar areaSum = adder(),\n areaRingSum = adder(),\n x00,\n y00,\n x0,\n y0;\nvar areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function polygonStart() {\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function polygonEnd() {\n areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n areaSum.add(abs(areaRingSum));\n areaRingSum.reset();\n },\n result: function result() {\n var area = areaSum / 2;\n areaSum.reset();\n return area;\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n areaStream.point = areaPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n areaRingSum.add(y0 * x - x0 * y);\n x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n areaPoint(x00, y00);\n}\n\nexport default areaStream;","export default function (x) {\n return x;\n}","import noop from \"../noop.js\";\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function result() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;","import { sqrt } from \"../math.js\"; // TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n Y0 = 0,\n Z0 = 0,\n X1 = 0,\n Y1 = 0,\n Z1 = 0,\n X2 = 0,\n Y2 = 0,\n Z2 = 0,\n x00,\n y00,\n x0,\n y0;\nvar centroidStream = {\n point: centroidPoint,\n lineStart: centroidLineStart,\n lineEnd: centroidLineEnd,\n polygonStart: function polygonStart() {\n centroidStream.lineStart = centroidRingStart;\n centroidStream.lineEnd = centroidRingEnd;\n },\n polygonEnd: function polygonEnd() {\n centroidStream.point = centroidPoint;\n centroidStream.lineStart = centroidLineStart;\n centroidStream.lineEnd = centroidLineEnd;\n },\n result: function result() {\n var centroid = Z2 ? [X2 / Z2, Y2 / Z2] : Z1 ? [X1 / Z1, Y1 / Z1] : Z0 ? [X0 / Z0, Y0 / Z0] : [NaN, NaN];\n X0 = Y0 = Z0 = X1 = Y1 = Z1 = X2 = Y2 = Z2 = 0;\n return centroid;\n }\n};\n\nfunction centroidPoint(x, y) {\n X0 += x;\n Y0 += y;\n ++Z0;\n}\n\nfunction centroidLineStart() {\n centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n centroidStream.point = centroidPointLine;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n var dx = x - x0,\n dy = y - y0,\n z = sqrt(dx * dx + dy * dy);\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n centroidStream.point = centroidPointRing;\n centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n var dx = x - x0,\n dy = y - y0,\n z = sqrt(dx * dx + dy * dy);\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n z = y0 * x - x0 * y;\n X2 += z * (x0 + x);\n Y2 += z * (y0 + y);\n Z2 += z * 3;\n centroidPoint(x0 = x, y0 = y);\n}\n\nexport default centroidStream;","import { tau } from \"../math.js\";\nimport noop from \"../noop.js\";\nexport default function PathContext(context) {\n this._context = context;\n}\nPathContext.prototype = {\n _radius: 4.5,\n pointRadius: function pointRadius(_) {\n return this._radius = _, this;\n },\n polygonStart: function polygonStart() {\n this._line = 0;\n },\n polygonEnd: function polygonEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (this._line === 0) this._context.closePath();\n this._point = NaN;\n },\n point: function point(x, y) {\n switch (this._point) {\n case 0:\n {\n this._context.moveTo(x, y);\n\n this._point = 1;\n break;\n }\n\n case 1:\n {\n this._context.lineTo(x, y);\n\n break;\n }\n\n default:\n {\n this._context.moveTo(x + this._radius, y);\n\n this._context.arc(x, y, this._radius, 0, tau);\n\n break;\n }\n }\n },\n result: noop\n};","import adder from \"../adder.js\";\nimport { sqrt } from \"../math.js\";\nimport noop from \"../noop.js\";\nvar lengthSum = adder(),\n lengthRing,\n x00,\n y00,\n x0,\n y0;\nvar lengthStream = {\n point: noop,\n lineStart: function lineStart() {\n lengthStream.point = lengthPointFirst;\n },\n lineEnd: function lineEnd() {\n if (lengthRing) lengthPoint(x00, y00);\n lengthStream.point = noop;\n },\n polygonStart: function polygonStart() {\n lengthRing = true;\n },\n polygonEnd: function polygonEnd() {\n lengthRing = null;\n },\n result: function result() {\n var length = +lengthSum;\n lengthSum.reset();\n return length;\n }\n};\n\nfunction lengthPointFirst(x, y) {\n lengthStream.point = lengthPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n x0 -= x, y0 -= y;\n lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n x0 = x, y0 = y;\n}\n\nexport default lengthStream;","export default function PathString() {\n this._string = [];\n}\nPathString.prototype = {\n _radius: 4.5,\n _circle: circle(4.5),\n pointRadius: function pointRadius(_) {\n if ((_ = +_) !== this._radius) this._radius = _, this._circle = null;\n return this;\n },\n polygonStart: function polygonStart() {\n this._line = 0;\n },\n polygonEnd: function polygonEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (this._line === 0) this._string.push(\"Z\");\n this._point = NaN;\n },\n point: function point(x, y) {\n switch (this._point) {\n case 0:\n {\n this._string.push(\"M\", x, \",\", y);\n\n this._point = 1;\n break;\n }\n\n case 1:\n {\n this._string.push(\"L\", x, \",\", y);\n\n break;\n }\n\n default:\n {\n if (this._circle == null) this._circle = circle(this._radius);\n\n this._string.push(\"M\", x, \",\", y, this._circle);\n\n break;\n }\n }\n },\n result: function result() {\n if (this._string.length) {\n var result = this._string.join(\"\");\n\n this._string = [];\n return result;\n } else {\n return null;\n }\n }\n};\n\nfunction circle(radius) {\n return \"m0,\" + radius + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + -2 * radius + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + 2 * radius + \"z\";\n}","import identity from \"../identity.js\";\nimport stream from \"../stream.js\";\nimport pathArea from \"./area.js\";\nimport pathBounds from \"./bounds.js\";\nimport pathCentroid from \"./centroid.js\";\nimport PathContext from \"./context.js\";\nimport pathMeasure from \"./measure.js\";\nimport PathString from \"./string.js\";\nexport default function (projection, context) {\n var pointRadius = 4.5,\n projectionStream,\n contextStream;\n\n function path(object) {\n if (object) {\n if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n stream(object, projectionStream(contextStream));\n }\n\n return contextStream.result();\n }\n\n path.area = function (object) {\n stream(object, projectionStream(pathArea));\n return pathArea.result();\n };\n\n path.measure = function (object) {\n stream(object, projectionStream(pathMeasure));\n return pathMeasure.result();\n };\n\n path.bounds = function (object) {\n stream(object, projectionStream(pathBounds));\n return pathBounds.result();\n };\n\n path.centroid = function (object) {\n stream(object, projectionStream(pathCentroid));\n return pathCentroid.result();\n };\n\n path.projection = function (_) {\n return arguments.length ? (projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream, path) : projection;\n };\n\n path.context = function (_) {\n if (!arguments.length) return context;\n contextStream = _ == null ? (context = null, new PathString()) : new PathContext(context = _);\n if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n return path;\n };\n\n path.pointRadius = function (_) {\n if (!arguments.length) return pointRadius;\n pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n return path;\n };\n\n return path.projection(projection).context(context);\n}","export default function (methods) {\n return {\n stream: transformer(methods)\n };\n}\nexport function transformer(methods) {\n return function (stream) {\n var s = new TransformStream();\n\n for (var key in methods) {\n s[key] = methods[key];\n }\n\n s.stream = stream;\n return s;\n };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n constructor: TransformStream,\n point: function point(x, y) {\n this.stream.point(x, y);\n },\n sphere: function sphere() {\n this.stream.sphere();\n },\n lineStart: function lineStart() {\n this.stream.lineStart();\n },\n lineEnd: function lineEnd() {\n this.stream.lineEnd();\n },\n polygonStart: function polygonStart() {\n this.stream.polygonStart();\n },\n polygonEnd: function polygonEnd() {\n this.stream.polygonEnd();\n }\n};","import { default as geoStream } from \"../stream.js\";\nimport boundsStream from \"../path/bounds.js\";\n\nfunction fit(projection, fitBounds, object) {\n var clip = projection.clipExtent && projection.clipExtent();\n projection.scale(150).translate([0, 0]);\n if (clip != null) projection.clipExtent(null);\n geoStream(object, projection.stream(boundsStream));\n fitBounds(boundsStream.result());\n if (clip != null) projection.clipExtent(clip);\n return projection;\n}\n\nexport function fitExtent(projection, extent, object) {\n return fit(projection, function (b) {\n var w = extent[1][0] - extent[0][0],\n h = extent[1][1] - extent[0][1],\n k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\nexport function fitSize(projection, size, object) {\n return fitExtent(projection, [[0, 0], size], object);\n}\nexport function fitWidth(projection, width, object) {\n return fit(projection, function (b) {\n var w = +width,\n k = w / (b[1][0] - b[0][0]),\n x = (w - k * (b[1][0] + b[0][0])) / 2,\n y = -k * b[0][1];\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\nexport function fitHeight(projection, height, object) {\n return fit(projection, function (b) {\n var h = +height,\n k = h / (b[1][1] - b[0][1]),\n x = -k * b[0][0],\n y = (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}","import { cartesian } from \"../cartesian.js\";\nimport { abs, asin, atan2, cos, epsilon, radians, sqrt } from \"../math.js\";\nimport { transformer } from \"../transform.js\";\nvar maxDepth = 16,\n // maximum depth of subdivision\ncosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function (project, delta2) {\n return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n return transformer({\n point: function point(x, y) {\n x = project(x, y);\n this.stream.point(x[0], x[1]);\n }\n });\n}\n\nfunction resample(project, delta2) {\n function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n var dx = x1 - x0,\n dy = y1 - y0,\n d2 = dx * dx + dy * dy;\n\n if (d2 > 4 * delta2 && depth--) {\n var a = a0 + a1,\n b = b0 + b1,\n c = c0 + c1,\n m = sqrt(a * a + b * b + c * c),\n phi2 = asin(c /= m),\n lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n p = project(lambda2, phi2),\n x2 = p[0],\n y2 = p[1],\n dx2 = x2 - x0,\n dy2 = y2 - y0,\n dz = dy * dx2 - dx * dy2;\n\n if (dz * dz / d2 > delta2 // perpendicular projected distance\n || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) {\n // angular distance\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n stream.point(x2, y2);\n resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n }\n }\n }\n\n return function (stream) {\n var lambda00, x00, y00, a00, b00, c00, // first point\n lambda0, x0, y0, a0, b0, c0; // previous point\n\n var resampleStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function polygonStart() {\n stream.polygonStart();\n resampleStream.lineStart = ringStart;\n },\n polygonEnd: function polygonEnd() {\n stream.polygonEnd();\n resampleStream.lineStart = lineStart;\n }\n };\n\n function point(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n }\n\n function lineStart() {\n x0 = NaN;\n resampleStream.point = linePoint;\n stream.lineStart();\n }\n\n function linePoint(lambda, phi) {\n var c = cartesian([lambda, phi]),\n p = project(lambda, phi);\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n stream.point(x0, y0);\n }\n\n function lineEnd() {\n resampleStream.point = point;\n stream.lineEnd();\n }\n\n function ringStart() {\n lineStart();\n resampleStream.point = ringPoint;\n resampleStream.lineEnd = ringEnd;\n }\n\n function ringPoint(lambda, phi) {\n linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n resampleStream.point = linePoint;\n }\n\n function ringEnd() {\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n resampleStream.lineEnd = lineEnd;\n lineEnd();\n }\n\n return resampleStream;\n };\n}","import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport { cos, degrees, radians, sin, sqrt } from \"../math.js\";\nimport { rotateRadians } from \"../rotation.js\";\nimport { transformer } from \"../transform.js\";\nimport { fitExtent, fitSize, fitWidth, fitHeight } from \"./fit.js\";\nimport resample from \"./resample.js\";\nvar transformRadians = transformer({\n point: function point(x, y) {\n this.stream.point(x * radians, y * radians);\n }\n});\n\nfunction transformRotate(rotate) {\n return transformer({\n point: function point(x, y) {\n var r = rotate(x, y);\n return this.stream.point(r[0], r[1]);\n }\n });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n function transform(x, y) {\n x *= sx;\n y *= sy;\n return [dx + k * x, dy - k * y];\n }\n\n transform.invert = function (x, y) {\n return [(x - dx) / k * sx, (dy - y) / k * sy];\n };\n\n return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n var cosAlpha = cos(alpha),\n sinAlpha = sin(alpha),\n a = cosAlpha * k,\n b = sinAlpha * k,\n ai = cosAlpha / k,\n bi = sinAlpha / k,\n ci = (sinAlpha * dy - cosAlpha * dx) / k,\n fi = (sinAlpha * dx + cosAlpha * dy) / k;\n\n function transform(x, y) {\n x *= sx;\n y *= sy;\n return [a * x - b * y + dx, dy - b * x - a * y];\n }\n\n transform.invert = function (x, y) {\n return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n };\n\n return transform;\n}\n\nexport default function projection(project) {\n return projectionMutator(function () {\n return project;\n })();\n}\nexport function projectionMutator(projectAt) {\n var project,\n k = 150,\n // scale\n x = 480,\n y = 250,\n // translate\n lambda = 0,\n phi = 0,\n // center\n deltaLambda = 0,\n deltaPhi = 0,\n deltaGamma = 0,\n rotate,\n // pre-rotate\n alpha = 0,\n // post-rotate angle\n sx = 1,\n // reflectX\n sy = 1,\n // reflectX\n theta = null,\n preclip = clipAntimeridian,\n // pre-clip angle\n x0 = null,\n y0,\n x1,\n y1,\n postclip = identity,\n // post-clip extent\n delta2 = 0.5,\n // precision\n projectResample,\n projectTransform,\n projectRotateTransform,\n cache,\n cacheStream;\n\n function projection(point) {\n return projectRotateTransform(point[0] * radians, point[1] * radians);\n }\n\n function invert(point) {\n point = projectRotateTransform.invert(point[0], point[1]);\n return point && [point[0] * degrees, point[1] * degrees];\n }\n\n projection.stream = function (stream) {\n return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n };\n\n projection.preclip = function (_) {\n return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n };\n\n projection.postclip = function (_) {\n return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n };\n\n projection.clipAngle = function (_) {\n return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n };\n\n projection.clipExtent = function (_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n projection.scale = function (_) {\n return arguments.length ? (k = +_, recenter()) : k;\n };\n\n projection.translate = function (_) {\n return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n };\n\n projection.center = function (_) {\n return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n };\n\n projection.rotate = function (_) {\n return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n };\n\n projection.angle = function (_) {\n return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n };\n\n projection.reflectX = function (_) {\n return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n };\n\n projection.reflectY = function (_) {\n return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n };\n\n projection.precision = function (_) {\n return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n };\n\n projection.fitExtent = function (extent, object) {\n return fitExtent(projection, extent, object);\n };\n\n projection.fitSize = function (size, object) {\n return fitSize(projection, size, object);\n };\n\n projection.fitWidth = function (width, object) {\n return fitWidth(projection, width, object);\n };\n\n projection.fitHeight = function (height, object) {\n return fitHeight(projection, height, object);\n };\n\n function recenter() {\n var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n transform = (alpha ? scaleTranslateRotate : scaleTranslate)(k, x - center[0], y - center[1], sx, sy, alpha);\n rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n projectTransform = compose(project, transform);\n projectRotateTransform = compose(rotate, projectTransform);\n projectResample = resample(projectTransform, delta2);\n return reset();\n }\n\n function reset() {\n cache = cacheStream = null;\n return projection;\n }\n\n return function () {\n project = projectAt.apply(this, arguments);\n projection.invert = project.invert && invert;\n return recenter();\n };\n}","import { degrees, pi, radians } from \"../math.js\";\nimport { projectionMutator } from \"./index.js\";\nexport function conicProjection(projectAt) {\n var phi0 = 0,\n phi1 = pi / 3,\n m = projectionMutator(projectAt),\n p = m(phi0, phi1);\n\n p.parallels = function (_) {\n return arguments.length ? m(phi0 = _[0] * radians, phi1 = _[1] * radians) : [phi0 * degrees, phi1 * degrees];\n };\n\n return p;\n}","import { abs, asin, atan2, cos, epsilon, pi, sign, sin, sqrt } from \"../math.js\";\nimport { conicProjection } from \"./conic.js\";\nimport { cylindricalEqualAreaRaw } from \"./cylindricalEqualArea.js\";\nexport function conicEqualAreaRaw(y0, y1) {\n var sy0 = sin(y0),\n n = (sy0 + sin(y1)) / 2; // Are the parallels symmetrical around the Equator?\n\n if (abs(n) < epsilon) return cylindricalEqualAreaRaw(y0);\n var c = 1 + sy0 * (2 * n - sy0),\n r0 = sqrt(c) / n;\n\n function project(x, y) {\n var r = sqrt(c - 2 * n * sin(y)) / n;\n return [r * sin(x *= n), r0 - r * cos(x)];\n }\n\n project.invert = function (x, y) {\n var r0y = r0 - y,\n l = atan2(x, abs(r0y)) * sign(r0y);\n if (r0y * n < 0) l -= pi * sign(x) * sign(r0y);\n return [l / n, asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))];\n };\n\n return project;\n}\nexport default function () {\n return conicProjection(conicEqualAreaRaw).scale(155.424).center([0, 33.6442]);\n}","import { asin, cos, sin } from \"../math.js\";\nexport function cylindricalEqualAreaRaw(phi0) {\n var cosPhi0 = cos(phi0);\n\n function forward(lambda, phi) {\n return [lambda * cosPhi0, sin(phi) / cosPhi0];\n }\n\n forward.invert = function (x, y) {\n return [x / cosPhi0, asin(y * cosPhi0)];\n };\n\n return forward;\n}","import conicEqualArea from \"./conicEqualArea.js\";\nexport default function () {\n return conicEqualArea().parallels([29.5, 45.5]).scale(1070).translate([480, 250]).rotate([96, 0]).center([-0.6, 38.7]);\n}","import { epsilon } from \"../math.js\";\nimport albers from \"./albers.js\";\nimport conicEqualArea from \"./conicEqualArea.js\";\nimport { fitExtent, fitSize, fitWidth, fitHeight } from \"./fit.js\"; // The projections must have mutually exclusive clip regions on the sphere,\n// as this will avoid emitting interleaving lines and polygons.\n\nfunction multiplex(streams) {\n var n = streams.length;\n return {\n point: function point(x, y) {\n var i = -1;\n\n while (++i < n) {\n streams[i].point(x, y);\n }\n },\n sphere: function sphere() {\n var i = -1;\n\n while (++i < n) {\n streams[i].sphere();\n }\n },\n lineStart: function lineStart() {\n var i = -1;\n\n while (++i < n) {\n streams[i].lineStart();\n }\n },\n lineEnd: function lineEnd() {\n var i = -1;\n\n while (++i < n) {\n streams[i].lineEnd();\n }\n },\n polygonStart: function polygonStart() {\n var i = -1;\n\n while (++i < n) {\n streams[i].polygonStart();\n }\n },\n polygonEnd: function polygonEnd() {\n var i = -1;\n\n while (++i < n) {\n streams[i].polygonEnd();\n }\n }\n };\n} // A composite projection for the United States, configured by default for\n// 960×500. The projection also works quite well at 960×600 if you change the\n// scale to 1285 and adjust the translate accordingly. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\n\n\nexport default function () {\n var cache,\n cacheStream,\n lower48 = albers(),\n lower48Point,\n alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]),\n alaskaPoint,\n // EPSG:3338\n hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]),\n hawaiiPoint,\n // ESRI:102007\n _point,\n pointStream = {\n point: function point(x, y) {\n _point = [x, y];\n }\n };\n\n function albersUsa(coordinates) {\n var x = coordinates[0],\n y = coordinates[1];\n return _point = null, (lower48Point.point(x, y), _point) || (alaskaPoint.point(x, y), _point) || (hawaiiPoint.point(x, y), _point);\n }\n\n albersUsa.invert = function (coordinates) {\n var k = lower48.scale(),\n t = lower48.translate(),\n x = (coordinates[0] - t[0]) / k,\n y = (coordinates[1] - t[1]) / k;\n return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii : lower48).invert(coordinates);\n };\n\n albersUsa.stream = function (stream) {\n return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);\n };\n\n albersUsa.precision = function (_) {\n if (!arguments.length) return lower48.precision();\n lower48.precision(_), alaska.precision(_), hawaii.precision(_);\n return reset();\n };\n\n albersUsa.scale = function (_) {\n if (!arguments.length) return lower48.scale();\n lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);\n return albersUsa.translate(lower48.translate());\n };\n\n albersUsa.translate = function (_) {\n if (!arguments.length) return lower48.translate();\n var k = lower48.scale(),\n x = +_[0],\n y = +_[1];\n lower48Point = lower48.translate(_).clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]]).stream(pointStream);\n alaskaPoint = alaska.translate([x - 0.307 * k, y + 0.201 * k]).clipExtent([[x - 0.425 * k + epsilon, y + 0.120 * k + epsilon], [x - 0.214 * k - epsilon, y + 0.234 * k - epsilon]]).stream(pointStream);\n hawaiiPoint = hawaii.translate([x - 0.205 * k, y + 0.212 * k]).clipExtent([[x - 0.214 * k + epsilon, y + 0.166 * k + epsilon], [x - 0.115 * k - epsilon, y + 0.234 * k - epsilon]]).stream(pointStream);\n return reset();\n };\n\n albersUsa.fitExtent = function (extent, object) {\n return fitExtent(albersUsa, extent, object);\n };\n\n albersUsa.fitSize = function (size, object) {\n return fitSize(albersUsa, size, object);\n };\n\n albersUsa.fitWidth = function (width, object) {\n return fitWidth(albersUsa, width, object);\n };\n\n albersUsa.fitHeight = function (height, object) {\n return fitHeight(albersUsa, height, object);\n };\n\n function reset() {\n cache = cacheStream = null;\n return albersUsa;\n }\n\n return albersUsa.scale(1070);\n}","import { asin, atan2, cos, sin, sqrt } from \"../math.js\";\nexport function azimuthalRaw(scale) {\n return function (x, y) {\n var cx = cos(x),\n cy = cos(y),\n k = scale(cx * cy);\n return [k * cy * sin(x), k * sin(y)];\n };\n}\nexport function azimuthalInvert(angle) {\n return function (x, y) {\n var z = sqrt(x * x + y * y),\n c = angle(z),\n sc = sin(c),\n cc = cos(c);\n return [atan2(x * sc, z * cc), asin(z && y * sc / z)];\n };\n}","import { asin, sqrt } from \"../math.js\";\nimport { azimuthalRaw, azimuthalInvert } from \"./azimuthal.js\";\nimport projection from \"./index.js\";\nexport var azimuthalEqualAreaRaw = azimuthalRaw(function (cxcy) {\n return sqrt(2 / (1 + cxcy));\n});\nazimuthalEqualAreaRaw.invert = azimuthalInvert(function (z) {\n return 2 * asin(z / 2);\n});\nexport default function () {\n return projection(azimuthalEqualAreaRaw).scale(124.75).clipAngle(180 - 1e-3);\n}","import { acos, sin } from \"../math.js\";\nimport { azimuthalRaw, azimuthalInvert } from \"./azimuthal.js\";\nimport projection from \"./index.js\";\nexport var azimuthalEquidistantRaw = azimuthalRaw(function (c) {\n return (c = acos(c)) && c / sin(c);\n});\nazimuthalEquidistantRaw.invert = azimuthalInvert(function (z) {\n return z;\n});\nexport default function () {\n return projection(azimuthalEquidistantRaw).scale(79.4188).clipAngle(180 - 1e-3);\n}","import { atan, exp, halfPi, log, pi, tan, tau } from \"../math.js\";\nimport rotation from \"../rotation.js\";\nimport projection from \"./index.js\";\nexport function mercatorRaw(lambda, phi) {\n return [lambda, log(tan((halfPi + phi) / 2))];\n}\n\nmercatorRaw.invert = function (x, y) {\n return [x, 2 * atan(exp(y)) - halfPi];\n};\n\nexport default function () {\n return mercatorProjection(mercatorRaw).scale(961 / tau);\n}\nexport function mercatorProjection(project) {\n var m = projection(project),\n center = m.center,\n scale = m.scale,\n translate = m.translate,\n clipExtent = m.clipExtent,\n x0 = null,\n y0,\n x1,\n y1; // clip extent\n\n m.scale = function (_) {\n return arguments.length ? (scale(_), reclip()) : scale();\n };\n\n m.translate = function (_) {\n return arguments.length ? (translate(_), reclip()) : translate();\n };\n\n m.center = function (_) {\n return arguments.length ? (center(_), reclip()) : center();\n };\n\n m.clipExtent = function (_) {\n return arguments.length ? (_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n function reclip() {\n var k = pi * scale(),\n t = m(rotation(m.rotate()).invert([0, 0]));\n return clipExtent(x0 == null ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]] : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n }\n\n return reclip();\n}","import { abs, atan, atan2, cos, epsilon, halfPi, log, pi, pow, sign, sin, sqrt, tan } from \"../math.js\";\nimport { conicProjection } from \"./conic.js\";\nimport { mercatorRaw } from \"./mercator.js\";\n\nfunction tany(y) {\n return tan((halfPi + y) / 2);\n}\n\nexport function conicConformalRaw(y0, y1) {\n var cy0 = cos(y0),\n n = y0 === y1 ? sin(y0) : log(cy0 / cos(y1)) / log(tany(y1) / tany(y0)),\n f = cy0 * pow(tany(y0), n) / n;\n if (!n) return mercatorRaw;\n\n function project(x, y) {\n if (f > 0) {\n if (y < -halfPi + epsilon) y = -halfPi + epsilon;\n } else {\n if (y > halfPi - epsilon) y = halfPi - epsilon;\n }\n\n var r = f / pow(tany(y), n);\n return [r * sin(n * x), f - r * cos(n * x)];\n }\n\n project.invert = function (x, y) {\n var fy = f - y,\n r = sign(n) * sqrt(x * x + fy * fy),\n l = atan2(x, abs(fy)) * sign(fy);\n if (fy * n < 0) l -= pi * sign(x) * sign(fy);\n return [l / n, 2 * atan(pow(f / r, 1 / n)) - halfPi];\n };\n\n return project;\n}\nexport default function () {\n return conicProjection(conicConformalRaw).scale(109.5).parallels([30, 30]);\n}","import projection from \"./index.js\";\nexport function equirectangularRaw(lambda, phi) {\n return [lambda, phi];\n}\nequirectangularRaw.invert = equirectangularRaw;\nexport default function () {\n return projection(equirectangularRaw).scale(152.63);\n}","import { abs, atan2, cos, epsilon, pi, sign, sin, sqrt } from \"../math.js\";\nimport { conicProjection } from \"./conic.js\";\nimport { equirectangularRaw } from \"./equirectangular.js\";\nexport function conicEquidistantRaw(y0, y1) {\n var cy0 = cos(y0),\n n = y0 === y1 ? sin(y0) : (cy0 - cos(y1)) / (y1 - y0),\n g = cy0 / n + y0;\n if (abs(n) < epsilon) return equirectangularRaw;\n\n function project(x, y) {\n var gy = g - y,\n nx = n * x;\n return [gy * sin(nx), g - gy * cos(nx)];\n }\n\n project.invert = function (x, y) {\n var gy = g - y,\n l = atan2(x, abs(gy)) * sign(gy);\n if (gy * n < 0) l -= pi * sign(x) * sign(gy);\n return [l / n, g - sign(n) * sqrt(x * x + gy * gy)];\n };\n\n return project;\n}\nexport default function () {\n return conicProjection(conicEquidistantRaw).scale(131.154).center([0, 13.9389]);\n}","import projection from \"./index.js\";\nimport { abs, asin, cos, epsilon2, sin, sqrt } from \"../math.js\";\nvar A1 = 1.340264,\n A2 = -0.081106,\n A3 = 0.000893,\n A4 = 0.003796,\n M = sqrt(3) / 2,\n iterations = 12;\nexport function equalEarthRaw(lambda, phi) {\n var l = asin(M * sin(phi)),\n l2 = l * l,\n l6 = l2 * l2 * l2;\n return [lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))), l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))];\n}\n\nequalEarthRaw.invert = function (x, y) {\n var l = y,\n l2 = l * l,\n l6 = l2 * l2 * l2;\n\n for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n if (abs(delta) < epsilon2) break;\n }\n\n return [M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l), asin(sin(l) / M)];\n};\n\nexport default function () {\n return projection(equalEarthRaw).scale(177.158);\n}","import { atan, cos, sin } from \"../math.js\";\nimport { azimuthalInvert } from \"./azimuthal.js\";\nimport projection from \"./index.js\";\nexport function gnomonicRaw(x, y) {\n var cy = cos(y),\n k = cos(x) * cy;\n return [cy * sin(x) / k, sin(y) / k];\n}\ngnomonicRaw.invert = azimuthalInvert(atan);\nexport default function () {\n return projection(gnomonicRaw).scale(144.049).clipAngle(60);\n}","import clipRectangle from \"../clip/rectangle.js\";\nimport identity from \"../identity.js\";\nimport { transformer } from \"../transform.js\";\nimport { fitExtent, fitSize, fitWidth, fitHeight } from \"./fit.js\";\nimport { cos, degrees, radians, sin } from \"../math.js\";\nexport default function () {\n var k = 1,\n tx = 0,\n ty = 0,\n sx = 1,\n sy = 1,\n // scale, translate and reflect\n alpha = 0,\n ca,\n sa,\n // angle\n x0 = null,\n y0,\n x1,\n y1,\n // clip extent\n kx = 1,\n ky = 1,\n transform = transformer({\n point: function point(x, y) {\n var p = projection([x, y]);\n this.stream.point(p[0], p[1]);\n }\n }),\n postclip = identity,\n cache,\n cacheStream;\n\n function reset() {\n kx = k * sx;\n ky = k * sy;\n cache = cacheStream = null;\n return projection;\n }\n\n function projection(p) {\n var x = p[0] * kx,\n y = p[1] * ky;\n\n if (alpha) {\n var t = y * ca - x * sa;\n x = x * ca + y * sa;\n y = t;\n }\n\n return [x + tx, y + ty];\n }\n\n projection.invert = function (p) {\n var x = p[0] - tx,\n y = p[1] - ty;\n\n if (alpha) {\n var t = y * ca + x * sa;\n x = x * ca - y * sa;\n y = t;\n }\n\n return [x / kx, y / ky];\n };\n\n projection.stream = function (stream) {\n return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream));\n };\n\n projection.postclip = function (_) {\n return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n };\n\n projection.clipExtent = function (_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n projection.scale = function (_) {\n return arguments.length ? (k = +_, reset()) : k;\n };\n\n projection.translate = function (_) {\n return arguments.length ? (tx = +_[0], ty = +_[1], reset()) : [tx, ty];\n };\n\n projection.angle = function (_) {\n return arguments.length ? (alpha = _ % 360 * radians, sa = sin(alpha), ca = cos(alpha), reset()) : alpha * degrees;\n };\n\n projection.reflectX = function (_) {\n return arguments.length ? (sx = _ ? -1 : 1, reset()) : sx < 0;\n };\n\n projection.reflectY = function (_) {\n return arguments.length ? (sy = _ ? -1 : 1, reset()) : sy < 0;\n };\n\n projection.fitExtent = function (extent, object) {\n return fitExtent(projection, extent, object);\n };\n\n projection.fitSize = function (size, object) {\n return fitSize(projection, size, object);\n };\n\n projection.fitWidth = function (width, object) {\n return fitWidth(projection, width, object);\n };\n\n projection.fitHeight = function (height, object) {\n return fitHeight(projection, height, object);\n };\n\n return projection;\n}","import projection from \"./index.js\";\nimport { abs, epsilon } from \"../math.js\";\nexport function naturalEarth1Raw(lambda, phi) {\n var phi2 = phi * phi,\n phi4 = phi2 * phi2;\n return [lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))), phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))];\n}\n\nnaturalEarth1Raw.invert = function (x, y) {\n var phi = y,\n i = 25,\n delta;\n\n do {\n var phi2 = phi * phi,\n phi4 = phi2 * phi2;\n phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) / (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));\n } while (abs(delta) > epsilon && --i > 0);\n\n return [x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))), phi];\n};\n\nexport default function () {\n return projection(naturalEarth1Raw).scale(175.295);\n}","import { asin, cos, epsilon, sin } from \"../math.js\";\nimport { azimuthalInvert } from \"./azimuthal.js\";\nimport projection from \"./index.js\";\nexport function orthographicRaw(x, y) {\n return [cos(y) * sin(x), sin(y)];\n}\northographicRaw.invert = azimuthalInvert(asin);\nexport default function () {\n return projection(orthographicRaw).scale(249.5).clipAngle(90 + epsilon);\n}","import { atan, cos, sin } from \"../math.js\";\nimport { azimuthalInvert } from \"./azimuthal.js\";\nimport projection from \"./index.js\";\nexport function stereographicRaw(x, y) {\n var cy = cos(y),\n k = 1 + cos(x) * cy;\n return [cy * sin(x) / k, sin(y) / k];\n}\nstereographicRaw.invert = azimuthalInvert(function (z) {\n return 2 * atan(z);\n});\nexport default function () {\n return projection(stereographicRaw).scale(250).clipAngle(142);\n}","import { atan, exp, halfPi, log, tan } from \"../math.js\";\nimport { mercatorProjection } from \"./mercator.js\";\nexport function transverseMercatorRaw(lambda, phi) {\n return [log(tan((halfPi + phi) / 2)), -lambda];\n}\n\ntransverseMercatorRaw.invert = function (x, y) {\n return [-y, 2 * atan(exp(x)) - halfPi];\n};\n\nexport default function () {\n var m = mercatorProjection(transverseMercatorRaw),\n center = m.center,\n rotate = m.rotate;\n\n m.center = function (_) {\n return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);\n };\n\n m.rotate = function (_) {\n return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);\n };\n\n return rotate([0, 0, 90]).scale(159.155);\n}","function defaultSeparation(a, b) {\n return a.parent === b.parent ? 1 : 2;\n}\n\nfunction meanX(children) {\n return children.reduce(meanXReduce, 0) / children.length;\n}\n\nfunction meanXReduce(x, c) {\n return x + c.x;\n}\n\nfunction maxY(children) {\n return 1 + children.reduce(maxYReduce, 0);\n}\n\nfunction maxYReduce(y, c) {\n return Math.max(y, c.y);\n}\n\nfunction leafLeft(node) {\n var children;\n\n while (children = node.children) {\n node = children[0];\n }\n\n return node;\n}\n\nfunction leafRight(node) {\n var children;\n\n while (children = node.children) {\n node = children[children.length - 1];\n }\n\n return node;\n}\n\nexport default function () {\n var separation = defaultSeparation,\n dx = 1,\n dy = 1,\n nodeSize = false;\n\n function cluster(root) {\n var previousNode,\n x = 0; // First walk, computing the initial x & y values.\n\n root.eachAfter(function (node) {\n var children = node.children;\n\n if (children) {\n node.x = meanX(children);\n node.y = maxY(children);\n } else {\n node.x = previousNode ? x += separation(node, previousNode) : 0;\n node.y = 0;\n previousNode = node;\n }\n });\n var left = leafLeft(root),\n right = leafRight(root),\n x0 = left.x - separation(left, right) / 2,\n x1 = right.x + separation(right, left) / 2; // Second walk, normalizing x & y to the desired size.\n\n return root.eachAfter(nodeSize ? function (node) {\n node.x = (node.x - root.x) * dx;\n node.y = (root.y - node.y) * dy;\n } : function (node) {\n node.x = (node.x - x0) / (x1 - x0) * dx;\n node.y = (1 - (root.y ? node.y / root.y : 1)) * dy;\n });\n }\n\n cluster.separation = function (x) {\n return arguments.length ? (separation = x, cluster) : separation;\n };\n\n cluster.size = function (x) {\n return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : nodeSize ? null : [dx, dy];\n };\n\n cluster.nodeSize = function (x) {\n return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : nodeSize ? [dx, dy] : null;\n };\n\n return cluster;\n}","function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;else while (--i >= 0) {\n sum += children[i].value;\n }\n node.value = sum;\n}\n\nexport default function () {\n return this.eachAfter(count);\n}","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nexport default function hierarchy(data, children) {\n var root = new Node(data),\n valued = +data.value && (root.value = data.value),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n if (children == null) children = defaultChildren;\n\n while (node = nodes.pop()) {\n if (valued) node.value = +node.data.value;\n\n if ((childs = children(node.data)) && (n = childs.length)) {\n node.children = new Array(n);\n\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = node.children[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction defaultChildren(d) {\n return d.children;\n}\n\nfunction copyData(node) {\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n\n do {\n node.height = height;\n } while ((node = node.parent) && node.height < ++height);\n}\nexport function Node(data) {\n this.data = data;\n this.depth = this.height = 0;\n this.parent = null;\n}\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy\n};","export default function (callback) {\n var node = this,\n current,\n next = [node],\n children,\n i,\n n;\n\n do {\n current = next.reverse(), next = [];\n\n while (node = current.pop()) {\n callback(node), children = node.children;\n if (children) for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n } while (next.length);\n\n return this;\n}","export default function (callback) {\n var node = this,\n nodes = [node],\n next = [],\n children,\n i,\n n;\n\n while (node = nodes.pop()) {\n next.push(node), children = node.children;\n if (children) for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n\n while (node = next.pop()) {\n callback(node);\n }\n\n return this;\n}","export default function (callback) {\n var node = this,\n nodes = [node],\n children,\n i;\n\n while (node = nodes.pop()) {\n callback(node), children = node.children;\n if (children) for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n\n return this;\n}","export default function (value) {\n return this.eachAfter(function (node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n\n while (--i >= 0) {\n sum += children[i].value;\n }\n\n node.value = sum;\n });\n}","export default function (compare) {\n return this.eachBefore(function (node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}","export default function (end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n\n var k = nodes.length;\n\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n\n return c;\n}","export default function () {\n var node = this,\n nodes = [node];\n\n while (node = node.parent) {\n nodes.push(node);\n }\n\n return nodes;\n}","export default function () {\n var nodes = [];\n this.each(function (node) {\n nodes.push(node);\n });\n return nodes;\n}","export default function () {\n var leaves = [];\n this.eachBefore(function (node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}","export default function () {\n var root = this,\n links = [];\n root.each(function (node) {\n if (node !== root) {\n // Don’t include the root’s parent, if any.\n links.push({\n source: node.parent,\n target: node\n });\n }\n });\n return links;\n}","export var slice = Array.prototype.slice;\nexport function shuffle(array) {\n var m = array.length,\n t,\n i;\n\n while (m) {\n i = Math.random() * m-- | 0;\n t = array[m];\n array[m] = array[i];\n array[i] = t;\n }\n\n return array;\n}","import { shuffle, slice } from \"../array.js\";\nexport default function (circles) {\n var i = 0,\n n = (circles = shuffle(slice.call(circles))).length,\n B = [],\n p,\n e;\n\n while (i < n) {\n p = circles[i];\n if (e && enclosesWeak(e, p)) ++i;else e = encloseBasis(B = extendBasis(B, p)), i = 0;\n }\n\n return e;\n}\n\nfunction extendBasis(B, p) {\n var i, j;\n if (enclosesWeakAll(p, B)) return [p]; // If we get here then B must have at least one element.\n\n for (i = 0; i < B.length; ++i) {\n if (enclosesNot(p, B[i]) && enclosesWeakAll(encloseBasis2(B[i], p), B)) {\n return [B[i], p];\n }\n } // If we get here then B must have at least two elements.\n\n\n for (i = 0; i < B.length - 1; ++i) {\n for (j = i + 1; j < B.length; ++j) {\n if (enclosesNot(encloseBasis2(B[i], B[j]), p) && enclosesNot(encloseBasis2(B[i], p), B[j]) && enclosesNot(encloseBasis2(B[j], p), B[i]) && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {\n return [B[i], B[j], p];\n }\n }\n } // If we get here then something is very wrong.\n\n\n throw new Error();\n}\n\nfunction enclosesNot(a, b) {\n var dr = a.r - b.r,\n dx = b.x - a.x,\n dy = b.y - a.y;\n return dr < 0 || dr * dr < dx * dx + dy * dy;\n}\n\nfunction enclosesWeak(a, b) {\n var dr = a.r - b.r + 1e-6,\n dx = b.x - a.x,\n dy = b.y - a.y;\n return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction enclosesWeakAll(a, B) {\n for (var i = 0; i < B.length; ++i) {\n if (!enclosesWeak(a, B[i])) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction encloseBasis(B) {\n switch (B.length) {\n case 1:\n return encloseBasis1(B[0]);\n\n case 2:\n return encloseBasis2(B[0], B[1]);\n\n case 3:\n return encloseBasis3(B[0], B[1], B[2]);\n }\n}\n\nfunction encloseBasis1(a) {\n return {\n x: a.x,\n y: a.y,\n r: a.r\n };\n}\n\nfunction encloseBasis2(a, b) {\n var x1 = a.x,\n y1 = a.y,\n r1 = a.r,\n x2 = b.x,\n y2 = b.y,\n r2 = b.r,\n x21 = x2 - x1,\n y21 = y2 - y1,\n r21 = r2 - r1,\n l = Math.sqrt(x21 * x21 + y21 * y21);\n return {\n x: (x1 + x2 + x21 / l * r21) / 2,\n y: (y1 + y2 + y21 / l * r21) / 2,\n r: (l + r1 + r2) / 2\n };\n}\n\nfunction encloseBasis3(a, b, c) {\n var x1 = a.x,\n y1 = a.y,\n r1 = a.r,\n x2 = b.x,\n y2 = b.y,\n r2 = b.r,\n x3 = c.x,\n y3 = c.y,\n r3 = c.r,\n a2 = x1 - x2,\n a3 = x1 - x3,\n b2 = y1 - y2,\n b3 = y1 - y3,\n c2 = r2 - r1,\n c3 = r3 - r1,\n d1 = x1 * x1 + y1 * y1 - r1 * r1,\n d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,\n d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,\n ab = a3 * b2 - a2 * b3,\n xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,\n xb = (b3 * c2 - b2 * c3) / ab,\n ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,\n yb = (a2 * c3 - a3 * c2) / ab,\n A = xb * xb + yb * yb - 1,\n B = 2 * (r1 + xa * xb + ya * yb),\n C = xa * xa + ya * ya - r1 * r1,\n r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);\n return {\n x: x1 + xa + xb * r,\n y: y1 + ya + yb * r,\n r: r\n };\n}","import enclose from \"./enclose.js\";\n\nfunction place(b, a, c) {\n var dx = b.x - a.x,\n x,\n a2,\n dy = b.y - a.y,\n y,\n b2,\n d2 = dx * dx + dy * dy;\n\n if (d2) {\n a2 = a.r + c.r, a2 *= a2;\n b2 = b.r + c.r, b2 *= b2;\n\n if (a2 > b2) {\n x = (d2 + b2 - a2) / (2 * d2);\n y = Math.sqrt(Math.max(0, b2 / d2 - x * x));\n c.x = b.x - x * dx - y * dy;\n c.y = b.y - x * dy + y * dx;\n } else {\n x = (d2 + a2 - b2) / (2 * d2);\n y = Math.sqrt(Math.max(0, a2 / d2 - x * x));\n c.x = a.x + x * dx - y * dy;\n c.y = a.y + x * dy + y * dx;\n }\n } else {\n c.x = a.x + c.r;\n c.y = a.y;\n }\n}\n\nfunction intersects(a, b) {\n var dr = a.r + b.r - 1e-6,\n dx = b.x - a.x,\n dy = b.y - a.y;\n return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction score(node) {\n var a = node._,\n b = node.next._,\n ab = a.r + b.r,\n dx = (a.x * b.r + b.x * a.r) / ab,\n dy = (a.y * b.r + b.y * a.r) / ab;\n return dx * dx + dy * dy;\n}\n\nfunction Node(circle) {\n this._ = circle;\n this.next = null;\n this.previous = null;\n}\n\nexport function packEnclose(circles) {\n if (!(n = circles.length)) return 0;\n var a, b, c, n, aa, ca, i, j, k, sj, sk; // Place the first circle.\n\n a = circles[0], a.x = 0, a.y = 0;\n if (!(n > 1)) return a.r; // Place the second circle.\n\n b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;\n if (!(n > 2)) return a.r + b.r; // Place the third circle.\n\n place(b, a, c = circles[2]); // Initialize the front-chain using the first three circles a, b and c.\n\n a = new Node(a), b = new Node(b), c = new Node(c);\n a.next = c.previous = b;\n b.next = a.previous = c;\n c.next = b.previous = a; // Attempt to place each remaining circle…\n\n pack: for (i = 3; i < n; ++i) {\n place(a._, b._, c = circles[i]), c = new Node(c); // Find the closest intersecting circle on the front-chain, if any.\n // “Closeness” is determined by linear distance along the front-chain.\n // “Ahead” or “behind” is likewise determined by linear distance.\n\n j = b.next, k = a.previous, sj = b._.r, sk = a._.r;\n\n do {\n if (sj <= sk) {\n if (intersects(j._, c._)) {\n b = j, a.next = b, b.previous = a, --i;\n continue pack;\n }\n\n sj += j._.r, j = j.next;\n } else {\n if (intersects(k._, c._)) {\n a = k, a.next = b, b.previous = a, --i;\n continue pack;\n }\n\n sk += k._.r, k = k.previous;\n }\n } while (j !== k.next); // Success! Insert the new circle c between a and b.\n\n\n c.previous = a, c.next = b, a.next = b.previous = b = c; // Compute the new closest circle pair to the centroid.\n\n aa = score(a);\n\n while ((c = c.next) !== b) {\n if ((ca = score(c)) < aa) {\n a = c, aa = ca;\n }\n }\n\n b = a.next;\n } // Compute the enclosing circle of the front chain.\n\n\n a = [b._], c = b;\n\n while ((c = c.next) !== b) {\n a.push(c._);\n }\n\n c = enclose(a); // Translate the circles to put the enclosing circle around the origin.\n\n for (i = 0; i < n; ++i) {\n a = circles[i], a.x -= c.x, a.y -= c.y;\n }\n\n return c.r;\n}\nexport default function (circles) {\n packEnclose(circles);\n return circles;\n}","export function optional(f) {\n return f == null ? null : required(f);\n}\nexport function required(f) {\n if (typeof f !== \"function\") throw new Error();\n return f;\n}","export function constantZero() {\n return 0;\n}\nexport default function (x) {\n return function () {\n return x;\n };\n}","import { packEnclose } from \"./siblings.js\";\nimport { optional } from \"../accessors.js\";\nimport constant, { constantZero } from \"../constant.js\";\n\nfunction defaultRadius(d) {\n return Math.sqrt(d.value);\n}\n\nexport default function () {\n var radius = null,\n dx = 1,\n dy = 1,\n padding = constantZero;\n\n function pack(root) {\n root.x = dx / 2, root.y = dy / 2;\n\n if (radius) {\n root.eachBefore(radiusLeaf(radius)).eachAfter(packChildren(padding, 0.5)).eachBefore(translateChild(1));\n } else {\n root.eachBefore(radiusLeaf(defaultRadius)).eachAfter(packChildren(constantZero, 1)).eachAfter(packChildren(padding, root.r / Math.min(dx, dy))).eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));\n }\n\n return root;\n }\n\n pack.radius = function (x) {\n return arguments.length ? (radius = optional(x), pack) : radius;\n };\n\n pack.size = function (x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];\n };\n\n pack.padding = function (x) {\n return arguments.length ? (padding = typeof x === \"function\" ? x : constant(+x), pack) : padding;\n };\n\n return pack;\n}\n\nfunction radiusLeaf(radius) {\n return function (node) {\n if (!node.children) {\n node.r = Math.max(0, +radius(node) || 0);\n }\n };\n}\n\nfunction packChildren(padding, k) {\n return function (node) {\n if (children = node.children) {\n var children,\n i,\n n = children.length,\n r = padding(node) * k || 0,\n e;\n if (r) for (i = 0; i < n; ++i) {\n children[i].r += r;\n }\n e = packEnclose(children);\n if (r) for (i = 0; i < n; ++i) {\n children[i].r -= r;\n }\n node.r = e + r;\n }\n };\n}\n\nfunction translateChild(k) {\n return function (node) {\n var parent = node.parent;\n node.r *= k;\n\n if (parent) {\n node.x = parent.x + k * node.x;\n node.y = parent.y + k * node.y;\n }\n };\n}","export default function (node) {\n node.x0 = Math.round(node.x0);\n node.y0 = Math.round(node.y0);\n node.x1 = Math.round(node.x1);\n node.y1 = Math.round(node.y1);\n}","export default function (parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}","import roundNode from \"./treemap/round.js\";\nimport treemapDice from \"./treemap/dice.js\";\nexport default function () {\n var dx = 1,\n dy = 1,\n padding = 0,\n round = false;\n\n function partition(root) {\n var n = root.height + 1;\n root.x0 = root.y0 = padding;\n root.x1 = dx;\n root.y1 = dy / n;\n root.eachBefore(positionNode(dy, n));\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(dy, n) {\n return function (node) {\n if (node.children) {\n treemapDice(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);\n }\n\n var x0 = node.x0,\n y0 = node.y0,\n x1 = node.x1 - padding,\n y1 = node.y1 - padding;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n };\n }\n\n partition.round = function (x) {\n return arguments.length ? (round = !!x, partition) : round;\n };\n\n partition.size = function (x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];\n };\n\n partition.padding = function (x) {\n return arguments.length ? (padding = +x, partition) : padding;\n };\n\n return partition;\n}","import { required } from \"./accessors.js\";\nimport { Node, computeHeight } from \"./hierarchy/index.js\";\nvar keyPrefix = \"$\",\n // Protect against keys like “__proto__”.\npreroot = {\n depth: -1\n},\n ambiguous = {};\n\nfunction defaultId(d) {\n return d.id;\n}\n\nfunction defaultParentId(d) {\n return d.parentId;\n}\n\nexport default function () {\n var id = defaultId,\n parentId = defaultParentId;\n\n function stratify(data) {\n var d,\n i,\n n = data.length,\n root,\n parent,\n node,\n nodes = new Array(n),\n nodeId,\n nodeKey,\n nodeByKey = {};\n\n for (i = 0; i < n; ++i) {\n d = data[i], node = nodes[i] = new Node(d);\n\n if ((nodeId = id(d, i, data)) != null && (nodeId += \"\")) {\n nodeKey = keyPrefix + (node.id = nodeId);\n nodeByKey[nodeKey] = nodeKey in nodeByKey ? ambiguous : node;\n }\n }\n\n for (i = 0; i < n; ++i) {\n node = nodes[i], nodeId = parentId(data[i], i, data);\n\n if (nodeId == null || !(nodeId += \"\")) {\n if (root) throw new Error(\"multiple roots\");\n root = node;\n } else {\n parent = nodeByKey[keyPrefix + nodeId];\n if (!parent) throw new Error(\"missing: \" + nodeId);\n if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n if (parent.children) parent.children.push(node);else parent.children = [node];\n node.parent = parent;\n }\n }\n\n if (!root) throw new Error(\"no root\");\n root.parent = preroot;\n root.eachBefore(function (node) {\n node.depth = node.parent.depth + 1;\n --n;\n }).eachBefore(computeHeight);\n root.parent = null;\n if (n > 0) throw new Error(\"cycle\");\n return root;\n }\n\n stratify.id = function (x) {\n return arguments.length ? (id = required(x), stratify) : id;\n };\n\n stratify.parentId = function (x) {\n return arguments.length ? (parentId = required(x), stratify) : parentId;\n };\n\n return stratify;\n}","import { Node } from \"./hierarchy/index.js\";\n\nfunction defaultSeparation(a, b) {\n return a.parent === b.parent ? 1 : 2;\n} // function radialSeparation(a, b) {\n// return (a.parent === b.parent ? 1 : 2) / a.depth;\n// }\n// This function is used to traverse the left contour of a subtree (or\n// subforest). It returns the successor of v on this contour. This successor is\n// either given by the leftmost child of v or by the thread of v. The function\n// returns null if and only if v is on the highest level of its subtree.\n\n\nfunction nextLeft(v) {\n var children = v.children;\n return children ? children[0] : v.t;\n} // This function works analogously to nextLeft.\n\n\nfunction nextRight(v) {\n var children = v.children;\n return children ? children[children.length - 1] : v.t;\n} // Shifts the current subtree rooted at w+. This is done by increasing\n// prelim(w+) and mod(w+) by shift.\n\n\nfunction moveSubtree(wm, wp, shift) {\n var change = shift / (wp.i - wm.i);\n wp.c -= change;\n wp.s += shift;\n wm.c += change;\n wp.z += shift;\n wp.m += shift;\n} // All other shifts, applied to the smaller subtrees between w- and w+, are\n// performed by this function. To prepare the shifts, we have to adjust\n// change(w+), shift(w+), and change(w-).\n\n\nfunction executeShifts(v) {\n var shift = 0,\n change = 0,\n children = v.children,\n i = children.length,\n w;\n\n while (--i >= 0) {\n w = children[i];\n w.z += shift;\n w.m += shift;\n shift += w.s + (change += w.c);\n }\n} // If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,\n// returns the specified (default) ancestor.\n\n\nfunction nextAncestor(vim, v, ancestor) {\n return vim.a.parent === v.parent ? vim.a : ancestor;\n}\n\nfunction TreeNode(node, i) {\n this._ = node;\n this.parent = null;\n this.children = null;\n this.A = null; // default ancestor\n\n this.a = this; // ancestor\n\n this.z = 0; // prelim\n\n this.m = 0; // mod\n\n this.c = 0; // change\n\n this.s = 0; // shift\n\n this.t = null; // thread\n\n this.i = i; // number\n}\n\nTreeNode.prototype = Object.create(Node.prototype);\n\nfunction treeRoot(root) {\n var tree = new TreeNode(root, 0),\n node,\n nodes = [tree],\n child,\n children,\n i,\n n;\n\n while (node = nodes.pop()) {\n if (children = node._.children) {\n node.children = new Array(n = children.length);\n\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = node.children[i] = new TreeNode(children[i], i));\n child.parent = node;\n }\n }\n }\n\n (tree.parent = new TreeNode(null, 0)).children = [tree];\n return tree;\n} // Node-link tree diagram using the Reingold-Tilford \"tidy\" algorithm\n\n\nexport default function () {\n var separation = defaultSeparation,\n dx = 1,\n dy = 1,\n nodeSize = null;\n\n function tree(root) {\n var t = treeRoot(root); // Compute the layout using Buchheim et al.’s algorithm.\n\n t.eachAfter(firstWalk), t.parent.m = -t.z;\n t.eachBefore(secondWalk); // If a fixed node size is specified, scale x and y.\n\n if (nodeSize) root.eachBefore(sizeNode); // If a fixed tree size is specified, scale x and y based on the extent.\n // Compute the left-most, right-most, and depth-most nodes for extents.\n else {\n var left = root,\n right = root,\n bottom = root;\n root.eachBefore(function (node) {\n if (node.x < left.x) left = node;\n if (node.x > right.x) right = node;\n if (node.depth > bottom.depth) bottom = node;\n });\n var s = left === right ? 1 : separation(left, right) / 2,\n tx = s - left.x,\n kx = dx / (right.x + s + tx),\n ky = dy / (bottom.depth || 1);\n root.eachBefore(function (node) {\n node.x = (node.x + tx) * kx;\n node.y = node.depth * ky;\n });\n }\n return root;\n } // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is\n // applied recursively to the children of v, as well as the function\n // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the\n // node v is placed to the midpoint of its outermost children.\n\n\n function firstWalk(v) {\n var children = v.children,\n siblings = v.parent.children,\n w = v.i ? siblings[v.i - 1] : null;\n\n if (children) {\n executeShifts(v);\n var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n\n if (w) {\n v.z = w.z + separation(v._, w._);\n v.m = v.z - midpoint;\n } else {\n v.z = midpoint;\n }\n } else if (w) {\n v.z = w.z + separation(v._, w._);\n }\n\n v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n } // Computes all real x-coordinates by summing up the modifiers recursively.\n\n\n function secondWalk(v) {\n v._.x = v.z + v.parent.m;\n v.m += v.parent.m;\n } // The core of the algorithm. Here, a new subtree is combined with the\n // previous subtrees. Threads are used to traverse the inside and outside\n // contours of the left and right subtree up to the highest common level. The\n // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the\n // superscript o means outside and i means inside, the subscript - means left\n // subtree and + means right subtree. For summing up the modifiers along the\n // contour, we use respective variables si+, si-, so-, and so+. Whenever two\n // nodes of the inside contours conflict, we compute the left one of the\n // greatest uncommon ancestors using the function ANCESTOR and call MOVE\n // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.\n // Finally, we add a new thread (if necessary).\n\n\n function apportion(v, w, ancestor) {\n if (w) {\n var vip = v,\n vop = v,\n vim = w,\n vom = vip.parent.children[0],\n sip = vip.m,\n sop = vop.m,\n sim = vim.m,\n som = vom.m,\n shift;\n\n while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {\n vom = nextLeft(vom);\n vop = nextRight(vop);\n vop.a = v;\n shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n\n if (shift > 0) {\n moveSubtree(nextAncestor(vim, v, ancestor), v, shift);\n sip += shift;\n sop += shift;\n }\n\n sim += vim.m;\n sip += vip.m;\n som += vom.m;\n sop += vop.m;\n }\n\n if (vim && !nextRight(vop)) {\n vop.t = vim;\n vop.m += sim - sop;\n }\n\n if (vip && !nextLeft(vom)) {\n vom.t = vip;\n vom.m += sip - som;\n ancestor = v;\n }\n }\n\n return ancestor;\n }\n\n function sizeNode(node) {\n node.x *= dx;\n node.y = node.depth * dy;\n }\n\n tree.separation = function (x) {\n return arguments.length ? (separation = x, tree) : separation;\n };\n\n tree.size = function (x) {\n return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : nodeSize ? null : [dx, dy];\n };\n\n tree.nodeSize = function (x) {\n return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : nodeSize ? [dx, dy] : null;\n };\n\n return tree;\n}","export default function (parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\nexport var phi = (1 + Math.sqrt(5)) / 2;\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx,\n dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0; // Find the next non-empty node.\n\n do {\n sumValue = nodes[i1++].value;\n } while (!sumValue && i1 < n);\n\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue); // Keep adding nodes while the aspect ratio maintains or improves.\n\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n\n if (newRatio > minRatio) {\n sumValue -= nodeValue;\n break;\n }\n\n minRatio = newRatio;\n } // Position and record the row orientation.\n\n\n rows.push(row = {\n value: sumValue,\n dice: dx < dy,\n children: nodes.slice(i0, i1)\n });\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\nexport default (function custom(ratio) {\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function (x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport { required } from \"../accessors.js\";\nimport constant, { constantZero } from \"../constant.js\";\nexport default function () {\n var tile = squarify,\n round = false,\n dx = 1,\n dy = 1,\n paddingStack = [0],\n paddingInner = constantZero,\n paddingTop = constantZero,\n paddingRight = constantZero,\n paddingBottom = constantZero,\n paddingLeft = constantZero;\n\n function treemap(root) {\n root.x0 = root.y0 = 0;\n root.x1 = dx;\n root.y1 = dy;\n root.eachBefore(positionNode);\n paddingStack = [0];\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(node) {\n var p = paddingStack[node.depth],\n x0 = node.x0 + p,\n y0 = node.y0 + p,\n x1 = node.x1 - p,\n y1 = node.y1 - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n\n if (node.children) {\n p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n x0 += paddingLeft(node) - p;\n y0 += paddingTop(node) - p;\n x1 -= paddingRight(node) - p;\n y1 -= paddingBottom(node) - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n tile(node, x0, y0, x1, y1);\n }\n }\n\n treemap.round = function (x) {\n return arguments.length ? (round = !!x, treemap) : round;\n };\n\n treemap.size = function (x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n };\n\n treemap.tile = function (x) {\n return arguments.length ? (tile = required(x), treemap) : tile;\n };\n\n treemap.padding = function (x) {\n return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n };\n\n treemap.paddingInner = function (x) {\n return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n };\n\n treemap.paddingOuter = function (x) {\n return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n };\n\n treemap.paddingTop = function (x) {\n return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n };\n\n treemap.paddingRight = function (x) {\n return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n };\n\n treemap.paddingBottom = function (x) {\n return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n };\n\n treemap.paddingLeft = function (x) {\n return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n };\n\n return treemap;\n}","export default function (parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n i,\n n = nodes.length,\n sum,\n sums = new Array(n + 1);\n\n for (sums[0] = sum = i = 0; i < n; ++i) {\n sums[i + 1] = sum += nodes[i].value;\n }\n\n partition(0, n, parent.value, x0, y0, x1, y1);\n\n function partition(i, j, value, x0, y0, x1, y1) {\n if (i >= j - 1) {\n var node = nodes[i];\n node.x0 = x0, node.y0 = y0;\n node.x1 = x1, node.y1 = y1;\n return;\n }\n\n var valueOffset = sums[i],\n valueTarget = value / 2 + valueOffset,\n k = i + 1,\n hi = j - 1;\n\n while (k < hi) {\n var mid = k + hi >>> 1;\n if (sums[mid] < valueTarget) k = mid + 1;else hi = mid;\n }\n\n if (valueTarget - sums[k - 1] < sums[k] - valueTarget && i + 1 < k) --k;\n var valueLeft = sums[k] - valueOffset,\n valueRight = value - valueLeft;\n\n if (x1 - x0 > y1 - y0) {\n var xk = (x0 * valueRight + x1 * valueLeft) / value;\n partition(i, k, valueLeft, x0, y0, xk, y1);\n partition(k, j, valueRight, xk, y0, x1, y1);\n } else {\n var yk = (y0 * valueRight + y1 * valueLeft) / value;\n partition(i, k, valueLeft, x0, y0, x1, yk);\n partition(k, j, valueRight, x0, yk, x1, y1);\n }\n }\n}","import dice from \"./dice.js\";\nimport slice from \"./slice.js\";\nexport default function (parent, x0, y0, x1, y1) {\n (parent.depth & 1 ? slice : dice)(parent, x0, y0, x1, y1);\n}","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\nimport { phi, squarifyRatio } from \"./squarify.js\";\nexport default (function custom(ratio) {\n function resquarify(parent, x0, y0, x1, y1) {\n if ((rows = parent._squarify) && rows.ratio === ratio) {\n var rows,\n row,\n nodes,\n i,\n j = -1,\n n,\n m = rows.length,\n value = parent.value;\n\n while (++j < m) {\n row = rows[j], nodes = row.children;\n\n for (i = row.value = 0, n = nodes.length; i < n; ++i) {\n row.value += nodes[i].value;\n }\n\n if (row.dice) treemapDice(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value);else treemapSlice(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1);\n value -= row.value;\n }\n } else {\n parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);\n rows.ratio = ratio;\n }\n }\n\n resquarify.ratio = function (x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return resquarify;\n})(phi);","export default function (range) {\n var n = range.length;\n return function (t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}","import { hue } from \"./color.js\";\nexport default function (a, b) {\n var i = hue(+a, +b);\n return function (t) {\n var x = i(t);\n return x - 360 * Math.floor(x / 360);\n };\n}","export default function (a, b) {\n return a = +a, b = +b, function (t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}","var rho = Math.SQRT2,\n rho2 = 2,\n rho4 = 4,\n epsilon2 = 1e-12;\n\nfunction cosh(x) {\n return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n} // p0 = [ux0, uy0, w0]\n// p1 = [ux1, uy1, w1]\n\n\nexport default function (p0, p1) {\n var ux0 = p0[0],\n uy0 = p0[1],\n w0 = p0[2],\n ux1 = p1[0],\n uy1 = p1[1],\n w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S; // Special case for u0 ≅ u1.\n\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n\n i = function i(t) {\n return [ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(rho * t * S)];\n };\n } // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n\n i = function i(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / cosh(rho * s + r0)];\n };\n }\n\n i.duration = S * 1000;\n return i;\n}","import { hsl as colorHsl } from \"d3-color\";\nimport color, { hue } from \"./color.js\";\n\nfunction hsl(hue) {\n return function (start, end) {\n var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function (t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n };\n}\n\nexport default hsl(hue);\nexport var hslLong = hsl(color);","import { lab as colorLab } from \"d3-color\";\nimport color from \"./color.js\";\nexport default function lab(start, end) {\n var l = color((start = colorLab(start)).l, (end = colorLab(end)).l),\n a = color(start.a, end.a),\n b = color(start.b, end.b),\n opacity = color(start.opacity, end.opacity);\n return function (t) {\n start.l = l(t);\n start.a = a(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n}","import { hcl as colorHcl } from \"d3-color\";\nimport color, { hue } from \"./color.js\";\n\nfunction hcl(hue) {\n return function (start, end) {\n var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n c = color(start.c, end.c),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function (t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n };\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);","import { cubehelix as colorCubehelix } from \"d3-color\";\nimport color, { hue } from \"./color.js\";\n\nfunction cubehelix(hue) {\n return function cubehelixGamma(y) {\n y = +y;\n\n function cubehelix(start, end) {\n var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function (t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(Math.pow(t, y));\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n cubehelix.gamma = cubehelixGamma;\n return cubehelix;\n }(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);","export default function piecewise(interpolate, values) {\n var i = 0,\n n = values.length - 1,\n v = values[0],\n I = new Array(n < 0 ? 0 : n);\n\n while (i < n) {\n I[i] = interpolate(v, v = values[++i]);\n }\n\n return function (t) {\n var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n return I[i](t - i);\n };\n}","export default function (interpolator, n) {\n var samples = new Array(n);\n\n for (var i = 0; i < n; ++i) {\n samples[i] = interpolator(i / (n - 1));\n }\n\n return samples;\n}","export default function (polygon) {\n var i = -1,\n n = polygon.length,\n a,\n b = polygon[n - 1],\n area = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n area += a[1] * b[0] - a[0] * b[1];\n }\n\n return area / 2;\n}","export default function (polygon) {\n var i = -1,\n n = polygon.length,\n x = 0,\n y = 0,\n a,\n b = polygon[n - 1],\n c,\n k = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n k += c = a[0] * b[1] - b[0] * a[1];\n x += (a[0] + b[0]) * c;\n y += (a[1] + b[1]) * c;\n }\n\n return k *= 3, [x / k, y / k];\n}","import cross from \"./cross.js\";\n\nfunction lexicographicOrder(a, b) {\n return a[0] - b[0] || a[1] - b[1];\n} // Computes the upper convex hull per the monotone chain algorithm.\n// Assumes points.length >= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\n\n\nfunction computeUpperHullIndexes(points) {\n var n = points.length,\n indexes = [0, 1],\n size = 2;\n\n for (var i = 2; i < n; ++i) {\n while (size > 1 && cross(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) {\n --size;\n }\n\n indexes[size++] = i;\n }\n\n return indexes.slice(0, size); // remove popped points\n}\n\nexport default function (points) {\n if ((n = points.length) < 3) return null;\n var i,\n n,\n sortedPoints = new Array(n),\n flippedPoints = new Array(n);\n\n for (i = 0; i < n; ++i) {\n sortedPoints[i] = [+points[i][0], +points[i][1], i];\n }\n\n sortedPoints.sort(lexicographicOrder);\n\n for (i = 0; i < n; ++i) {\n flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n }\n\n var upperIndexes = computeUpperHullIndexes(sortedPoints),\n lowerIndexes = computeUpperHullIndexes(flippedPoints); // Construct the hull polygon, removing possible duplicate endpoints.\n\n var skipLeft = lowerIndexes[0] === upperIndexes[0],\n skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n hull = []; // Add upper hull in right-to-l order.\n // Then add lower hull in left-to-right order.\n\n for (i = upperIndexes.length - 1; i >= 0; --i) {\n hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n }\n\n for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) {\n hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n }\n\n return hull;\n}","// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\nexport default function (a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n}","export default function (polygon, point) {\n var n = polygon.length,\n p = polygon[n - 1],\n x = point[0],\n y = point[1],\n x0 = p[0],\n y0 = p[1],\n x1,\n y1,\n inside = false;\n\n for (var i = 0; i < n; ++i) {\n p = polygon[i], x1 = p[0], y1 = p[1];\n if (y1 > y !== y0 > y && x < (x0 - x1) * (y - y1) / (y0 - y1) + x1) inside = !inside;\n x0 = x1, y0 = y1;\n }\n\n return inside;\n}","export default function (polygon) {\n var i = -1,\n n = polygon.length,\n b = polygon[n - 1],\n xa,\n ya,\n xb = b[0],\n yb = b[1],\n perimeter = 0;\n\n while (++i < n) {\n xa = xb;\n ya = yb;\n b = polygon[i];\n xb = b[0];\n yb = b[1];\n xa -= xb;\n ya -= yb;\n perimeter += Math.sqrt(xa * xa + ya * ya);\n }\n\n return perimeter;\n}","export default function () {\n return Math.random();\n}","import defaultSource from \"./defaultSource\";\nexport default (function sourceRandomUniform(source) {\n function randomUniform(min, max) {\n min = min == null ? 0 : +min;\n max = max == null ? 1 : +max;\n if (arguments.length === 1) max = min, min = 0;else max -= min;\n return function () {\n return source() * max + min;\n };\n }\n\n randomUniform.source = sourceRandomUniform;\n return randomUniform;\n})(defaultSource);","import defaultSource from \"./defaultSource\";\nexport default (function sourceRandomNormal(source) {\n function randomNormal(mu, sigma) {\n var x, r;\n mu = mu == null ? 0 : +mu;\n sigma = sigma == null ? 1 : +sigma;\n return function () {\n var y; // If available, use the second previously-generated uniform random.\n\n if (x != null) y = x, x = null; // Otherwise, generate a new x and y.\n else do {\n x = source() * 2 - 1;\n y = source() * 2 - 1;\n r = x * x + y * y;\n } while (!r || r > 1);\n return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r);\n };\n }\n\n randomNormal.source = sourceRandomNormal;\n return randomNormal;\n})(defaultSource);","import defaultSource from \"./defaultSource\";\nimport normal from \"./normal\";\nexport default (function sourceRandomLogNormal(source) {\n function randomLogNormal() {\n var randomNormal = normal.source(source).apply(this, arguments);\n return function () {\n return Math.exp(randomNormal());\n };\n }\n\n randomLogNormal.source = sourceRandomLogNormal;\n return randomLogNormal;\n})(defaultSource);","import defaultSource from \"./defaultSource\";\nexport default (function sourceRandomIrwinHall(source) {\n function randomIrwinHall(n) {\n return function () {\n for (var sum = 0, i = 0; i < n; ++i) {\n sum += source();\n }\n\n return sum;\n };\n }\n\n randomIrwinHall.source = sourceRandomIrwinHall;\n return randomIrwinHall;\n})(defaultSource);","import defaultSource from \"./defaultSource\";\nimport irwinHall from \"./irwinHall\";\nexport default (function sourceRandomBates(source) {\n function randomBates(n) {\n var randomIrwinHall = irwinHall.source(source)(n);\n return function () {\n return randomIrwinHall() / n;\n };\n }\n\n randomBates.source = sourceRandomBates;\n return randomBates;\n})(defaultSource);","import defaultSource from \"./defaultSource\";\nexport default (function sourceRandomExponential(source) {\n function randomExponential(lambda) {\n return function () {\n return -Math.log(1 - source()) / lambda;\n };\n }\n\n randomExponential.source = sourceRandomExponential;\n return randomExponential;\n})(defaultSource);","export function initRange(domain, range) {\n switch (arguments.length) {\n case 0:\n break;\n\n case 1:\n this.range(domain);\n break;\n\n default:\n this.range(range).domain(domain);\n break;\n }\n\n return this;\n}\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0:\n break;\n\n case 1:\n this.interpolator(domain);\n break;\n\n default:\n this.interpolator(interpolator).domain(domain);\n break;\n }\n\n return this;\n}","var array = Array.prototype;\nexport var map = array.map;\nexport var slice = array.slice;","import { map } from \"d3-collection\";\nimport { slice } from \"./array\";\nimport { initRange } from \"./init\";\nexport var implicit = {\n name: \"implicit\"\n};\nexport default function ordinal() {\n var index = map(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n var key = d + \"\",\n i = index.get(key);\n\n if (!i) {\n if (unknown !== implicit) return unknown;\n index.set(key, i = domain.push(d));\n }\n\n return range[(i - 1) % range.length];\n }\n\n scale.domain = function (_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = map();\n var i = -1,\n n = _.length,\n d,\n key;\n\n while (++i < n) {\n if (!index.has(key = (d = _[i]) + \"\")) index.set(key, domain.push(d));\n }\n\n return scale;\n };\n\n scale.range = function (_) {\n return arguments.length ? (range = slice.call(_), scale) : range.slice();\n };\n\n scale.unknown = function (_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function () {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n return scale;\n}","import { range as sequence } from \"d3-array\";\nimport { initRange } from \"./init\";\nimport ordinal from \"./ordinal\";\nexport default function band() {\n var scale = ordinal().unknown(undefined),\n domain = scale.domain,\n ordinalRange = scale.range,\n range = [0, 1],\n step,\n bandwidth,\n round = false,\n paddingInner = 0,\n paddingOuter = 0,\n align = 0.5;\n delete scale.unknown;\n\n function rescale() {\n var n = domain().length,\n reverse = range[1] < range[0],\n start = range[reverse - 0],\n stop = range[1 - reverse];\n step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n if (round) step = Math.floor(step);\n start += (stop - start - step * (n - paddingInner)) * align;\n bandwidth = step * (1 - paddingInner);\n if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n var values = sequence(n).map(function (i) {\n return start + step * i;\n });\n return ordinalRange(reverse ? values.reverse() : values);\n }\n\n scale.domain = function (_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.range = function (_) {\n return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();\n };\n\n scale.rangeRound = function (_) {\n return range = [+_[0], +_[1]], round = true, rescale();\n };\n\n scale.bandwidth = function () {\n return bandwidth;\n };\n\n scale.step = function () {\n return step;\n };\n\n scale.round = function (_) {\n return arguments.length ? (round = !!_, rescale()) : round;\n };\n\n scale.padding = function (_) {\n return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n };\n\n scale.paddingInner = function (_) {\n return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n };\n\n scale.paddingOuter = function (_) {\n return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n };\n\n scale.align = function (_) {\n return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n };\n\n scale.copy = function () {\n return band(domain(), range).round(round).paddingInner(paddingInner).paddingOuter(paddingOuter).align(align);\n };\n\n return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n var copy = scale.copy;\n scale.padding = scale.paddingOuter;\n delete scale.paddingInner;\n delete scale.paddingOuter;\n\n scale.copy = function () {\n return pointish(copy());\n };\n\n return scale;\n}\n\nexport function point() {\n return pointish(band.apply(null, arguments).paddingInner(1));\n}","export default function (x) {\n return function () {\n return x;\n };\n}","export default function (x) {\n return +x;\n}","import { bisect } from \"d3-array\";\nimport { interpolate as interpolateValue, interpolateNumber, interpolateRound } from \"d3-interpolate\";\nimport { map, slice } from \"./array\";\nimport constant from \"./constant\";\nimport number from \"./number\";\nvar unit = [0, 1];\nexport function identity(x) {\n return x;\n}\n\nfunction normalize(a, b) {\n return (b -= a = +a) ? function (x) {\n return (x - a) / b;\n } : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(domain) {\n var a = domain[0],\n b = domain[domain.length - 1],\n t;\n if (a > b) t = a, a = b, b = t;\n return function (x) {\n return Math.max(a, Math.min(b, x));\n };\n} // normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\n\n\nfunction bimap(domain, range, interpolate) {\n var d0 = domain[0],\n d1 = domain[1],\n r0 = range[0],\n r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function (x) {\n return r0(d0(x));\n };\n}\n\nfunction polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1; // Reverse descending domains.\n\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function (x) {\n var i = bisect(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n}\n\nexport function copy(source, target) {\n return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown());\n}\nexport function transformer() {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n }\n\n scale.invert = function (y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function (_) {\n return arguments.length ? (domain = map.call(_, number), clamp === identity || (clamp = clamper(domain)), rescale()) : domain.slice();\n };\n\n scale.range = function (_) {\n return arguments.length ? (range = slice.call(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function (_) {\n return range = slice.call(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function (_) {\n return arguments.length ? (clamp = _ ? clamper(domain) : identity, scale) : clamp !== identity;\n };\n\n scale.interpolate = function (_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n scale.unknown = function (_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function (t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n}\nexport default function continuous(transform, untransform) {\n return transformer()(transform, untransform);\n}","import { tickStep } from \"d3-array\";\nimport { format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound } from \"d3-format\";\nexport default function (start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n\n switch (specifier.type) {\n case \"s\":\n {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\":\n {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n\n case \"f\":\n case \"%\":\n {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n\n return format(specifier);\n}","import { ticks, tickIncrement } from \"d3-array\";\nimport continuous, { copy, identity } from \"./continuous\";\nimport { initRange } from \"./init\";\nimport tickFormat from \"./tickFormat\";\nexport function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function (count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function (count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function (count) {\n if (count == null) count = 10;\n var d = domain(),\n i0 = 0,\n i1 = d.length - 1,\n start = d[i0],\n stop = d[i1],\n step;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n\n step = tickIncrement(start, stop, count);\n\n if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n step = tickIncrement(start, stop, count);\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n step = tickIncrement(start, stop, count);\n }\n\n if (step > 0) {\n d[i0] = Math.floor(start / step) * step;\n d[i1] = Math.ceil(stop / step) * step;\n domain(d);\n } else if (step < 0) {\n d[i0] = Math.ceil(start * step) / step;\n d[i1] = Math.floor(stop * step) / step;\n domain(d);\n }\n\n return scale;\n };\n\n return scale;\n}\nexport default function linear() {\n var scale = continuous(identity, identity);\n\n scale.copy = function () {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n return linearish(scale);\n}","import { map } from \"./array\";\nimport { linearish } from \"./linear\";\nimport number from \"./number\";\nexport default function identity(domain) {\n var unknown;\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : x;\n }\n\n scale.invert = scale;\n\n scale.domain = scale.range = function (_) {\n return arguments.length ? (domain = map.call(_, number), scale) : domain.slice();\n };\n\n scale.unknown = function (_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function () {\n return identity(domain).unknown(unknown);\n };\n\n domain = arguments.length ? map.call(domain, number) : [0, 1];\n return linearish(scale);\n}","export default function (domain, interval) {\n domain = domain.slice();\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n t;\n\n if (x1 < x0) {\n t = i0, i0 = i1, i1 = t;\n t = x0, x0 = x1, x1 = t;\n }\n\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n}","import { ticks } from \"d3-array\";\nimport { format } from \"d3-format\";\nimport nice from \"./nice\";\nimport { copy, transformer } from \"./continuous\";\nimport { initRange } from \"./init\";\n\nfunction transformLog(x) {\n return Math.log(x);\n}\n\nfunction transformExp(x) {\n return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n return base === 10 ? pow10 : base === Math.E ? Math.exp : function (x) {\n return Math.pow(base, x);\n };\n}\n\nfunction logp(base) {\n return base === Math.E ? Math.log : base === 10 && Math.log10 || base === 2 && Math.log2 || (base = Math.log(base), function (x) {\n return Math.log(x) / base;\n });\n}\n\nfunction reflect(f) {\n return function (x) {\n return -f(-x);\n };\n}\n\nexport function loggish(transform) {\n var scale = transform(transformLog, transformExp),\n domain = scale.domain,\n base = 10,\n logs,\n pows;\n\n function rescale() {\n logs = logp(base), pows = powp(base);\n\n if (domain()[0] < 0) {\n logs = reflect(logs), pows = reflect(pows);\n transform(transformLogn, transformExpn);\n } else {\n transform(transformLog, transformExp);\n }\n\n return scale;\n }\n\n scale.base = function (_) {\n return arguments.length ? (base = +_, rescale()) : base;\n };\n\n scale.domain = function (_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.ticks = function (count) {\n var d = domain(),\n u = d[0],\n v = d[d.length - 1],\n r;\n if (r = v < u) i = u, u = v, v = i;\n var i = logs(u),\n j = logs(v),\n p,\n k,\n t,\n n = count == null ? 10 : +count,\n z = [];\n\n if (!(base % 1) && j - i < n) {\n i = Math.round(i) - 1, j = Math.round(j) + 1;\n if (u > 0) for (; i < j; ++i) {\n for (k = 1, p = pows(i); k < base; ++k) {\n t = p * k;\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n } else for (; i < j; ++i) {\n for (k = base - 1, p = pows(i); k >= 1; --k) {\n t = p * k;\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n }\n } else {\n z = ticks(i, j, Math.min(j - i, n)).map(pows);\n }\n\n return r ? z.reverse() : z;\n };\n\n scale.tickFormat = function (count, specifier) {\n if (specifier == null) specifier = base === 10 ? \".0e\" : \",\";\n if (typeof specifier !== \"function\") specifier = format(specifier);\n if (count === Infinity) return specifier;\n if (count == null) count = 10;\n var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n\n return function (d) {\n var i = d / pows(Math.round(logs(d)));\n if (i * base < base - 0.5) i *= base;\n return i <= k ? specifier(d) : \"\";\n };\n };\n\n scale.nice = function () {\n return domain(nice(domain(), {\n floor: function floor(x) {\n return pows(Math.floor(logs(x)));\n },\n ceil: function ceil(x) {\n return pows(Math.ceil(logs(x)));\n }\n }));\n };\n\n return scale;\n}\nexport default function log() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function () {\n return copy(scale, log()).base(scale.base());\n };\n\n initRange.apply(scale, arguments);\n return scale;\n}","import { linearish } from \"./linear\";\nimport { copy, transformer } from \"./continuous\";\nimport { initRange } from \"./init\";\n\nfunction transformSymlog(c) {\n return function (x) {\n return Math.sign(x) * Math.log1p(Math.abs(x / c));\n };\n}\n\nfunction transformSymexp(c) {\n return function (x) {\n return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n };\n}\n\nexport function symlogish(transform) {\n var c = 1,\n scale = transform(transformSymlog(c), transformSymexp(c));\n\n scale.constant = function (_) {\n return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n };\n\n return linearish(scale);\n}\nexport default function symlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function () {\n return copy(scale, symlog()).constant(scale.constant());\n };\n\n return initRange.apply(scale, arguments);\n}","import { linearish } from \"./linear\";\nimport { copy, identity, transformer } from \"./continuous\";\nimport { initRange } from \"./init\";\n\nfunction transformPow(exponent) {\n return function (x) {\n return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n };\n}\n\nfunction transformSqrt(x) {\n return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n var scale = transform(identity, identity),\n exponent = 1;\n\n function rescale() {\n return exponent === 1 ? transform(identity, identity) : exponent === 0.5 ? transform(transformSqrt, transformSquare) : transform(transformPow(exponent), transformPow(1 / exponent));\n }\n\n scale.exponent = function (_) {\n return arguments.length ? (exponent = +_, rescale()) : exponent;\n };\n\n return linearish(scale);\n}\nexport default function pow() {\n var scale = powish(transformer());\n\n scale.copy = function () {\n return copy(scale, pow()).exponent(scale.exponent());\n };\n\n initRange.apply(scale, arguments);\n return scale;\n}\nexport function sqrt() {\n return pow.apply(null, arguments).exponent(0.5);\n}","import { ascending, bisect, quantile as threshold } from \"d3-array\";\nimport { slice } from \"./array\";\nimport { initRange } from \"./init\";\nexport default function quantile() {\n var domain = [],\n range = [],\n thresholds = [],\n unknown;\n\n function rescale() {\n var i = 0,\n n = Math.max(1, range.length);\n thresholds = new Array(n - 1);\n\n while (++i < n) {\n thresholds[i - 1] = threshold(domain, i / n);\n }\n\n return scale;\n }\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n }\n\n scale.invertExtent = function (y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN] : [i > 0 ? thresholds[i - 1] : domain[0], i < thresholds.length ? thresholds[i] : domain[domain.length - 1]];\n };\n\n scale.domain = function (_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n\n for (var i = 0, n = _.length, d; i < n; ++i) {\n if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);\n }\n\n domain.sort(ascending);\n return rescale();\n };\n\n scale.range = function (_) {\n return arguments.length ? (range = slice.call(_), rescale()) : range.slice();\n };\n\n scale.unknown = function (_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.quantiles = function () {\n return thresholds.slice();\n };\n\n scale.copy = function () {\n return quantile().domain(domain).range(range).unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}","import { bisect } from \"d3-array\";\nimport { slice } from \"./array\";\nimport { linearish } from \"./linear\";\nimport { initRange } from \"./init\";\nexport default function quantize() {\n var x0 = 0,\n x1 = 1,\n n = 1,\n domain = [0.5],\n range = [0, 1],\n unknown;\n\n function scale(x) {\n return x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n function rescale() {\n var i = -1;\n domain = new Array(n);\n\n while (++i < n) {\n domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);\n }\n\n return scale;\n }\n\n scale.domain = function (_) {\n return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1];\n };\n\n scale.range = function (_) {\n return arguments.length ? (n = (range = slice.call(_)).length - 1, rescale()) : range.slice();\n };\n\n scale.invertExtent = function (y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN] : i < 1 ? [x0, domain[0]] : i >= n ? [domain[n - 1], x1] : [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function (_) {\n return arguments.length ? (unknown = _, scale) : scale;\n };\n\n scale.thresholds = function () {\n return domain.slice();\n };\n\n scale.copy = function () {\n return quantize().domain([x0, x1]).range(range).unknown(unknown);\n };\n\n return initRange.apply(linearish(scale), arguments);\n}","import { bisect } from \"d3-array\";\nimport { slice } from \"./array\";\nimport { initRange } from \"./init\";\nexport default function threshold() {\n var domain = [0.5],\n range = [0, 1],\n unknown,\n n = 1;\n\n function scale(x) {\n return x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n scale.domain = function (_) {\n return arguments.length ? (domain = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n };\n\n scale.range = function (_) {\n return arguments.length ? (range = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n };\n\n scale.invertExtent = function (y) {\n var i = range.indexOf(y);\n return [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function (_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function () {\n return threshold().domain(domain).range(range).unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}","var t0 = new Date(),\n t1 = new Date();\nexport default function newInterval(floori, offseti, count, field) {\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date() : new Date(+date)), date;\n }\n\n interval.floor = function (date) {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = function (date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = function (date) {\n var d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = function (date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function (start, stop, step) {\n var range = [],\n previous;\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n\n do {\n range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n } while (previous < start && start < stop);\n\n return range;\n };\n\n interval.filter = function (test) {\n return newInterval(function (date) {\n if (date >= date) while (floori(date), !test(date)) {\n date.setTime(date - 1);\n }\n }, function (date, step) {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n\n }\n }\n });\n };\n\n if (count) {\n interval.count = function (start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = function (step) {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? function (d) {\n return field(d) % step === 0;\n } : function (d) {\n return interval.count(0, d) % step === 0;\n });\n };\n }\n\n return interval;\n}","import interval from \"./interval.js\";\nvar year = interval(function (date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setFullYear(date.getFullYear() + step);\n}, function (start, end) {\n return end.getFullYear() - start.getFullYear();\n}, function (date) {\n return date.getFullYear();\n}); // An optimized implementation for this simple case.\n\nyear.every = function (k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function (date) {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport default year;\nexport var years = year.range;","import interval from \"./interval.js\";\nvar month = interval(function (date) {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setMonth(date.getMonth() + step);\n}, function (start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function (date) {\n return date.getMonth();\n});\nexport default month;\nexport var months = month.range;","export var durationSecond = 1e3;\nexport var durationMinute = 6e4;\nexport var durationHour = 36e5;\nexport var durationDay = 864e5;\nexport var durationWeek = 6048e5;","import interval from \"./interval.js\";\nimport { durationMinute, durationWeek } from \"./duration.js\";\n\nfunction weekday(i) {\n return interval(function (date) {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function (start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;","import interval from \"./interval.js\";\nimport { durationDay, durationMinute } from \"./duration.js\";\nvar day = interval(function (date) {\n date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setDate(date.getDate() + step);\n}, function (start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;\n}, function (date) {\n return date.getDate() - 1;\n});\nexport default day;\nexport var days = day.range;","import interval from \"./interval.js\";\nimport { durationHour, durationMinute, durationSecond } from \"./duration.js\";\nvar hour = interval(function (date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, function (date, step) {\n date.setTime(+date + step * durationHour);\n}, function (start, end) {\n return (end - start) / durationHour;\n}, function (date) {\n return date.getHours();\n});\nexport default hour;\nexport var hours = hour.range;","import interval from \"./interval.js\";\nimport { durationMinute, durationSecond } from \"./duration.js\";\nvar minute = interval(function (date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, function (date, step) {\n date.setTime(+date + step * durationMinute);\n}, function (start, end) {\n return (end - start) / durationMinute;\n}, function (date) {\n return date.getMinutes();\n});\nexport default minute;\nexport var minutes = minute.range;","import interval from \"./interval.js\";\nimport { durationSecond } from \"./duration.js\";\nvar second = interval(function (date) {\n date.setTime(date - date.getMilliseconds());\n}, function (date, step) {\n date.setTime(+date + step * durationSecond);\n}, function (start, end) {\n return (end - start) / durationSecond;\n}, function (date) {\n return date.getUTCSeconds();\n});\nexport default second;\nexport var seconds = second.range;","import interval from \"./interval.js\";\nvar millisecond = interval(function () {// noop\n}, function (date, step) {\n date.setTime(+date + step);\n}, function (start, end) {\n return end - start;\n}); // An optimized implementation for this simple case.\n\nmillisecond.every = function (k) {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return interval(function (date) {\n date.setTime(Math.floor(date / k) * k);\n }, function (date, step) {\n date.setTime(+date + step * k);\n }, function (start, end) {\n return (end - start) / k;\n });\n};\n\nexport default millisecond;\nexport var milliseconds = millisecond.range;","import interval from \"./interval.js\";\nimport { durationWeek } from \"./duration.js\";\n\nfunction utcWeekday(i) {\n return interval(function (date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function (start, end) {\n return (end - start) / durationWeek;\n });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;","import interval from \"./interval.js\";\nimport { durationDay } from \"./duration.js\";\nvar utcDay = interval(function (date) {\n date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n}, function (start, end) {\n return (end - start) / durationDay;\n}, function (date) {\n return date.getUTCDate() - 1;\n});\nexport default utcDay;\nexport var utcDays = utcDay.range;","import interval from \"./interval.js\";\nvar utcYear = interval(function (date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function (start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, function (date) {\n return date.getUTCFullYear();\n}); // An optimized implementation for this simple case.\n\nutcYear.every = function (k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function (date) {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;","import { timeDay, timeSunday, timeMonday, timeThursday, timeYear, utcDay, utcSunday, utcMonday, utcThursday, utcYear } from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {\n y: y,\n m: m,\n d: d,\n H: 0,\n M: 0,\n S: 0,\n L: 0\n };\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n }; // These recursive directive definitions must be deferred.\n\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function (date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function (string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week,\n day;\n if (i != string.length) return null; // If a UNIX timestamp is specified, return it.\n\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0)); // If this is utcParse, never use the local timezone.\n\n if (Z && !(\"Z\" in d)) d.Z = 0; // The am-pm flag is 0 for AM, and 1 for PM.\n\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12; // If the month was not specified, inherit from the quarter.\n\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0; // Convert day-of-week and week-of-year to day-of-year.\n\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n } // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n\n\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n } // Otherwise, all fields are in local time.\n\n\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || (j = parse(d, string, j)) < 0) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function format(specifier) {\n var f = newFormat(specifier += \"\", formats);\n\n f.toString = function () {\n return specifier;\n };\n\n return f;\n },\n parse: function parse(specifier) {\n var p = newParse(specifier += \"\", false);\n\n p.toString = function () {\n return specifier;\n };\n\n return p;\n },\n utcFormat: function utcFormat(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n\n f.toString = function () {\n return specifier;\n };\n\n return f;\n },\n utcParse: function utcParse(specifier) {\n var p = newParse(specifier += \"\", true);\n\n p.toString = function () {\n return specifier;\n };\n\n return p;\n }\n };\n}\nvar pads = {\n \"-\": \"\",\n \"_\": \" \",\n \"0\": \"0\"\n},\n numberRe = /^\\s*\\d+/,\n // note: ignores next directive\npercentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n var map = {},\n i = -1,\n n = names.length;\n\n while (++i < n) {\n map[names[i].toLowerCase()] = i;\n }\n\n return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\")) + pad(z / 60 | 0, \"0\", 2) + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}","import formatLocale from \"./locale.js\";\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}","import { bisector, tickStep } from \"d3-array\";\nimport { timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeMillisecond } from \"d3-time\";\nimport { timeFormat } from \"d3-time-format\";\nimport { map } from \"./array\";\nimport continuous, { copy, identity } from \"./continuous\";\nimport { initRange } from \"./init\";\nimport nice from \"./nice\";\nvar durationSecond = 1000,\n durationMinute = durationSecond * 60,\n durationHour = durationMinute * 60,\n durationDay = durationHour * 24,\n durationWeek = durationDay * 7,\n durationMonth = durationDay * 30,\n durationYear = durationDay * 365;\n\nfunction date(t) {\n return new Date(t);\n}\n\nfunction number(t) {\n return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(year, month, week, day, hour, minute, second, millisecond, format) {\n var scale = continuous(identity, identity),\n invert = scale.invert,\n domain = scale.domain;\n var formatMillisecond = format(\".%L\"),\n formatSecond = format(\":%S\"),\n formatMinute = format(\"%I:%M\"),\n formatHour = format(\"%I %p\"),\n formatDay = format(\"%a %d\"),\n formatWeek = format(\"%b %d\"),\n formatMonth = format(\"%B\"),\n formatYear = format(\"%Y\");\n var tickIntervals = [[second, 1, durationSecond], [second, 5, 5 * durationSecond], [second, 15, 15 * durationSecond], [second, 30, 30 * durationSecond], [minute, 1, durationMinute], [minute, 5, 5 * durationMinute], [minute, 15, 15 * durationMinute], [minute, 30, 30 * durationMinute], [hour, 1, durationHour], [hour, 3, 3 * durationHour], [hour, 6, 6 * durationHour], [hour, 12, 12 * durationHour], [day, 1, durationDay], [day, 2, 2 * durationDay], [week, 1, durationWeek], [month, 1, durationMonth], [month, 3, 3 * durationMonth], [year, 1, durationYear]];\n\n function tickFormat(date) {\n return (second(date) < date ? formatMillisecond : minute(date) < date ? formatSecond : hour(date) < date ? formatMinute : day(date) < date ? formatHour : month(date) < date ? week(date) < date ? formatDay : formatWeek : year(date) < date ? formatMonth : formatYear)(date);\n }\n\n function tickInterval(interval, start, stop, step) {\n if (interval == null) interval = 10; // If a desired tick count is specified, pick a reasonable tick interval\n // based on the extent of the domain and a rough estimate of tick size.\n // Otherwise, assume interval is already a time interval and use it.\n\n if (typeof interval === \"number\") {\n var target = Math.abs(stop - start) / interval,\n i = bisector(function (i) {\n return i[2];\n }).right(tickIntervals, target);\n\n if (i === tickIntervals.length) {\n step = tickStep(start / durationYear, stop / durationYear, interval);\n interval = year;\n } else if (i) {\n i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n step = i[1];\n interval = i[0];\n } else {\n step = Math.max(tickStep(start, stop, interval), 1);\n interval = millisecond;\n }\n }\n\n return step == null ? interval : interval.every(step);\n }\n\n scale.invert = function (y) {\n return new Date(invert(y));\n };\n\n scale.domain = function (_) {\n return arguments.length ? domain(map.call(_, number)) : domain().map(date);\n };\n\n scale.ticks = function (interval, step) {\n var d = domain(),\n t0 = d[0],\n t1 = d[d.length - 1],\n r = t1 < t0,\n t;\n if (r) t = t0, t0 = t1, t1 = t;\n t = tickInterval(interval, t0, t1, step);\n t = t ? t.range(t0, t1 + 1) : []; // inclusive stop\n\n return r ? t.reverse() : t;\n };\n\n scale.tickFormat = function (count, specifier) {\n return specifier == null ? tickFormat : format(specifier);\n };\n\n scale.nice = function (interval, step) {\n var d = domain();\n return (interval = tickInterval(interval, d[0], d[d.length - 1], step)) ? domain(nice(d, interval)) : scale;\n };\n\n scale.copy = function () {\n return copy(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format));\n };\n\n return scale;\n}\nexport default function () {\n return initRange.apply(calendar(timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeMillisecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}","import interval from \"./interval.js\";\nvar utcMonth = interval(function (date) {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, function (start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function (date) {\n return date.getUTCMonth();\n});\nexport default utcMonth;\nexport var utcMonths = utcMonth.range;","import interval from \"./interval.js\";\nimport { durationHour } from \"./duration.js\";\nvar utcHour = interval(function (date) {\n date.setUTCMinutes(0, 0, 0);\n}, function (date, step) {\n date.setTime(+date + step * durationHour);\n}, function (start, end) {\n return (end - start) / durationHour;\n}, function (date) {\n return date.getUTCHours();\n});\nexport default utcHour;\nexport var utcHours = utcHour.range;","import interval from \"./interval.js\";\nimport { durationMinute } from \"./duration.js\";\nvar utcMinute = interval(function (date) {\n date.setUTCSeconds(0, 0);\n}, function (date, step) {\n date.setTime(+date + step * durationMinute);\n}, function (start, end) {\n return (end - start) / durationMinute;\n}, function (date) {\n return date.getUTCMinutes();\n});\nexport default utcMinute;\nexport var utcMinutes = utcMinute.range;","import { calendar } from \"./time\";\nimport { utcFormat } from \"d3-time-format\";\nimport { utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcMillisecond } from \"d3-time\";\nimport { initRange } from \"./init\";\nexport default function () {\n return initRange.apply(calendar(utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcMillisecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}","import { identity } from \"./continuous\";\nimport { initInterpolator } from \"./init\";\nimport { linearish } from \"./linear\";\nimport { loggish } from \"./log\";\nimport { symlogish } from \"./symlog\";\nimport { powish } from \"./pow\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 1,\n t0,\n t1,\n k10,\n transform,\n interpolator = identity,\n clamp = false,\n unknown;\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function (_) {\n return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n };\n\n scale.clamp = function (_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function (_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n scale.unknown = function (_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function (t) {\n transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n return scale;\n };\n}\n\nexport function copy(source, target) {\n return target.domain(source.domain()).interpolator(source.interpolator()).clamp(source.clamp()).unknown(source.unknown());\n}\nexport default function sequential() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function () {\n return copy(scale, sequential());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\nexport function sequentialLog() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function () {\n return copy(scale, sequentialLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\nexport function sequentialSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function () {\n return copy(scale, sequentialSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\nexport function sequentialPow() {\n var scale = powish(transformer());\n\n scale.copy = function () {\n return copy(scale, sequentialPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\nexport function sequentialSqrt() {\n return sequentialPow.apply(null, arguments).exponent(0.5);\n}","import { ascending, bisect } from \"d3-array\";\nimport { identity } from \"./continuous\";\nimport { initInterpolator } from \"./init\";\nexport default function sequentialQuantile() {\n var domain = [],\n interpolator = identity;\n\n function scale(x) {\n if (!isNaN(x = +x)) return interpolator((bisect(domain, x) - 1) / (domain.length - 1));\n }\n\n scale.domain = function (_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n\n for (var i = 0, n = _.length, d; i < n; ++i) {\n if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);\n }\n\n domain.sort(ascending);\n return scale;\n };\n\n scale.interpolator = function (_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n scale.copy = function () {\n return sequentialQuantile(interpolator).domain(domain);\n };\n\n return initInterpolator.apply(scale, arguments);\n}","import { identity } from \"./continuous\";\nimport { initInterpolator } from \"./init\";\nimport { linearish } from \"./linear\";\nimport { loggish } from \"./log\";\nimport { copy } from \"./sequential\";\nimport { symlogish } from \"./symlog\";\nimport { powish } from \"./pow\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 0.5,\n x2 = 1,\n t0,\n t1,\n t2,\n k10,\n k21,\n interpolator = identity,\n transform,\n clamp = false,\n unknown;\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (x < t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function (_) {\n return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), t2 = transform(x2 = +_[2]), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), scale) : [x0, x1, x2];\n };\n\n scale.clamp = function (_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function (_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n scale.unknown = function (_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function (t) {\n transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1);\n return scale;\n };\n}\n\nexport default function diverging() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function () {\n return copy(scale, diverging());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\nexport function divergingLog() {\n var scale = loggish(transformer()).domain([0.1, 1, 10]);\n\n scale.copy = function () {\n return copy(scale, divergingLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\nexport function divergingSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function () {\n return copy(scale, divergingSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\nexport function divergingPow() {\n var scale = powish(transformer());\n\n scale.copy = function () {\n return copy(scale, divergingPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\nexport function divergingSqrt() {\n return divergingPow.apply(null, arguments).exponent(0.5);\n}","export default function (specifier) {\n var n = specifier.length / 6 | 0,\n colors = new Array(n),\n i = 0;\n\n while (i < n) {\n colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n }\n\n return colors;\n}","import colors from \"../colors.js\";\nexport default colors(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\");","import colors from \"../colors.js\";\nexport default colors(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\");","import colors from \"../colors.js\";\nexport default colors(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\");","import colors from \"../colors.js\";\nexport default colors(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\");","import colors from \"../colors.js\";\nexport default colors(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\");","import colors from \"../colors.js\";\nexport default colors(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\");","import colors from \"../colors.js\";\nexport default colors(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\");","import colors from \"../colors.js\";\nexport default colors(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\");","import colors from \"../colors.js\";\nexport default colors(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\");","import colors from \"../colors.js\";\nexport default colors(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");","import { interpolateRgbBasis } from \"d3-interpolate\";\nexport default function (scheme) {\n return interpolateRgbBasis(scheme[scheme.length - 1]);\n}","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"d8b365f5f5f55ab4ac\", \"a6611adfc27d80cdc1018571\", \"a6611adfc27df5f5f580cdc1018571\", \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\", \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\", \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\", \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\", \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\", \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"af8dc3f7f7f77fbf7b\", \"7b3294c2a5cfa6dba0008837\", \"7b3294c2a5cff7f7f7a6dba0008837\", \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\", \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\", \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\", \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\", \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\", \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"e9a3c9f7f7f7a1d76a\", \"d01c8bf1b6dab8e1864dac26\", \"d01c8bf1b6daf7f7f7b8e1864dac26\", \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\", \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\", \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\", \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\", \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\", \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"998ec3f7f7f7f1a340\", \"5e3c99b2abd2fdb863e66101\", \"5e3c99b2abd2f7f7f7fdb863e66101\", \"542788998ec3d8daebfee0b6f1a340b35806\", \"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\", \"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\", \"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\", \"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\", \"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"ef8a62f7f7f767a9cf\", \"ca0020f4a58292c5de0571b0\", \"ca0020f4a582f7f7f792c5de0571b0\", \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\", \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\", \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\", \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\", \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\", \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"ef8a62ffffff999999\", \"ca0020f4a582bababa404040\", \"ca0020f4a582ffffffbababa404040\", \"b2182bef8a62fddbc7e0e0e09999994d4d4d\", \"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\", \"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\", \"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\", \"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\", \"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"fc8d59ffffbf91bfdb\", \"d7191cfdae61abd9e92c7bb6\", \"d7191cfdae61ffffbfabd9e92c7bb6\", \"d73027fc8d59fee090e0f3f891bfdb4575b4\", \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\", \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\", \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\", \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\", \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"fc8d59ffffbf91cf60\", \"d7191cfdae61a6d96a1a9641\", \"d7191cfdae61ffffbfa6d96a1a9641\", \"d73027fc8d59fee08bd9ef8b91cf601a9850\", \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\", \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\", \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\", \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\", \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"fc8d59ffffbf99d594\", \"d7191cfdae61abdda42b83ba\", \"d7191cfdae61ffffbfabdda42b83ba\", \"d53e4ffc8d59fee08be6f59899d5943288bd\", \"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\", \"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\", \"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\", \"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\", \"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"e5f5f999d8c92ca25f\", \"edf8fbb2e2e266c2a4238b45\", \"edf8fbb2e2e266c2a42ca25f006d2c\", \"edf8fbccece699d8c966c2a42ca25f006d2c\", \"edf8fbccece699d8c966c2a441ae76238b45005824\", \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\", \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"e0ecf49ebcda8856a7\", \"edf8fbb3cde38c96c688419d\", \"edf8fbb3cde38c96c68856a7810f7c\", \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\", \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\", \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\", \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"e0f3dba8ddb543a2ca\", \"f0f9e8bae4bc7bccc42b8cbe\", \"f0f9e8bae4bc7bccc443a2ca0868ac\", \"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\", \"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\", \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\", \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"fee8c8fdbb84e34a33\", \"fef0d9fdcc8afc8d59d7301f\", \"fef0d9fdcc8afc8d59e34a33b30000\", \"fef0d9fdd49efdbb84fc8d59e34a33b30000\", \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\", \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\", \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"ece2f0a6bddb1c9099\", \"f6eff7bdc9e167a9cf02818a\", \"f6eff7bdc9e167a9cf1c9099016c59\", \"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\", \"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\", \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\", \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"ece7f2a6bddb2b8cbe\", \"f1eef6bdc9e174a9cf0570b0\", \"f1eef6bdc9e174a9cf2b8cbe045a8d\", \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\", \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\", \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\", \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"e7e1efc994c7dd1c77\", \"f1eef6d7b5d8df65b0ce1256\", \"f1eef6d7b5d8df65b0dd1c77980043\", \"f1eef6d4b9dac994c7df65b0dd1c77980043\", \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\", \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\", \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"fde0ddfa9fb5c51b8a\", \"feebe2fbb4b9f768a1ae017e\", \"feebe2fbb4b9f768a1c51b8a7a0177\", \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\", \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\", \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\", \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"edf8b17fcdbb2c7fb8\", \"ffffcca1dab441b6c4225ea8\", \"ffffcca1dab441b6c42c7fb8253494\", \"ffffccc7e9b47fcdbb41b6c42c7fb8253494\", \"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\", \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\", \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"f7fcb9addd8e31a354\", \"ffffccc2e69978c679238443\", \"ffffccc2e69978c67931a354006837\", \"ffffccd9f0a3addd8e78c67931a354006837\", \"ffffccd9f0a3addd8e78c67941ab5d238443005a32\", \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\", \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"fff7bcfec44fd95f0e\", \"ffffd4fed98efe9929cc4c02\", \"ffffd4fed98efe9929d95f0e993404\", \"ffffd4fee391fec44ffe9929d95f0e993404\", \"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\", \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\", \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"ffeda0feb24cf03b20\", \"ffffb2fecc5cfd8d3ce31a1c\", \"ffffb2fecc5cfd8d3cf03b20bd0026\", \"ffffb2fed976feb24cfd8d3cf03b20bd0026\", \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\", \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\", \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"deebf79ecae13182bd\", \"eff3ffbdd7e76baed62171b5\", \"eff3ffbdd7e76baed63182bd08519c\", \"eff3ffc6dbef9ecae16baed63182bd08519c\", \"eff3ffc6dbef9ecae16baed64292c62171b5084594\", \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\", \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"e5f5e0a1d99b31a354\", \"edf8e9bae4b374c476238b45\", \"edf8e9bae4b374c47631a354006d2c\", \"edf8e9c7e9c0a1d99b74c47631a354006d2c\", \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\", \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\", \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"f0f0f0bdbdbd636363\", \"f7f7f7cccccc969696525252\", \"f7f7f7cccccc969696636363252525\", \"f7f7f7d9d9d9bdbdbd969696636363252525\", \"f7f7f7d9d9d9bdbdbd969696737373525252252525\", \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\", \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"efedf5bcbddc756bb1\", \"f2f0f7cbc9e29e9ac86a51a3\", \"f2f0f7cbc9e29e9ac8756bb154278f\", \"f2f0f7dadaebbcbddc9e9ac8756bb154278f\", \"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\", \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\", \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"fee0d2fc9272de2d26\", \"fee5d9fcae91fb6a4acb181d\", \"fee5d9fcae91fb6a4ade2d26a50f15\", \"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\", \"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\", \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\", \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"fee6cefdae6be6550d\", \"feeddefdbe85fd8d3cd94701\", \"feeddefdbe85fd8d3ce6550da63603\", \"feeddefdd0a2fdae6bfd8d3ce6550da63603\", \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\", \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\", \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\").map(colors);\nexport default ramp(scheme);","export default function (t) {\n t = Math.max(0, Math.min(1, t));\n return \"rgb(\" + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + \", \" + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + \", \" + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67))))))) + \")\";\n}","import { cubehelix } from \"d3-color\";\nimport { interpolateCubehelixLong } from \"d3-interpolate\";\nexport default interpolateCubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));","import { cubehelix } from \"d3-color\";\nimport { interpolateCubehelixLong } from \"d3-interpolate\";\nexport var warm = interpolateCubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\nexport var cool = interpolateCubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\nvar c = cubehelix();\nexport default function (t) {\n if (t < 0 || t > 1) t -= Math.floor(t);\n var ts = Math.abs(t - 0.5);\n c.h = 360 * t - 100;\n c.s = 1.5 - 1.5 * ts;\n c.l = 0.8 - 0.9 * ts;\n return c + \"\";\n}","import { rgb } from \"d3-color\";\nvar c = rgb(),\n pi_1_3 = Math.PI / 3,\n pi_2_3 = Math.PI * 2 / 3;\nexport default function (t) {\n var x;\n t = (0.5 - t) * Math.PI;\n c.r = 255 * (x = Math.sin(t)) * x;\n c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;\n c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;\n return c + \"\";\n}","export default function (t) {\n t = Math.max(0, Math.min(1, t));\n return \"rgb(\" + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + \", \" + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + \", \" + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66))))))) + \")\";\n}","import colors from \"../colors.js\";\n\nfunction ramp(range) {\n var n = range.length;\n return function (t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}\n\nexport default ramp(colors(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\"));\nexport var magma = ramp(colors(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\nexport var inferno = ramp(colors(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\nexport var plasma = ramp(colors(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));","import creator from \"./creator\";\nimport select from \"./select\";\nexport default function (name) {\n return select(creator(name).call(document.documentElement));\n}","var nextId = 0;\nexport default function local() {\n return new Local();\n}\n\nfunction Local() {\n this._ = \"@\" + (++nextId).toString(36);\n}\n\nLocal.prototype = local.prototype = {\n constructor: Local,\n get: function get(node) {\n var id = this._;\n\n while (!(id in node)) {\n if (!(node = node.parentNode)) return;\n }\n\n return node[id];\n },\n set: function set(node, value) {\n return node[this._] = value;\n },\n remove: function remove(node) {\n return this._ in node && delete node[this._];\n },\n toString: function toString() {\n return this._;\n }\n};","import { Selection, root } from \"./selection/index\";\nexport default function (selector) {\n return typeof selector === \"string\" ? new Selection([document.querySelectorAll(selector)], [document.documentElement]) : new Selection([selector == null ? [] : selector], root);\n}","import sourceEvent from \"./sourceEvent\";\nimport point from \"./point\";\nexport default function (node, touches) {\n if (touches == null) touches = sourceEvent().touches;\n\n for (var i = 0, n = touches ? touches.length : 0, points = new Array(n); i < n; ++i) {\n points[i] = point(node, touches[i]);\n }\n\n return points;\n}","export default function (x) {\n return function constant() {\n return x;\n };\n}","export var abs = Math.abs;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var max = Math.max;\nexport var min = Math.min;\nexport var sin = Math.sin;\nexport var sqrt = Math.sqrt;\nexport var epsilon = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = 2 * pi;\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}","import { path } from \"d3-path\";\nimport constant from \"./constant.js\";\nimport { abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau } from \"./math.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0,\n y10 = y1 - y0,\n x32 = x3 - x2,\n y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n} // Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\n\n\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00; // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function () {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null;\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n if (!context) context = buffer = path(); // Ensure that the outer radius is always larger than the inner radius.\n\n if (r1 < r0) r = r1, r1 = r0, r0 = r; // Is it a point?\n\n if (!(r1 > epsilon)) context.moveTo(0, 0); // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n } // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = ap > epsilon && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1; // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10); // Apply rounded corners?\n\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc; // Restrict the corner radius according to the sector angle.\n\n if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n }\n } // Is the sector collapsed to a line?\n\n\n if (!(da1 > epsilon)) context.moveTo(x01, y01); // Does the sector’s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); // Have the corners merged?\n\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n } // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10); // Does the sector’s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); // Have the corners merged?\n\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n } // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n context.closePath();\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function () {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function (_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function (_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function (_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function (_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function (_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function (_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function (_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function (_) {\n return arguments.length ? (context = _ == null ? null : _, arc) : context;\n };\n\n return arc;\n}","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n\n case 1:\n this._point = 2;\n // proceed\n\n default:\n this._context.lineTo(x, y);\n\n break;\n }\n }\n};\nexport default function (context) {\n return new Linear(context);\n}","export function x(p) {\n return p[0];\n}\nexport function y(p) {\n return p[1];\n}","import { path } from \"d3-path\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport { x as pointX, y as pointY } from \"./point.js\";\nexport default function () {\n var x = pointX,\n y = pointY,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null;\n\n function line(data) {\n var i,\n n = data.length,\n d,\n defined0 = false,\n buffer;\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();else output.lineEnd();\n }\n\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function (_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function (_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function (_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function (_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function (_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}","import { path } from \"d3-path\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport line from \"./line.js\";\nimport { x as pointX, y as pointY } from \"./point.js\";\nexport default function () {\n var x0 = pointX,\n x1 = null,\n y0 = constant(0),\n y1 = pointY,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null;\n\n function area(data) {\n var i,\n j,\n k,\n n = data.length,\n d,\n defined0 = false,\n buffer,\n x0z = new Array(n),\n y0z = new Array(n);\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) {\n j = i;\n output.areaStart();\n output.lineStart();\n } else {\n output.lineEnd();\n output.lineStart();\n\n for (k = i - 1; k >= j; --k) {\n output.point(x0z[k], y0z[k]);\n }\n\n output.lineEnd();\n output.areaEnd();\n }\n }\n\n if (defined0) {\n x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n }\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n function arealine() {\n return line().defined(defined).curve(curve).context(context);\n }\n\n area.x = function (_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n };\n\n area.x0 = function (_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n };\n\n area.x1 = function (_) {\n return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n };\n\n area.y = function (_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n };\n\n area.y0 = function (_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n };\n\n area.y1 = function (_) {\n return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n };\n\n area.lineX0 = area.lineY0 = function () {\n return arealine().x(x0).y(y0);\n };\n\n area.lineY1 = function () {\n return arealine().x(x0).y(y1);\n };\n\n area.lineX1 = function () {\n return arealine().x(x1).y(y0);\n };\n\n area.defined = function (_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n };\n\n area.curve = function (_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n };\n\n area.context = function (_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n };\n\n return area;\n}","export default function (a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}","export default function (d) {\n return d;\n}","import constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport { tau } from \"./math.js\";\nexport default function () {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = data.length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n } // Optionally sort the arcs by previously-computed values or by data.\n\n\n if (sortValues != null) index.sort(function (i, j) {\n return sortValues(arcs[i], arcs[j]);\n });else if (sort != null) index.sort(function (i, j) {\n return sort(data[i], data[j]);\n }); // Compute the arcs! They are stored in the original data's order.\n\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function (_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function (_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function (_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function (_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function (_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function (_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}","import curveLinear from \"./linear.js\";\nexport var curveRadialLinear = curveRadial(curveLinear);\n\nfunction Radial(curve) {\n this._curve = curve;\n}\n\nRadial.prototype = {\n areaStart: function areaStart() {\n this._curve.areaStart();\n },\n areaEnd: function areaEnd() {\n this._curve.areaEnd();\n },\n lineStart: function lineStart() {\n this._curve.lineStart();\n },\n lineEnd: function lineEnd() {\n this._curve.lineEnd();\n },\n point: function point(a, r) {\n this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n }\n};\nexport default function curveRadial(curve) {\n function radial(context) {\n return new Radial(curve(context));\n }\n\n radial._curve = curve;\n return radial;\n}","import curveRadial, { curveRadialLinear } from \"./curve/radial.js\";\nimport line from \"./line.js\";\nexport function lineRadial(l) {\n var c = l.curve;\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n\n l.curve = function (_) {\n return arguments.length ? c(curveRadial(_)) : c()._curve;\n };\n\n return l;\n}\nexport default function () {\n return lineRadial(line().curve(curveRadialLinear));\n}","import curveRadial, { curveRadialLinear } from \"./curve/radial.js\";\nimport area from \"./area.js\";\nimport { lineRadial } from \"./lineRadial.js\";\nexport default function () {\n var a = area().curve(curveRadialLinear),\n c = a.curve,\n x0 = a.lineX0,\n x1 = a.lineX1,\n y0 = a.lineY0,\n y1 = a.lineY1;\n a.angle = a.x, delete a.x;\n a.startAngle = a.x0, delete a.x0;\n a.endAngle = a.x1, delete a.x1;\n a.radius = a.y, delete a.y;\n a.innerRadius = a.y0, delete a.y0;\n a.outerRadius = a.y1, delete a.y1;\n a.lineStartAngle = function () {\n return lineRadial(x0());\n }, delete a.lineX0;\n a.lineEndAngle = function () {\n return lineRadial(x1());\n }, delete a.lineX1;\n a.lineInnerRadius = function () {\n return lineRadial(y0());\n }, delete a.lineY0;\n a.lineOuterRadius = function () {\n return lineRadial(y1());\n }, delete a.lineY1;\n\n a.curve = function (_) {\n return arguments.length ? c(curveRadial(_)) : c()._curve;\n };\n\n return a;\n}","export default function (x, y) {\n return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];\n}","export var slice = Array.prototype.slice;","import { path } from \"d3-path\";\nimport { slice } from \"../array.js\";\nimport constant from \"../constant.js\";\nimport { x as pointX, y as pointY } from \"../point.js\";\nimport pointRadial from \"../pointRadial.js\";\n\nfunction linkSource(d) {\n return d.source;\n}\n\nfunction linkTarget(d) {\n return d.target;\n}\n\nfunction link(curve) {\n var source = linkSource,\n target = linkTarget,\n x = pointX,\n y = pointY,\n context = null;\n\n function link() {\n var buffer,\n argv = slice.call(arguments),\n s = source.apply(this, argv),\n t = target.apply(this, argv);\n if (!context) context = buffer = path();\n curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n link.source = function (_) {\n return arguments.length ? (source = _, link) : source;\n };\n\n link.target = function (_) {\n return arguments.length ? (target = _, link) : target;\n };\n\n link.x = function (_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), link) : x;\n };\n\n link.y = function (_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), link) : y;\n };\n\n link.context = function (_) {\n return arguments.length ? (context = _ == null ? null : _, link) : context;\n };\n\n return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n var p0 = pointRadial(x0, y0),\n p1 = pointRadial(x0, y0 = (y0 + y1) / 2),\n p2 = pointRadial(x1, y0),\n p3 = pointRadial(x1, y1);\n context.moveTo(p0[0], p0[1]);\n context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nexport function linkHorizontal() {\n return link(curveHorizontal);\n}\nexport function linkVertical() {\n return link(curveVertical);\n}\nexport function linkRadial() {\n var l = link(curveRadial);\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n return l;\n}","import { pi, tau } from \"../math.js\";\nexport default {\n draw: function draw(context, size) {\n var r = Math.sqrt(size / pi);\n context.moveTo(r, 0);\n context.arc(0, 0, r, 0, tau);\n }\n};","export default {\n draw: function draw(context, size) {\n var r = Math.sqrt(size / 5) / 2;\n context.moveTo(-3 * r, -r);\n context.lineTo(-r, -r);\n context.lineTo(-r, -3 * r);\n context.lineTo(r, -3 * r);\n context.lineTo(r, -r);\n context.lineTo(3 * r, -r);\n context.lineTo(3 * r, r);\n context.lineTo(r, r);\n context.lineTo(r, 3 * r);\n context.lineTo(-r, 3 * r);\n context.lineTo(-r, r);\n context.lineTo(-3 * r, r);\n context.closePath();\n }\n};","var tan30 = Math.sqrt(1 / 3),\n tan30_2 = tan30 * 2;\nexport default {\n draw: function draw(context, size) {\n var y = Math.sqrt(size / tan30_2),\n x = y * tan30;\n context.moveTo(0, -y);\n context.lineTo(x, 0);\n context.lineTo(0, y);\n context.lineTo(-x, 0);\n context.closePath();\n }\n};","import { pi, tau } from \"../math.js\";\nvar ka = 0.89081309152928522810,\n kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10),\n kx = Math.sin(tau / 10) * kr,\n ky = -Math.cos(tau / 10) * kr;\nexport default {\n draw: function draw(context, size) {\n var r = Math.sqrt(size * ka),\n x = kx * r,\n y = ky * r;\n context.moveTo(0, -r);\n context.lineTo(x, y);\n\n for (var i = 1; i < 5; ++i) {\n var a = tau * i / 5,\n c = Math.cos(a),\n s = Math.sin(a);\n context.lineTo(s * r, -c * r);\n context.lineTo(c * x - s * y, s * x + c * y);\n }\n\n context.closePath();\n }\n};","export default {\n draw: function draw(context, size) {\n var w = Math.sqrt(size),\n x = -w / 2;\n context.rect(x, x, w, w);\n }\n};","var sqrt3 = Math.sqrt(3);\nexport default {\n draw: function draw(context, size) {\n var y = -Math.sqrt(size / (sqrt3 * 3));\n context.moveTo(0, y * 2);\n context.lineTo(-sqrt3 * y, -y);\n context.lineTo(sqrt3 * y, -y);\n context.closePath();\n }\n};","var c = -0.5,\n s = Math.sqrt(3) / 2,\n k = 1 / Math.sqrt(12),\n a = (k / 2 + 1) * 3;\nexport default {\n draw: function draw(context, size) {\n var r = Math.sqrt(size / a),\n x0 = r / 2,\n y0 = r * k,\n x1 = x0,\n y1 = r * k + r,\n x2 = -x1,\n y2 = y1;\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n context.lineTo(x2, y2);\n context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n context.closePath();\n }\n};","import { path } from \"d3-path\";\nimport circle from \"./symbol/circle.js\";\nimport cross from \"./symbol/cross.js\";\nimport diamond from \"./symbol/diamond.js\";\nimport star from \"./symbol/star.js\";\nimport square from \"./symbol/square.js\";\nimport triangle from \"./symbol/triangle.js\";\nimport wye from \"./symbol/wye.js\";\nimport constant from \"./constant.js\";\nexport var symbols = [circle, cross, diamond, square, star, triangle, wye];\nexport default function () {\n var type = constant(circle),\n size = constant(64),\n context = null;\n\n function symbol() {\n var buffer;\n if (!context) context = buffer = path();\n type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n symbol.type = function (_) {\n return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n };\n\n symbol.size = function (_) {\n return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n };\n\n symbol.context = function (_) {\n return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n };\n\n return symbol;\n}","export default function () {}","function _point(that, x, y) {\n that._context.bezierCurveTo((2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6);\n}\n\nexport { _point as point };\nexport function Basis(context) {\n this._context = context;\n}\nBasis.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 3:\n _point(this, this._x1, this._y1);\n\n // proceed\n\n case 2:\n this._context.lineTo(this._x1, this._y1);\n\n break;\n }\n\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n\n case 1:\n this._point = 2;\n break;\n\n case 2:\n this._point = 3;\n\n this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);\n\n // proceed\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\nexport default function (context) {\n return new Basis(context);\n}","import noop from \"../noop.js\";\nimport { point as _point } from \"./basis.js\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 1:\n {\n this._context.moveTo(this._x2, this._y2);\n\n this._context.closePath();\n\n break;\n }\n\n case 2:\n {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n\n this._context.closePath();\n\n break;\n }\n\n case 3:\n {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._x2 = x, this._y2 = y;\n break;\n\n case 1:\n this._point = 2;\n this._x3 = x, this._y3 = y;\n break;\n\n case 2:\n this._point = 3;\n this._x4 = x, this._y4 = y;\n\n this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6);\n\n break;\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\nexport default function (context) {\n return new BasisClosed(context);\n}","import { point as _point } from \"./basis.js\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n break;\n\n case 1:\n this._point = 2;\n break;\n\n case 2:\n this._point = 3;\n var x0 = (this._x0 + 4 * this._x1 + x) / 6,\n y0 = (this._y0 + 4 * this._y1 + y) / 6;\n this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0);\n break;\n\n case 3:\n this._point = 4;\n // proceed\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\nexport default function (context) {\n return new BasisOpen(context);\n}","import { Basis } from \"./basis.js\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function lineStart() {\n this._x = [];\n this._y = [];\n\n this._basis.lineStart();\n },\n lineEnd: function lineEnd() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n\n this._basis.point(this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), this._beta * y[i] + (1 - this._beta) * (y0 + t * dy));\n }\n }\n\n this._x = this._y = null;\n\n this._basis.lineEnd();\n },\n point: function point(x, y) {\n this._x.push(+x);\n\n this._y.push(+y);\n }\n};\nexport default (function custom(beta) {\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function (beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);","function _point(that, x, y) {\n that._context.bezierCurveTo(that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2);\n}\n\nexport { _point as point };\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\nCardinal.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 2:\n this._context.lineTo(this._x2, this._y2);\n\n break;\n\n case 3:\n _point(this, this._x1, this._y1);\n\n break;\n }\n\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n\n case 1:\n this._point = 2;\n this._x1 = x, this._y1 = y;\n break;\n\n case 2:\n this._point = 3;\n // proceed\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\nexport default (function custom(tension) {\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function (tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);","import noop from \"../noop.js\";\nimport { point as _point } from \"./cardinal.js\";\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 1:\n {\n this._context.moveTo(this._x3, this._y3);\n\n this._context.closePath();\n\n break;\n }\n\n case 2:\n {\n this._context.lineTo(this._x3, this._y3);\n\n this._context.closePath();\n\n break;\n }\n\n case 3:\n {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._x3 = x, this._y3 = y;\n break;\n\n case 1:\n this._point = 2;\n\n this._context.moveTo(this._x4 = x, this._y4 = y);\n\n break;\n\n case 2:\n this._point = 3;\n this._x5 = x, this._y5 = y;\n break;\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\nexport default (function custom(tension) {\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function (tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);","import { point as _point } from \"./cardinal.js\";\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\nCardinalOpen.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n break;\n\n case 1:\n this._point = 2;\n break;\n\n case 2:\n this._point = 3;\n this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);\n break;\n\n case 3:\n this._point = 4;\n // proceed\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\nexport default (function custom(tension) {\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function (tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);","import { epsilon } from \"../math.js\";\nimport { Cardinal } from \"./cardinal.js\";\n\nfunction _point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nexport { _point as point };\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 2:\n this._context.lineTo(this._x2, this._y2);\n\n break;\n\n case 3:\n this.point(this._x2, this._y2);\n break;\n }\n\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n\n case 1:\n this._point = 2;\n break;\n\n case 2:\n this._point = 3;\n // proceed\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\nexport default (function custom(alpha) {\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function (alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);","import { CardinalClosed } from \"./cardinalClosed.js\";\nimport noop from \"../noop.js\";\nimport { point as _point } from \"./catmullRom.js\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 1:\n {\n this._context.moveTo(this._x3, this._y3);\n\n this._context.closePath();\n\n break;\n }\n\n case 2:\n {\n this._context.lineTo(this._x3, this._y3);\n\n this._context.closePath();\n\n break;\n }\n\n case 3:\n {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._x3 = x, this._y3 = y;\n break;\n\n case 1:\n this._point = 2;\n\n this._context.moveTo(this._x4 = x, this._y4 = y);\n\n break;\n\n case 2:\n this._point = 3;\n this._x5 = x, this._y5 = y;\n break;\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\nexport default (function custom(alpha) {\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function (alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);","import { CardinalOpen } from \"./cardinalOpen.js\";\nimport { point as _point } from \"./catmullRom.js\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0:\n this._point = 1;\n break;\n\n case 1:\n this._point = 2;\n break;\n\n case 2:\n this._point = 3;\n this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);\n break;\n\n case 3:\n this._point = 4;\n // proceed\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\nexport default (function custom(alpha) {\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function (alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);","import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function lineStart() {\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (this._point) this._context.closePath();\n },\n point: function point(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);else this._point = 1, this._context.moveTo(x, y);\n }\n};\nexport default function (context) {\n return new LinearClosed(context);\n}","function sign(x) {\n return x < 0 ? -1 : 1;\n} // Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\n\n\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n} // Calculate a one-sided slope.\n\n\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n} // According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\n\n\nfunction _point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 2:\n this._context.lineTo(this._x1, this._y1);\n\n break;\n\n case 3:\n _point(this, this._t0, slope2(this, this._t0));\n\n break;\n }\n\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n var t1 = NaN;\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n\n case 1:\n this._point = 2;\n break;\n\n case 2:\n this._point = 3;\n\n _point(this, slope2(this, t1 = slope3(this, x, y)), t1);\n\n break;\n\n default:\n _point(this, this._t0, t1 = slope3(this, x, y));\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n};\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function (x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function moveTo(x, y) {\n this._context.moveTo(y, x);\n },\n closePath: function closePath() {\n this._context.closePath();\n },\n lineTo: function lineTo(x, y) {\n this._context.lineTo(y, x);\n },\n bezierCurveTo: function bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._context.bezierCurveTo(y1, x1, y2, x2, y, x);\n }\n};\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}","function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function lineEnd() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || this._line !== 0 && n === 1) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function point(x, y) {\n this._x.push(+x);\n\n this._y.push(+y);\n }\n}; // See https://www.particleincell.com/2012/bezier-splines/ for derivation.\n\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n\n for (i = 1; i < n - 1; ++i) {\n a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n }\n\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n\n for (i = 1; i < n; ++i) {\n m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n }\n\n a[n - 1] = r[n - 1] / b[n - 1];\n\n for (i = n - 2; i >= 0; --i) {\n a[i] = (r[i] - a[i + 1]) / b[i];\n }\n\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n\n for (i = 0; i < n - 1; ++i) {\n b[i] = 2 * x[i + 1] - a[i + 1];\n }\n\n return [a, b];\n}\n\nexport default function (context) {\n return new Natural(context);\n}","function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n\n case 1:\n this._point = 2;\n // proceed\n\n default:\n {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n\n this._context.lineTo(x1, this._y);\n\n this._context.lineTo(x1, y);\n }\n\n break;\n }\n }\n\n this._x = x, this._y = y;\n }\n};\nexport default function (context) {\n return new Step(context, 0.5);\n}\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\nexport function stepAfter(context) {\n return new Step(context, 1);\n}","export default function (series, order) {\n if (!((n = series.length) > 1)) return;\n\n for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n s0 = s1, s1 = series[order[i]];\n\n for (j = 0; j < m; ++j) {\n s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n }\n }\n}","export default function (series) {\n var n = series.length,\n o = new Array(n);\n\n while (--n >= 0) {\n o[n] = n;\n }\n\n return o;\n}","import { slice } from \"./array.js\";\nimport constant from \"./constant.js\";\nimport offsetNone from \"./offset/none.js\";\nimport orderNone from \"./order/none.js\";\n\nfunction stackValue(d, key) {\n return d[key];\n}\n\nexport default function () {\n var keys = constant([]),\n order = orderNone,\n offset = offsetNone,\n value = stackValue;\n\n function stack(data) {\n var kz = keys.apply(this, arguments),\n i,\n m = data.length,\n n = kz.length,\n sz = new Array(n),\n oz;\n\n for (i = 0; i < n; ++i) {\n for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {\n si[j] = sij = [0, +value(data[j], ki, j, data)];\n sij.data = data[j];\n }\n\n si.key = ki;\n }\n\n for (i = 0, oz = order(sz); i < n; ++i) {\n sz[oz[i]].index = i;\n }\n\n offset(sz, oz);\n return sz;\n }\n\n stack.keys = function (_) {\n return arguments.length ? (keys = typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : keys;\n };\n\n stack.value = function (_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), stack) : value;\n };\n\n stack.order = function (_) {\n return arguments.length ? (order = _ == null ? orderNone : typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : order;\n };\n\n stack.offset = function (_) {\n return arguments.length ? (offset = _ == null ? offsetNone : _, stack) : offset;\n };\n\n return stack;\n}","import none from \"./none.js\";\nexport default function (series, order) {\n if (!((n = series.length) > 0)) return;\n\n for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n for (y = i = 0; i < n; ++i) {\n y += series[i][j][1] || 0;\n }\n\n if (y) for (i = 0; i < n; ++i) {\n series[i][j][1] /= y;\n }\n }\n\n none(series, order);\n}","export default function (series, order) {\n if (!((n = series.length) > 0)) return;\n\n for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {\n for (yp = yn = 0, i = 0; i < n; ++i) {\n if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) {\n d[0] = yp, d[1] = yp += dy;\n } else if (dy < 0) {\n d[1] = yn, d[0] = yn += dy;\n } else {\n d[0] = 0, d[1] = dy;\n }\n }\n }\n}","import none from \"./none.js\";\nexport default function (series, order) {\n if (!((n = series.length) > 0)) return;\n\n for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n for (var i = 0, y = 0; i < n; ++i) {\n y += series[i][j][1] || 0;\n }\n\n s0[j][1] += s0[j][0] = -y / 2;\n }\n\n none(series, order);\n}","import none from \"./none.js\";\nexport default function (series, order) {\n if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n\n for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n var si = series[order[i]],\n sij0 = si[j][1] || 0,\n sij1 = si[j - 1][1] || 0,\n s3 = (sij0 - sij1) / 2;\n\n for (var k = 0; k < i; ++k) {\n var sk = series[order[k]],\n skj0 = sk[j][1] || 0,\n skj1 = sk[j - 1][1] || 0;\n s3 += skj0 - skj1;\n }\n\n s1 += sij0, s2 += s3 * sij0;\n }\n\n s0[j - 1][1] += s0[j - 1][0] = y;\n if (s1) y -= s2 / s1;\n }\n\n s0[j - 1][1] += s0[j - 1][0] = y;\n none(series, order);\n}","import none from \"./none.js\";\nexport default function (series) {\n var peaks = series.map(peak);\n return none(series).sort(function (a, b) {\n return peaks[a] - peaks[b];\n });\n}\n\nfunction peak(series) {\n var i = -1,\n j = 0,\n n = series.length,\n vi,\n vj = -Infinity;\n\n while (++i < n) {\n if ((vi = +series[i][1]) > vj) vj = vi, j = i;\n }\n\n return j;\n}","import none from \"./none.js\";\nexport default function (series) {\n var sums = series.map(sum);\n return none(series).sort(function (a, b) {\n return sums[a] - sums[b];\n });\n}\nexport function sum(series) {\n var s = 0,\n i = -1,\n n = series.length,\n v;\n\n while (++i < n) {\n if (v = +series[i][1]) s += v;\n }\n\n return s;\n}","import ascending from \"./ascending.js\";\nexport default function (series) {\n return ascending(series).reverse();\n}","import appearance from \"./appearance.js\";\nimport { sum } from \"./ascending.js\";\nexport default function (series) {\n var n = series.length,\n i,\n j,\n sums = series.map(sum),\n order = appearance(series),\n top = 0,\n bottom = 0,\n tops = [],\n bottoms = [];\n\n for (i = 0; i < n; ++i) {\n j = order[i];\n\n if (top < bottom) {\n top += sums[j];\n tops.push(j);\n } else {\n bottom += sums[j];\n bottoms.push(j);\n }\n }\n\n return bottoms.reverse().concat(tops);\n}","import none from \"./none.js\";\nexport default function (series) {\n return none(series).reverse();\n}","import { utcFormat } from \"./defaultLocale.js\";\nexport var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\nfunction formatIsoNative(date) {\n return date.toISOString();\n}\n\nvar formatIso = Date.prototype.toISOString ? formatIsoNative : utcFormat(isoSpecifier);\nexport default formatIso;","import { isoSpecifier } from \"./isoFormat.js\";\nimport { utcParse } from \"./defaultLocale.js\";\n\nfunction parseIsoNative(string) {\n var date = new Date(string);\n return isNaN(date) ? null : date;\n}\n\nvar parseIso = +new Date(\"2000-01-01T00:00:00.000Z\") ? parseIsoNative : utcParse(isoSpecifier);\nexport default parseIso;","import { Timer, now } from \"./timer.js\";\nexport default function (callback, delay, time) {\n var t = new Timer(),\n total = delay;\n if (delay == null) return t.restart(callback, delay, time), t;\n delay = +delay, time = time == null ? now() : +time;\n t.restart(function tick(elapsed) {\n elapsed += total;\n t.restart(tick, total += delay, time);\n callback(elapsed);\n }, delay, time);\n return t;\n}","export default function (x) {\n return function () {\n return x;\n };\n}","export function x(d) {\n return d[0];\n}\nexport function y(d) {\n return d[1];\n}","function RedBlackTree() {\n this._ = null; // root node\n}\n\nexport function RedBlackNode(node) {\n node.U = // parent node\n node.C = // color - true for red, false for black\n node.L = // left node\n node.R = // right node\n node.P = // previous node\n node.N = null; // next node\n}\nRedBlackTree.prototype = {\n constructor: RedBlackTree,\n insert: function insert(after, node) {\n var parent, grandpa, uncle;\n\n if (after) {\n node.P = after;\n node.N = after.N;\n if (after.N) after.N.P = node;\n after.N = node;\n\n if (after.R) {\n after = after.R;\n\n while (after.L) {\n after = after.L;\n }\n\n after.L = node;\n } else {\n after.R = node;\n }\n\n parent = after;\n } else if (this._) {\n after = RedBlackFirst(this._);\n node.P = null;\n node.N = after;\n after.P = after.L = node;\n parent = after;\n } else {\n node.P = node.N = null;\n this._ = node;\n parent = null;\n }\n\n node.L = node.R = null;\n node.U = parent;\n node.C = true;\n after = node;\n\n while (parent && parent.C) {\n grandpa = parent.U;\n\n if (parent === grandpa.L) {\n uncle = grandpa.R;\n\n if (uncle && uncle.C) {\n parent.C = uncle.C = false;\n grandpa.C = true;\n after = grandpa;\n } else {\n if (after === parent.R) {\n RedBlackRotateLeft(this, parent);\n after = parent;\n parent = after.U;\n }\n\n parent.C = false;\n grandpa.C = true;\n RedBlackRotateRight(this, grandpa);\n }\n } else {\n uncle = grandpa.L;\n\n if (uncle && uncle.C) {\n parent.C = uncle.C = false;\n grandpa.C = true;\n after = grandpa;\n } else {\n if (after === parent.L) {\n RedBlackRotateRight(this, parent);\n after = parent;\n parent = after.U;\n }\n\n parent.C = false;\n grandpa.C = true;\n RedBlackRotateLeft(this, grandpa);\n }\n }\n\n parent = after.U;\n }\n\n this._.C = false;\n },\n remove: function remove(node) {\n if (node.N) node.N.P = node.P;\n if (node.P) node.P.N = node.N;\n node.N = node.P = null;\n var parent = node.U,\n sibling,\n left = node.L,\n right = node.R,\n next,\n red;\n if (!left) next = right;else if (!right) next = left;else next = RedBlackFirst(right);\n\n if (parent) {\n if (parent.L === node) parent.L = next;else parent.R = next;\n } else {\n this._ = next;\n }\n\n if (left && right) {\n red = next.C;\n next.C = node.C;\n next.L = left;\n left.U = next;\n\n if (next !== right) {\n parent = next.U;\n next.U = node.U;\n node = next.R;\n parent.L = node;\n next.R = right;\n right.U = next;\n } else {\n next.U = parent;\n parent = next;\n node = next.R;\n }\n } else {\n red = node.C;\n node = next;\n }\n\n if (node) node.U = parent;\n if (red) return;\n\n if (node && node.C) {\n node.C = false;\n return;\n }\n\n do {\n if (node === this._) break;\n\n if (node === parent.L) {\n sibling = parent.R;\n\n if (sibling.C) {\n sibling.C = false;\n parent.C = true;\n RedBlackRotateLeft(this, parent);\n sibling = parent.R;\n }\n\n if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) {\n if (!sibling.R || !sibling.R.C) {\n sibling.L.C = false;\n sibling.C = true;\n RedBlackRotateRight(this, sibling);\n sibling = parent.R;\n }\n\n sibling.C = parent.C;\n parent.C = sibling.R.C = false;\n RedBlackRotateLeft(this, parent);\n node = this._;\n break;\n }\n } else {\n sibling = parent.L;\n\n if (sibling.C) {\n sibling.C = false;\n parent.C = true;\n RedBlackRotateRight(this, parent);\n sibling = parent.L;\n }\n\n if (sibling.L && sibling.L.C || sibling.R && sibling.R.C) {\n if (!sibling.L || !sibling.L.C) {\n sibling.R.C = false;\n sibling.C = true;\n RedBlackRotateLeft(this, sibling);\n sibling = parent.L;\n }\n\n sibling.C = parent.C;\n parent.C = sibling.L.C = false;\n RedBlackRotateRight(this, parent);\n node = this._;\n break;\n }\n }\n\n sibling.C = true;\n node = parent;\n parent = parent.U;\n } while (!node.C);\n\n if (node) node.C = false;\n }\n};\n\nfunction RedBlackRotateLeft(tree, node) {\n var p = node,\n q = node.R,\n parent = p.U;\n\n if (parent) {\n if (parent.L === p) parent.L = q;else parent.R = q;\n } else {\n tree._ = q;\n }\n\n q.U = parent;\n p.U = q;\n p.R = q.L;\n if (p.R) p.R.U = p;\n q.L = p;\n}\n\nfunction RedBlackRotateRight(tree, node) {\n var p = node,\n q = node.L,\n parent = p.U;\n\n if (parent) {\n if (parent.L === p) parent.L = q;else parent.R = q;\n } else {\n tree._ = q;\n }\n\n q.U = parent;\n p.U = q;\n p.L = q.R;\n if (p.L) p.L.U = p;\n q.R = p;\n}\n\nfunction RedBlackFirst(node) {\n while (node.L) {\n node = node.L;\n }\n\n return node;\n}\n\nexport default RedBlackTree;","import { cells, edges, epsilon } from \"./Diagram\";\nexport function createEdge(left, right, v0, v1) {\n var edge = [null, null],\n index = edges.push(edge) - 1;\n edge.left = left;\n edge.right = right;\n if (v0) setEdgeEnd(edge, left, right, v0);\n if (v1) setEdgeEnd(edge, right, left, v1);\n cells[left.index].halfedges.push(index);\n cells[right.index].halfedges.push(index);\n return edge;\n}\nexport function createBorderEdge(left, v0, v1) {\n var edge = [v0, v1];\n edge.left = left;\n return edge;\n}\nexport function setEdgeEnd(edge, left, right, vertex) {\n if (!edge[0] && !edge[1]) {\n edge[0] = vertex;\n edge.left = left;\n edge.right = right;\n } else if (edge.left === right) {\n edge[1] = vertex;\n } else {\n edge[0] = vertex;\n }\n} // Liang–Barsky line clipping.\n\nfunction clipEdge(edge, x0, y0, x1, y1) {\n var a = edge[0],\n b = edge[1],\n ax = a[0],\n ay = a[1],\n bx = b[0],\n by = b[1],\n t0 = 0,\n t1 = 1,\n dx = bx - ax,\n dy = by - ay,\n r;\n r = x0 - ax;\n if (!dx && r > 0) return;\n r /= dx;\n\n if (dx < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dx > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = x1 - ax;\n if (!dx && r < 0) return;\n r /= dx;\n\n if (dx < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dx > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n r = y0 - ay;\n if (!dy && r > 0) return;\n r /= dy;\n\n if (dy < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dy > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = y1 - ay;\n if (!dy && r < 0) return;\n r /= dy;\n\n if (dy < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dy > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n if (!(t0 > 0) && !(t1 < 1)) return true; // TODO Better check?\n\n if (t0 > 0) edge[0] = [ax + t0 * dx, ay + t0 * dy];\n if (t1 < 1) edge[1] = [ax + t1 * dx, ay + t1 * dy];\n return true;\n}\n\nfunction connectEdge(edge, x0, y0, x1, y1) {\n var v1 = edge[1];\n if (v1) return true;\n var v0 = edge[0],\n left = edge.left,\n right = edge.right,\n lx = left[0],\n ly = left[1],\n rx = right[0],\n ry = right[1],\n fx = (lx + rx) / 2,\n fy = (ly + ry) / 2,\n fm,\n fb;\n\n if (ry === ly) {\n if (fx < x0 || fx >= x1) return;\n\n if (lx > rx) {\n if (!v0) v0 = [fx, y0];else if (v0[1] >= y1) return;\n v1 = [fx, y1];\n } else {\n if (!v0) v0 = [fx, y1];else if (v0[1] < y0) return;\n v1 = [fx, y0];\n }\n } else {\n fm = (lx - rx) / (ry - ly);\n fb = fy - fm * fx;\n\n if (fm < -1 || fm > 1) {\n if (lx > rx) {\n if (!v0) v0 = [(y0 - fb) / fm, y0];else if (v0[1] >= y1) return;\n v1 = [(y1 - fb) / fm, y1];\n } else {\n if (!v0) v0 = [(y1 - fb) / fm, y1];else if (v0[1] < y0) return;\n v1 = [(y0 - fb) / fm, y0];\n }\n } else {\n if (ly < ry) {\n if (!v0) v0 = [x0, fm * x0 + fb];else if (v0[0] >= x1) return;\n v1 = [x1, fm * x1 + fb];\n } else {\n if (!v0) v0 = [x1, fm * x1 + fb];else if (v0[0] < x0) return;\n v1 = [x0, fm * x0 + fb];\n }\n }\n }\n\n edge[0] = v0;\n edge[1] = v1;\n return true;\n}\n\nexport function clipEdges(x0, y0, x1, y1) {\n var i = edges.length,\n edge;\n\n while (i--) {\n if (!connectEdge(edge = edges[i], x0, y0, x1, y1) || !clipEdge(edge, x0, y0, x1, y1) || !(Math.abs(edge[0][0] - edge[1][0]) > epsilon || Math.abs(edge[0][1] - edge[1][1]) > epsilon)) {\n delete edges[i];\n }\n }\n}","import { createBorderEdge } from \"./Edge\";\nimport { cells, edges, epsilon } from \"./Diagram\";\nexport function createCell(site) {\n return cells[site.index] = {\n site: site,\n halfedges: []\n };\n}\n\nfunction cellHalfedgeAngle(cell, edge) {\n var site = cell.site,\n va = edge.left,\n vb = edge.right;\n if (site === vb) vb = va, va = site;\n if (vb) return Math.atan2(vb[1] - va[1], vb[0] - va[0]);\n if (site === va) va = edge[1], vb = edge[0];else va = edge[0], vb = edge[1];\n return Math.atan2(va[0] - vb[0], vb[1] - va[1]);\n}\n\nexport function cellHalfedgeStart(cell, edge) {\n return edge[+(edge.left !== cell.site)];\n}\nexport function cellHalfedgeEnd(cell, edge) {\n return edge[+(edge.left === cell.site)];\n}\nexport function sortCellHalfedges() {\n for (var i = 0, n = cells.length, cell, halfedges, j, m; i < n; ++i) {\n if ((cell = cells[i]) && (m = (halfedges = cell.halfedges).length)) {\n var index = new Array(m),\n array = new Array(m);\n\n for (j = 0; j < m; ++j) {\n index[j] = j, array[j] = cellHalfedgeAngle(cell, edges[halfedges[j]]);\n }\n\n index.sort(function (i, j) {\n return array[j] - array[i];\n });\n\n for (j = 0; j < m; ++j) {\n array[j] = halfedges[index[j]];\n }\n\n for (j = 0; j < m; ++j) {\n halfedges[j] = array[j];\n }\n }\n }\n}\nexport function clipCells(x0, y0, x1, y1) {\n var nCells = cells.length,\n iCell,\n cell,\n site,\n iHalfedge,\n halfedges,\n nHalfedges,\n start,\n startX,\n startY,\n end,\n endX,\n endY,\n cover = true;\n\n for (iCell = 0; iCell < nCells; ++iCell) {\n if (cell = cells[iCell]) {\n site = cell.site;\n halfedges = cell.halfedges;\n iHalfedge = halfedges.length; // Remove any dangling clipped edges.\n\n while (iHalfedge--) {\n if (!edges[halfedges[iHalfedge]]) {\n halfedges.splice(iHalfedge, 1);\n }\n } // Insert any border edges as necessary.\n\n\n iHalfedge = 0, nHalfedges = halfedges.length;\n\n while (iHalfedge < nHalfedges) {\n end = cellHalfedgeEnd(cell, edges[halfedges[iHalfedge]]), endX = end[0], endY = end[1];\n start = cellHalfedgeStart(cell, edges[halfedges[++iHalfedge % nHalfedges]]), startX = start[0], startY = start[1];\n\n if (Math.abs(endX - startX) > epsilon || Math.abs(endY - startY) > epsilon) {\n halfedges.splice(iHalfedge, 0, edges.push(createBorderEdge(site, end, Math.abs(endX - x0) < epsilon && y1 - endY > epsilon ? [x0, Math.abs(startX - x0) < epsilon ? startY : y1] : Math.abs(endY - y1) < epsilon && x1 - endX > epsilon ? [Math.abs(startY - y1) < epsilon ? startX : x1, y1] : Math.abs(endX - x1) < epsilon && endY - y0 > epsilon ? [x1, Math.abs(startX - x1) < epsilon ? startY : y0] : Math.abs(endY - y0) < epsilon && endX - x0 > epsilon ? [Math.abs(startY - y0) < epsilon ? startX : x0, y0] : null)) - 1);\n ++nHalfedges;\n }\n }\n\n if (nHalfedges) cover = false;\n }\n } // If there weren’t any edges, have the closest site cover the extent.\n // It doesn’t matter which corner of the extent we measure!\n\n\n if (cover) {\n var dx,\n dy,\n d2,\n dc = Infinity;\n\n for (iCell = 0, cover = null; iCell < nCells; ++iCell) {\n if (cell = cells[iCell]) {\n site = cell.site;\n dx = site[0] - x0;\n dy = site[1] - y0;\n d2 = dx * dx + dy * dy;\n if (d2 < dc) dc = d2, cover = cell;\n }\n }\n\n if (cover) {\n var v00 = [x0, y0],\n v01 = [x0, y1],\n v11 = [x1, y1],\n v10 = [x1, y0];\n cover.halfedges.push(edges.push(createBorderEdge(site = cover.site, v00, v01)) - 1, edges.push(createBorderEdge(site, v01, v11)) - 1, edges.push(createBorderEdge(site, v11, v10)) - 1, edges.push(createBorderEdge(site, v10, v00)) - 1);\n }\n } // Lastly delete any cells with no edges; these were entirely clipped.\n\n\n for (iCell = 0; iCell < nCells; ++iCell) {\n if (cell = cells[iCell]) {\n if (!cell.halfedges.length) {\n delete cells[iCell];\n }\n }\n }\n}","import { RedBlackNode } from \"./RedBlackTree\";\nimport { circles, epsilon2 } from \"./Diagram\";\nvar circlePool = [];\nexport var firstCircle;\n\nfunction Circle() {\n RedBlackNode(this);\n this.x = this.y = this.arc = this.site = this.cy = null;\n}\n\nexport function attachCircle(arc) {\n var lArc = arc.P,\n rArc = arc.N;\n if (!lArc || !rArc) return;\n var lSite = lArc.site,\n cSite = arc.site,\n rSite = rArc.site;\n if (lSite === rSite) return;\n var bx = cSite[0],\n by = cSite[1],\n ax = lSite[0] - bx,\n ay = lSite[1] - by,\n cx = rSite[0] - bx,\n cy = rSite[1] - by;\n var d = 2 * (ax * cy - ay * cx);\n if (d >= -epsilon2) return;\n var ha = ax * ax + ay * ay,\n hc = cx * cx + cy * cy,\n x = (cy * ha - ay * hc) / d,\n y = (ax * hc - cx * ha) / d;\n var circle = circlePool.pop() || new Circle();\n circle.arc = arc;\n circle.site = cSite;\n circle.x = x + bx;\n circle.y = (circle.cy = y + by) + Math.sqrt(x * x + y * y); // y bottom\n\n arc.circle = circle;\n var before = null,\n node = circles._;\n\n while (node) {\n if (circle.y < node.y || circle.y === node.y && circle.x <= node.x) {\n if (node.L) node = node.L;else {\n before = node.P;\n break;\n }\n } else {\n if (node.R) node = node.R;else {\n before = node;\n break;\n }\n }\n }\n\n circles.insert(before, circle);\n if (!before) firstCircle = circle;\n}\nexport function detachCircle(arc) {\n var circle = arc.circle;\n\n if (circle) {\n if (!circle.P) firstCircle = circle.N;\n circles.remove(circle);\n circlePool.push(circle);\n RedBlackNode(circle);\n arc.circle = null;\n }\n}","import { RedBlackNode } from \"./RedBlackTree\";\nimport { createCell } from \"./Cell\";\nimport { attachCircle, detachCircle } from \"./Circle\";\nimport { createEdge, setEdgeEnd } from \"./Edge\";\nimport { beaches, epsilon } from \"./Diagram\";\nvar beachPool = [];\n\nfunction Beach() {\n RedBlackNode(this);\n this.edge = this.site = this.circle = null;\n}\n\nfunction createBeach(site) {\n var beach = beachPool.pop() || new Beach();\n beach.site = site;\n return beach;\n}\n\nfunction detachBeach(beach) {\n detachCircle(beach);\n beaches.remove(beach);\n beachPool.push(beach);\n RedBlackNode(beach);\n}\n\nexport function removeBeach(beach) {\n var circle = beach.circle,\n x = circle.x,\n y = circle.cy,\n vertex = [x, y],\n previous = beach.P,\n next = beach.N,\n disappearing = [beach];\n detachBeach(beach);\n var lArc = previous;\n\n while (lArc.circle && Math.abs(x - lArc.circle.x) < epsilon && Math.abs(y - lArc.circle.cy) < epsilon) {\n previous = lArc.P;\n disappearing.unshift(lArc);\n detachBeach(lArc);\n lArc = previous;\n }\n\n disappearing.unshift(lArc);\n detachCircle(lArc);\n var rArc = next;\n\n while (rArc.circle && Math.abs(x - rArc.circle.x) < epsilon && Math.abs(y - rArc.circle.cy) < epsilon) {\n next = rArc.N;\n disappearing.push(rArc);\n detachBeach(rArc);\n rArc = next;\n }\n\n disappearing.push(rArc);\n detachCircle(rArc);\n var nArcs = disappearing.length,\n iArc;\n\n for (iArc = 1; iArc < nArcs; ++iArc) {\n rArc = disappearing[iArc];\n lArc = disappearing[iArc - 1];\n setEdgeEnd(rArc.edge, lArc.site, rArc.site, vertex);\n }\n\n lArc = disappearing[0];\n rArc = disappearing[nArcs - 1];\n rArc.edge = createEdge(lArc.site, rArc.site, null, vertex);\n attachCircle(lArc);\n attachCircle(rArc);\n}\nexport function addBeach(site) {\n var x = site[0],\n directrix = site[1],\n lArc,\n rArc,\n dxl,\n dxr,\n node = beaches._;\n\n while (node) {\n dxl = leftBreakPoint(node, directrix) - x;\n if (dxl > epsilon) node = node.L;else {\n dxr = x - rightBreakPoint(node, directrix);\n\n if (dxr > epsilon) {\n if (!node.R) {\n lArc = node;\n break;\n }\n\n node = node.R;\n } else {\n if (dxl > -epsilon) {\n lArc = node.P;\n rArc = node;\n } else if (dxr > -epsilon) {\n lArc = node;\n rArc = node.N;\n } else {\n lArc = rArc = node;\n }\n\n break;\n }\n }\n }\n\n createCell(site);\n var newArc = createBeach(site);\n beaches.insert(lArc, newArc);\n if (!lArc && !rArc) return;\n\n if (lArc === rArc) {\n detachCircle(lArc);\n rArc = createBeach(lArc.site);\n beaches.insert(newArc, rArc);\n newArc.edge = rArc.edge = createEdge(lArc.site, newArc.site);\n attachCircle(lArc);\n attachCircle(rArc);\n return;\n }\n\n if (!rArc) {\n // && lArc\n newArc.edge = createEdge(lArc.site, newArc.site);\n return;\n } // else lArc !== rArc\n\n\n detachCircle(lArc);\n detachCircle(rArc);\n var lSite = lArc.site,\n ax = lSite[0],\n ay = lSite[1],\n bx = site[0] - ax,\n by = site[1] - ay,\n rSite = rArc.site,\n cx = rSite[0] - ax,\n cy = rSite[1] - ay,\n d = 2 * (bx * cy - by * cx),\n hb = bx * bx + by * by,\n hc = cx * cx + cy * cy,\n vertex = [(cy * hb - by * hc) / d + ax, (bx * hc - cx * hb) / d + ay];\n setEdgeEnd(rArc.edge, lSite, rSite, vertex);\n newArc.edge = createEdge(lSite, site, null, vertex);\n rArc.edge = createEdge(site, rSite, null, vertex);\n attachCircle(lArc);\n attachCircle(rArc);\n}\n\nfunction leftBreakPoint(arc, directrix) {\n var site = arc.site,\n rfocx = site[0],\n rfocy = site[1],\n pby2 = rfocy - directrix;\n if (!pby2) return rfocx;\n var lArc = arc.P;\n if (!lArc) return -Infinity;\n site = lArc.site;\n var lfocx = site[0],\n lfocy = site[1],\n plby2 = lfocy - directrix;\n if (!plby2) return lfocx;\n var hl = lfocx - rfocx,\n aby2 = 1 / pby2 - 1 / plby2,\n b = hl / plby2;\n if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx;\n return (rfocx + lfocx) / 2;\n}\n\nfunction rightBreakPoint(arc, directrix) {\n var rArc = arc.N;\n if (rArc) return leftBreakPoint(rArc, directrix);\n var site = arc.site;\n return site[1] === directrix ? site[0] : Infinity;\n}","import { addBeach, removeBeach } from \"./Beach\";\nimport { sortCellHalfedges, cellHalfedgeStart, clipCells } from \"./Cell\";\nimport { firstCircle } from \"./Circle\";\nimport { clipEdges } from \"./Edge\";\nimport RedBlackTree from \"./RedBlackTree\";\nexport var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var beaches;\nexport var cells;\nexport var circles;\nexport var edges;\n\nfunction triangleArea(a, b, c) {\n return (a[0] - c[0]) * (b[1] - a[1]) - (a[0] - b[0]) * (c[1] - a[1]);\n}\n\nfunction lexicographic(a, b) {\n return b[1] - a[1] || b[0] - a[0];\n}\n\nexport default function Diagram(sites, extent) {\n var site = sites.sort(lexicographic).pop(),\n x,\n y,\n circle;\n edges = [];\n cells = new Array(sites.length);\n beaches = new RedBlackTree();\n circles = new RedBlackTree();\n\n while (true) {\n circle = firstCircle;\n\n if (site && (!circle || site[1] < circle.y || site[1] === circle.y && site[0] < circle.x)) {\n if (site[0] !== x || site[1] !== y) {\n addBeach(site);\n x = site[0], y = site[1];\n }\n\n site = sites.pop();\n } else if (circle) {\n removeBeach(circle.arc);\n } else {\n break;\n }\n }\n\n sortCellHalfedges();\n\n if (extent) {\n var x0 = +extent[0][0],\n y0 = +extent[0][1],\n x1 = +extent[1][0],\n y1 = +extent[1][1];\n clipEdges(x0, y0, x1, y1);\n clipCells(x0, y0, x1, y1);\n }\n\n this.edges = edges;\n this.cells = cells;\n beaches = circles = edges = cells = null;\n}\nDiagram.prototype = {\n constructor: Diagram,\n polygons: function polygons() {\n var edges = this.edges;\n return this.cells.map(function (cell) {\n var polygon = cell.halfedges.map(function (i) {\n return cellHalfedgeStart(cell, edges[i]);\n });\n polygon.data = cell.site.data;\n return polygon;\n });\n },\n triangles: function triangles() {\n var triangles = [],\n edges = this.edges;\n this.cells.forEach(function (cell, i) {\n if (!(m = (halfedges = cell.halfedges).length)) return;\n var site = cell.site,\n halfedges,\n j = -1,\n m,\n s0,\n e1 = edges[halfedges[m - 1]],\n s1 = e1.left === site ? e1.right : e1.left;\n\n while (++j < m) {\n s0 = s1;\n e1 = edges[halfedges[j]];\n s1 = e1.left === site ? e1.right : e1.left;\n\n if (s0 && s1 && i < s0.index && i < s1.index && triangleArea(site, s0, s1) < 0) {\n triangles.push([site.data, s0.data, s1.data]);\n }\n }\n });\n return triangles;\n },\n links: function links() {\n return this.edges.filter(function (edge) {\n return edge.right;\n }).map(function (edge) {\n return {\n source: edge.left.data,\n target: edge.right.data\n };\n });\n },\n find: function find(x, y, radius) {\n var that = this,\n i0,\n i1 = that._found || 0,\n n = that.cells.length,\n cell; // Use the previously-found cell, or start with an arbitrary one.\n\n while (!(cell = that.cells[i1])) {\n if (++i1 >= n) return null;\n }\n\n var dx = x - cell.site[0],\n dy = y - cell.site[1],\n d2 = dx * dx + dy * dy; // Traverse the half-edges to find a closer cell, if any.\n\n do {\n cell = that.cells[i0 = i1], i1 = null;\n cell.halfedges.forEach(function (e) {\n var edge = that.edges[e],\n v = edge.left;\n if ((v === cell.site || !v) && !(v = edge.right)) return;\n var vx = x - v[0],\n vy = y - v[1],\n v2 = vx * vx + vy * vy;\n if (v2 < d2) d2 = v2, i1 = v.index;\n });\n } while (i1 !== null);\n\n that._found = i0;\n return radius == null || d2 <= radius * radius ? cell.site : null;\n }\n};","import constant from \"./constant\";\nimport { x as pointX, y as pointY } from \"./point\";\nimport Diagram, { epsilon } from \"./Diagram\";\nexport default function () {\n var x = pointX,\n y = pointY,\n extent = null;\n\n function voronoi(data) {\n return new Diagram(data.map(function (d, i) {\n var s = [Math.round(x(d, i, data) / epsilon) * epsilon, Math.round(y(d, i, data) / epsilon) * epsilon];\n s.index = i;\n s.data = d;\n return s;\n }), extent);\n }\n\n voronoi.polygons = function (data) {\n return voronoi(data).polygons();\n };\n\n voronoi.links = function (data) {\n return voronoi(data).links();\n };\n\n voronoi.triangles = function (data) {\n return voronoi(data).triangles();\n };\n\n voronoi.x = function (_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), voronoi) : x;\n };\n\n voronoi.y = function (_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), voronoi) : y;\n };\n\n voronoi.extent = function (_) {\n return arguments.length ? (extent = _ == null ? null : [[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]], voronoi) : extent && [[extent[0][0], extent[0][1]], [extent[1][0], extent[1][1]]];\n };\n\n voronoi.size = function (_) {\n return arguments.length ? (extent = _ == null ? null : [[0, 0], [+_[0], +_[1]]], voronoi) : extent && [extent[1][0] - extent[0][0], extent[1][1] - extent[0][1]];\n };\n\n return voronoi;\n}","export default function (x) {\n return function () {\n return x;\n };\n}","export default function ZoomEvent(target, type, transform) {\n this.target = target;\n this.type = type;\n this.transform = transform;\n}","export function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}\nTransform.prototype = {\n constructor: Transform,\n scale: function scale(k) {\n return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n },\n translate: function translate(x, y) {\n return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n },\n apply: function apply(point) {\n return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n },\n applyX: function applyX(x) {\n return x * this.k + this.x;\n },\n applyY: function applyY(y) {\n return y * this.k + this.y;\n },\n invert: function invert(location) {\n return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n },\n invertX: function invertX(x) {\n return (x - this.x) / this.k;\n },\n invertY: function invertY(y) {\n return (y - this.y) / this.k;\n },\n rescaleX: function rescaleX(x) {\n return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n },\n rescaleY: function rescaleY(y) {\n return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n },\n toString: function toString() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\nexport var identity = new Transform(1, 0, 0);\ntransform.prototype = Transform.prototype;\nexport default function transform(node) {\n while (!node.__zoom) {\n if (!(node = node.parentNode)) return identity;\n }\n\n return node.__zoom;\n}","import { event } from \"d3-selection\";\nexport function nopropagation() {\n event.stopImmediatePropagation();\n}\nexport default function () {\n event.preventDefault();\n event.stopImmediatePropagation();\n}","import { dispatch } from \"d3-dispatch\";\nimport { dragDisable, dragEnable } from \"d3-drag\";\nimport { interpolateZoom } from \"d3-interpolate\";\nimport { event, customEvent, select, mouse, touch } from \"d3-selection\";\nimport { interrupt } from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport ZoomEvent from \"./event.js\";\nimport { Transform, identity } from \"./transform.js\";\nimport noevent, { nopropagation } from \"./noevent.js\"; // Ignore right-click, since that should open the context menu.\n\nfunction defaultFilter() {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n var e = this;\n\n if (e instanceof SVGElement) {\n e = e.ownerSVGElement || e;\n\n if (e.hasAttribute(\"viewBox\")) {\n e = e.viewBox.baseVal;\n return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n }\n\n return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n }\n\n return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\n\nfunction defaultTransform() {\n return this.__zoom || identity;\n}\n\nfunction defaultWheelDelta() {\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002);\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || \"ontouchstart\" in this;\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n return transform.translate(dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1), dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1));\n}\n\nexport default function () {\n var filter = defaultFilter,\n extent = defaultExtent,\n constrain = defaultConstrain,\n wheelDelta = defaultWheelDelta,\n touchable = defaultTouchable,\n scaleExtent = [0, Infinity],\n translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n duration = 250,\n interpolate = interpolateZoom,\n listeners = dispatch(\"start\", \"zoom\", \"end\"),\n touchstarting,\n touchending,\n touchDelay = 500,\n wheelDelay = 150,\n clickDistance2 = 0;\n\n function zoom(selection) {\n selection.property(\"__zoom\", defaultTransform).on(\"wheel.zoom\", wheeled).on(\"mousedown.zoom\", mousedowned).on(\"dblclick.zoom\", dblclicked).filter(touchable).on(\"touchstart.zoom\", touchstarted).on(\"touchmove.zoom\", touchmoved).on(\"touchend.zoom touchcancel.zoom\", touchended).style(\"touch-action\", \"none\").style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n zoom.transform = function (collection, transform, point) {\n var selection = collection.selection ? collection.selection() : collection;\n selection.property(\"__zoom\", defaultTransform);\n\n if (collection !== selection) {\n schedule(collection, transform, point);\n } else {\n selection.interrupt().each(function () {\n gesture(this, arguments).start().zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform).end();\n });\n }\n };\n\n zoom.scaleBy = function (selection, k, p) {\n zoom.scaleTo(selection, function () {\n var k0 = this.__zoom.k,\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return k0 * k1;\n }, p);\n };\n\n zoom.scaleTo = function (selection, k, p) {\n zoom.transform(selection, function () {\n var e = extent.apply(this, arguments),\n t0 = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p,\n p1 = t0.invert(p0),\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n }, p);\n };\n\n zoom.translateBy = function (selection, x, y) {\n zoom.transform(selection, function () {\n return constrain(this.__zoom.translate(typeof x === \"function\" ? x.apply(this, arguments) : x, typeof y === \"function\" ? y.apply(this, arguments) : y), extent.apply(this, arguments), translateExtent);\n });\n };\n\n zoom.translateTo = function (selection, x, y, p) {\n zoom.transform(selection, function () {\n var e = extent.apply(this, arguments),\n t = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(typeof x === \"function\" ? -x.apply(this, arguments) : -x, typeof y === \"function\" ? -y.apply(this, arguments) : -y), e, translateExtent);\n }, p);\n };\n\n function scale(transform, k) {\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n return k === transform.k ? transform : new Transform(k, transform.x, transform.y);\n }\n\n function translate(transform, p0, p1) {\n var x = p0[0] - p1[0] * transform.k,\n y = p0[1] - p1[1] * transform.k;\n return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);\n }\n\n function centroid(extent) {\n return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n }\n\n function schedule(transition, transform, point) {\n transition.on(\"start.zoom\", function () {\n gesture(this, arguments).start();\n }).on(\"interrupt.zoom end.zoom\", function () {\n gesture(this, arguments).end();\n }).tween(\"zoom\", function () {\n var that = this,\n args = arguments,\n g = gesture(that, args),\n e = extent.apply(that, args),\n p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point,\n w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n a = that.__zoom,\n b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n return function (t) {\n if (t === 1) t = b; // Avoid rounding error on end.\n else {\n var l = i(t),\n k = w / l[2];\n t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k);\n }\n g.zoom(null, t);\n };\n });\n }\n\n function gesture(that, args, clean) {\n return !clean && that.__zooming || new Gesture(that, args);\n }\n\n function Gesture(that, args) {\n this.that = that;\n this.args = args;\n this.active = 0;\n this.extent = extent.apply(that, args);\n this.taps = 0;\n }\n\n Gesture.prototype = {\n start: function start() {\n if (++this.active === 1) {\n this.that.__zooming = this;\n this.emit(\"start\");\n }\n\n return this;\n },\n zoom: function zoom(key, transform) {\n if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n this.that.__zoom = transform;\n this.emit(\"zoom\");\n return this;\n },\n end: function end() {\n if (--this.active === 0) {\n delete this.that.__zooming;\n this.emit(\"end\");\n }\n\n return this;\n },\n emit: function emit(type) {\n customEvent(new ZoomEvent(zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]);\n }\n };\n\n function wheeled() {\n if (!filter.apply(this, arguments)) return;\n var g = gesture(this, arguments),\n t = this.__zoom,\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n p = mouse(this); // If the mouse is in the same location as before, reuse it.\n // If there were recent wheel events, reset the wheel idle timeout.\n\n if (g.wheel) {\n if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n g.mouse[1] = t.invert(g.mouse[0] = p);\n }\n\n clearTimeout(g.wheel);\n } // If this wheel event won’t trigger a transform change, ignore it.\n else if (t.k === k) return; // Otherwise, capture the mouse point and location at the start.\n else {\n g.mouse = [p, t.invert(p)];\n interrupt(this);\n g.start();\n }\n\n noevent();\n g.wheel = setTimeout(wheelidled, wheelDelay);\n g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n function wheelidled() {\n g.wheel = null;\n g.end();\n }\n }\n\n function mousedowned() {\n if (touchending || !filter.apply(this, arguments)) return;\n var g = gesture(this, arguments, true),\n v = select(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n p = mouse(this),\n x0 = event.clientX,\n y0 = event.clientY;\n dragDisable(event.view);\n nopropagation();\n g.mouse = [p, this.__zoom.invert(p)];\n interrupt(this);\n g.start();\n\n function mousemoved() {\n noevent();\n\n if (!g.moved) {\n var dx = event.clientX - x0,\n dy = event.clientY - y0;\n g.moved = dx * dx + dy * dy > clickDistance2;\n }\n\n g.zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = mouse(g.that), g.mouse[1]), g.extent, translateExtent));\n }\n\n function mouseupped() {\n v.on(\"mousemove.zoom mouseup.zoom\", null);\n dragEnable(event.view, g.moved);\n noevent();\n g.end();\n }\n }\n\n function dblclicked() {\n if (!filter.apply(this, arguments)) return;\n var t0 = this.__zoom,\n p0 = mouse(this),\n p1 = t0.invert(p0),\n k1 = t0.k * (event.shiftKey ? 0.5 : 2),\n t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, arguments), translateExtent);\n noevent();\n if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0);else select(this).call(zoom.transform, t1);\n }\n\n function touchstarted() {\n if (!filter.apply(this, arguments)) return;\n var touches = event.touches,\n n = touches.length,\n g = gesture(this, arguments, event.changedTouches.length === n),\n started,\n i,\n t,\n p;\n nopropagation();\n\n for (i = 0; i < n; ++i) {\n t = touches[i], p = touch(this, touches, t.identifier);\n p = [p, this.__zoom.invert(p), t.identifier];\n if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;\n }\n\n if (touchstarting) touchstarting = clearTimeout(touchstarting);\n\n if (started) {\n if (g.taps < 2) touchstarting = setTimeout(function () {\n touchstarting = null;\n }, touchDelay);\n interrupt(this);\n g.start();\n }\n }\n\n function touchmoved() {\n if (!this.__zooming) return;\n var g = gesture(this, arguments),\n touches = event.changedTouches,\n n = touches.length,\n i,\n t,\n p,\n l;\n noevent();\n if (touchstarting) touchstarting = clearTimeout(touchstarting);\n g.taps = 0;\n\n for (i = 0; i < n; ++i) {\n t = touches[i], p = touch(this, touches, t.identifier);\n if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n }\n\n t = g.that.__zoom;\n\n if (g.touch1) {\n var p0 = g.touch0[0],\n l0 = g.touch0[1],\n p1 = g.touch1[0],\n l1 = g.touch1[1],\n dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n t = scale(t, Math.sqrt(dp / dl));\n p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n } else if (g.touch0) p = g.touch0[0], l = g.touch0[1];else return;\n\n g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n }\n\n function touchended() {\n if (!this.__zooming) return;\n var g = gesture(this, arguments),\n touches = event.changedTouches,\n n = touches.length,\n i,\n t;\n nopropagation();\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function () {\n touchending = null;\n }, touchDelay);\n\n for (i = 0; i < n; ++i) {\n t = touches[i];\n if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n }\n\n if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);else {\n g.end(); // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.\n\n if (g.taps === 2) {\n var p = select(this).on(\"dblclick.zoom\");\n if (p) p.apply(this, arguments);\n }\n }\n }\n\n zoom.wheelDelta = function (_) {\n return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : constant(+_), zoom) : wheelDelta;\n };\n\n zoom.filter = function (_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), zoom) : filter;\n };\n\n zoom.touchable = function (_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), zoom) : touchable;\n };\n\n zoom.extent = function (_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n };\n\n zoom.scaleExtent = function (_) {\n return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n };\n\n zoom.translateExtent = function (_) {\n return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n };\n\n zoom.constrain = function (_) {\n return arguments.length ? (constrain = _, zoom) : constrain;\n };\n\n zoom.duration = function (_) {\n return arguments.length ? (duration = +_, zoom) : duration;\n };\n\n zoom.interpolate = function (_) {\n return arguments.length ? (interpolate = _, zoom) : interpolate;\n };\n\n zoom.on = function () {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? zoom : value;\n };\n\n zoom.clickDistance = function (_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n };\n\n return zoom;\n}","var arrayMap = require('./_arrayMap'),\n baseIntersection = require('./_baseIntersection'),\n baseRest = require('./_baseRest'),\n castArrayLikeObject = require('./_castArrayLikeObject');\n/**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n\n\nvar intersection = baseRest(function (arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];\n});\nmodule.exports = intersection;","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n/** Error message constants. */\n\n\nvar FUNC_ERROR_TEXT = 'Expected a function';\n/* Built-in method references for those with the same name as other `lodash` methods. */\n\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n\n wait = toNumber(wait) || 0;\n\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time; // Start the timer for the trailing edge.\n\n timerId = setTimeout(timerExpired, wait); // Invoke the leading edge.\n\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime; // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n\n return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;\n }\n\n function timerExpired() {\n var time = now();\n\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n } // Restart the timer.\n\n\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n\n return result;\n }\n\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*! algoliasearch.umd.js | 4.8.6 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */\n!function (e, t) {\n \"object\" == (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) && \"undefined\" != typeof module ? module.exports = t() : \"function\" == typeof define && define.amd ? define(t) : (e = e || self).algoliasearch = t();\n}(this, function () {\n \"use strict\";\n\n function e(e, t, r) {\n return t in e ? Object.defineProperty(e, t, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[t] = r, e;\n }\n\n function t(e, t) {\n var r = Object.keys(e);\n\n if (Object.getOwnPropertySymbols) {\n var n = Object.getOwnPropertySymbols(e);\n t && (n = n.filter(function (t) {\n return Object.getOwnPropertyDescriptor(e, t).enumerable;\n })), r.push.apply(r, n);\n }\n\n return r;\n }\n\n function r(r) {\n for (var n = 1; n < arguments.length; n++) {\n var a = null != arguments[n] ? arguments[n] : {};\n n % 2 ? t(Object(a), !0).forEach(function (t) {\n e(r, t, a[t]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(a)) : t(Object(a)).forEach(function (e) {\n Object.defineProperty(r, e, Object.getOwnPropertyDescriptor(a, e));\n });\n }\n\n return r;\n }\n\n function n(e, t) {\n if (null == e) return {};\n\n var r,\n n,\n a = function (e, t) {\n if (null == e) return {};\n var r,\n n,\n a = {},\n o = Object.keys(e);\n\n for (n = 0; n < o.length; n++) {\n r = o[n], t.indexOf(r) >= 0 || (a[r] = e[r]);\n }\n\n return a;\n }(e, t);\n\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n\n for (n = 0; n < o.length; n++) {\n r = o[n], t.indexOf(r) >= 0 || Object.prototype.propertyIsEnumerable.call(e, r) && (a[r] = e[r]);\n }\n }\n\n return a;\n }\n\n function a(e, t) {\n return function (e) {\n if (Array.isArray(e)) return e;\n }(e) || function (e, t) {\n if (!(Symbol.iterator in Object(e) || \"[object Arguments]\" === Object.prototype.toString.call(e))) return;\n var r = [],\n n = !0,\n a = !1,\n o = void 0;\n\n try {\n for (var u, i = e[Symbol.iterator](); !(n = (u = i.next()).done) && (r.push(u.value), !t || r.length !== t); n = !0) {\n ;\n }\n } catch (e) {\n a = !0, o = e;\n } finally {\n try {\n n || null == i[\"return\"] || i[\"return\"]();\n } finally {\n if (a) throw o;\n }\n }\n\n return r;\n }(e, t) || function () {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }();\n }\n\n function o(e) {\n return function (e) {\n if (Array.isArray(e)) {\n for (var t = 0, r = new Array(e.length); t < e.length; t++) {\n r[t] = e[t];\n }\n\n return r;\n }\n }(e) || function (e) {\n if (Symbol.iterator in Object(e) || \"[object Arguments]\" === Object.prototype.toString.call(e)) return Array.from(e);\n }(e) || function () {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }();\n }\n\n function u(e) {\n var t,\n r = \"algoliasearch-client-js-\".concat(e.key),\n n = function n() {\n return void 0 === t && (t = e.localStorage || window.localStorage), t;\n },\n o = function o() {\n return JSON.parse(n().getItem(r) || \"{}\");\n };\n\n return {\n get: function get(e, t) {\n var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {\n miss: function miss() {\n return Promise.resolve();\n }\n };\n return Promise.resolve().then(function () {\n var r = JSON.stringify(e),\n n = o()[r];\n return Promise.all([n || t(), void 0 !== n]);\n }).then(function (e) {\n var t = a(e, 2),\n n = t[0],\n o = t[1];\n return Promise.all([n, o || r.miss(n)]);\n }).then(function (e) {\n return a(e, 1)[0];\n });\n },\n set: function set(e, t) {\n return Promise.resolve().then(function () {\n var a = o();\n return a[JSON.stringify(e)] = t, n().setItem(r, JSON.stringify(a)), t;\n });\n },\n \"delete\": function _delete(e) {\n return Promise.resolve().then(function () {\n var t = o();\n delete t[JSON.stringify(e)], n().setItem(r, JSON.stringify(t));\n });\n },\n clear: function clear() {\n return Promise.resolve().then(function () {\n n().removeItem(r);\n });\n }\n };\n }\n\n function i(e) {\n var t = o(e.caches),\n r = t.shift();\n return void 0 === r ? {\n get: function get(e, t) {\n var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {\n miss: function miss() {\n return Promise.resolve();\n }\n },\n n = t();\n return n.then(function (e) {\n return Promise.all([e, r.miss(e)]);\n }).then(function (e) {\n return a(e, 1)[0];\n });\n },\n set: function set(e, t) {\n return Promise.resolve(t);\n },\n \"delete\": function _delete(e) {\n return Promise.resolve();\n },\n clear: function clear() {\n return Promise.resolve();\n }\n } : {\n get: function get(e, n) {\n var a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {\n miss: function miss() {\n return Promise.resolve();\n }\n };\n return r.get(e, n, a)[\"catch\"](function () {\n return i({\n caches: t\n }).get(e, n, a);\n });\n },\n set: function set(e, n) {\n return r.set(e, n)[\"catch\"](function () {\n return i({\n caches: t\n }).set(e, n);\n });\n },\n \"delete\": function _delete(e) {\n return r[\"delete\"](e)[\"catch\"](function () {\n return i({\n caches: t\n })[\"delete\"](e);\n });\n },\n clear: function clear() {\n return r.clear()[\"catch\"](function () {\n return i({\n caches: t\n }).clear();\n });\n }\n };\n }\n\n function s() {\n var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {\n serializable: !0\n },\n t = {};\n return {\n get: function get(r, n) {\n var a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {\n miss: function miss() {\n return Promise.resolve();\n }\n },\n o = JSON.stringify(r);\n if (o in t) return Promise.resolve(e.serializable ? JSON.parse(t[o]) : t[o]);\n\n var u = n(),\n i = a && a.miss || function () {\n return Promise.resolve();\n };\n\n return u.then(function (e) {\n return i(e);\n }).then(function () {\n return u;\n });\n },\n set: function set(r, n) {\n return t[JSON.stringify(r)] = e.serializable ? JSON.stringify(n) : n, Promise.resolve(n);\n },\n \"delete\": function _delete(e) {\n return delete t[JSON.stringify(e)], Promise.resolve();\n },\n clear: function clear() {\n return t = {}, Promise.resolve();\n }\n };\n }\n\n function c(e, t, r) {\n var n = {\n \"x-algolia-api-key\": r,\n \"x-algolia-application-id\": t\n };\n return {\n headers: function headers() {\n return e === m.WithinHeaders ? n : {};\n },\n queryParameters: function queryParameters() {\n return e === m.WithinQueryParameters ? n : {};\n }\n };\n }\n\n function f(e) {\n var t = 0;\n return e(function r() {\n return t++, new Promise(function (n) {\n setTimeout(function () {\n n(e(r));\n }, Math.min(100 * t, 1e3));\n });\n });\n }\n\n function d(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : function (e, t) {\n return Promise.resolve();\n };\n return Object.assign(e, {\n wait: function wait(r) {\n return d(e.then(function (e) {\n return Promise.all([t(e, r), e]);\n }).then(function (e) {\n return e[1];\n }));\n }\n });\n }\n\n function l(e) {\n for (var t = e.length - 1; t > 0; t--) {\n var r = Math.floor(Math.random() * (t + 1)),\n n = e[t];\n e[t] = e[r], e[r] = n;\n }\n\n return e;\n }\n\n function p(e, t) {\n return t ? (Object.keys(t).forEach(function (r) {\n e[r] = t[r](e);\n }), e) : e;\n }\n\n function h(e) {\n for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) {\n r[n - 1] = arguments[n];\n }\n\n var a = 0;\n return e.replace(/%s/g, function () {\n return encodeURIComponent(r[a++]);\n });\n }\n\n var m = {\n WithinQueryParameters: 0,\n WithinHeaders: 1\n };\n\n function y(e, t) {\n var r = e || {},\n n = r.data || {};\n return Object.keys(r).forEach(function (e) {\n -1 === [\"timeout\", \"headers\", \"queryParameters\", \"data\", \"cacheable\"].indexOf(e) && (n[e] = r[e]);\n }), {\n data: Object.entries(n).length > 0 ? n : void 0,\n timeout: r.timeout || t,\n headers: r.headers || {},\n queryParameters: r.queryParameters || {},\n cacheable: r.cacheable\n };\n }\n\n var g = {\n Read: 1,\n Write: 2,\n Any: 3\n },\n v = 1,\n b = 2,\n P = 3;\n\n function O(e) {\n var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : v;\n return r(r({}, e), {}, {\n status: t,\n lastUpdate: Date.now()\n });\n }\n\n function w(e) {\n return \"string\" == typeof e ? {\n protocol: \"https\",\n url: e,\n accept: g.Any\n } : {\n protocol: e.protocol || \"https\",\n url: e.url,\n accept: e.accept || g.Any\n };\n }\n\n var j = \"DELETE\",\n I = \"GET\",\n x = \"POST\",\n q = \"PUT\";\n\n function D(e, t) {\n return Promise.all(t.map(function (t) {\n return e.get(t, function () {\n return Promise.resolve(O(t));\n });\n })).then(function (e) {\n var r = e.filter(function (e) {\n return function (e) {\n return e.status === v || Date.now() - e.lastUpdate > 12e4;\n }(e);\n }),\n n = e.filter(function (e) {\n return function (e) {\n return e.status === P && Date.now() - e.lastUpdate <= 12e4;\n }(e);\n }),\n a = [].concat(o(r), o(n));\n return {\n getTimeout: function getTimeout(e, t) {\n return (0 === n.length && 0 === e ? 1 : n.length + 3 + e) * t;\n },\n statelessHosts: a.length > 0 ? a.map(function (e) {\n return w(e);\n }) : t\n };\n });\n }\n\n function S(e, t, n, a) {\n var u = [],\n i = function (e, t) {\n if (e.method === I || void 0 === e.data && void 0 === t.data) return;\n var n = Array.isArray(e.data) ? e.data : r(r({}, e.data), t.data);\n return JSON.stringify(n);\n }(n, a),\n s = function (e, t) {\n var n = r(r({}, e.headers), t.headers),\n a = {};\n return Object.keys(n).forEach(function (e) {\n var t = n[e];\n a[e.toLowerCase()] = t;\n }), a;\n }(e, a),\n c = n.method,\n f = n.method !== I ? {} : r(r({}, n.data), a.data),\n d = r(r(r({\n \"x-algolia-agent\": e.userAgent.value\n }, e.queryParameters), f), a.queryParameters),\n l = 0,\n p = function t(r, o) {\n var f = r.pop();\n if (void 0 === f) throw {\n name: \"RetryError\",\n message: \"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.\",\n transporterStackTrace: A(u)\n };\n\n var p = {\n data: i,\n headers: s,\n method: c,\n url: N(f, n.path, d),\n connectTimeout: o(l, e.timeouts.connect),\n responseTimeout: o(l, a.timeout)\n },\n h = function h(e) {\n var t = {\n request: p,\n response: e,\n host: f,\n triesLeft: r.length\n };\n return u.push(t), t;\n },\n m = {\n onSuccess: function onSuccess(e) {\n return function (e) {\n try {\n return JSON.parse(e.content);\n } catch (t) {\n throw function (e, t) {\n return {\n name: \"DeserializationError\",\n message: e,\n response: t\n };\n }(t.message, e);\n }\n }(e);\n },\n onRetry: function onRetry(n) {\n var a = h(n);\n return n.isTimedOut && l++, Promise.all([e.logger.info(\"Retryable failure\", E(a)), e.hostsCache.set(f, O(f, n.isTimedOut ? P : b))]).then(function () {\n return t(r, o);\n });\n },\n onFail: function onFail(e) {\n throw h(e), function (e, t) {\n var r = e.content,\n n = e.status,\n a = r;\n\n try {\n a = JSON.parse(r).message;\n } catch (e) {}\n\n return function (e, t, r) {\n return {\n name: \"ApiError\",\n message: e,\n status: t,\n transporterStackTrace: r\n };\n }(a, n, t);\n }(e, A(u));\n }\n };\n\n return e.requester.send(p).then(function (e) {\n return function (e, t) {\n return function (e) {\n var t = e.status;\n return e.isTimedOut || function (e) {\n var t = e.isTimedOut,\n r = e.status;\n return !t && 0 == ~~r;\n }(e) || 2 != ~~(t / 100) && 4 != ~~(t / 100);\n }(e) ? t.onRetry(e) : 2 == ~~(e.status / 100) ? t.onSuccess(e) : t.onFail(e);\n }(e, m);\n });\n };\n\n return D(e.hostsCache, t).then(function (e) {\n return p(o(e.statelessHosts).reverse(), e.getTimeout);\n });\n }\n\n function k(e) {\n var t = e.hostsCache,\n r = e.logger,\n n = e.requester,\n o = e.requestsCache,\n u = e.responsesCache,\n i = e.timeouts,\n s = e.userAgent,\n c = e.hosts,\n f = e.queryParameters,\n d = {\n hostsCache: t,\n logger: r,\n requester: n,\n requestsCache: o,\n responsesCache: u,\n timeouts: i,\n userAgent: s,\n headers: e.headers,\n queryParameters: f,\n hosts: c.map(function (e) {\n return w(e);\n }),\n read: function read(e, t) {\n var r = y(t, d.timeouts.read),\n n = function n() {\n return S(d, d.hosts.filter(function (e) {\n return 0 != (e.accept & g.Read);\n }), e, r);\n };\n\n if (!0 !== (void 0 !== r.cacheable ? r.cacheable : e.cacheable)) return n();\n var o = {\n request: e,\n mappedRequestOptions: r,\n transporter: {\n queryParameters: d.queryParameters,\n headers: d.headers\n }\n };\n return d.responsesCache.get(o, function () {\n return d.requestsCache.get(o, function () {\n return d.requestsCache.set(o, n()).then(function (e) {\n return Promise.all([d.requestsCache[\"delete\"](o), e]);\n }, function (e) {\n return Promise.all([d.requestsCache[\"delete\"](o), Promise.reject(e)]);\n }).then(function (e) {\n var t = a(e, 2);\n t[0];\n return t[1];\n });\n });\n }, {\n miss: function miss(e) {\n return d.responsesCache.set(o, e);\n }\n });\n },\n write: function write(e, t) {\n return S(d, d.hosts.filter(function (e) {\n return 0 != (e.accept & g.Write);\n }), e, y(t, d.timeouts.write));\n }\n };\n return d;\n }\n\n function T(e) {\n var t = {\n value: \"Algolia for JavaScript (\".concat(e, \")\"),\n add: function add(e) {\n var r = \"; \".concat(e.segment).concat(void 0 !== e.version ? \" (\".concat(e.version, \")\") : \"\");\n return -1 === t.value.indexOf(r) && (t.value = \"\".concat(t.value).concat(r)), t;\n }\n };\n return t;\n }\n\n function N(e, t, r) {\n var n = R(r),\n a = \"\".concat(e.protocol, \"://\").concat(e.url, \"/\").concat(\"/\" === t.charAt(0) ? t.substr(1) : t);\n return n.length && (a += \"?\".concat(n)), a;\n }\n\n function R(e) {\n return Object.keys(e).map(function (t) {\n return h(\"%s=%s\", t, (r = e[t], \"[object Object]\" === Object.prototype.toString.call(r) || \"[object Array]\" === Object.prototype.toString.call(r) ? JSON.stringify(e[t]) : e[t]));\n var r;\n }).join(\"&\");\n }\n\n function A(e) {\n return e.map(function (e) {\n return E(e);\n });\n }\n\n function E(e) {\n var t = e.request.headers[\"x-algolia-api-key\"] ? {\n \"x-algolia-api-key\": \"*****\"\n } : {};\n return r(r({}, e), {}, {\n request: r(r({}, e.request), {}, {\n headers: r(r({}, e.request.headers), t)\n })\n });\n }\n\n var C = function C(e) {\n return function (t, r) {\n return e.transporter.write({\n method: x,\n path: \"2/abtests\",\n data: t\n }, r);\n };\n },\n U = function U(e) {\n return function (t, r) {\n return e.transporter.write({\n method: j,\n path: h(\"2/abtests/%s\", t)\n }, r);\n };\n },\n J = function J(e) {\n return function (t, r) {\n return e.transporter.read({\n method: I,\n path: h(\"2/abtests/%s\", t)\n }, r);\n };\n },\n z = function z(e) {\n return function (t) {\n return e.transporter.read({\n method: I,\n path: \"2/abtests\"\n }, t);\n };\n },\n F = function F(e) {\n return function (t, r) {\n return e.transporter.write({\n method: x,\n path: h(\"2/abtests/%s/stop\", t)\n }, r);\n };\n },\n H = function H(e) {\n return function (t) {\n return e.transporter.read({\n method: I,\n path: \"1/strategies/personalization\"\n }, t);\n };\n },\n M = function M(e) {\n return function (t, r) {\n return e.transporter.write({\n method: x,\n path: \"1/strategies/personalization\",\n data: t\n }, r);\n };\n };\n\n function K(e) {\n return function t(r) {\n return e.request(r).then(function (n) {\n if (void 0 !== e.batch && e.batch(n.hits), !e.shouldStop(n)) return n.cursor ? t({\n cursor: n.cursor\n }) : t({\n page: (r.page || 0) + 1\n });\n });\n }({});\n }\n\n var W = function W(e) {\n return function (t, a) {\n var o = a || {},\n u = o.queryParameters,\n i = n(o, [\"queryParameters\"]),\n s = r({\n acl: t\n }, void 0 !== u ? {\n queryParameters: u\n } : {});\n return d(e.transporter.write({\n method: x,\n path: \"1/keys\",\n data: s\n }, i), function (t, r) {\n return f(function (n) {\n return Y(e)(t.key, r)[\"catch\"](function (e) {\n if (404 !== e.status) throw e;\n return n();\n });\n });\n });\n };\n },\n B = function B(e) {\n return function (t, r, n) {\n var a = y(n);\n return a.queryParameters[\"X-Algolia-User-ID\"] = t, e.transporter.write({\n method: x,\n path: \"1/clusters/mapping\",\n data: {\n cluster: r\n }\n }, a);\n };\n },\n Q = function Q(e) {\n return function (t, r, n) {\n return e.transporter.write({\n method: x,\n path: \"1/clusters/mapping/batch\",\n data: {\n users: t,\n cluster: r\n }\n }, n);\n };\n },\n G = function G(e) {\n return function (t, r, n) {\n return d(e.transporter.write({\n method: x,\n path: h(\"1/indexes/%s/operation\", t),\n data: {\n operation: \"copy\",\n destination: r\n }\n }, n), function (r, n) {\n return re(e)(t, {\n methods: {\n waitTask: tt\n }\n }).waitTask(r.taskID, n);\n });\n };\n },\n L = function L(e) {\n return function (t, n, a) {\n return G(e)(t, n, r(r({}, a), {}, {\n scope: [nt.Rules]\n }));\n };\n },\n V = function V(e) {\n return function (t, n, a) {\n return G(e)(t, n, r(r({}, a), {}, {\n scope: [nt.Settings]\n }));\n };\n },\n _ = function _(e) {\n return function (t, n, a) {\n return G(e)(t, n, r(r({}, a), {}, {\n scope: [nt.Synonyms]\n }));\n };\n },\n X = function X(e) {\n return function (t, r) {\n return d(e.transporter.write({\n method: j,\n path: h(\"1/keys/%s\", t)\n }, r), function (r, n) {\n return f(function (r) {\n return Y(e)(t, n).then(r)[\"catch\"](function (e) {\n if (404 !== e.status) throw e;\n });\n });\n });\n };\n },\n Y = function Y(e) {\n return function (t, r) {\n return e.transporter.read({\n method: I,\n path: h(\"1/keys/%s\", t)\n }, r);\n };\n },\n Z = function Z(e) {\n return function (t) {\n return e.transporter.read({\n method: I,\n path: \"1/logs\"\n }, t);\n };\n },\n $ = function $(e) {\n return function (t) {\n return e.transporter.read({\n method: I,\n path: \"1/clusters/mapping/top\"\n }, t);\n };\n },\n ee = function ee(e) {\n return function (t, r) {\n return e.transporter.read({\n method: I,\n path: h(\"1/clusters/mapping/%s\", t)\n }, r);\n };\n },\n te = function te(e) {\n return function (t) {\n var r = t || {},\n a = r.retrieveMappings,\n o = n(r, [\"retrieveMappings\"]);\n return !0 === a && (o.getClusters = !0), e.transporter.read({\n method: I,\n path: \"1/clusters/mapping/pending\"\n }, o);\n };\n },\n re = function re(e) {\n return function (t) {\n var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},\n n = {\n transporter: e.transporter,\n appId: e.appId,\n indexName: t\n };\n return p(n, r.methods);\n };\n },\n ne = function ne(e) {\n return function (t) {\n return e.transporter.read({\n method: I,\n path: \"1/keys\"\n }, t);\n };\n },\n ae = function ae(e) {\n return function (t) {\n return e.transporter.read({\n method: I,\n path: \"1/clusters\"\n }, t);\n };\n },\n oe = function oe(e) {\n return function (t) {\n return e.transporter.read({\n method: I,\n path: \"1/indexes\"\n }, t);\n };\n },\n ue = function ue(e) {\n return function (t) {\n return e.transporter.read({\n method: I,\n path: \"1/clusters/mapping\"\n }, t);\n };\n },\n ie = function ie(e) {\n return function (t, r, n) {\n return d(e.transporter.write({\n method: x,\n path: h(\"1/indexes/%s/operation\", t),\n data: {\n operation: \"move\",\n destination: r\n }\n }, n), function (r, n) {\n return re(e)(t, {\n methods: {\n waitTask: tt\n }\n }).waitTask(r.taskID, n);\n });\n };\n },\n se = function se(e) {\n return function (t, r) {\n return d(e.transporter.write({\n method: x,\n path: \"1/indexes/*/batch\",\n data: {\n requests: t\n }\n }, r), function (t, r) {\n return Promise.all(Object.keys(t.taskID).map(function (n) {\n return re(e)(n, {\n methods: {\n waitTask: tt\n }\n }).waitTask(t.taskID[n], r);\n }));\n });\n };\n },\n ce = function ce(e) {\n return function (t, r) {\n return e.transporter.read({\n method: x,\n path: \"1/indexes/*/objects\",\n data: {\n requests: t\n }\n }, r);\n };\n },\n fe = function fe(e) {\n return function (t, n) {\n var a = t.map(function (e) {\n return r(r({}, e), {}, {\n params: R(e.params || {})\n });\n });\n return e.transporter.read({\n method: x,\n path: \"1/indexes/*/queries\",\n data: {\n requests: a\n },\n cacheable: !0\n }, n);\n };\n },\n de = function de(e) {\n return function (t, a) {\n return Promise.all(t.map(function (t) {\n var o = t.params,\n u = o.facetName,\n i = o.facetQuery,\n s = n(o, [\"facetName\", \"facetQuery\"]);\n return re(e)(t.indexName, {\n methods: {\n searchForFacetValues: Ye\n }\n }).searchForFacetValues(u, i, r(r({}, a), s));\n }));\n };\n },\n le = function le(e) {\n return function (t, r) {\n var n = y(r);\n return n.queryParameters[\"X-Algolia-User-ID\"] = t, e.transporter.write({\n method: j,\n path: \"1/clusters/mapping\"\n }, n);\n };\n },\n pe = function pe(e) {\n return function (t, r) {\n return d(e.transporter.write({\n method: x,\n path: h(\"1/keys/%s/restore\", t)\n }, r), function (r, n) {\n return f(function (r) {\n return Y(e)(t, n)[\"catch\"](function (e) {\n if (404 !== e.status) throw e;\n return r();\n });\n });\n });\n };\n },\n he = function he(e) {\n return function (t, r) {\n return e.transporter.read({\n method: x,\n path: \"1/clusters/mapping/search\",\n data: {\n query: t\n }\n }, r);\n };\n },\n me = function me(e) {\n return function (t, r) {\n var a = Object.assign({}, r),\n o = r || {},\n u = o.queryParameters,\n i = n(o, [\"queryParameters\"]),\n s = u ? {\n queryParameters: u\n } : {},\n c = [\"acl\", \"indexes\", \"referers\", \"restrictSources\", \"queryParameters\", \"description\", \"maxQueriesPerIPPerHour\", \"maxHitsPerQuery\"];\n return d(e.transporter.write({\n method: q,\n path: h(\"1/keys/%s\", t),\n data: s\n }, i), function (r, n) {\n return f(function (r) {\n return Y(e)(t, n).then(function (e) {\n return function (e) {\n return Object.keys(a).filter(function (e) {\n return -1 !== c.indexOf(e);\n }).every(function (t) {\n return e[t] === a[t];\n });\n }(e) ? Promise.resolve() : r();\n });\n });\n });\n };\n },\n ye = function ye(e) {\n return function (t, r) {\n return d(e.transporter.write({\n method: x,\n path: h(\"1/indexes/%s/batch\", e.indexName),\n data: {\n requests: t\n }\n }, r), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n ge = function ge(e) {\n return function (t) {\n return K(r(r({\n shouldStop: function shouldStop(e) {\n return void 0 === e.cursor;\n }\n }, t), {}, {\n request: function request(r) {\n return e.transporter.read({\n method: x,\n path: h(\"1/indexes/%s/browse\", e.indexName),\n data: r\n }, t);\n }\n }));\n };\n },\n ve = function ve(e) {\n return function (t) {\n var n = r({\n hitsPerPage: 1e3\n }, t);\n return K(r(r({\n shouldStop: function shouldStop(e) {\n return e.hits.length < n.hitsPerPage;\n }\n }, n), {}, {\n request: function request(t) {\n return Ze(e)(\"\", r(r({}, n), t)).then(function (e) {\n return r(r({}, e), {}, {\n hits: e.hits.map(function (e) {\n return delete e._highlightResult, e;\n })\n });\n });\n }\n }));\n };\n },\n be = function be(e) {\n return function (t) {\n var n = r({\n hitsPerPage: 1e3\n }, t);\n return K(r(r({\n shouldStop: function shouldStop(e) {\n return e.hits.length < n.hitsPerPage;\n }\n }, n), {}, {\n request: function request(t) {\n return $e(e)(\"\", r(r({}, n), t)).then(function (e) {\n return r(r({}, e), {}, {\n hits: e.hits.map(function (e) {\n return delete e._highlightResult, e;\n })\n });\n });\n }\n }));\n };\n },\n Pe = function Pe(e) {\n return function (t, r, a) {\n var o = a || {},\n u = o.batchSize,\n i = n(o, [\"batchSize\"]),\n s = {\n taskIDs: [],\n objectIDs: []\n };\n return d(function n() {\n var a,\n o = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0,\n c = [];\n\n for (a = o; a < t.length && (c.push(t[a]), c.length !== (u || 1e3)); a++) {\n ;\n }\n\n return 0 === c.length ? Promise.resolve(s) : ye(e)(c.map(function (e) {\n return {\n action: r,\n body: e\n };\n }), i).then(function (e) {\n return s.objectIDs = s.objectIDs.concat(e.objectIDs), s.taskIDs.push(e.taskID), a++, n(a);\n });\n }(), function (t, r) {\n return Promise.all(t.taskIDs.map(function (t) {\n return tt(e)(t, r);\n }));\n });\n };\n },\n Oe = function Oe(e) {\n return function (t) {\n return d(e.transporter.write({\n method: x,\n path: h(\"1/indexes/%s/clear\", e.indexName)\n }, t), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n we = function we(e) {\n return function (t) {\n var r = t || {},\n a = r.forwardToReplicas,\n o = y(n(r, [\"forwardToReplicas\"]));\n return a && (o.queryParameters.forwardToReplicas = 1), d(e.transporter.write({\n method: x,\n path: h(\"1/indexes/%s/rules/clear\", e.indexName)\n }, o), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n je = function je(e) {\n return function (t) {\n var r = t || {},\n a = r.forwardToReplicas,\n o = y(n(r, [\"forwardToReplicas\"]));\n return a && (o.queryParameters.forwardToReplicas = 1), d(e.transporter.write({\n method: x,\n path: h(\"1/indexes/%s/synonyms/clear\", e.indexName)\n }, o), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n Ie = function Ie(e) {\n return function (t, r) {\n return d(e.transporter.write({\n method: x,\n path: h(\"1/indexes/%s/deleteByQuery\", e.indexName),\n data: t\n }, r), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n xe = function xe(e) {\n return function (t) {\n return d(e.transporter.write({\n method: j,\n path: h(\"1/indexes/%s\", e.indexName)\n }, t), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n qe = function qe(e) {\n return function (t, r) {\n return d(De(e)([t], r).then(function (e) {\n return {\n taskID: e.taskIDs[0]\n };\n }), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n De = function De(e) {\n return function (t, r) {\n var n = t.map(function (e) {\n return {\n objectID: e\n };\n });\n return Pe(e)(n, rt.DeleteObject, r);\n };\n },\n Se = function Se(e) {\n return function (t, r) {\n var a = r || {},\n o = a.forwardToReplicas,\n u = y(n(a, [\"forwardToReplicas\"]));\n return o && (u.queryParameters.forwardToReplicas = 1), d(e.transporter.write({\n method: j,\n path: h(\"1/indexes/%s/rules/%s\", e.indexName, t)\n }, u), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n ke = function ke(e) {\n return function (t, r) {\n var a = r || {},\n o = a.forwardToReplicas,\n u = y(n(a, [\"forwardToReplicas\"]));\n return o && (u.queryParameters.forwardToReplicas = 1), d(e.transporter.write({\n method: j,\n path: h(\"1/indexes/%s/synonyms/%s\", e.indexName, t)\n }, u), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n Te = function Te(e) {\n return function (t) {\n return Je(e)(t).then(function () {\n return !0;\n })[\"catch\"](function (e) {\n if (404 !== e.status) throw e;\n return !1;\n });\n };\n },\n Ne = function Ne(e) {\n return function (t, r, n) {\n return e.transporter.read({\n method: x,\n path: h(\"1/answers/%s/prediction\", e.indexName),\n data: {\n query: t,\n queryLanguages: r\n },\n cacheable: !0\n }, n);\n };\n },\n Re = function Re(e) {\n return function (t, o) {\n var u = o || {},\n i = u.query,\n s = u.paginate,\n c = n(u, [\"query\", \"paginate\"]),\n f = 0;\n return function n() {\n return Xe(e)(i || \"\", r(r({}, c), {}, {\n page: f\n })).then(function (e) {\n for (var r = 0, o = Object.entries(e.hits); r < o.length; r++) {\n var u = a(o[r], 2),\n i = u[0],\n c = u[1];\n if (t(c)) return {\n object: c,\n position: parseInt(i, 10),\n page: f\n };\n }\n\n if (f++, !1 === s || f >= e.nbPages) throw {\n name: \"ObjectNotFoundError\",\n message: \"Object not found.\"\n };\n return n();\n });\n }();\n };\n },\n Ae = function Ae(e) {\n return function (t, r) {\n return e.transporter.read({\n method: I,\n path: h(\"1/indexes/%s/%s\", e.indexName, t)\n }, r);\n };\n },\n Ee = function Ee() {\n return function (e, t) {\n for (var r = 0, n = Object.entries(e.hits); r < n.length; r++) {\n var o = a(n[r], 2),\n u = o[0];\n if (o[1].objectID === t) return parseInt(u, 10);\n }\n\n return -1;\n };\n },\n Ce = function Ce(e) {\n return function (t, a) {\n var o = a || {},\n u = o.attributesToRetrieve,\n i = n(o, [\"attributesToRetrieve\"]),\n s = t.map(function (t) {\n return r({\n indexName: e.indexName,\n objectID: t\n }, u ? {\n attributesToRetrieve: u\n } : {});\n });\n return e.transporter.read({\n method: x,\n path: \"1/indexes/*/objects\",\n data: {\n requests: s\n }\n }, i);\n };\n },\n Ue = function Ue(e) {\n return function (t, r) {\n return e.transporter.read({\n method: I,\n path: h(\"1/indexes/%s/rules/%s\", e.indexName, t)\n }, r);\n };\n },\n Je = function Je(e) {\n return function (t) {\n return e.transporter.read({\n method: I,\n path: h(\"1/indexes/%s/settings\", e.indexName),\n data: {\n getVersion: 2\n }\n }, t);\n };\n },\n ze = function ze(e) {\n return function (t, r) {\n return e.transporter.read({\n method: I,\n path: h(\"1/indexes/%s/synonyms/%s\", e.indexName, t)\n }, r);\n };\n },\n Fe = function Fe(e) {\n return function (t, r) {\n return d(He(e)([t], r).then(function (e) {\n return {\n objectID: e.objectIDs[0],\n taskID: e.taskIDs[0]\n };\n }), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n He = function He(e) {\n return function (t, r) {\n var a = r || {},\n o = a.createIfNotExists,\n u = n(a, [\"createIfNotExists\"]),\n i = o ? rt.PartialUpdateObject : rt.PartialUpdateObjectNoCreate;\n return Pe(e)(t, i, u);\n };\n },\n Me = function Me(e) {\n return function (t, u) {\n var i = u || {},\n s = i.safe,\n c = i.autoGenerateObjectIDIfNotExist,\n f = i.batchSize,\n l = n(i, [\"safe\", \"autoGenerateObjectIDIfNotExist\", \"batchSize\"]),\n p = function p(t, r, n, a) {\n return d(e.transporter.write({\n method: x,\n path: h(\"1/indexes/%s/operation\", t),\n data: {\n operation: n,\n destination: r\n }\n }, a), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n },\n m = Math.random().toString(36).substring(7),\n y = \"\".concat(e.indexName, \"_tmp_\").concat(m),\n g = Qe({\n appId: e.appId,\n transporter: e.transporter,\n indexName: y\n }),\n v = [],\n b = p(e.indexName, y, \"copy\", r(r({}, l), {}, {\n scope: [\"settings\", \"synonyms\", \"rules\"]\n }));\n\n return v.push(b), d((s ? b.wait(l) : b).then(function () {\n var e = g(t, r(r({}, l), {}, {\n autoGenerateObjectIDIfNotExist: c,\n batchSize: f\n }));\n return v.push(e), s ? e.wait(l) : e;\n }).then(function () {\n var t = p(y, e.indexName, \"move\", l);\n return v.push(t), s ? t.wait(l) : t;\n }).then(function () {\n return Promise.all(v);\n }).then(function (e) {\n var t = a(e, 3),\n r = t[0],\n n = t[1],\n u = t[2];\n return {\n objectIDs: n.objectIDs,\n taskIDs: [r.taskID].concat(o(n.taskIDs), [u.taskID])\n };\n }), function (e, t) {\n return Promise.all(v.map(function (e) {\n return e.wait(t);\n }));\n });\n };\n },\n Ke = function Ke(e) {\n return function (t, n) {\n return Le(e)(t, r(r({}, n), {}, {\n clearExistingRules: !0\n }));\n };\n },\n We = function We(e) {\n return function (t, n) {\n return _e(e)(t, r(r({}, n), {}, {\n clearExistingSynonyms: !0\n }));\n };\n },\n Be = function Be(e) {\n return function (t, r) {\n return d(Qe(e)([t], r).then(function (e) {\n return {\n objectID: e.objectIDs[0],\n taskID: e.taskIDs[0]\n };\n }), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n Qe = function Qe(e) {\n return function (t, r) {\n var a = r || {},\n o = a.autoGenerateObjectIDIfNotExist,\n u = n(a, [\"autoGenerateObjectIDIfNotExist\"]),\n i = o ? rt.AddObject : rt.UpdateObject;\n\n if (i === rt.UpdateObject) {\n var s = !0,\n c = !1,\n f = void 0;\n\n try {\n for (var l, p = t[Symbol.iterator](); !(s = (l = p.next()).done); s = !0) {\n if (void 0 === l.value.objectID) return d(Promise.reject({\n name: \"MissingObjectIDError\",\n message: \"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option.\"\n }));\n }\n } catch (e) {\n c = !0, f = e;\n } finally {\n try {\n s || null == p[\"return\"] || p[\"return\"]();\n } finally {\n if (c) throw f;\n }\n }\n }\n\n return Pe(e)(t, i, u);\n };\n },\n Ge = function Ge(e) {\n return function (t, r) {\n return Le(e)([t], r);\n };\n },\n Le = function Le(e) {\n return function (t, r) {\n var a = r || {},\n o = a.forwardToReplicas,\n u = a.clearExistingRules,\n i = y(n(a, [\"forwardToReplicas\", \"clearExistingRules\"]));\n return o && (i.queryParameters.forwardToReplicas = 1), u && (i.queryParameters.clearExistingRules = 1), d(e.transporter.write({\n method: x,\n path: h(\"1/indexes/%s/rules/batch\", e.indexName),\n data: t\n }, i), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n Ve = function Ve(e) {\n return function (t, r) {\n return _e(e)([t], r);\n };\n },\n _e = function _e(e) {\n return function (t, r) {\n var a = r || {},\n o = a.forwardToReplicas,\n u = a.clearExistingSynonyms,\n i = a.replaceExistingSynonyms,\n s = y(n(a, [\"forwardToReplicas\", \"clearExistingSynonyms\", \"replaceExistingSynonyms\"]));\n return o && (s.queryParameters.forwardToReplicas = 1), (i || u) && (s.queryParameters.replaceExistingSynonyms = 1), d(e.transporter.write({\n method: x,\n path: h(\"1/indexes/%s/synonyms/batch\", e.indexName),\n data: t\n }, s), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n Xe = function Xe(e) {\n return function (t, r) {\n return e.transporter.read({\n method: x,\n path: h(\"1/indexes/%s/query\", e.indexName),\n data: {\n query: t\n },\n cacheable: !0\n }, r);\n };\n },\n Ye = function Ye(e) {\n return function (t, r, n) {\n return e.transporter.read({\n method: x,\n path: h(\"1/indexes/%s/facets/%s/query\", e.indexName, t),\n data: {\n facetQuery: r\n },\n cacheable: !0\n }, n);\n };\n },\n Ze = function Ze(e) {\n return function (t, r) {\n return e.transporter.read({\n method: x,\n path: h(\"1/indexes/%s/rules/search\", e.indexName),\n data: {\n query: t\n }\n }, r);\n };\n },\n $e = function $e(e) {\n return function (t, r) {\n return e.transporter.read({\n method: x,\n path: h(\"1/indexes/%s/synonyms/search\", e.indexName),\n data: {\n query: t\n }\n }, r);\n };\n },\n et = function et(e) {\n return function (t, r) {\n var a = r || {},\n o = a.forwardToReplicas,\n u = y(n(a, [\"forwardToReplicas\"]));\n return o && (u.queryParameters.forwardToReplicas = 1), d(e.transporter.write({\n method: q,\n path: h(\"1/indexes/%s/settings\", e.indexName),\n data: t\n }, u), function (t, r) {\n return tt(e)(t.taskID, r);\n });\n };\n },\n tt = function tt(e) {\n return function (t, r) {\n return f(function (n) {\n return function (e) {\n return function (t, r) {\n return e.transporter.read({\n method: I,\n path: h(\"1/indexes/%s/task/%s\", e.indexName, t.toString())\n }, r);\n };\n }(e)(t, r).then(function (e) {\n return \"published\" !== e.status ? n() : void 0;\n });\n });\n };\n },\n rt = {\n AddObject: \"addObject\",\n UpdateObject: \"updateObject\",\n PartialUpdateObject: \"partialUpdateObject\",\n PartialUpdateObjectNoCreate: \"partialUpdateObjectNoCreate\",\n DeleteObject: \"deleteObject\",\n DeleteIndex: \"delete\",\n ClearIndex: \"clear\"\n },\n nt = {\n Settings: \"settings\",\n Synonyms: \"synonyms\",\n Rules: \"rules\"\n },\n at = 1,\n ot = 2,\n ut = 3;\n\n function it(e, t, n) {\n var a,\n o = {\n appId: e,\n apiKey: t,\n timeouts: {\n connect: 1,\n read: 2,\n write: 30\n },\n requester: {\n send: function send(e) {\n return new Promise(function (t) {\n var r = new XMLHttpRequest();\n r.open(e.method, e.url, !0), Object.keys(e.headers).forEach(function (t) {\n return r.setRequestHeader(t, e.headers[t]);\n });\n\n var n,\n a = function a(e, n) {\n return setTimeout(function () {\n r.abort(), t({\n status: 0,\n content: n,\n isTimedOut: !0\n });\n }, 1e3 * e);\n },\n o = a(e.connectTimeout, \"Connection timeout\");\n\n r.onreadystatechange = function () {\n r.readyState > r.OPENED && void 0 === n && (clearTimeout(o), n = a(e.responseTimeout, \"Socket timeout\"));\n }, r.onerror = function () {\n 0 === r.status && (clearTimeout(o), clearTimeout(n), t({\n content: r.responseText || \"Network request failed\",\n status: r.status,\n isTimedOut: !1\n }));\n }, r.onload = function () {\n clearTimeout(o), clearTimeout(n), t({\n content: r.responseText,\n status: r.status,\n isTimedOut: !1\n });\n }, r.send(e.data);\n });\n }\n },\n logger: (a = ut, {\n debug: function debug(e, t) {\n return at >= a && console.debug(e, t), Promise.resolve();\n },\n info: function info(e, t) {\n return ot >= a && console.info(e, t), Promise.resolve();\n },\n error: function error(e, t) {\n return console.error(e, t), Promise.resolve();\n }\n }),\n responsesCache: s(),\n requestsCache: s({\n serializable: !1\n }),\n hostsCache: i({\n caches: [u({\n key: \"\".concat(\"4.8.6\", \"-\").concat(e)\n }), s()]\n }),\n userAgent: T(\"4.8.6\").add({\n segment: \"Browser\"\n })\n };\n return function (e) {\n var t = e.appId,\n n = c(void 0 !== e.authMode ? e.authMode : m.WithinHeaders, t, e.apiKey),\n a = k(r(r({\n hosts: [{\n url: \"\".concat(t, \"-dsn.algolia.net\"),\n accept: g.Read\n }, {\n url: \"\".concat(t, \".algolia.net\"),\n accept: g.Write\n }].concat(l([{\n url: \"\".concat(t, \"-1.algolianet.com\")\n }, {\n url: \"\".concat(t, \"-2.algolianet.com\")\n }, {\n url: \"\".concat(t, \"-3.algolianet.com\")\n }]))\n }, e), {}, {\n headers: r(r(r({}, n.headers()), {\n \"content-type\": \"application/x-www-form-urlencoded\"\n }), e.headers),\n queryParameters: r(r({}, n.queryParameters()), e.queryParameters)\n }));\n return p({\n transporter: a,\n appId: t,\n addAlgoliaAgent: function addAlgoliaAgent(e, t) {\n a.userAgent.add({\n segment: e,\n version: t\n });\n },\n clearCache: function clearCache() {\n return Promise.all([a.requestsCache.clear(), a.responsesCache.clear()]).then(function () {});\n }\n }, e.methods);\n }(r(r(r({}, o), n), {}, {\n methods: {\n search: fe,\n searchForFacetValues: de,\n multipleBatch: se,\n multipleGetObjects: ce,\n multipleQueries: fe,\n copyIndex: G,\n copySettings: V,\n copySynonyms: _,\n copyRules: L,\n moveIndex: ie,\n listIndices: oe,\n getLogs: Z,\n listClusters: ae,\n multipleSearchForFacetValues: de,\n getApiKey: Y,\n addApiKey: W,\n listApiKeys: ne,\n updateApiKey: me,\n deleteApiKey: X,\n restoreApiKey: pe,\n assignUserID: B,\n assignUserIDs: Q,\n getUserID: ee,\n searchUserIDs: he,\n listUserIDs: ue,\n getTopUserIDs: $,\n removeUserID: le,\n hasPendingMappings: te,\n initIndex: function initIndex(e) {\n return function (t) {\n return re(e)(t, {\n methods: {\n batch: ye,\n \"delete\": xe,\n findAnswers: Ne,\n getObject: Ae,\n getObjects: Ce,\n saveObject: Be,\n saveObjects: Qe,\n search: Xe,\n searchForFacetValues: Ye,\n waitTask: tt,\n setSettings: et,\n getSettings: Je,\n partialUpdateObject: Fe,\n partialUpdateObjects: He,\n deleteObject: qe,\n deleteObjects: De,\n deleteBy: Ie,\n clearObjects: Oe,\n browseObjects: ge,\n getObjectPosition: Ee,\n findObject: Re,\n exists: Te,\n saveSynonym: Ve,\n saveSynonyms: _e,\n getSynonym: ze,\n searchSynonyms: $e,\n browseSynonyms: be,\n deleteSynonym: ke,\n clearSynonyms: je,\n replaceAllObjects: Me,\n replaceAllSynonyms: We,\n searchRules: Ze,\n getRule: Ue,\n deleteRule: Se,\n saveRule: Ge,\n saveRules: Le,\n replaceAllRules: Ke,\n browseRules: ve,\n clearRules: we\n }\n });\n };\n },\n initAnalytics: function initAnalytics() {\n return function (e) {\n return function (e) {\n var t = e.region || \"us\",\n n = c(m.WithinHeaders, e.appId, e.apiKey),\n a = k(r(r({\n hosts: [{\n url: \"analytics.\".concat(t, \".algolia.com\")\n }]\n }, e), {}, {\n headers: r(r(r({}, n.headers()), {\n \"content-type\": \"application/json\"\n }), e.headers),\n queryParameters: r(r({}, n.queryParameters()), e.queryParameters)\n }));\n return p({\n appId: e.appId,\n transporter: a\n }, e.methods);\n }(r(r(r({}, o), e), {}, {\n methods: {\n addABTest: C,\n getABTest: J,\n getABTests: z,\n stopABTest: F,\n deleteABTest: U\n }\n }));\n };\n },\n initRecommendation: function initRecommendation() {\n return function (e) {\n return function (e) {\n var t = e.region || \"us\",\n n = c(m.WithinHeaders, e.appId, e.apiKey),\n a = k(r(r({\n hosts: [{\n url: \"recommendation.\".concat(t, \".algolia.com\")\n }]\n }, e), {}, {\n headers: r(r(r({}, n.headers()), {\n \"content-type\": \"application/json\"\n }), e.headers),\n queryParameters: r(r({}, n.queryParameters()), e.queryParameters)\n }));\n return p({\n appId: e.appId,\n transporter: a\n }, e.methods);\n }(r(r(r({}, o), e), {}, {\n methods: {\n getPersonalizationStrategy: H,\n setPersonalizationStrategy: M\n }\n }));\n };\n }\n }\n }));\n }\n\n return it.version = \"4.8.6\", it;\n});","var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n\n\nvar difference = baseRest(function (array, values) {\n return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : [];\n});\nmodule.exports = difference;","function _typeof2(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\n(function webpackUniversalModuleDefinition(root, factory) {\n if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof2(exports)) === 'object' && (typeof module === \"undefined\" ? \"undefined\" : _typeof2(module)) === 'object') module.exports = factory();else if (typeof define === 'function' && define.amd) define([], factory);else if ((typeof exports === \"undefined\" ? \"undefined\" : _typeof2(exports)) === 'object') exports[\"mermaid\"] = factory();else root[\"mermaid\"] = factory();\n})(typeof self !== \"undefined\" ? self : this, function () {\n return (\n /******/\n function (modules) {\n // webpackBootstrap\n\n /******/\n // The module cache\n\n /******/\n var installedModules = {};\n /******/\n\n /******/\n // The require function\n\n /******/\n\n function __webpack_require__(moduleId) {\n /******/\n\n /******/\n // Check if module is in cache\n\n /******/\n if (installedModules[moduleId]) {\n /******/\n return installedModules[moduleId].exports;\n /******/\n }\n /******/\n // Create a new module (and put it into the cache)\n\n /******/\n\n\n var module = installedModules[moduleId] = {\n /******/\n i: moduleId,\n\n /******/\n l: false,\n\n /******/\n exports: {}\n /******/\n\n };\n /******/\n\n /******/\n // Execute the module function\n\n /******/\n\n modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n /******/\n\n /******/\n // Flag the module as loaded\n\n /******/\n\n module.l = true;\n /******/\n\n /******/\n // Return the exports of the module\n\n /******/\n\n return module.exports;\n /******/\n }\n /******/\n\n /******/\n\n /******/\n // expose the modules object (__webpack_modules__)\n\n /******/\n\n\n __webpack_require__.m = modules;\n /******/\n\n /******/\n // expose the module cache\n\n /******/\n\n __webpack_require__.c = installedModules;\n /******/\n\n /******/\n // define getter function for harmony exports\n\n /******/\n\n __webpack_require__.d = function (exports, name, getter) {\n /******/\n if (!__webpack_require__.o(exports, name)) {\n /******/\n Object.defineProperty(exports, name, {\n enumerable: true,\n get: getter\n });\n /******/\n }\n /******/\n\n };\n /******/\n\n /******/\n // define __esModule on exports\n\n /******/\n\n\n __webpack_require__.r = function (exports) {\n /******/\n if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n /******/\n Object.defineProperty(exports, Symbol.toStringTag, {\n value: 'Module'\n });\n /******/\n }\n /******/\n\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n /******/\n };\n /******/\n\n /******/\n // create a fake namespace object\n\n /******/\n // mode & 1: value is a module id, require it\n\n /******/\n // mode & 2: merge all properties of value into the ns\n\n /******/\n // mode & 4: return value when already ns object\n\n /******/\n // mode & 8|1: behave like require\n\n /******/\n\n\n __webpack_require__.t = function (value, mode) {\n /******/\n if (mode & 1) value = __webpack_require__(value);\n /******/\n\n if (mode & 8) return value;\n /******/\n\n if (mode & 4 && _typeof2(value) === 'object' && value && value.__esModule) return value;\n /******/\n\n var ns = Object.create(null);\n /******/\n\n __webpack_require__.r(ns);\n /******/\n\n\n Object.defineProperty(ns, 'default', {\n enumerable: true,\n value: value\n });\n /******/\n\n if (mode & 2 && typeof value != 'string') for (var key in value) {\n __webpack_require__.d(ns, key, function (key) {\n return value[key];\n }.bind(null, key));\n }\n /******/\n\n return ns;\n /******/\n };\n /******/\n\n /******/\n // getDefaultExport function for compatibility with non-harmony modules\n\n /******/\n\n\n __webpack_require__.n = function (module) {\n /******/\n var getter = module && module.__esModule ?\n /******/\n function getDefault() {\n return module['default'];\n } :\n /******/\n function getModuleExports() {\n return module;\n };\n /******/\n\n __webpack_require__.d(getter, 'a', getter);\n /******/\n\n\n return getter;\n /******/\n };\n /******/\n\n /******/\n // Object.prototype.hasOwnProperty.call\n\n /******/\n\n\n __webpack_require__.o = function (object, property) {\n return Object.prototype.hasOwnProperty.call(object, property);\n };\n /******/\n\n /******/\n // __webpack_public_path__\n\n /******/\n\n\n __webpack_require__.p = \"\";\n /******/\n\n /******/\n\n /******/\n // Load entry module and return exports\n\n /******/\n\n return __webpack_require__(__webpack_require__.s = \"./src/mermaid.js\");\n /******/\n }(\n /************************************************************************/\n\n /******/\n {\n /***/\n \"./node_modules/node-libs-browser/mock/empty.js\":\n /*!******************************************************!*\\\n !*** ./node_modules/node-libs-browser/mock/empty.js ***!\n \\******************************************************/\n\n /*! no static exports found */\n\n /***/\n function node_modulesNodeLibsBrowserMockEmptyJs(module, exports) {\n /***/\n },\n\n /***/\n \"./node_modules/path-browserify/index.js\":\n /*!***********************************************!*\\\n !*** ./node_modules/path-browserify/index.js ***!\n \\***********************************************/\n\n /*! no static exports found */\n\n /***/\n function node_modulesPathBrowserifyIndexJs(module, exports, __webpack_require__) {\n /* WEBPACK VAR INJECTION */\n (function (process) {\n // .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,\n // backported and transplited with Babel, with backwards-compat fixes\n // Copyright Joyent, Inc. and other Node contributors.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a\n // copy of this software and associated documentation files (the\n // \"Software\"), to deal in the Software without restriction, including\n // without limitation the rights to use, copy, modify, merge, publish,\n // distribute, sublicense, and/or sell copies of the Software, and to permit\n // persons to whom the Software is furnished to do so, subject to the\n // following conditions:\n //\n // The above copyright notice and this permission notice shall be included\n // in all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n // USE OR OTHER DEALINGS IN THE SOFTWARE.\n // resolves . and .. elements in a path array with directory names there\n // must be no slashes, empty elements, or device names (c:\\) in the array\n // (so also no leading and trailing slashes - it does not distinguish\n // relative and absolute paths)\n function normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n } // if the path is allowed to go above the root, restore leading ..s\n\n\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n } // path.resolve([from ...], to)\n // posix version\n\n\n exports.resolve = function () {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = i >= 0 ? arguments[i] : process.cwd(); // Skip empty and invalid entries\n\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n } // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n // Normalize the path\n\n\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function (p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n }; // path.normalize(path)\n // posix version\n\n\n exports.normalize = function (path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/'; // Normalize the path\n\n path = normalizeArray(filter(path.split('/'), function (p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n }; // posix version\n\n\n exports.isAbsolute = function (path) {\n return path.charAt(0) === '/';\n }; // posix version\n\n\n exports.join = function () {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function (p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n\n return p;\n }).join('/'));\n }; // path.relative(from, to)\n // posix version\n\n\n exports.relative = function (from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n return outputParts.join('/');\n };\n\n exports.sep = '/';\n exports.delimiter = ':';\n\n exports.dirname = function (path) {\n if (typeof path !== 'string') path = path + '';\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47\n /*/*/\n ;\n var end = -1;\n var matchedSlash = true;\n\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n\n if (code === 47\n /*/*/\n ) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n\n if (hasRoot && end === 1) {\n // return '//';\n // Backwards-compat fix:\n return '/';\n }\n\n return path.slice(0, end);\n };\n\n function basename(path) {\n if (typeof path !== 'string') path = path + '';\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47\n /*/*/\n ) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n } // Uses a mixed approach for backwards-compatibility, as ext behavior changed\n // in new Node.js versions, so only basename() above is backported here\n\n\n exports.basename = function (path, ext) {\n var f = basename(path);\n\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n\n return f;\n };\n\n exports.extname = function (path) {\n if (typeof path !== 'string') path = path + '';\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true; // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n\n var preDotState = 0;\n\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n\n if (code === 47\n /*/*/\n ) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n\n continue;\n }\n\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n\n if (code === 46\n /*.*/\n ) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot\n preDotState === 0 || // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n\n return path.slice(startDot, end);\n };\n\n function filter(xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n\n return res;\n } // String.prototype.substr - negative index don't work in IE8\n\n\n var substr = 'ab'.substr(-1) === 'b' ? function (str, start, len) {\n return str.substr(start, len);\n } : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n };\n /* WEBPACK VAR INJECTION */\n }).call(this, __webpack_require__(\n /*! ./../process/browser.js */\n \"./node_modules/process/browser.js\"));\n /***/\n },\n\n /***/\n \"./node_modules/process/browser.js\":\n /*!*****************************************!*\\\n !*** ./node_modules/process/browser.js ***!\n \\*****************************************/\n\n /*! no static exports found */\n\n /***/\n function node_modulesProcessBrowserJs(module, exports) {\n // shim for using process in browser\n var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it\n // don't break things. But we need to wrap it in a try catch in case it is\n // wrapped in strict mode code which doesn't define any globals. It's inside a\n // function because try/catches deoptimize in certain engines.\n\n var cachedSetTimeout;\n var cachedClearTimeout;\n\n function defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n }\n\n function defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n }\n\n (function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n })();\n\n function runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n } // if setTimeout wasn't available but was latter defined\n\n\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n }\n\n function runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n } // if clearTimeout wasn't available but was latter defined\n\n\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n }\n\n var queue = [];\n var draining = false;\n var currentQueue;\n var queueIndex = -1;\n\n function cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n\n draining = false;\n\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n\n if (queue.length) {\n drainQueue();\n }\n }\n\n function drainQueue() {\n if (draining) {\n return;\n }\n\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n var len = queue.length;\n\n while (len) {\n currentQueue = queue;\n queue = [];\n\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n\n queueIndex = -1;\n len = queue.length;\n }\n\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n }\n\n process.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n\n queue.push(new Item(fun, args));\n\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n }; // v8 likes predictible objects\n\n\n function Item(fun, array) {\n this.fun = fun;\n this.array = array;\n }\n\n Item.prototype.run = function () {\n this.fun.apply(null, this.array);\n };\n\n process.title = 'browser';\n process.browser = true;\n process.env = {};\n process.argv = [];\n process.version = ''; // empty string to avoid regexp issues\n\n process.versions = {};\n\n function noop() {}\n\n process.on = noop;\n process.addListener = noop;\n process.once = noop;\n process.off = noop;\n process.removeListener = noop;\n process.removeAllListeners = noop;\n process.emit = noop;\n process.prependListener = noop;\n process.prependOnceListener = noop;\n\n process.listeners = function (name) {\n return [];\n };\n\n process.binding = function (name) {\n throw new Error('process.binding is not supported');\n };\n\n process.cwd = function () {\n return '/';\n };\n\n process.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n };\n\n process.umask = function () {\n return 0;\n };\n /***/\n\n },\n\n /***/\n \"./node_modules/webpack/buildin/module.js\":\n /*!***********************************!*\\\n !*** (webpack)/buildin/module.js ***!\n \\***********************************/\n\n /*! no static exports found */\n\n /***/\n function node_modulesWebpackBuildinModuleJs(module, exports) {\n module.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n };\n /***/\n\n },\n\n /***/\n \"./package.json\":\n /*!**********************!*\\\n !*** ./package.json ***!\n \\**********************/\n\n /*! exports provided: name, version, description, main, keywords, scripts, repository, author, license, standard, dependencies, devDependencies, files, yarn-upgrade-all, sideEffects, husky, default */\n\n /***/\n function packageJson(module) {\n module.exports = JSON.parse(\"{\\\"name\\\":\\\"mermaid\\\",\\\"version\\\":\\\"8.9.2\\\",\\\"description\\\":\\\"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.\\\",\\\"main\\\":\\\"dist/mermaid.core.js\\\",\\\"keywords\\\":[\\\"diagram\\\",\\\"markdown\\\",\\\"flowchart\\\",\\\"sequence diagram\\\",\\\"gantt\\\",\\\"class diagram\\\",\\\"git graph\\\"],\\\"scripts\\\":{\\\"build:development\\\":\\\"webpack --progress --colors\\\",\\\"build:production\\\":\\\"yarn build:development -p --config webpack.config.prod.babel.js\\\",\\\"build\\\":\\\"yarn build:development && yarn build:production\\\",\\\"postbuild\\\":\\\"documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md\\\",\\\"build:watch\\\":\\\"yarn build --watch\\\",\\\"minify\\\":\\\"minify ./dist/mermaid.js > ./dist/mermaid.min.js\\\",\\\"release\\\":\\\"yarn build\\\",\\\"lint\\\":\\\"eslint src\\\",\\\"e2e:depr\\\":\\\"yarn lint && jest e2e --config e2e/jest.config.js\\\",\\\"cypress\\\":\\\"percy exec -- cypress run\\\",\\\"e2e\\\":\\\"start-server-and-test dev http://localhost:9000/ cypress\\\",\\\"e2e-upd\\\":\\\"yarn lint && jest e2e -u --config e2e/jest.config.js\\\",\\\"dev\\\":\\\"webpack-dev-server --config webpack.config.e2e.js\\\",\\\"test\\\":\\\"yarn lint && jest src/.*\\\",\\\"test:watch\\\":\\\"jest --watch src\\\",\\\"prepublishOnly\\\":\\\"yarn build && yarn test\\\",\\\"prepare\\\":\\\"yarn build\\\"},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"https://github.com/knsv/mermaid\\\"},\\\"author\\\":\\\"Knut Sveidqvist\\\",\\\"license\\\":\\\"MIT\\\",\\\"standard\\\":{\\\"ignore\\\":[\\\"**/parser/*.js\\\",\\\"dist/**/*.js\\\",\\\"cypress/**/*.js\\\"],\\\"globals\\\":[\\\"page\\\"]},\\\"dependencies\\\":{\\\"@braintree/sanitize-url\\\":\\\"^3.1.0\\\",\\\"d3\\\":\\\"^5.7.0\\\",\\\"dagre\\\":\\\"^0.8.4\\\",\\\"dagre-d3\\\":\\\"^0.6.4\\\",\\\"entity-decode\\\":\\\"^2.0.2\\\",\\\"graphlib\\\":\\\"^2.1.7\\\",\\\"he\\\":\\\"^1.2.0\\\",\\\"khroma\\\":\\\"^1.1.0\\\",\\\"minify\\\":\\\"^4.1.1\\\",\\\"moment-mini\\\":\\\"^2.22.1\\\",\\\"stylis\\\":\\\"^3.5.2\\\"},\\\"devDependencies\\\":{\\\"@babel/core\\\":\\\"^7.2.2\\\",\\\"@babel/preset-env\\\":\\\"^7.8.4\\\",\\\"@babel/register\\\":\\\"^7.0.0\\\",\\\"@percy/cypress\\\":\\\"*\\\",\\\"babel-core\\\":\\\"7.0.0-bridge.0\\\",\\\"babel-eslint\\\":\\\"^10.1.0\\\",\\\"babel-jest\\\":\\\"^24.9.0\\\",\\\"babel-loader\\\":\\\"^8.0.4\\\",\\\"coveralls\\\":\\\"^3.0.2\\\",\\\"css-loader\\\":\\\"^2.0.1\\\",\\\"css-to-string-loader\\\":\\\"^0.1.3\\\",\\\"cypress\\\":\\\"4.0.1\\\",\\\"documentation\\\":\\\"^12.0.1\\\",\\\"eslint\\\":\\\"^6.3.0\\\",\\\"eslint-config-prettier\\\":\\\"^6.3.0\\\",\\\"eslint-plugin-prettier\\\":\\\"^3.1.0\\\",\\\"husky\\\":\\\"^1.2.1\\\",\\\"identity-obj-proxy\\\":\\\"^3.0.0\\\",\\\"jest\\\":\\\"^24.9.0\\\",\\\"jison\\\":\\\"^0.4.18\\\",\\\"moment\\\":\\\"^2.23.0\\\",\\\"node-sass\\\":\\\"^5.0.0\\\",\\\"prettier\\\":\\\"^1.18.2\\\",\\\"puppeteer\\\":\\\"^1.17.0\\\",\\\"sass-loader\\\":\\\"^7.1.0\\\",\\\"start-server-and-test\\\":\\\"^1.10.6\\\",\\\"terser-webpack-plugin\\\":\\\"^2.2.2\\\",\\\"webpack\\\":\\\"^4.41.2\\\",\\\"webpack-bundle-analyzer\\\":\\\"^3.7.0\\\",\\\"webpack-cli\\\":\\\"^3.1.2\\\",\\\"webpack-dev-server\\\":\\\"^3.4.1\\\",\\\"webpack-node-externals\\\":\\\"^1.7.2\\\",\\\"yarn-upgrade-all\\\":\\\"^0.5.0\\\"},\\\"files\\\":[\\\"dist\\\"],\\\"yarn-upgrade-all\\\":{\\\"ignore\\\":[\\\"babel-core\\\"]},\\\"sideEffects\\\":[\\\"**/*.css\\\",\\\"**/*.scss\\\"],\\\"husky\\\":{\\\"hooks\\\":{\\\"pre-push\\\":\\\"yarn test\\\"}}}\");\n /***/\n },\n\n /***/\n \"./src/config.js\":\n /*!***********************!*\\\n !*** ./src/config.js ***!\n \\***********************/\n\n /*! exports provided: defaultConfig, updateCurrentConfig, setSiteConfig, saveConfigFromInitilize, updateSiteConfig, getSiteConfig, setConfig, getConfig, sanitize, addDirective, reset */\n\n /***/\n function srcConfigJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"defaultConfig\", function () {\n return defaultConfig;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"updateCurrentConfig\", function () {\n return updateCurrentConfig;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setSiteConfig\", function () {\n return setSiteConfig;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"saveConfigFromInitilize\", function () {\n return saveConfigFromInitilize;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"updateSiteConfig\", function () {\n return updateSiteConfig;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getSiteConfig\", function () {\n return getSiteConfig;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConfig\", function () {\n return setConfig;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getConfig\", function () {\n return getConfig;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"sanitize\", function () {\n return sanitize;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addDirective\", function () {\n return addDirective;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"reset\", function () {\n return reset;\n });\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ./utils */\n \"./src/utils.js\");\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _themes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./themes */\n \"./src/themes/index.js\");\n /* harmony import */\n\n\n var _defaultConfig__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./defaultConfig */\n \"./src/defaultConfig.js\");\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n } // debugger;\n\n\n var defaultConfig = Object.freeze(_defaultConfig__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\n var siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, defaultConfig);\n var configFromInitialize;\n var directives = [];\n var currentConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, defaultConfig);\n\n var updateCurrentConfig = function updateCurrentConfig(siteCfg, _directives) {\n // start with config beeing the siteConfig\n var cfg = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, siteCfg); // let sCfg = assignWithDepth(defaultConfig, siteConfigDelta);\n // Join directives\n\n var sumOfDirectives = {};\n\n for (var i = 0; i < _directives.length; i++) {\n var d = _directives[i];\n sanitize(d); // Apply the data from the directive where the the overrides the themeVaraibles\n\n sumOfDirectives = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])(sumOfDirectives, d);\n }\n\n cfg = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])(cfg, sumOfDirectives);\n\n if (sumOfDirectives.theme) {\n var tmpConfigFromInitialize = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, configFromInitialize);\n var themeVariables = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])(tmpConfigFromInitialize.themeVariables || {}, sumOfDirectives.themeVariables);\n cfg.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_2__[\"default\"][cfg.theme].getThemeVariables(themeVariables);\n }\n\n currentConfig = cfg;\n return cfg;\n };\n /**\n *## setSiteConfig\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array|\n ***Notes:**\n *Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset\n *the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig\n *to the defaultConfig\n *Note: currentConfig is set in this function\n **Default value: At default, will mirror Global Config**\n * @param conf - the base currentConfig to use as siteConfig\n * @returns {*} - the siteConfig\n */\n\n\n var setSiteConfig = function setSiteConfig(conf) {\n siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, defaultConfig);\n siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])(siteConfig, conf);\n\n if (conf.theme) {\n siteConfig.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_2__[\"default\"][conf.theme].getThemeVariables(conf.themeVariables);\n }\n\n currentConfig = updateCurrentConfig(siteConfig, directives);\n return siteConfig;\n };\n\n var saveConfigFromInitilize = function saveConfigFromInitilize(conf) {\n configFromInitialize = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, conf);\n };\n\n var updateSiteConfig = function updateSiteConfig(conf) {\n siteConfig = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])(siteConfig, conf);\n updateCurrentConfig(siteConfig, directives);\n return siteConfig;\n };\n /**\n *## getSiteConfig\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig|\n ***Notes**:\n *Returns **any** values in siteConfig.\n * @returns {*}\n */\n\n\n var getSiteConfig = function getSiteConfig() {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, siteConfig);\n };\n /**\n *## setConfig\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Sets the siteConfig to desired values | Put Request| Any Values, except ones in secure array|\n ***Notes**:\n *Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure keys. Any\n *values found in conf with key found in siteConfig.secure will be replaced with the corresponding\n *siteConfig value.\n * @param conf - the potential currentConfig\n * @returns {*} - the currentConfig merged with the sanitized conf\n */\n\n\n var setConfig = function setConfig(conf) {\n // sanitize(conf);\n // Object.keys(conf).forEach(key => {\n // const manipulator = manipulators[key];\n // conf[key] = manipulator ? manipulator(conf[key]) : conf[key];\n // });\n Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])(currentConfig, conf);\n return getConfig();\n };\n /**\n * ## getConfig\n *| Function | Description | Type | Return Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| getConfig |Obtains the currentConfig | Get Request | Any Values from currentConfig|\n ***Notes**:\n *Returns **any** the currentConfig\n * @returns {*} - the currentConfig\n */\n\n\n var getConfig = function getConfig() {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"assignWithDepth\"])({}, currentConfig);\n };\n /**\n *## sanitize\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| sanitize |Sets the siteConfig to desired values. | Put Request |None|\n *Ensures options parameter does not attempt to override siteConfig secure keys\n *Note: modifies options in-place\n * @param options - the potential setConfig parameter\n */\n\n\n var sanitize = function sanitize(options) {\n // Checking that options are not in the list of excluded options\n Object.keys(siteConfig.secure).forEach(function (key) {\n if (typeof options[siteConfig.secure[key]] !== 'undefined') {\n // DO NOT attempt to print options[siteConfig.secure[key]] within `${}` as a malicious script\n // can exploit the logger's attempt to stringify the value and execute arbitrary code\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].debug(\"Denied attempt to modify a secure key \".concat(siteConfig.secure[key]), options[siteConfig.secure[key]]);\n\n delete options[siteConfig.secure[key]];\n }\n }); // Check that there no attempts of prototype pollution\n\n Object.keys(options).forEach(function (key) {\n if (key.indexOf('__') === 0) {\n delete options[key];\n }\n }); // Check that there no attempts of xss, there should be no tags at all in the directive\n // blocking data urls as base64 urls can contain svgs with inline script tags\n\n Object.keys(options).forEach(function (key) {\n if (typeof options[key] === 'string') {\n if (options[key].indexOf('<') > -1 || options[key].indexOf('>') > -1 || options[key].indexOf('url(data:') > -1) {\n delete options[key];\n }\n }\n\n if (_typeof(options[key]) === 'object') {\n sanitize(options[key]);\n }\n });\n };\n\n var addDirective = function addDirective(directive) {\n if (directive.fontFamily) {\n if (!directive.themeVariables) {\n directive.themeVariables = {\n fontFamily: directive.fontFamily\n };\n } else {\n if (!directive.themeVariables.fontFamily) {\n directive.themeVariables = {\n fontFamily: directive.fontFamily\n };\n }\n }\n }\n\n directives.push(directive);\n updateCurrentConfig(siteConfig, directives);\n };\n /**\n *## reset\n *| Function | Description | Type | Required | Values |\n *| --------- | ------------------- | ------- | -------- | ------------------ |\n *| reset|Resets currentConfig to conf| Put Request | Required | None|\n *\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| conf| base set of values, which currentConfig coul be **reset** to.| Dictionary | Required | Any Values, with respect to the secure Array|\n *\n **Notes :\n (default: current siteConfig ) (optional, default `getSiteConfig()`)\n * @param conf the base currentConfig to reset to (default: current siteConfig ) (optional, default `getSiteConfig()`)\n */\n\n\n var reset = function reset() {\n // Replace current config with siteConfig\n directives = [];\n updateCurrentConfig(siteConfig, directives);\n };\n /***/\n\n },\n\n /***/\n \"./src/dagre-wrapper/clusters.js\":\n /*!***************************************!*\\\n !*** ./src/dagre-wrapper/clusters.js ***!\n \\***************************************/\n\n /*! exports provided: insertCluster, getClusterTitleWidth, clear, positionCluster */\n\n /***/\n function srcDagreWrapperClustersJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"insertCluster\", function () {\n return insertCluster;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getClusterTitleWidth\", function () {\n return getClusterTitleWidth;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"clear\", function () {\n return clear;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"positionCluster\", function () {\n return positionCluster;\n });\n /* harmony import */\n\n\n var _intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ./intersect/intersect-rect */\n \"./src/dagre-wrapper/intersect/intersect-rect.js\");\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _createLabel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./createLabel */\n \"./src/dagre-wrapper/createLabel.js\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_3__);\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../config */\n \"./src/config.js\");\n\n var rect = function rect(parent, node) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].trace('Creating subgraph rect for ', node.id, node); // Add outer g element\n\n\n var shapeSvg = parent.insert('g').attr('class', 'cluster' + (node[\"class\"] ? ' ' + node[\"class\"] : '')).attr('id', node.id); // add the rect\n\n var rect = shapeSvg.insert('rect', ':first-child'); // Create the label and insert it after the rect\n\n var label = shapeSvg.insert('g').attr('class', 'cluster-label');\n var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(node.labelText, node.labelStyle, undefined, true)); // Get the size of the label\n\n var bbox = text.getBBox();\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.htmlLabels) {\n var div = text.children[0];\n var dv = Object(d3__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n var padding = 0 * node.padding;\n var halfPadding = padding / 2;\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].trace('Data ', node, JSON.stringify(node)); // center the rect around its coordinate\n\n\n rect.attr('style', node.style).attr('rx', node.rx).attr('ry', node.ry).attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', node.width + padding).attr('height', node.height + padding); // Center the label\n\n label.attr('transform', 'translate(' + (node.x - bbox.width / 2) + ', ' + (node.y - node.height / 2 + node.padding / 3) + ')');\n var rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node, point);\n };\n\n return shapeSvg;\n };\n /**\n * Non visiable cluster where the note is group with its\n */\n\n\n var noteGroup = function noteGroup(parent, node) {\n // Add outer g element\n var shapeSvg = parent.insert('g').attr('class', 'note-cluster').attr('id', node.id); // add the rect\n\n var rect = shapeSvg.insert('rect', ':first-child');\n var padding = 0 * node.padding;\n var halfPadding = padding / 2; // center the rect around its coordinate\n\n rect.attr('rx', node.rx).attr('ry', node.ry).attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', node.width + padding).attr('height', node.height + padding).attr('fill', 'none');\n var rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node, point);\n };\n\n return shapeSvg;\n };\n\n var roundedWithTitle = function roundedWithTitle(parent, node) {\n // Add outer g element\n var shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id); // add the rect\n\n var rect = shapeSvg.insert('rect', ':first-child'); // Create the label and insert it after the rect\n\n var label = shapeSvg.insert('g').attr('class', 'cluster-label');\n var innerRect = shapeSvg.append('rect');\n var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(node.labelText, node.labelStyle, undefined, true)); // Get the size of the label\n\n var bbox = text.getBBox();\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.htmlLabels) {\n var div = text.children[0];\n var dv = Object(d3__WEBPACK_IMPORTED_MODULE_3__[\"select\"])(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n bbox = text.getBBox();\n var padding = 0 * node.padding;\n var halfPadding = padding / 2; // center the rect around its coordinate\n\n rect.attr('class', 'outer').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding).attr('width', node.width + padding).attr('height', node.height + padding);\n innerRect.attr('class', 'inner').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1).attr('width', node.width + padding).attr('height', node.height + padding - bbox.height - 3); // Center the label\n\n label.attr('transform', 'translate(' + (node.x - bbox.width / 2) + ', ' + (node.y - node.height / 2 - node.padding / 3 + (Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.htmlLabels ? 5 : 3)) + ')');\n var rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node, point);\n };\n\n return shapeSvg;\n };\n\n var divider = function divider(parent, node) {\n // Add outer g element\n var shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id); // add the rect\n\n var rect = shapeSvg.insert('rect', ':first-child');\n var padding = 0 * node.padding;\n var halfPadding = padding / 2; // center the rect around its coordinate\n\n rect.attr('class', 'divider').attr('x', node.x - node.width / 2 - halfPadding).attr('y', node.y - node.height / 2).attr('width', node.width + padding).attr('height', node.height + padding);\n var rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return Object(_intersect_intersect_rect__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node, point);\n };\n\n return shapeSvg;\n };\n\n var shapes = {\n rect: rect,\n roundedWithTitle: roundedWithTitle,\n noteGroup: noteGroup,\n divider: divider\n };\n var clusterElems = {};\n\n var insertCluster = function insertCluster(elem, node) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].trace('Inserting cluster');\n\n var shape = node.shape || 'rect';\n clusterElems[node.id] = shapes[shape](elem, node);\n };\n\n var getClusterTitleWidth = function getClusterTitleWidth(elem, node) {\n var label = Object(_createLabel__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(node.labelText, node.labelStyle, undefined, true);\n elem.node().appendChild(label);\n var width = label.getBBox().width;\n elem.node().removeChild(label);\n return width;\n };\n\n var clear = function clear() {\n clusterElems = {};\n };\n\n var positionCluster = function positionCluster(node) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Position cluster');\n\n var el = clusterElems[node.id];\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n };\n /***/\n\n },\n\n /***/\n \"./src/dagre-wrapper/createLabel.js\":\n /*!******************************************!*\\\n !*** ./src/dagre-wrapper/createLabel.js ***!\n \\******************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDagreWrapperCreateLabelJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ../config */\n \"./src/config.js\"); // eslint-disable-line\n // let vertexNode;\n // if (getConfig().flowchart.htmlLabels) {\n // // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n // const node = {\n // label: vertexText.replace(/fa[lrsb]?:fa-[\\w-]+/g, s => ``)\n // };\n // vertexNode = addHtmlLabel(svg, node).node();\n // vertexNode.parentNode.removeChild(vertexNode);\n // } else {\n // const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n // svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n // const rows = vertexText.split(common.lineBreakRegex);\n // for (let j = 0; j < rows.length; j++) {\n // const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n // tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n // tspan.setAttribute('dy', '1em');\n // tspan.setAttribute('x', '1');\n // tspan.textContent = rows[j];\n // svgLabel.appendChild(tspan);\n // }\n // vertexNode = svgLabel;\n // }\n\n\n function applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr('style', styleFn);\n }\n }\n\n function addHtmlLabel(node) {\n // var fo = root.append('foreignObject').attr('width', '100000');\n // var div = fo.append('xhtml:div');\n // div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n // var label = node.label;\n // switch (typeof label) {\n // case 'function':\n // div.insert(label);\n // break;\n // case 'object':\n // // Currently we assume this is a DOM object.\n // div.insert(function() {\n // return label;\n // });\n // break;\n // default:\n // div.html(label);\n // }\n // applyStyle(div, node.labelStyle);\n // div.style('display', 'inline-block');\n // // Fix for firefox\n // div.style('white-space', 'nowrap');\n // var client = div.node().getBoundingClientRect();\n // fo.attr('width', client.width).attr('height', client.height);\n var fo = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject'));\n var div = fo.append('xhtml:div');\n var label = node.label;\n var labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n div.html('' + label + '');\n applyStyle(div, node.labelStyle);\n div.style('display', 'inline-block'); // Fix for firefox\n\n div.style('white-space', 'nowrap');\n div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n return fo.node();\n }\n\n var createLabel = function createLabel(_vertexText, style, isTitle, isNode) {\n var vertexText = _vertexText || '';\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"])().flowchart.htmlLabels) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n vertexText = vertexText.replace(/\\\\n|\\n/g, '
');\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('vertexText' + vertexText);\n\n var node = {\n isNode: isNode,\n label: vertexText.replace(/fa[lrsb]?:fa-[\\w-]+/g, function (s) {\n return \"\");\n }),\n labelStyle: style.replace('fill:', 'color:')\n };\n var vertexNode = addHtmlLabel(node); // vertexNode.parentNode.removeChild(vertexNode);\n\n return vertexNode;\n } else {\n var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', style.replace('color:', 'fill:'));\n var rows = [];\n\n if (typeof vertexText === 'string') {\n rows = vertexText.split(/\\\\n|\\n|
/gi);\n } else if (Array.isArray(vertexText)) {\n rows = vertexText;\n } else {\n rows = [];\n }\n\n for (var j = 0; j < rows.length; j++) {\n var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '0');\n\n if (isTitle) {\n tspan.setAttribute('class', 'title-row');\n } else {\n tspan.setAttribute('class', 'row');\n }\n\n tspan.textContent = rows[j].trim();\n svgLabel.appendChild(tspan);\n }\n\n return svgLabel;\n }\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = createLabel;\n /***/\n },\n\n /***/\n \"./src/dagre-wrapper/edges.js\":\n /*!************************************!*\\\n !*** ./src/dagre-wrapper/edges.js ***!\n \\************************************/\n\n /*! exports provided: clear, insertEdgeLabel, positionEdgeLabel, intersection, insertEdge */\n\n /***/\n function srcDagreWrapperEdgesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"clear\", function () {\n return clear;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"insertEdgeLabel\", function () {\n return insertEdgeLabel;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"positionEdgeLabel\", function () {\n return positionEdgeLabel;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"intersection\", function () {\n return intersection;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"insertEdge\", function () {\n return insertEdge;\n });\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _createLabel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./createLabel */\n \"./src/dagre-wrapper/createLabel.js\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_2__);\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../utils */\n \"./src/utils.js\"); // eslint-disable-line\n // import { calcLabelPosition } from '../utils';\n\n\n var edgeLabels = {};\n var terminalLabels = {};\n\n var clear = function clear() {\n edgeLabels = {};\n terminalLabels = {};\n };\n\n var insertEdgeLabel = function insertEdgeLabel(elem, edge) {\n // Create the actual text element\n var labelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(edge.label, edge.labelStyle); // Create outer g, edgeLabel, this will be positioned after graph layout\n\n var edgeLabel = elem.insert('g').attr('class', 'edgeLabel'); // Create inner g, label, this will be positioned now for centering the text\n\n var label = edgeLabel.insert('g').attr('class', 'label');\n label.node().appendChild(labelElement); // Center the label\n\n var bbox = labelElement.getBBox();\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels) {\n var div = labelElement.children[0];\n var dv = Object(d3__WEBPACK_IMPORTED_MODULE_2__[\"select\"])(labelElement);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')'); // Make element accessible by id for positioning\n\n edgeLabels[edge.id] = edgeLabel; // Update the abstract data of the edge with the new information about its width and height\n\n edge.width = bbox.width;\n edge.height = bbox.height;\n\n if (edge.startLabelLeft) {\n // Create the actual text element\n var startLabelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(edge.startLabelLeft, edge.labelStyle);\n var startEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n var inner = startEdgeLabelLeft.insert('g').attr('class', 'inner');\n inner.node().appendChild(startLabelElement);\n var slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n\n terminalLabels[edge.id].startLeft = startEdgeLabelLeft;\n }\n\n if (edge.startLabelRight) {\n // Create the actual text element\n var _startLabelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(edge.startLabelRight, edge.labelStyle);\n\n var startEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n\n var _inner = startEdgeLabelRight.insert('g').attr('class', 'inner');\n\n startEdgeLabelRight.node().appendChild(_startLabelElement);\n\n _inner.node().appendChild(_startLabelElement);\n\n var _slBox = _startLabelElement.getBBox();\n\n _inner.attr('transform', 'translate(' + -_slBox.width / 2 + ', ' + -_slBox.height / 2 + ')');\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n\n terminalLabels[edge.id].startRight = startEdgeLabelRight;\n }\n\n if (edge.endLabelLeft) {\n // Create the actual text element\n var endLabelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(edge.endLabelLeft, edge.labelStyle);\n var endEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n\n var _inner2 = endEdgeLabelLeft.insert('g').attr('class', 'inner');\n\n _inner2.node().appendChild(endLabelElement);\n\n var _slBox2 = endLabelElement.getBBox();\n\n _inner2.attr('transform', 'translate(' + -_slBox2.width / 2 + ', ' + -_slBox2.height / 2 + ')');\n\n endEdgeLabelLeft.node().appendChild(endLabelElement);\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n\n terminalLabels[edge.id].endLeft = endEdgeLabelLeft;\n }\n\n if (edge.endLabelRight) {\n // Create the actual text element\n var _endLabelElement = Object(_createLabel__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(edge.endLabelRight, edge.labelStyle);\n\n var endEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n\n var _inner3 = endEdgeLabelRight.insert('g').attr('class', 'inner');\n\n _inner3.node().appendChild(_endLabelElement);\n\n var _slBox3 = _endLabelElement.getBBox();\n\n _inner3.attr('transform', 'translate(' + -_slBox3.width / 2 + ', ' + -_slBox3.height / 2 + ')');\n\n endEdgeLabelRight.node().appendChild(_endLabelElement);\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n\n terminalLabels[edge.id].endRight = endEdgeLabelRight;\n }\n };\n\n var positionEdgeLabel = function positionEdgeLabel(edge, paths) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Moving label', edge.id, edge.label, edgeLabels[edge.id]);\n\n var path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n\n if (edge.label) {\n var el = edgeLabels[edge.id];\n var x = edge.x;\n var y = edge.y;\n\n if (path) {\n // // debugger;\n var pos = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].calcLabelPosition(path);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Moving label from (', x, ',', y, ') to (', pos.x, ',', pos.y, ')'); // x = pos.x;\n // y = pos.y;\n\n }\n\n el.attr('transform', 'translate(' + x + ', ' + y + ')');\n } //let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n\n\n if (edge.startLabelLeft) {\n var _el = terminalLabels[edge.id].startLeft;\n var _x = edge.x;\n var _y = edge.y;\n\n if (path) {\n // debugger;\n var _pos = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].calcTerminalLabelPosition(0, 'start_left', path);\n\n _x = _pos.x;\n _y = _pos.y;\n }\n\n _el.attr('transform', 'translate(' + _x + ', ' + _y + ')');\n }\n\n if (edge.startLabelRight) {\n var _el2 = terminalLabels[edge.id].startRight;\n var _x2 = edge.x;\n var _y2 = edge.y;\n\n if (path) {\n // debugger;\n var _pos2 = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].calcTerminalLabelPosition(0, 'start_right', path);\n\n _x2 = _pos2.x;\n _y2 = _pos2.y;\n }\n\n _el2.attr('transform', 'translate(' + _x2 + ', ' + _y2 + ')');\n }\n\n if (edge.endLabelLeft) {\n var _el3 = terminalLabels[edge.id].endLeft;\n var _x3 = edge.x;\n var _y3 = edge.y;\n\n if (path) {\n // debugger;\n var _pos3 = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].calcTerminalLabelPosition(0, 'end_left', path);\n\n _x3 = _pos3.x;\n _y3 = _pos3.y;\n }\n\n _el3.attr('transform', 'translate(' + _x3 + ', ' + _y3 + ')');\n }\n\n if (edge.endLabelRight) {\n var _el4 = terminalLabels[edge.id].endRight;\n var _x4 = edge.x;\n var _y4 = edge.y;\n\n if (path) {\n // debugger;\n var _pos4 = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].calcTerminalLabelPosition(0, 'end_right', path);\n\n _x4 = _pos4.x;\n _y4 = _pos4.y;\n }\n\n _el4.attr('transform', 'translate(' + _x4 + ', ' + _y4 + ')');\n }\n }; // const getRelationType = function(type) {\n // switch (type) {\n // case stateDb.relationType.AGGREGATION:\n // return 'aggregation';\n // case stateDb.relationType.EXTENSION:\n // return 'extension';\n // case stateDb.relationType.COMPOSITION:\n // return 'composition';\n // case stateDb.relationType.DEPENDENCY:\n // return 'dependency';\n // }\n // };\n\n\n var outsideNode = function outsideNode(node, point) {\n // log.warn('Checking bounds ', node, point);\n var x = node.x;\n var y = node.y;\n var dx = Math.abs(point.x - x);\n var dy = Math.abs(point.y - y);\n var w = node.width / 2;\n var h = node.height / 2;\n\n if (dx >= w || dy >= h) {\n return true;\n }\n\n return false;\n };\n\n var intersection = function intersection(node, outsidePoint, insidePoint) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('intersection calc o:', outsidePoint, ' i:', insidePoint, node);\n\n var x = node.x;\n var y = node.y;\n var dx = Math.abs(x - insidePoint.x);\n var w = node.width / 2;\n var r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;\n var h = node.height / 2;\n var edges = {\n x1: x - w,\n x2: x + w,\n y1: y - h,\n y2: y + h\n };\n\n if (outsidePoint.x === edges.x1 || outsidePoint.x === edges.x2 || outsidePoint.y === edges.y1 || outsidePoint.y === edges.y2) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('calc equals on edge');\n\n return outsidePoint;\n }\n\n var Q = Math.abs(outsidePoint.y - insidePoint.y);\n var R = Math.abs(outsidePoint.x - insidePoint.x); // log.warn();\n\n if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {\n // eslint-disable-line\n // Intersection is top or bottom of rect.\n // let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n var q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n r = R * q / Q;\n var res = {\n x: insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - r,\n y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - q\n };\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn(\"topp/bott calc, Q \".concat(Q, \", q \").concat(q, \", R \").concat(R, \", r \").concat(r), res);\n\n return res;\n } else {\n // Intersection onn sides of rect\n // q = (Q * r) / R;\n // q = 2;\n // r = (R * q) / Q;\n if (insidePoint.x < outsidePoint.x) {\n r = outsidePoint.x - w - x;\n } else {\n // r = outsidePoint.x - w - x;\n r = x - w - outsidePoint.x;\n }\n\n var _q = _q = Q * r / R;\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn(\"sides calc, Q \".concat(Q, \", q \").concat(_q, \", R \").concat(R, \", r \").concat(r), {\n x: insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x + dx - w,\n y: insidePoint.y < outsidePoint.y ? insidePoint.y + _q : insidePoint.y - _q\n });\n\n return {\n x: insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x + dx - w,\n y: insidePoint.y < outsidePoint.y ? insidePoint.y + _q : insidePoint.y - _q\n };\n }\n }; //(edgePaths, e, edge, clusterDb, diagramtype, graph)\n\n\n var insertEdge = function insertEdge(elem, e, edge, clusterDb, diagramType, graph) {\n var points = edge.points;\n var pointsHasChanged = false;\n var tail = graph.node(e.v);\n var head = graph.node(e.w);\n\n if (head.intersect && tail.intersect) {\n points = points.slice(1, edge.points.length - 1);\n points.unshift(tail.intersect(points[0]));\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Last point', points[points.length - 1], head, head.intersect(points[points.length - 1]));\n\n points.push(head.intersect(points[points.length - 1]));\n }\n\n if (edge.toCluster) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('edge', edge);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('to cluster', clusterDb[edge.toCluster]);\n\n points = [];\n var lastPointOutside;\n var isInside = false;\n edge.points.forEach(function (point) {\n var node = clusterDb[edge.toCluster].node;\n\n if (!outsideNode(node, point) && !isInside) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('inside', edge.toCluster, point, lastPointOutside); // First point inside the rect\n\n\n var inter = intersection(node, lastPointOutside, point);\n var pointPresent = false;\n points.forEach(function (p) {\n pointPresent = pointPresent || p.x === inter.x && p.y === inter.y;\n }); // if (!pointPresent) {\n\n if (!points.find(function (e) {\n return e.x === inter.x && e.y === inter.y;\n })) {\n points.push(inter);\n } else {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('no intersect', inter, points);\n }\n\n isInside = true;\n } else {\n if (!isInside) points.push(point);\n }\n\n lastPointOutside = point;\n });\n pointsHasChanged = true;\n }\n\n if (edge.fromCluster) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('edge', edge);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('from cluster', clusterDb[edge.fromCluster]);\n\n var updatedPoints = [];\n\n var _lastPointOutside;\n\n var _isInside = false;\n\n for (var i = points.length - 1; i >= 0; i--) {\n var point = points[i];\n var node = clusterDb[edge.fromCluster].node;\n\n if (!outsideNode(node, point) && !_isInside) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('inside', edge.fromCluster, point, node); // First point inside the rect\n\n\n var insterection = intersection(node, _lastPointOutside, point); // log.trace('intersect', intersection(node, lastPointOutside, point));\n\n updatedPoints.unshift(insterection); // points.push(insterection);\n\n _isInside = true;\n } else {\n // at the outside\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('Outside point', point);\n\n if (!_isInside) updatedPoints.unshift(point);\n }\n\n _lastPointOutside = point;\n }\n\n points = updatedPoints;\n pointsHasChanged = true;\n } // The data for our line\n\n\n var lineData = points.filter(function (p) {\n return !Number.isNaN(p.y);\n }); // This is the accessor function we talked about above\n\n var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_2__[\"line\"])().x(function (d) {\n return d.x;\n }).y(function (d) {\n return d.y;\n }).curve(d3__WEBPACK_IMPORTED_MODULE_2__[\"curveBasis\"]); // Contruct stroke classes based on properties\n\n var strokeClasses;\n\n switch (edge.thickness) {\n case 'normal':\n strokeClasses = 'edge-thickness-normal';\n break;\n\n case 'thick':\n strokeClasses = 'edge-thickness-thick';\n break;\n\n default:\n strokeClasses = '';\n }\n\n switch (edge.pattern) {\n case 'solid':\n strokeClasses += ' edge-pattern-solid';\n break;\n\n case 'dotted':\n strokeClasses += ' edge-pattern-dotted';\n break;\n\n case 'dashed':\n strokeClasses += ' edge-pattern-dashed';\n break;\n }\n\n var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', edge.id).attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : '')).attr('style', edge.style); // DEBUG code, adds a red circle at each edge coordinate\n // edge.points.forEach(point => {\n // elem\n // .append('circle')\n // .style('stroke', 'red')\n // .style('fill', 'red')\n // .attr('r', 1)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n\n var url = '';\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().state.arrowMarkerAbsolute) {\n url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('arrowTypeStart', edge.arrowTypeStart);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('arrowTypeEnd', edge.arrowTypeEnd);\n\n switch (edge.arrowTypeStart) {\n case 'arrow_cross':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-crossStart' + ')');\n break;\n\n case 'arrow_point':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-pointStart' + ')');\n break;\n\n case 'arrow_barb':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-barbStart' + ')');\n break;\n\n case 'arrow_circle':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-circleStart' + ')');\n break;\n\n case 'aggregation':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-aggregationStart' + ')');\n break;\n\n case 'extension':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-extensionStart' + ')');\n break;\n\n case 'composition':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-compositionStart' + ')');\n break;\n\n case 'dependency':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-dependencyStart' + ')');\n break;\n\n default:\n }\n\n switch (edge.arrowTypeEnd) {\n case 'arrow_cross':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-crossEnd' + ')');\n break;\n\n case 'arrow_point':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-pointEnd' + ')');\n break;\n\n case 'arrow_barb':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-barbEnd' + ')');\n break;\n\n case 'arrow_circle':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-circleEnd' + ')');\n break;\n\n case 'aggregation':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-aggregationEnd' + ')');\n break;\n\n case 'extension':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-extensionEnd' + ')');\n break;\n\n case 'composition':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-compositionEnd' + ')');\n break;\n\n case 'dependency':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-dependencyEnd' + ')');\n break;\n\n default:\n }\n\n var paths = {};\n\n if (pointsHasChanged) {\n paths.updatedPath = points;\n }\n\n paths.originalPath = edge.points;\n return paths;\n };\n /***/\n\n },\n\n /***/\n \"./src/dagre-wrapper/index.js\":\n /*!************************************!*\\\n !*** ./src/dagre-wrapper/index.js ***!\n \\************************************/\n\n /*! exports provided: render */\n\n /***/\n function srcDagreWrapperIndexJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"render\", function () {\n return render;\n });\n /* harmony import */\n\n\n var dagre__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! dagre */\n \"dagre\");\n /* harmony import */\n\n\n var dagre__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! graphlib */\n \"graphlib\");\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_1__);\n /* harmony import */\n\n\n var _markers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./markers */\n \"./src/dagre-wrapper/markers.js\");\n /* harmony import */\n\n\n var _shapes_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./shapes/util */\n \"./src/dagre-wrapper/shapes/util.js\");\n /* harmony import */\n\n\n var _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ./mermaid-graphlib */\n \"./src/dagre-wrapper/mermaid-graphlib.js\");\n /* harmony import */\n\n\n var _nodes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ./nodes */\n \"./src/dagre-wrapper/nodes.js\");\n /* harmony import */\n\n\n var _clusters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\n /*! ./clusters */\n \"./src/dagre-wrapper/clusters.js\");\n /* harmony import */\n\n\n var _edges__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\n /*! ./edges */\n \"./src/dagre-wrapper/edges.js\");\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(\n /*! ../logger */\n \"./src/logger.js\");\n\n var recursiveRender = function recursiveRender(_elem, graph, diagramtype, parentCluster) {\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Graph in recursive render: XXX', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph), parentCluster);\n\n var dir = graph.graph().rankdir;\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].warn('Dir in recursive render - dir:', dir);\n\n var elem = _elem.insert('g').attr('class', 'root'); // eslint-disable-line\n\n\n if (!graph.nodes()) {\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('No nodes found for', graph);\n } else {\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Recursive render XXX', graph.nodes());\n }\n\n if (graph.edges().length > 0) {\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Recursive edges', graph.edge(graph.edges()[0]));\n }\n\n var clusters = elem.insert('g').attr('class', 'clusters'); // eslint-disable-line\n\n var edgePaths = elem.insert('g').attr('class', 'edgePaths');\n var edgeLabels = elem.insert('g').attr('class', 'edgeLabels');\n var nodes = elem.insert('g').attr('class', 'nodes'); // Insert nodes, this will insert them into the dom and each node will get a size. The size is updated\n // to the abstract node and is later used by dagre for the layout\n\n graph.nodes().forEach(function (v) {\n var node = graph.node(v);\n\n if (typeof parentCluster !== 'undefined') {\n var data = JSON.parse(JSON.stringify(parentCluster.clusterData)); // data.clusterPositioning = true;\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Setting data for cluster XXX (', v, ') ', data, parentCluster);\n\n graph.setNode(parentCluster.id, data);\n\n if (!graph.parent(v)) {\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].warn('Setting parent', v, parentCluster.id);\n\n graph.setParent(v, parentCluster.id, data);\n }\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('(Insert) Node XXX' + v + ': ' + JSON.stringify(graph.node(v)));\n\n if (node && node.clusterNode) {\n // const children = graph.children(v);\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Cluster identified', v, node, graph.node(v));\n\n var newEl = recursiveRender(nodes, node.graph, diagramtype, graph.node(v));\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_3__[\"updateNodeBounds\"])(node, newEl);\n Object(_nodes__WEBPACK_IMPORTED_MODULE_5__[\"setNodeElem\"])(newEl, node);\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].warn('Recursive render complete', newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n // This is a cluster but not to be rendered recusively\n // Render as before\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Cluster - the non recursive path XXX', v, node.id, node, graph);\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info(Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"findNonClusterChild\"])(node.id, graph));\n\n _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clusterDb\"][node.id] = {\n id: Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"findNonClusterChild\"])(node.id, graph),\n node: node\n }; // insertCluster(clusters, graph.node(v));\n } else {\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Node - the non recursive path', v, node.id, node);\n\n Object(_nodes__WEBPACK_IMPORTED_MODULE_5__[\"insertNode\"])(nodes, graph.node(v), dir);\n }\n }\n }); // Insert labels, this will insert them into the dom so that the width can be calculated\n // Also figure out which edges point to/from clusters and adjust them accordingly\n // Edges from/to clusters really points to the first child in the cluster.\n // TODO: pick optimal child in the cluster to us as link anchor\n\n graph.edges().forEach(function (e) {\n var edge = graph.edge(e.v, e.w, e.name);\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Edge ' + e.v + ' -> ' + e.w + ': ', e, ' ', JSON.stringify(graph.edge(e))); // Check if link is either from or to a cluster\n\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Fix', _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clusterDb\"], 'ids:', e.v, e.w, 'Translateing: ', _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clusterDb\"][e.v], _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clusterDb\"][e.w]);\n\n Object(_edges__WEBPACK_IMPORTED_MODULE_7__[\"insertEdgeLabel\"])(edgeLabels, edge);\n });\n graph.edges().forEach(function (e) {\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n });\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('#############################################');\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('### Layout ###');\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('#############################################');\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info(graph);\n\n dagre__WEBPACK_IMPORTED_MODULE_0___default.a.layout(graph);\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Graph after layout:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); // Move the nodes to the correct place\n\n\n Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"sortNodesByHierarchy\"])(graph).forEach(function (v) {\n var node = graph.node(v);\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Position ' + v + ': ' + JSON.stringify(graph.node(v)));\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Position ' + v + ': (' + node.x, ',' + node.y, ') width: ', node.width, ' height: ', node.height);\n\n if (node && node.clusterNode) {\n // clusterDb[node.id].node = node;\n Object(_nodes__WEBPACK_IMPORTED_MODULE_5__[\"positionNode\"])(node);\n } else {\n // Non cluster node\n if (graph.children(v).length > 0) {\n // A cluster in the non-recurive way\n // positionCluster(node);\n Object(_clusters__WEBPACK_IMPORTED_MODULE_6__[\"insertCluster\"])(clusters, node);\n _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clusterDb\"][node.id].node = node;\n } else {\n Object(_nodes__WEBPACK_IMPORTED_MODULE_5__[\"positionNode\"])(node);\n }\n }\n }); // Move the edge labels to the correct place after layout\n\n graph.edges().forEach(function (e) {\n var edge = graph.edge(e);\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(edge), edge);\n\n var paths = Object(_edges__WEBPACK_IMPORTED_MODULE_7__[\"insertEdge\"])(edgePaths, e, edge, _mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clusterDb\"], diagramtype, graph);\n Object(_edges__WEBPACK_IMPORTED_MODULE_7__[\"positionEdgeLabel\"])(edge, paths);\n });\n return elem;\n };\n\n var render = function render(elem, graph, markers, diagramtype, id) {\n Object(_markers__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(elem, markers, diagramtype, id);\n Object(_nodes__WEBPACK_IMPORTED_MODULE_5__[\"clear\"])();\n Object(_edges__WEBPACK_IMPORTED_MODULE_7__[\"clear\"])();\n Object(_clusters__WEBPACK_IMPORTED_MODULE_6__[\"clear\"])();\n Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"clear\"])();\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].warn('Graph at first:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph));\n\n Object(_mermaid_graphlib__WEBPACK_IMPORTED_MODULE_4__[\"adjustClustersAndEdges\"])(graph);\n\n _logger__WEBPACK_IMPORTED_MODULE_8__[\"log\"].warn('Graph after:', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph)); // log.warn('Graph ever after:', graphlib.json.write(graph.node('A').graph));\n\n\n recursiveRender(elem, graph, diagramtype);\n }; // const shapeDefinitions = {};\n // export const addShape = ({ shapeType: fun }) => {\n // shapeDefinitions[shapeType] = fun;\n // };\n // const arrowDefinitions = {};\n // export const addArrow = ({ arrowType: fun }) => {\n // arrowDefinitions[arrowType] = fun;\n // };\n\n /***/\n\n },\n\n /***/\n \"./src/dagre-wrapper/intersect/index.js\":\n /*!**********************************************!*\\\n !*** ./src/dagre-wrapper/intersect/index.js ***!\n \\**********************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDagreWrapperIntersectIndexJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony import */\n\n\n var _intersect_node_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ./intersect-node.js */\n \"./src/dagre-wrapper/intersect/intersect-node.js\");\n /* harmony import */\n\n\n var _intersect_node_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_intersect_node_js__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _intersect_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./intersect-circle.js */\n \"./src/dagre-wrapper/intersect/intersect-circle.js\");\n /* harmony import */\n\n\n var _intersect_ellipse_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./intersect-ellipse.js */\n \"./src/dagre-wrapper/intersect/intersect-ellipse.js\");\n /* harmony import */\n\n\n var _intersect_polygon_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./intersect-polygon.js */\n \"./src/dagre-wrapper/intersect/intersect-polygon.js\");\n /* harmony import */\n\n\n var _intersect_rect_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ./intersect-rect.js */\n \"./src/dagre-wrapper/intersect/intersect-rect.js\");\n /*\n * Borrowed with love from from dagrge-d3. Many thanks to cpettitt!\n */\n\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n node: _intersect_node_js__WEBPACK_IMPORTED_MODULE_0___default.a,\n circle: _intersect_circle_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n ellipse: _intersect_ellipse_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n polygon: _intersect_polygon_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n rect: _intersect_rect_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n };\n /***/\n },\n\n /***/\n \"./src/dagre-wrapper/intersect/intersect-circle.js\":\n /*!*********************************************************!*\\\n !*** ./src/dagre-wrapper/intersect/intersect-circle.js ***!\n \\*********************************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDagreWrapperIntersectIntersectCircleJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony import */\n\n\n var _intersect_ellipse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ./intersect-ellipse */\n \"./src/dagre-wrapper/intersect/intersect-ellipse.js\");\n\n function intersectCircle(node, rx, point) {\n return Object(_intersect_ellipse__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node, rx, rx, point);\n }\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = intersectCircle;\n /***/\n },\n\n /***/\n \"./src/dagre-wrapper/intersect/intersect-ellipse.js\":\n /*!**********************************************************!*\\\n !*** ./src/dagre-wrapper/intersect/intersect-ellipse.js ***!\n \\**********************************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDagreWrapperIntersectIntersectEllipseJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n\n function intersectEllipse(node, rx, ry, point) {\n // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html\n var cx = node.x;\n var cy = node.y;\n var px = cx - point.x;\n var py = cy - point.y;\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n var dx = Math.abs(rx * ry * px / det);\n\n if (point.x < cx) {\n dx = -dx;\n }\n\n var dy = Math.abs(rx * ry * py / det);\n\n if (point.y < cy) {\n dy = -dy;\n }\n\n return {\n x: cx + dx,\n y: cy + dy\n };\n }\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = intersectEllipse;\n /***/\n },\n\n /***/\n \"./src/dagre-wrapper/intersect/intersect-line.js\":\n /*!*******************************************************!*\\\n !*** ./src/dagre-wrapper/intersect/intersect-line.js ***!\n \\*******************************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDagreWrapperIntersectIntersectLineJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /*\n * Returns the point at which two lines, p and q, intersect or returns\n * undefined if they do not intersect.\n */\n\n\n function intersectLine(p1, p2, q1, q2) {\n // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,\n // p7 and p473.\n var a1, a2, b1, b2, c1, c2;\n var r1, r2, r3, r4;\n var denom, offset, num;\n var x, y; // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +\n // b1 y + c1 = 0.\n\n a1 = p2.y - p1.y;\n b1 = p1.x - p2.x;\n c1 = p2.x * p1.y - p1.x * p2.y; // Compute r3 and r4.\n\n r3 = a1 * q1.x + b1 * q1.y + c1;\n r4 = a1 * q2.x + b1 * q2.y + c1; // Check signs of r3 and r4. If both point 3 and point 4 lie on\n // same side of line 1, the line segments do not intersect.\n\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return;\n } // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0\n\n\n a2 = q2.y - q1.y;\n b2 = q1.x - q2.x;\n c2 = q2.x * q1.y - q1.x * q2.y; // Compute r1 and r2\n\n r1 = a2 * p1.x + b2 * p1.y + c2;\n r2 = a2 * p2.x + b2 * p2.y + c2; // Check signs of r1 and r2. If both point 1 and point 2 lie\n // on same side of second line segment, the line segments do\n // not intersect.\n\n if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n return;\n } // Line segments intersect: compute intersection point.\n\n\n denom = a1 * b2 - a2 * b1;\n\n if (denom === 0) {\n return;\n }\n\n offset = Math.abs(denom / 2); // The denom/2 is to get rounding instead of truncating. It\n // is added or subtracted to the numerator, depending upon the\n // sign of the numerator.\n\n num = b1 * c2 - b2 * c1;\n x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n num = a2 * c1 - a1 * c2;\n y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n return {\n x: x,\n y: y\n };\n }\n\n function sameSign(r1, r2) {\n return r1 * r2 > 0;\n }\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = intersectLine;\n /***/\n },\n\n /***/\n \"./src/dagre-wrapper/intersect/intersect-node.js\":\n /*!*******************************************************!*\\\n !*** ./src/dagre-wrapper/intersect/intersect-node.js ***!\n \\*******************************************************/\n\n /*! no static exports found */\n\n /***/\n function srcDagreWrapperIntersectIntersectNodeJs(module, exports) {\n module.exports = intersectNode;\n\n function intersectNode(node, point) {\n // console.info('Intersect Node');\n return node.intersect(point);\n }\n /***/\n\n },\n\n /***/\n \"./src/dagre-wrapper/intersect/intersect-polygon.js\":\n /*!**********************************************************!*\\\n !*** ./src/dagre-wrapper/intersect/intersect-polygon.js ***!\n \\**********************************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDagreWrapperIntersectIntersectPolygonJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony import */\n\n\n var _intersect_line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ./intersect-line */\n \"./src/dagre-wrapper/intersect/intersect-line.js\");\n /* eslint \"no-console\": off */\n\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = intersectPolygon;\n /*\n * Returns the point ({x, y}) at which the point argument intersects with the\n * node argument assuming that it has the shape specified by polygon.\n */\n\n function intersectPolygon(node, polyPoints, point) {\n var x1 = node.x;\n var y1 = node.y;\n var intersections = [];\n var minX = Number.POSITIVE_INFINITY;\n var minY = Number.POSITIVE_INFINITY;\n\n if (typeof polyPoints.forEach === 'function') {\n polyPoints.forEach(function (entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n } else {\n minX = Math.min(minX, polyPoints.x);\n minY = Math.min(minY, polyPoints.y);\n }\n\n var left = x1 - node.width / 2 - minX;\n var top = y1 - node.height / 2 - minY;\n\n for (var i = 0; i < polyPoints.length; i++) {\n var p1 = polyPoints[i];\n var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n var intersect = Object(_intersect_line__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node, point, {\n x: left + p1.x,\n y: top + p1.y\n }, {\n x: left + p2.x,\n y: top + p2.y\n });\n\n if (intersect) {\n intersections.push(intersect);\n }\n }\n\n if (!intersections.length) {\n // console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node);\n return node;\n }\n\n if (intersections.length > 1) {\n // More intersections, find the one nearest to edge end point\n intersections.sort(function (p, q) {\n var pdx = p.x - point.x;\n var pdy = p.y - point.y;\n var distp = Math.sqrt(pdx * pdx + pdy * pdy);\n var qdx = q.x - point.x;\n var qdy = q.y - point.y;\n var distq = Math.sqrt(qdx * qdx + qdy * qdy);\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n\n return intersections[0];\n }\n /***/\n\n },\n\n /***/\n \"./src/dagre-wrapper/intersect/intersect-rect.js\":\n /*!*******************************************************!*\\\n !*** ./src/dagre-wrapper/intersect/intersect-rect.js ***!\n \\*******************************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDagreWrapperIntersectIntersectRectJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n\n var intersectRect = function intersectRect(node, point) {\n var x = node.x;\n var y = node.y; // Rectangle intersection algorithm from:\n // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n\n var dx = point.x - x;\n var dy = point.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n var sx, sy;\n\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n\n sx = dy === 0 ? 0 : h * dx / dy;\n sy = h;\n } else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n\n sx = w;\n sy = dx === 0 ? 0 : w * dy / dx;\n }\n\n return {\n x: x + sx,\n y: y + sy\n };\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = intersectRect;\n /***/\n },\n\n /***/\n \"./src/dagre-wrapper/markers.js\":\n /*!**************************************!*\\\n !*** ./src/dagre-wrapper/markers.js ***!\n \\**************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDagreWrapperMarkersJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ../logger */\n \"./src/logger.js\");\n /**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\n // Only add the number of markers that the diagram needs\n\n\n var insertMarkers = function insertMarkers(elem, markerArray, type, id) {\n markerArray.forEach(function (markerName) {\n markers[markerName](elem, type, id);\n });\n };\n\n var extension = function extension(elem, type, id) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('Making markers for ', id);\n\n elem.append('defs').append('marker').attr('id', type + '-extensionStart').attr('class', 'marker extension ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 1,7 L18,13 V 1 Z');\n elem.append('defs').append('marker').attr('id', type + '-extensionEnd').attr('class', 'marker extension ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n };\n\n var composition = function composition(elem, type) {\n elem.append('defs').append('marker').attr('id', type + '-compositionStart').attr('class', 'marker composition ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n elem.append('defs').append('marker').attr('id', type + '-compositionEnd').attr('class', 'marker composition ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n };\n\n var aggregation = function aggregation(elem, type) {\n elem.append('defs').append('marker').attr('id', type + '-aggregationStart').attr('class', 'marker aggregation ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n elem.append('defs').append('marker').attr('id', type + '-aggregationEnd').attr('class', 'marker aggregation ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n };\n\n var dependency = function dependency(elem, type) {\n elem.append('defs').append('marker').attr('id', type + '-dependencyStart').attr('class', 'marker dependency ' + type).attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n elem.append('defs').append('marker').attr('id', type + '-dependencyEnd').attr('class', 'marker dependency ' + type).attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n };\n\n var point = function point(elem, type) {\n elem.append('marker').attr('id', type + '-pointEnd').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 12).attr('markerHeight', 12).attr('orient', 'auto').append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');\n elem.append('marker').attr('id', type + '-pointStart').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', 0).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 12).attr('markerHeight', 12).attr('orient', 'auto').append('path').attr('d', 'M 0 5 L 10 10 L 10 0 z').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');\n };\n\n var circle = function circle(elem, type) {\n elem.append('marker').attr('id', type + '-circleEnd').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', 11).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('circle').attr('cx', '5').attr('cy', '5').attr('r', '5').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');\n elem.append('marker').attr('id', type + '-circleStart').attr('class', 'marker ' + type).attr('viewBox', '0 0 10 10').attr('refX', -1).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('circle').attr('cx', '5').attr('cy', '5').attr('r', '5').attr('class', 'arrowMarkerPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');\n };\n\n var cross = function cross(elem, type) {\n elem.append('marker').attr('id', type + '-crossEnd').attr('class', 'marker cross ' + type).attr('viewBox', '0 0 11 11').attr('refX', 12).attr('refY', 5.2).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('path') // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9').attr('class', 'arrowMarkerPath').style('stroke-width', 2).style('stroke-dasharray', '1,0');\n elem.append('marker').attr('id', type + '-crossStart').attr('class', 'marker cross ' + type).attr('viewBox', '0 0 11 11').attr('refX', -1).attr('refY', 5.2).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 11).attr('markerHeight', 11).attr('orient', 'auto').append('path') // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9').attr('class', 'arrowMarkerPath').style('stroke-width', 2).style('stroke-dasharray', '1,0');\n };\n\n var barb = function barb(elem, type) {\n elem.append('defs').append('marker').attr('id', type + '-barbEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 14).attr('markerUnits', 'strokeWidth').attr('orient', 'auto').append('path').attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n }; // TODO rename the class diagram markers to something shape descriptive and semanitc free\n\n\n var markers = {\n extension: extension,\n composition: composition,\n aggregation: aggregation,\n dependency: dependency,\n point: point,\n circle: circle,\n cross: cross,\n barb: barb\n };\n /* harmony default export */\n\n __webpack_exports__[\"default\"] = insertMarkers;\n /***/\n },\n\n /***/\n \"./src/dagre-wrapper/mermaid-graphlib.js\":\n /*!***********************************************!*\\\n !*** ./src/dagre-wrapper/mermaid-graphlib.js ***!\n \\***********************************************/\n\n /*! exports provided: clusterDb, clear, extractDecendants, validate, findNonClusterChild, adjustClustersAndEdges, extractor, sortNodesByHierarchy */\n\n /***/\n function srcDagreWrapperMermaidGraphlibJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"clusterDb\", function () {\n return clusterDb;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"clear\", function () {\n return clear;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"extractDecendants\", function () {\n return extractDecendants;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"validate\", function () {\n return validate;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"findNonClusterChild\", function () {\n return findNonClusterChild;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"adjustClustersAndEdges\", function () {\n return adjustClustersAndEdges;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"extractor\", function () {\n return extractor;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"sortNodesByHierarchy\", function () {\n return sortNodesByHierarchy;\n });\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! graphlib */\n \"graphlib\");\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_1__);\n /**\n * Decorates with functions required by mermaids dagre-wrapper.\n */\n\n\n var clusterDb = {};\n var decendants = {};\n var parents = {};\n\n var clear = function clear() {\n decendants = {};\n parents = {};\n clusterDb = {};\n };\n\n var isDecendant = function isDecendant(id, ancenstorId) {\n // if (id === ancenstorId) return true;\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('In isDecendant', ancenstorId, ' ', id, ' = ', decendants[ancenstorId].indexOf(id) >= 0);\n\n if (decendants[ancenstorId].indexOf(id) >= 0) return true;\n return false;\n };\n\n var edgeInCluster = function edgeInCluster(edge, clusterId) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Decendants of ', clusterId, ' is ', decendants[clusterId]);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Edge is ', edge); // Edges to/from the cluster is not in the cluster, they are in the parent\n\n\n if (edge.v === clusterId) return false;\n if (edge.w === clusterId) return false;\n\n if (!decendants[clusterId]) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Tilt, ', clusterId, ',not in decendants');\n\n return false;\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Here ');\n\n if (decendants[clusterId].indexOf(edge.v) >= 0) return true;\n if (isDecendant(edge.v, clusterId)) return true;\n if (isDecendant(edge.w, clusterId)) return true;\n if (decendants[clusterId].indexOf(edge.w) >= 0) return true;\n return false;\n };\n\n var copy = function copy(clusterId, graph, newGraph, rootId) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Copying children of ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId);\n\n var nodes = graph.children(clusterId) || []; // Include cluster node if it is not the root\n\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Copying (nodes) clusterId', clusterId, 'nodes', nodes);\n\n nodes.forEach(function (node) {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n var data = graph.node(node);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('cp ', node, ' to ', rootId, ' with parent ', clusterId); //,node, data, ' parent is ', clusterId);\n\n\n newGraph.setNode(node, data);\n\n if (rootId !== graph.parent(node)) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Setting parent', node, graph.parent(node));\n\n newGraph.setParent(node, graph.parent(node));\n }\n\n if (clusterId !== rootId && node !== clusterId) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Setting parent', node, clusterId);\n\n newGraph.setParent(node, clusterId);\n } else {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('In copy ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Not Setting parent for node=', node, 'cluster!==rootId', clusterId !== rootId, 'node!==clusterId', node !== clusterId);\n }\n\n var edges = graph.edges(node);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Copying Edges', edges);\n\n edges.forEach(function (edge) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Edge', edge);\n\n var data = graph.edge(edge.v, edge.w, edge.name);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Edge data', data, rootId);\n\n try {\n // Do not copy edges in and out of the root cluster, they belong to the parent graph\n if (edgeInCluster(edge, rootId)) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Copying as ', edge.v, edge.w, data, edge.name);\n\n newGraph.setEdge(edge.v, edge.w, data, edge.name);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('newGraph edges ', newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Skipping copy of edge ', edge.v, '-->', edge.w, ' rootId: ', rootId, ' clusterId:', clusterId);\n }\n } catch (e) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].error(e);\n }\n });\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Removing node', node);\n\n graph.removeNode(node);\n });\n };\n\n var extractDecendants = function extractDecendants(id, graph) {\n // log.debug('Extracting ', id);\n var children = graph.children(id);\n var res = [].concat(children);\n\n for (var i = 0; i < children.length; i++) {\n parents[children[i]] = id;\n res = res.concat(extractDecendants(children[i], graph));\n }\n\n return res;\n };\n /**\n * Validates the graph, checking that all parent child relation points to existing nodes and that\n * edges between nodes also ia correct. When not correct the function logs the discrepancies.\n * @param {graphlib graph} g\n */\n\n\n var validate = function validate(graph) {\n var edges = graph.edges();\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('Edges: ', edges);\n\n for (var i = 0; i < edges.length; i++) {\n if (graph.children(edges[i].v).length > 0) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('The node ', edges[i].v, ' is part of and edge even though it has children');\n\n return false;\n }\n\n if (graph.children(edges[i].w).length > 0) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('The node ', edges[i].w, ' is part of and edge even though it has children');\n\n return false;\n }\n }\n\n return true;\n };\n /**\n * Finds a child that is not a cluster. When faking a edge between a node and a cluster.\n * @param {Finds a } id\n * @param {*} graph\n */\n\n\n var findNonClusterChild = function findNonClusterChild(id, graph) {\n // const node = graph.node(id);\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('Searching', id); // const children = graph.children(id).reverse();\n\n\n var children = graph.children(id); //.reverse();\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('Searching children of id ', id, children);\n\n if (children.length < 1) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('This is a valid node', id);\n\n return id;\n }\n\n for (var i = 0; i < children.length; i++) {\n var _id = findNonClusterChild(children[i], graph);\n\n if (_id) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace('Found replacement for', id, ' => ', _id);\n\n return _id;\n }\n }\n };\n\n var getAnchorId = function getAnchorId(id) {\n if (!clusterDb[id]) {\n return id;\n } // If the cluster has no external connections\n\n\n if (!clusterDb[id].externalConnections) {\n return id;\n } // Return the replacement node\n\n\n if (clusterDb[id]) {\n return clusterDb[id].id;\n }\n\n return id;\n };\n\n var adjustClustersAndEdges = function adjustClustersAndEdges(graph, depth) {\n if (!graph || depth > 10) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Opting out, no graph ');\n\n return;\n } else {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Opting in, graph ');\n } // Go through the nodes and for each cluster found, save a replacment node, this can be used when\n // faking a link to a cluster\n\n\n graph.nodes().forEach(function (id) {\n var children = graph.children(id);\n\n if (children.length > 0) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Cluster identified', id, ' Replacement id in edges: ', findNonClusterChild(id, graph));\n\n decendants[id] = extractDecendants(id, graph);\n clusterDb[id] = {\n id: findNonClusterChild(id, graph),\n clusterData: graph.node(id)\n };\n }\n }); // Check incoming and outgoing edges for each cluster\n\n graph.nodes().forEach(function (id) {\n var children = graph.children(id);\n var edges = graph.edges();\n\n if (children.length > 0) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Cluster identified', id, decendants);\n\n edges.forEach(function (edge) {\n // log.debug('Edge, decendants: ', edge, decendants[id]);\n // Check if any edge leaves the cluster (not the actual cluster, thats a link from the box)\n if (edge.v !== id && edge.w !== id) {\n // Any edge where either the one of the nodes is decending to the cluster but not the other\n // if (decendants[id].indexOf(edge.v) < 0 && decendants[id].indexOf(edge.w) < 0) {\n var d1 = isDecendant(edge.v, id);\n var d2 = isDecendant(edge.w, id); // d1 xor d2 - if either d1 is true and d2 is false or the other way around\n\n if (d1 ^ d2) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Edge: ', edge, ' leaves cluster ', id);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Decendants of XXX ', id, ': ', decendants[id]);\n\n clusterDb[id].externalConnections = true;\n }\n }\n });\n } else {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Not a cluster ', id, decendants);\n }\n }); // For clusters with incoming and/or outgoing edges translate those edges to a real node\n // in the cluster inorder to fake the edge\n\n graph.edges().forEach(function (e) {\n var edge = graph.edge(e);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n\n var v = e.v;\n var w = e.w; // Check if link is either from or to a cluster\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Fix XXX', clusterDb, 'ids:', e.v, e.w, 'Translateing: ', clusterDb[e.v], ' --- ', clusterDb[e.w]);\n\n if (clusterDb[e.v] || clusterDb[e.w]) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Fixing and trixing - removing XXX', e.v, e.w, e.name);\n\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) edge.fromCluster = e.v;\n if (w !== e.w) edge.toCluster = e.w;\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Fix Replacing with XXX', v, w, e.name);\n\n graph.setEdge(v, w, edge, e.name);\n }\n });\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Adjusted Graph', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph));\n\n extractor(graph, 0);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].trace(clusterDb); // Remove references to extracted cluster\n // graph.edges().forEach(edge => {\n // if (isDecendant(edge.v, clusterId) || isDecendant(edge.w, clusterId)) {\n // graph.removeEdge(edge);\n // }\n // });\n\n };\n\n var extractor = function extractor(graph, depth) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('extractor - ', depth, graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph), graph.children('D'));\n\n if (depth > 10) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].error('Bailing out');\n\n return;\n } // For clusters without incoming and/or outgoing edges, create a new cluster-node\n // containing the nodes and edges in the custer in a new graph\n // for (let i = 0;)\n\n\n var nodes = graph.nodes();\n var hasChildren = false;\n\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n var children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n\n if (!hasChildren) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Done, no node has children', graph.nodes());\n\n return;\n } // const clusters = Object.keys(clusterDb);\n // clusters.forEach(clusterId => {\n\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Nodes = ', nodes, depth);\n\n for (var _i = 0; _i < nodes.length; _i++) {\n var _node = nodes[_i];\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Extracting node', _node, clusterDb, clusterDb[_node] && !clusterDb[_node].externalConnections, !graph.parent(_node), graph.node(_node), graph.children('D'), ' Depth ', depth); // Note that the node might have been removed after the Object.keys call so better check\n // that it still is in the game\n\n\n if (!clusterDb[_node]) {\n // Skip if the node is not a cluster\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Not a cluster', _node, depth); // break;\n\n } else if (!clusterDb[_node].externalConnections && // !graph.parent(node) &&\n graph.children(_node) && graph.children(_node).length > 0) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Cluster without external connections, without a parent and with children', _node, depth);\n\n var graphSettings = graph.graph();\n var clusterGraph = new graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: graphSettings.rankdir === 'TB' ? 'LR' : 'TB',\n // Todo: set proper spacing\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function () {\n return {};\n });\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Old graph before copy', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph));\n\n copy(_node, graph, clusterGraph, _node);\n graph.setNode(_node, {\n clusterNode: true,\n id: _node,\n clusterData: clusterDb[_node].clusterData,\n labelText: clusterDb[_node].labelText,\n graph: clusterGraph\n });\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('New graph after copy node: (', _node, ')', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(clusterGraph));\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Old graph after copy', graphlib__WEBPACK_IMPORTED_MODULE_1___default.a.json.write(graph));\n } else {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('Cluster ** ', _node, ' **not meeting the criteria !externalConnections:', !clusterDb[_node].externalConnections, ' no parent: ', !graph.parent(_node), ' children ', graph.children(_node) && graph.children(_node).length > 0, graph.children('D'), depth);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(clusterDb);\n }\n }\n\n nodes = graph.nodes();\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn('New list of nodes', nodes);\n\n for (var _i2 = 0; _i2 < nodes.length; _i2++) {\n var _node2 = nodes[_i2];\n var data = graph.node(_node2);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].warn(' Now next level', _node2, data);\n\n if (data.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n };\n\n var sorter = function sorter(graph, nodes) {\n if (nodes.length === 0) return [];\n var result = Object.assign(nodes);\n nodes.forEach(function (node) {\n var children = graph.children(node);\n var sorted = sorter(graph, children);\n result = result.concat(sorted);\n });\n return result;\n };\n\n var sortNodesByHierarchy = function sortNodesByHierarchy(graph) {\n return sorter(graph, graph.children());\n };\n /***/\n\n },\n\n /***/\n \"./src/dagre-wrapper/nodes.js\":\n /*!************************************!*\\\n !*** ./src/dagre-wrapper/nodes.js ***!\n \\************************************/\n\n /*! exports provided: insertNode, setNodeElem, clear, positionNode */\n\n /***/\n function srcDagreWrapperNodesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"insertNode\", function () {\n return insertNode;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setNodeElem\", function () {\n return setNodeElem;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"clear\", function () {\n return clear;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"positionNode\", function () {\n return positionNode;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _shapes_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./shapes/util */\n \"./src/dagre-wrapper/shapes/util.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ./intersect/index.js */\n \"./src/dagre-wrapper/intersect/index.js\");\n /* harmony import */\n\n\n var _createLabel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ./createLabel */\n \"./src/dagre-wrapper/createLabel.js\");\n /* harmony import */\n\n\n var _shapes_note__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\n /*! ./shapes/note */\n \"./src/dagre-wrapper/shapes/note.js\");\n /* harmony import */\n\n\n var _diagrams_class_svgDraw__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\n /*! ../diagrams/class/svgDraw */\n \"./src/diagrams/class/svgDraw.js\"); // eslint-disable-line\n\n\n var question = function question(parent, node) {\n var _labelHelper = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n shapeSvg = _labelHelper.shapeSvg,\n bbox = _labelHelper.bbox;\n\n var w = bbox.width + node.padding;\n var h = bbox.height + node.padding;\n var s = w + h;\n var points = [{\n x: s / 2,\n y: 0\n }, {\n x: s,\n y: -s / 2\n }, {\n x: s / 2,\n y: -s\n }, {\n x: 0,\n y: -s / 2\n }];\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Question main (Circle)');\n\n var questionElem = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, s, s, points);\n questionElem.attr('style', node.style);\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, questionElem);\n\n node.intersect = function (point) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].warn('Intersect called');\n\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n };\n\n return shapeSvg;\n };\n\n var hexagon = function hexagon(parent, node) {\n var _labelHelper2 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n shapeSvg = _labelHelper2.shapeSvg,\n bbox = _labelHelper2.bbox;\n\n var f = 4;\n var h = bbox.height + node.padding;\n var m = h / f;\n var w = bbox.width + 2 * m + node.padding;\n var points = [{\n x: m,\n y: 0\n }, {\n x: w - m,\n y: 0\n }, {\n x: w,\n y: -h / 2\n }, {\n x: w - m,\n y: -h\n }, {\n x: m,\n y: -h\n }, {\n x: 0,\n y: -h / 2\n }];\n var hex = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n hex.attr('style', node.style);\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, hex);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n };\n\n return shapeSvg;\n };\n\n var rect_left_inv_arrow = function rect_left_inv_arrow(parent, node) {\n var _labelHelper3 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n shapeSvg = _labelHelper3.shapeSvg,\n bbox = _labelHelper3.bbox;\n\n var w = bbox.width + node.padding;\n var h = bbox.height + node.padding;\n var points = [{\n x: -h / 2,\n y: 0\n }, {\n x: w,\n y: 0\n }, {\n x: w,\n y: -h\n }, {\n x: -h / 2,\n y: -h\n }, {\n x: 0,\n y: -h / 2\n }];\n var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n el.attr('style', node.style);\n node.width = w + h;\n node.height = h;\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n };\n\n return shapeSvg;\n };\n\n var lean_right = function lean_right(parent, node) {\n var _labelHelper4 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n shapeSvg = _labelHelper4.shapeSvg,\n bbox = _labelHelper4.bbox;\n\n var w = bbox.width + node.padding;\n var h = bbox.height + node.padding;\n var points = [{\n x: -2 * h / 6,\n y: 0\n }, {\n x: w - h / 6,\n y: 0\n }, {\n x: w + 2 * h / 6,\n y: -h\n }, {\n x: h / 6,\n y: -h\n }];\n var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n el.attr('style', node.style);\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n };\n\n return shapeSvg;\n };\n\n var lean_left = function lean_left(parent, node) {\n var _labelHelper5 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n shapeSvg = _labelHelper5.shapeSvg,\n bbox = _labelHelper5.bbox;\n\n var w = bbox.width + node.padding;\n var h = bbox.height + node.padding;\n var points = [{\n x: 2 * h / 6,\n y: 0\n }, {\n x: w + h / 6,\n y: 0\n }, {\n x: w - 2 * h / 6,\n y: -h\n }, {\n x: -h / 6,\n y: -h\n }];\n var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n el.attr('style', node.style);\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n };\n\n return shapeSvg;\n };\n\n var trapezoid = function trapezoid(parent, node) {\n var _labelHelper6 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n shapeSvg = _labelHelper6.shapeSvg,\n bbox = _labelHelper6.bbox;\n\n var w = bbox.width + node.padding;\n var h = bbox.height + node.padding;\n var points = [{\n x: -2 * h / 6,\n y: 0\n }, {\n x: w + 2 * h / 6,\n y: 0\n }, {\n x: w - h / 6,\n y: -h\n }, {\n x: h / 6,\n y: -h\n }];\n var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n el.attr('style', node.style);\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n };\n\n return shapeSvg;\n };\n\n var inv_trapezoid = function inv_trapezoid(parent, node) {\n var _labelHelper7 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n shapeSvg = _labelHelper7.shapeSvg,\n bbox = _labelHelper7.bbox;\n\n var w = bbox.width + node.padding;\n var h = bbox.height + node.padding;\n var points = [{\n x: h / 6,\n y: 0\n }, {\n x: w - h / 6,\n y: 0\n }, {\n x: w + 2 * h / 6,\n y: -h\n }, {\n x: -2 * h / 6,\n y: -h\n }];\n var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n el.attr('style', node.style);\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n };\n\n return shapeSvg;\n };\n\n var rect_right_inv_arrow = function rect_right_inv_arrow(parent, node) {\n var _labelHelper8 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n shapeSvg = _labelHelper8.shapeSvg,\n bbox = _labelHelper8.bbox;\n\n var w = bbox.width + node.padding;\n var h = bbox.height + node.padding;\n var points = [{\n x: 0,\n y: 0\n }, {\n x: w + h / 2,\n y: 0\n }, {\n x: w,\n y: -h / 2\n }, {\n x: w + h / 2,\n y: -h\n }, {\n x: 0,\n y: -h\n }];\n var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n el.attr('style', node.style);\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n };\n\n return shapeSvg;\n };\n\n var cylinder = function cylinder(parent, node) {\n var _labelHelper9 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n shapeSvg = _labelHelper9.shapeSvg,\n bbox = _labelHelper9.bbox;\n\n var w = bbox.width + node.padding;\n var rx = w / 2;\n var ry = rx / (2.5 + w / 50);\n var h = bbox.height + ry + node.padding;\n var shape = 'M 0,' + ry + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 a ' + rx + ',' + ry + ' 0,0,0 ' + -w + ' 0 l 0,' + h + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 l 0,' + -h;\n var el = shapeSvg.attr('label-offset-y', ry).insert('path', ':first-child').attr('style', node.style).attr('d', shape).attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')');\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n node.intersect = function (point) {\n var pos = _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].rect(node, point);\n\n var x = pos.x - node.x;\n\n if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {\n // ellipsis equation: x*x / a*a + y*y / b*b = 1\n // solve for y to get adjustion value for pos.y\n var y = ry * ry * (1 - x * x / (rx * rx));\n if (y != 0) y = Math.sqrt(y);\n y = ry - y;\n if (point.y - node.y > 0) y = -y;\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n };\n\n var rect = function rect(parent, node) {\n var _labelHelper10 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, 'node ' + node.classes, true),\n shapeSvg = _labelHelper10.shapeSvg,\n bbox = _labelHelper10.bbox,\n halfPadding = _labelHelper10.halfPadding;\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].trace('Classes = ', node.classes); // add the rect\n\n\n var rect = shapeSvg.insert('rect', ':first-child');\n rect.attr('class', 'basic label-container').attr('style', node.style).attr('rx', node.rx).attr('ry', node.ry).attr('x', -bbox.width / 2 - halfPadding).attr('y', -bbox.height / 2 - halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding);\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, rect);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].rect(node, point);\n };\n\n return shapeSvg;\n };\n\n var rectWithTitle = function rectWithTitle(parent, node) {\n // const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes);\n var classes;\n\n if (!node.classes) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.classes;\n } // Add outer g element\n\n\n var shapeSvg = parent.insert('g').attr('class', classes).attr('id', node.domId || node.id); // Create the title label and insert it after the rect\n\n var rect = shapeSvg.insert('rect', ':first-child'); // const innerRect = shapeSvg.insert('rect');\n\n var innerLine = shapeSvg.insert('line');\n var label = shapeSvg.insert('g').attr('class', 'label');\n var text2 = node.labelText.flat();\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Label text', text2[0]);\n\n var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(text2[0], node.labelStyle, true, true));\n var bbox;\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels) {\n var div = text.children[0];\n var dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Text 2', text2);\n\n var textRows = text2.slice(1, text2.length);\n var titleBox = text.getBBox();\n var descr = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(textRows.join('
'), node.labelStyle, true, true));\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels) {\n var _div = descr.children[0];\n\n var _dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(descr);\n\n bbox = _div.getBoundingClientRect();\n\n _dv.attr('width', bbox.width);\n\n _dv.attr('height', bbox.height);\n } // bbox = label.getBBox();\n // log.info(descr);\n\n\n var halfPadding = node.padding / 2;\n Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(descr).attr('transform', 'translate( ' + ( // (titleBox.width - bbox.width) / 2 +\n bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ', ' + (titleBox.height + halfPadding + 5) + ')');\n Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(text).attr('transform', 'translate( ' + ( // (titleBox.width - bbox.width) / 2 +\n bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ', ' + 0 + ')'); // Get the size of the label\n // Bounding box for title and text\n\n bbox = label.node().getBBox(); // Center the label\n\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')');\n rect.attr('class', 'outer title-state').attr('x', -bbox.width / 2 - halfPadding).attr('y', -bbox.height / 2 - halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding);\n innerLine.attr('class', 'divider').attr('x1', -bbox.width / 2 - halfPadding).attr('x2', bbox.width / 2 + halfPadding).attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, rect);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].rect(node, point);\n };\n\n return shapeSvg;\n };\n\n var stadium = function stadium(parent, node) {\n var _labelHelper11 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n shapeSvg = _labelHelper11.shapeSvg,\n bbox = _labelHelper11.bbox;\n\n var h = bbox.height + node.padding;\n var w = bbox.width + h / 4 + node.padding; // add the rect\n\n var rect = shapeSvg.insert('rect', ':first-child').attr('style', node.style).attr('rx', h / 2).attr('ry', h / 2).attr('x', -w / 2).attr('y', -h / 2).attr('width', w).attr('height', h);\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, rect);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].rect(node, point);\n };\n\n return shapeSvg;\n };\n\n var circle = function circle(parent, node) {\n var _labelHelper12 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n shapeSvg = _labelHelper12.shapeSvg,\n bbox = _labelHelper12.bbox,\n halfPadding = _labelHelper12.halfPadding;\n\n var circle = shapeSvg.insert('circle', ':first-child'); // center the circle around its coordinate\n\n circle.attr('style', node.style).attr('rx', node.rx).attr('ry', node.ry).attr('r', bbox.width / 2 + halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding);\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Circle main');\n\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, circle);\n\n node.intersect = function (point) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Circle intersect', node, bbox.width / 2 + halfPadding, point);\n\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].circle(node, bbox.width / 2 + halfPadding, point);\n };\n\n return shapeSvg;\n };\n\n var subroutine = function subroutine(parent, node) {\n var _labelHelper13 = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"labelHelper\"])(parent, node, undefined, true),\n shapeSvg = _labelHelper13.shapeSvg,\n bbox = _labelHelper13.bbox;\n\n var w = bbox.width + node.padding;\n var h = bbox.height + node.padding;\n var points = [{\n x: 0,\n y: 0\n }, {\n x: w,\n y: 0\n }, {\n x: w,\n y: -h\n }, {\n x: 0,\n y: -h\n }, {\n x: 0,\n y: 0\n }, {\n x: -8,\n y: 0\n }, {\n x: w + 8,\n y: 0\n }, {\n x: w + 8,\n y: -h\n }, {\n x: -8,\n y: -h\n }, {\n x: -8,\n y: 0\n }];\n var el = Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"insertPolygonShape\"])(shapeSvg, w, h, points);\n el.attr('style', node.style);\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, el);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].polygon(node, points, point);\n };\n\n return shapeSvg;\n };\n\n var start = function start(parent, node) {\n var shapeSvg = parent.insert('g').attr('class', 'node default').attr('id', node.domId || node.id);\n var circle = shapeSvg.insert('circle', ':first-child'); // center the circle around its coordinate\n\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, circle);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].circle(node, 7, point);\n };\n\n return shapeSvg;\n };\n\n var forkJoin = function forkJoin(parent, node, dir) {\n var shapeSvg = parent.insert('g').attr('class', 'node default').attr('id', node.domId || node.id);\n var width = 70;\n var height = 10;\n\n if (dir === 'LR') {\n width = 10;\n height = 70;\n }\n\n var shape = shapeSvg.append('rect').style('stroke', 'black').style('fill', 'black').attr('x', -1 * width / 2).attr('y', -1 * height / 2).attr('width', width).attr('height', height).attr('class', 'fork-join');\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, shape);\n node.height = node.height + node.padding / 2;\n node.width = node.width + node.padding / 2;\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].rect(node, point);\n };\n\n return shapeSvg;\n };\n\n var end = function end(parent, node) {\n var shapeSvg = parent.insert('g').attr('class', 'node default').attr('id', node.domId || node.id);\n var innerCircle = shapeSvg.insert('circle', ':first-child');\n var circle = shapeSvg.insert('circle', ':first-child');\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n innerCircle.attr('class', 'state-end').attr('r', 5).attr('width', 10).attr('height', 10);\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, circle);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].circle(node, 7, point);\n };\n\n return shapeSvg;\n };\n\n var class_box = function class_box(parent, node) {\n var halfPadding = node.padding / 2;\n var rowPadding = 4;\n var lineHeight = 8;\n var classes;\n\n if (!node.classes) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.classes;\n } // Add outer g element\n\n\n var shapeSvg = parent.insert('g').attr('class', classes).attr('id', node.domId || node.id); // Create the title label and insert it after the rect\n\n var rect = shapeSvg.insert('rect', ':first-child');\n var topLine = shapeSvg.insert('line');\n var bottomLine = shapeSvg.insert('line');\n var maxWidth = 0;\n var maxHeight = rowPadding;\n var labelContainer = shapeSvg.insert('g').attr('class', 'label');\n var verticalPos = 0;\n var hasInterface = node.classData.annotations && node.classData.annotations[0]; // 1. Create the labels\n\n var interfaceLabelText = node.classData.annotations[0] ? '«' + node.classData.annotations[0] + '»' : '';\n var interfaceLabel = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(interfaceLabelText, node.labelStyle, true, true));\n var interfaceBBox = interfaceLabel.getBBox();\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels) {\n var div = interfaceLabel.children[0];\n var dv = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(interfaceLabel);\n interfaceBBox = div.getBoundingClientRect();\n dv.attr('width', interfaceBBox.width);\n dv.attr('height', interfaceBBox.height);\n }\n\n if (node.classData.annotations[0]) {\n maxHeight += interfaceBBox.height + rowPadding;\n maxWidth += interfaceBBox.width;\n }\n\n var classTitleString = node.classData.id;\n\n if (node.classData.type !== undefined && node.classData.type !== '') {\n classTitleString += '<' + node.classData.type + '>';\n }\n\n var classTitleLabel = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classTitleString, node.labelStyle, true, true));\n Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(classTitleLabel).attr('class', 'classTitle');\n var classTitleBBox = classTitleLabel.getBBox();\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels) {\n var _div2 = classTitleLabel.children[0];\n\n var _dv2 = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(classTitleLabel);\n\n classTitleBBox = _div2.getBoundingClientRect();\n\n _dv2.attr('width', classTitleBBox.width);\n\n _dv2.attr('height', classTitleBBox.height);\n }\n\n maxHeight += classTitleBBox.height + rowPadding;\n\n if (classTitleBBox.width > maxWidth) {\n maxWidth = classTitleBBox.width;\n }\n\n var classAttributes = [];\n node.classData.members.forEach(function (str) {\n var parsedText = Object(_diagrams_class_svgDraw__WEBPACK_IMPORTED_MODULE_7__[\"parseMember\"])(str).displayText;\n var lbl = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(parsedText, node.labelStyle, true, true));\n var bbox = lbl.getBBox();\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels) {\n var _div3 = lbl.children[0];\n\n var _dv3 = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(lbl);\n\n bbox = _div3.getBoundingClientRect();\n\n _dv3.attr('width', bbox.width);\n\n _dv3.attr('height', bbox.height);\n }\n\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n\n maxHeight += bbox.height + rowPadding;\n classAttributes.push(lbl);\n });\n maxHeight += lineHeight;\n var classMethods = [];\n node.classData.methods.forEach(function (str) {\n var parsedText = Object(_diagrams_class_svgDraw__WEBPACK_IMPORTED_MODULE_7__[\"parseMember\"])(str).displayText;\n var lbl = labelContainer.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(parsedText, node.labelStyle, true, true));\n var bbox = lbl.getBBox();\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"])().flowchart.htmlLabels) {\n var _div4 = lbl.children[0];\n\n var _dv4 = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(lbl);\n\n bbox = _div4.getBoundingClientRect();\n\n _dv4.attr('width', bbox.width);\n\n _dv4.attr('height', bbox.height);\n }\n\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n\n maxHeight += bbox.height + rowPadding;\n classMethods.push(lbl);\n });\n maxHeight += lineHeight; // 2. Position the labels\n // position the interface label\n\n if (hasInterface) {\n var _diffX = (maxWidth - interfaceBBox.width) / 2;\n\n Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(interfaceLabel).attr('transform', 'translate( ' + (-1 * maxWidth / 2 + _diffX) + ', ' + -1 * maxHeight / 2 + ')');\n verticalPos = interfaceBBox.height + rowPadding;\n } // Positin the class title label\n\n\n var diffX = (maxWidth - classTitleBBox.width) / 2;\n Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(classTitleLabel).attr('transform', 'translate( ' + (-1 * maxWidth / 2 + diffX) + ', ' + (-1 * maxHeight / 2 + verticalPos) + ')');\n verticalPos += classTitleBBox.height + rowPadding;\n topLine.attr('class', 'divider').attr('x1', -maxWidth / 2 - halfPadding).attr('x2', maxWidth / 2 + halfPadding).attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n verticalPos += lineHeight;\n classAttributes.forEach(function (lbl) {\n Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(lbl).attr('transform', 'translate( ' + -maxWidth / 2 + ', ' + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ')');\n verticalPos += classTitleBBox.height + rowPadding;\n });\n verticalPos += lineHeight;\n bottomLine.attr('class', 'divider').attr('x1', -maxWidth / 2 - halfPadding).attr('x2', maxWidth / 2 + halfPadding).attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n verticalPos += lineHeight;\n classMethods.forEach(function (lbl) {\n Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(lbl).attr('transform', 'translate( ' + -maxWidth / 2 + ', ' + (-1 * maxHeight / 2 + verticalPos) + ')');\n verticalPos += classTitleBBox.height + rowPadding;\n }); //\n // let bbox;\n // if (getConfig().flowchart.htmlLabels) {\n // const div = interfaceLabel.children[0];\n // const dv = select(interfaceLabel);\n // bbox = div.getBoundingClientRect();\n // dv.attr('width', bbox.width);\n // dv.attr('height', bbox.height);\n // }\n // bbox = labelContainer.getBBox();\n // log.info('Text 2', text2);\n // const textRows = text2.slice(1, text2.length);\n // let titleBox = text.getBBox();\n // const descr = label\n // .node()\n // .appendChild(createLabel(textRows.join('
'), node.labelStyle, true, true));\n // if (getConfig().flowchart.htmlLabels) {\n // const div = descr.children[0];\n // const dv = select(descr);\n // bbox = div.getBoundingClientRect();\n // dv.attr('width', bbox.width);\n // dv.attr('height', bbox.height);\n // }\n // // bbox = label.getBBox();\n // // log.info(descr);\n // select(descr).attr(\n // 'transform',\n // 'translate( ' +\n // // (titleBox.width - bbox.width) / 2 +\n // (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) +\n // ', ' +\n // (titleBox.height + halfPadding + 5) +\n // ')'\n // );\n // select(text).attr(\n // 'transform',\n // 'translate( ' +\n // // (titleBox.width - bbox.width) / 2 +\n // (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) +\n // ', ' +\n // 0 +\n // ')'\n // );\n // // Get the size of the label\n // // Bounding box for title and text\n // bbox = label.node().getBBox();\n // // Center the label\n // label.attr(\n // 'transform',\n // 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'\n // );\n\n rect.attr('class', 'outer title-state').attr('x', -maxWidth / 2 - halfPadding).attr('y', -(maxHeight / 2) - halfPadding).attr('width', maxWidth + node.padding).attr('height', maxHeight + node.padding); // innerLine\n // .attr('class', 'divider')\n // .attr('x1', -bbox.width / 2 - halfPadding)\n // .attr('x2', bbox.width / 2 + halfPadding)\n // .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding)\n // .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n\n Object(_shapes_util__WEBPACK_IMPORTED_MODULE_2__[\"updateNodeBounds\"])(node, rect);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].rect(node, point);\n };\n\n return shapeSvg;\n };\n\n var shapes = {\n question: question,\n rect: rect,\n rectWithTitle: rectWithTitle,\n circle: circle,\n stadium: stadium,\n hexagon: hexagon,\n rect_left_inv_arrow: rect_left_inv_arrow,\n lean_right: lean_right,\n lean_left: lean_left,\n trapezoid: trapezoid,\n inv_trapezoid: inv_trapezoid,\n rect_right_inv_arrow: rect_right_inv_arrow,\n cylinder: cylinder,\n start: start,\n end: end,\n note: _shapes_note__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n subroutine: subroutine,\n fork: forkJoin,\n join: forkJoin,\n class_box: class_box\n };\n var nodeElems = {};\n\n var insertNode = function insertNode(elem, node, dir) {\n var newEl;\n var el; // Add link when appropriate\n\n if (node.link) {\n newEl = elem.insert('svg:a').attr('xlink:href', node.link).attr('target', node.linkTarget || '_blank');\n el = shapes[node.shape](newEl, node, dir);\n } else {\n el = shapes[node.shape](elem, node, dir);\n newEl = el;\n }\n\n if (node.tooltip) {\n el.attr('title', node.tooltip);\n }\n\n if (node[\"class\"]) {\n el.attr('class', 'node default ' + node[\"class\"]);\n }\n\n nodeElems[node.id] = newEl;\n\n if (node.haveCallback) {\n nodeElems[node.id].attr('class', nodeElems[node.id].attr('class') + ' clickable');\n }\n };\n\n var setNodeElem = function setNodeElem(elem, node) {\n nodeElems[node.id] = elem;\n };\n\n var clear = function clear() {\n nodeElems = {};\n };\n\n var positionNode = function positionNode(node) {\n var el = nodeElems[node.id];\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].trace('Transforming node', node, 'translate(' + (node.x - node.width / 2 - 5) + ', ' + (node.y - node.height / 2 - 5) + ')');\n\n var padding = 8;\n\n if (node.clusterNode) {\n el.attr('transform', 'translate(' + (node.x - node.width / 2 - padding) + ', ' + (node.y - node.height / 2 - padding) + ')');\n } else {\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n }\n };\n /***/\n\n },\n\n /***/\n \"./src/dagre-wrapper/shapes/note.js\":\n /*!******************************************!*\\\n !*** ./src/dagre-wrapper/shapes/note.js ***!\n \\******************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDagreWrapperShapesNoteJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony import */\n\n\n var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ./util */\n \"./src/dagre-wrapper/shapes/util.js\");\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _intersect_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ../intersect/index.js */\n \"./src/dagre-wrapper/intersect/index.js\"); // eslint-disable-line\n\n\n var note = function note(parent, node) {\n var _labelHelper = Object(_util__WEBPACK_IMPORTED_MODULE_0__[\"labelHelper\"])(parent, node, 'node ' + node.classes, true),\n shapeSvg = _labelHelper.shapeSvg,\n bbox = _labelHelper.bbox,\n halfPadding = _labelHelper.halfPadding;\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].info('Classes = ', node.classes); // add the rect\n\n\n var rect = shapeSvg.insert('rect', ':first-child');\n rect.attr('rx', node.rx).attr('ry', node.ry).attr('x', -bbox.width / 2 - halfPadding).attr('y', -bbox.height / 2 - halfPadding).attr('width', bbox.width + node.padding).attr('height', bbox.height + node.padding);\n Object(_util__WEBPACK_IMPORTED_MODULE_0__[\"updateNodeBounds\"])(node, rect);\n\n node.intersect = function (point) {\n return _intersect_index_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].rect(node, point);\n };\n\n return shapeSvg;\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = note;\n /***/\n },\n\n /***/\n \"./src/dagre-wrapper/shapes/util.js\":\n /*!******************************************!*\\\n !*** ./src/dagre-wrapper/shapes/util.js ***!\n \\******************************************/\n\n /*! exports provided: labelHelper, updateNodeBounds, insertPolygonShape */\n\n /***/\n function srcDagreWrapperShapesUtilJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"labelHelper\", function () {\n return labelHelper;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"updateNodeBounds\", function () {\n return updateNodeBounds;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"insertPolygonShape\", function () {\n return insertPolygonShape;\n });\n /* harmony import */\n\n\n var _createLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ../createLabel */\n \"./src/dagre-wrapper/createLabel.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_2__);\n\n var labelHelper = function labelHelper(parent, node, _classes, isNode) {\n var classes;\n\n if (!_classes) {\n classes = 'node default';\n } else {\n classes = _classes;\n } // Add outer g element\n\n\n var shapeSvg = parent.insert('g').attr('class', classes).attr('id', node.domId || node.id); // Create the label and insert it after the rect\n\n var label = shapeSvg.insert('g').attr('class', 'label').attr('style', node.labelStyle);\n var text = label.node().appendChild(Object(_createLabel__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node.labelText, node.labelStyle, false, isNode)); // Get the size of the label\n\n var bbox = text.getBBox();\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_1__[\"getConfig\"])().flowchart.htmlLabels) {\n var div = text.children[0];\n var dv = Object(d3__WEBPACK_IMPORTED_MODULE_2__[\"select\"])(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n var halfPadding = node.padding / 2; // Center the label\n\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n return {\n shapeSvg: shapeSvg,\n bbox: bbox,\n halfPadding: halfPadding,\n label: label\n };\n };\n\n var updateNodeBounds = function updateNodeBounds(node, element) {\n var bbox = element.node().getBBox();\n node.width = bbox.width;\n node.height = bbox.height;\n };\n\n function insertPolygonShape(parent, w, h, points) {\n return parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {\n return d.x + ',' + d.y;\n }).join(' ')).attr('class', 'label-container').attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n }\n /***/\n\n },\n\n /***/\n \"./src/defaultConfig.js\":\n /*!******************************!*\\\n !*** ./src/defaultConfig.js ***!\n \\******************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDefaultConfigJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony import */\n\n\n var _themes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ./themes */\n \"./src/themes/index.js\");\n /**\n * **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more[[click here](8.6.0_docs.md)].**\n *\n * ## **What follows are config instructions for older versions**\n * These are the default options which can be overridden with the initialization call like so:\n * **Example 1:**\n * \n * mermaid.initialize({\n * flowchart:{\n * htmlLabels: false\n * }\n * });\n *
\n *\n * **Example 2:**\n * \n * <script>\n * var config = {\n * startOnLoad:true,\n * flowchart:{\n * useMaxWidth:true,\n * htmlLabels:true,\n * curve:'cardinal',\n * },\n *\n * securityLevel:'loose',\n * };\n * mermaid.initialize(config);\n * </script>\n *
\n * A summary of all options and their defaults is found [here](#mermaidapi-configuration-defaults). A description of each option follows below.\n *\n * @name Configuration\n */\n\n\n var config = {\n /** theme , the CSS style sheet\n *\n * theme , the CSS style sheet\n *\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| Theme |Built in Themes| String | Optional | Values include, default, forest, dark, neutral, null|\n *\n ***Notes:**To disable any pre-defined mermaid theme, use \"null\".\n * \n * \"theme\": \"forest\",\n * \"themeCSS\": \".node rect { fill: red; }\"\n *
\n */\n theme: 'default',\n themeVariables: _themes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]['default'].getThemeVariables(),\n themeCSS: undefined,\n\n /* **maxTextSize** - The maximum allowed size of the users text diamgram */\n maxTextSize: 50000,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *|fontFamily | specifies the font to be used in the rendered diagrams| String | Required | Trebuchet MS, Verdana, Arial, Sans-Serif |\n *\n ***notes: Default value is \\\\\"trebuchet ms\\\\\".\n */\n fontFamily: '\"trebuchet ms\", verdana, arial, sans-serif;',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| logLevel |This option decides the amount of logging to be used.| String | Required | 1, 2, 3, 4, 5 |\n *\n *\n ***Notes:**\n *- debug: 1.\n *- info: 2.\n *- warn: 3.\n *- error: 4.\n *- fatal: 5(default).\n */\n logLevel: 5,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| securitylevel | Level of trust for parsed diagram|String | Required | Strict, Loose, antiscript |\n *\n ***Notes:\n *- **strict**: (**default**) tags in text are encoded, click functionality is disabeled\n *- **loose**: tags in text are allowed, click functionality is enabled\n *- **antiscript**: html tags in text are allowed, (only script element is removed), click functionality is enabled\n */\n securityLevel: 'strict',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| startOnLoad| Dictates whether mermaind starts on Page load | Boolean | Required | True, False |\n *\n ***Notes:**\n ***Default value: true**\n */\n startOnLoad: true,\n\n /**\n *| Parameter | Description |Type | Required |Values|\n *| --- | --- | --- | --- | --- |\n *| arrowMarkerAbsolute | Controls whether or arrow markers in html code are absolute paths or anchors | Boolean | Required | True, False |\n *\n *\n *## Notes**: This matters if you are using base tag settings.\n ***Default value: false**.\n */\n arrowMarkerAbsolute: false,\n\n /**\n * This option controls which currentConfig keys are considered _secure_ and can only be changed via\n * call to mermaidAPI.initialize. Calls to mermaidAPI.reinitialize cannot make changes to\n * the `secure` keys in the current currentConfig. This prevents malicious graph directives from\n * overriding a site's default security.\n */\n secure: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'],\n\n /**\n * This option controls if the generated ids of nodes in the SVG are generated randomly or based on a seed.\n * If set to false, the IDs are generated based on the current date and thus are not deterministic. This is the default behaviour.\n *\n *## Notes**: This matters if your files are checked into sourcecontrol e.g. git and should not change unless content is changed.\n ***Default value: false**\n */\n deterministicIds: false,\n\n /**\n * This option is the optional seed for deterministic ids. if set to undefined but deterministicIds is true, a simple number iterator is used.\n * You can set this attribute to base the seed on a static string.\n */\n deterministicIDSeed: undefined,\n\n /**\n * The object containing configurations specific for flowcharts\n */\n flowchart: {\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramPadding | amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |\n *\n ***Notes:**The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels\n ***Default value: 8**.\n */\n diagramPadding: 8,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| htmlLabels | Flag for setting whether or not a html tag should be used for rendering labels on the edges. | Boolean| Required | True, False|\n *\n ***Notes: Default value: true**.\n */\n htmlLabels: true,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| nodeSpacing | Defines the spacing between nodes on the same level | Integer| Required | Any positive Numbers |\n *\n ***Notes:\n *Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, and the vertical spacing for LR as well as RL graphs.**\n ***Default value 50**.\n */\n nodeSpacing: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| rankSpacing | Defines the spacing between nodes on different levels | Integer | Required| Any Positive Numbers |\n *\n ***Notes: pertains to vertical spacing for TB (top to bottom) or BT (bottom to top), and the horizontal spacing for LR as well as RL graphs.\n ***Default value 50**.\n */\n rankSpacing: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| curve | Defines how mermaid renders curves for flowcharts. | String | Required | Basis, Linear, Cardinal|\n *\n ***Notes:\n *Default Vaue: Linear**\n */\n curve: 'linear',\n // Only used in new experimental rendering\n // represents the padding between the labels and the shape\n padding: 15,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See notes | Boolean | 4 | True, False |\n *\n ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the\n *available space if not the absolute space required is used.\n *\n ***Default value true**.\n */\n useMaxWidth: true\n },\n\n /**\n * The object containing configurations specific for sequence diagrams\n */\n sequence: {\n /**\n * widt of the activation rect\n * **Default value 10**.\n */\n activationWidth: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramMarginX | margin to the right and left of the sequence diagram | Integer | Required | Any Positive Values |\n *\n ***Notes:**\n ***Default value 50**.\n */\n diagramMarginX: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramMarginY | Margin to the over and under the sequence diagram | Integer | Required | Any Positive Values|\n *\n ***Notes:**\n ***Default value 10**.\n */\n diagramMarginY: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| actorMargin | Margin between actors. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 50**.\n */\n actorMargin: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| width | Width of actor boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 150**.\n */\n width: 150,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| height | Height of actor boxes | Integer | Required | Any Positive Value|\n *\n ***Notes:**\n ***Default value 65**..\n */\n height: 65,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n *\n ***Default value 10**.\n */\n boxMargin: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| boxTextMargin| margin around the text in loop/alt/opt boxes | Integer | Required| Any Positive Value|\n *\n ***Notes:**\n *\n ***Default value 5**.\n */\n boxTextMargin: 5,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteMargin | margin around notes. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n *\n ***Default value 10**.\n */\n noteMargin: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageMargin | Space between messages. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n *\n *Space between messages.\n ***Default value 35**.\n */\n messageMargin: 35,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageAlign | Multiline message alignment | Integer | Required | left, center, right |\n *\n ***Notes:**center **default**\n */\n messageAlign: 'center',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| mirrorActors | mirror actors under diagram. | Boolean| Required | True, False |\n *\n ***Notes:**\n *\n ***Default value true**.\n */\n mirrorActors: true,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| bottomMarginAdj | Prolongs the edge of the diagram downwards. | Integer | Required | Any Positive Value |\n *\n ***Notes:**Depending on css styling this might need adjustment.\n ***Default value 1**.\n */\n bottomMarginAdj: 1,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See Notes | Boolean | Required | True, False |\n *\n ***Notes:**\n *when this flag is set to true, the height and width is set to 100% and is then scaling with the\n *available space. If set to false, the absolute space required is used.\n ***Default value: True**.\n */\n useMaxWidth: true,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| rightAngles | display curve arrows as right angles| Boolean | Required | True, False |\n *\n ***Notes:**\n *\n *This will display arrows that start and begin at the same node as right angles, rather than a curve\n ***Default value false**.\n */\n rightAngles: false,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| showSequenceNumbers | This will show the node numbers | Boolean | Required | True, False |\n *\n ***Notes:**\n ***Default value false**.\n */\n showSequenceNumbers: false,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| actorFontSize| This sets the font size of the actor's description | Integer | Require | Any Positive Value |\n *\n ***Notes:**\n ***Default value 14**..\n */\n actorFontSize: 14,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| actorFontFamily |This sets the font family of the actor's description | 3 | 4 | Open-Sans, Sans-Serif |\n *\n ***Notes:**\n ***Default value \"Open-Sans\", \"sans-serif\"**.\n */\n actorFontFamily: '\"Open-Sans\", \"sans-serif\"',\n\n /**\n * This sets the font weight of the actor's description\n * **Default value 400.\n */\n actorFontWeight: 400,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteFontSize |This sets the font size of actor-attached notes. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 14**..\n */\n noteFontSize: 14,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteFontFamily| This sets the font family of actor-attached notes. | String | Required | trebuchet ms, verdana, arial, sans-serif |\n *\n ***Notes:**\n ***Default value: trebuchet ms **.\n */\n noteFontFamily: '\"trebuchet ms\", verdana, arial, sans-serif',\n\n /**\n * This sets the font weight of the note's description\n * **Default value 400.\n */\n noteFontWeight: 400,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteAlign | This sets the text alignment of actor-attached notes. | string | required | left, center, right|\n *\n ***Notes:**\n ***Default value center**.\n */\n noteAlign: 'center',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageFontSize | This sets the font size of actor messages. | Integer | Required | Any Positive Number |\n *\n ***Notes:**\n ***Default value 16**.\n */\n messageFontSize: 16,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageFontFamily | This sets the font family of actor messages. | String| Required | trebuchet ms\", verdana, arial, sans-serif |\n *\n ***Notes:**\n ***Default value: \"trebuchet ms**.\n */\n messageFontFamily: '\"trebuchet ms\", verdana, arial, sans-serif',\n\n /**\n * This sets the font weight of the message's description\n * **Default value 400.\n */\n messageFontWeight: 400,\n\n /**\n * This sets the auto-wrap state for the diagram\n * **Default value false.\n */\n wrap: false,\n\n /**\n * This sets the auto-wrap padding for the diagram (sides only)\n * **Default value 10.\n */\n wrapPadding: 10,\n\n /**\n * This sets the width of the loop-box (loop, alt, opt, par)\n * **Default value 50.\n */\n labelBoxWidth: 50,\n\n /**\n * This sets the height of the loop-box (loop, alt, opt, par)\n * **Default value 20.\n */\n labelBoxHeight: 20,\n messageFont: function messageFont() {\n return {\n fontFamily: this.messageFontFamily,\n fontSize: this.messageFontSize,\n fontWeight: this.messageFontWeight\n };\n },\n noteFont: function noteFont() {\n return {\n fontFamily: this.noteFontFamily,\n fontSize: this.noteFontSize,\n fontWeight: this.noteFontWeight\n };\n },\n actorFont: function actorFont() {\n return {\n fontFamily: this.actorFontFamily,\n fontSize: this.actorFontSize,\n fontWeight: this.actorFontWeight\n };\n }\n },\n\n /**\n * The object containing configurations specific for gantt diagrams*\n */\n gantt: {\n /**\n *### titleTopMargin\n *\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| titleTopMargin | Margin top for the text over the gantt diagram | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 25**.\n */\n titleTopMargin: 25,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| barHeight | The height of the bars in the graph | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 20**.\n */\n barHeight: 20,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| barGap | The margin between the different activities in the gantt diagram. | Integer | Optional |Any Positive Value |\n *\n ***Notes:**\n ***Default value 4**.\n */\n barGap: 4,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| topPadding | Margin between title and gantt diagram and between axis and gantt diagram. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 50**.\n */\n topPadding: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| leftPadding | The space allocated for the section name to the left of the activities. | Integer| Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 75**.\n */\n leftPadding: 75,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| gridLineStartPadding | Vertical starting position of the grid lines. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 35**.\n */\n gridLineStartPadding: 35,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| fontSize | Font size| Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 11**.\n */\n fontSize: 11,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| fontFamily | font Family | string | required |\"Open-Sans\", \"sans-serif\" |\n *\n ***Notes:**\n *\n ***Default value '\"Open-Sans\", \"sans-serif\"'**.\n */\n fontFamily: '\"Open-Sans\", \"sans-serif\"',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| numberSectionStyles | The number of alternating section styles | Integer | 4 | Any Positive Value |\n *\n ***Notes:**\n ***Default value 4**.\n */\n numberSectionStyles: 4,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| axisFormat | Datetime format of the axis. | 3 | Required | Date in yy-mm-dd |\n *\n ***Notes:**\n *\n * This might need adjustment to match your locale and preferences\n ***Default value '%Y-%m-%d'**.\n */\n axisFormat: '%Y-%m-%d',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See notes | Boolean | 4 | True, False |\n *\n ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the\n *available space if not the absolute space required is used.\n *\n ***Default value true**.\n */\n useMaxWidth: true,\n useWidth: undefined\n },\n\n /**\n * The object containing configurations specific for journey diagrams\n */\n journey: {\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramMarginX | margin to the right and left of the sequence diagram | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 50**.\n */\n diagramMarginX: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramMarginY | margin to the over and under the sequence diagram. | Integer | Required | Any Positive Value|\n *\n ***Notes:**\n ***Default value 10**..\n */\n diagramMarginY: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| actorMargin | Margin between actors. | Integer | Required | Any Positive Value|\n *\n ***Notes:**\n ***Default value 50**.\n */\n actorMargin: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| width | Width of actor boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 150**.\n */\n width: 150,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| height | Height of actor boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 65**.\n */\n height: 65,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 10**.\n */\n boxMargin: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| boxTextMargin | margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n */\n boxTextMargin: 5,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| noteMargin | margin around notes. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n ***Default value 10**.\n */\n noteMargin: 10,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageMargin |Space between messages. | Integer | Required | Any Positive Value |\n *\n ***Notes:**\n *\n *Space between messages.\n ***Default value 35**.\n */\n messageMargin: 35,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| messageAlign |Multiline message alignment | 3 | 4 | left, center, right |\n *\n ***Notes:**default:center**\n */\n messageAlign: 'center',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| bottomMarginAdj | Prolongs the edge of the diagram downwards. | Integer | 4 | Any Positive Value |\n *\n ***Notes:**Depending on css styling this might need adjustment.\n ***Default value 1**.\n */\n bottomMarginAdj: 1,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See notes | Boolean | 4 | True, False |\n *\n ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the\n *available space if not the absolute space required is used.\n *\n ***Default value true**.\n */\n useMaxWidth: true,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| rightAngles | Curved Arrows become Right Angles, | 3 | 4 | True, False |\n *\n ***Notes:**This will display arrows that start and begin at the same node as right angles, rather than a curves\n ***Default value false**.\n */\n rightAngles: false\n },\n \"class\": {\n arrowMarkerAbsolute: false,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See notes | Boolean | 4 | True, False |\n *\n ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the\n *available space if not the absolute space required is used.\n *\n ***Default value true**.\n */\n useMaxWidth: true\n },\n git: {\n arrowMarkerAbsolute: false,\n useWidth: undefined,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See notes | Boolean | 4 | True, False |\n *\n ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the\n *available space if not the absolute space required is used.\n *\n ***Default value true**.\n */\n useMaxWidth: true\n },\n state: {\n dividerMargin: 10,\n sizeUnit: 5,\n padding: 8,\n textHeight: 10,\n titleShift: -15,\n noteMargin: 10,\n forkWidth: 70,\n forkHeight: 7,\n // Used\n miniPadding: 2,\n // Font size factor, this is used to guess the width of the edges labels before rendering by dagre\n // layout. This might need updating if/when switching font\n fontSizeFactor: 5.02,\n fontSize: 24,\n labelHeight: 16,\n edgeLengthFactor: '20',\n compositTitleSize: 35,\n radius: 5,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See notes | Boolean | 4 | True, False |\n *\n ***Notes:**when this flag is set the height and width is set to 100% and is then scaling with the\n *available space if not the absolute space required is used.\n *\n ***Default value true**.\n */\n useMaxWidth: true\n },\n\n /**\n * The object containing configurations specific for entity relationship diagrams\n */\n er: {\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| diagramPadding | amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |\n *\n ***Notes:**The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels\n ***Default value: 20**.\n */\n diagramPadding: 20,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| layoutDirection | Directional bias for layout of entities. | String | Required | \"TB\", \"BT\",\"LR\",\"RL\" |\n *\n ***Notes:**\n *'TB' for Top-Bottom, 'BT'for Bottom-Top, 'LR' for Left-Right, or 'RL' for Right to Left.\n * T = top, B = bottom, L = left, and R = right.\n ***Default value: TB **.\n */\n layoutDirection: 'TB',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| minEntityWidth | The mimimum width of an entity box, | Integer | Required| Any Positive Value |\n *\n ***Notes:**expressed in pixels\n ***Default value: 100**.\n */\n minEntityWidth: 100,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| minEntityHeight| The minimum height of an entity box, | Integer | 4 | Any Positive Value |\n *\n ***Notes:**expressed in pixels\n ***Default value: 75 **\n */\n minEntityHeight: 75,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| entityPadding|minimum internal padding betweentext in box and box borders| Integer | 4 | Any Positive Value |\n *\n ***Notes:**The minimum internal padding betweentext in an entity box and the enclosing box borders, expressed in pixels.\n ***Default value: 15 **\n */\n entityPadding: 15,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| stroke | Stroke color of box edges and lines | String | 4 | Any recognized color |\n ***Default value: gray **\n */\n stroke: 'gray',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| fill | Fill color of entity boxes | String | 4 | Any recognized color |\n *\n ***Notes:**\n ***Default value:'honeydew'**\n */\n fill: 'honeydew',\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| fontSize| Font Size in pixels| Integer | | Any Positive Value |\n *\n ***Notes:**Font size (expressed as an integer representing a number of pixels)\n ***Default value: 12 **\n */\n fontSize: 12,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See Notes | Boolean | Required | true, false |\n *\n ***Notes:**\n *When this flag is set to true, the diagram width is locked to 100% and\n *scaled based on available space. If set to false, the diagram reserves its\n *absolute width.\n ***Default value: true**.\n */\n useMaxWidth: true\n },\n\n /**\n * The object containing configurations specific for pie diagrams\n */\n pie: {\n useWidth: undefined,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| useMaxWidth | See Notes | Boolean | Required | true, false |\n *\n ***Notes:**\n *When this flag is set to true, the diagram width is locked to 100% and\n *scaled based on available space. If set to false, the diagram reserves its\n *absolute width.\n ***Default value: true**.\n */\n useMaxWidth: true\n }\n };\n config[\"class\"].arrowMarkerAbsolute = config.arrowMarkerAbsolute;\n config.git.arrowMarkerAbsolute = config.arrowMarkerAbsolute;\n /* harmony default export */\n\n __webpack_exports__[\"default\"] = config;\n /***/\n },\n\n /***/\n \"./src/diagrams/class/classDb.js\":\n /*!***************************************!*\\\n !*** ./src/diagrams/class/classDb.js ***!\n \\***************************************/\n\n /*! exports provided: parseDirective, addClass, lookUpDomId, clear, getClass, getClasses, getRelations, addRelation, addAnnotation, addMember, addMembers, cleanupLabel, setCssClass, setLink, setClickEvent, bindFunctions, lineType, relationType, default */\n\n /***/\n function srcDiagramsClassClassDbJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"parseDirective\", function () {\n return parseDirective;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addClass\", function () {\n return addClass;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"lookUpDomId\", function () {\n return lookUpDomId;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"clear\", function () {\n return clear;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getClass\", function () {\n return getClass;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getClasses\", function () {\n return getClasses;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getRelations\", function () {\n return getRelations;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addRelation\", function () {\n return addRelation;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addAnnotation\", function () {\n return addAnnotation;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addMember\", function () {\n return addMember;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addMembers\", function () {\n return addMembers;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"cleanupLabel\", function () {\n return cleanupLabel;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setCssClass\", function () {\n return setCssClass;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setLink\", function () {\n return setLink;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setClickEvent\", function () {\n return setClickEvent;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"bindFunctions\", function () {\n return bindFunctions;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"lineType\", function () {\n return lineType;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"relationType\", function () {\n return relationType;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _common_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../common/common */\n \"./src/diagrams/common/common.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n /* harmony import */\n\n\n var _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ../../mermaidAPI */\n \"./src/mermaidAPI.js\");\n\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n }\n\n function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }\n\n function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n }\n\n var MERMAID_DOM_ID_PREFIX = 'classid-';\n var relations = [];\n var classes = {};\n var classCounter = 0;\n var funs = [];\n\n var parseDirective = function parseDirective(statement, context, type) {\n _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__[\"default\"].parseDirective(this, statement, context, type);\n };\n\n var splitClassNameAndType = function splitClassNameAndType(id) {\n var genericType = '';\n var className = id;\n\n if (id.indexOf('~') > 0) {\n var split = id.split('~');\n className = split[0];\n genericType = split[1];\n }\n\n return {\n className: className,\n type: genericType\n };\n };\n /**\n * Function called by parser when a node definition has been found.\n * @param id\n * @public\n */\n\n\n var addClass = function addClass(id) {\n var classId = splitClassNameAndType(id); // Only add class if not exists\n\n if (typeof classes[classId.className] !== 'undefined') return;\n classes[classId.className] = {\n id: classId.className,\n type: classId.type,\n cssClasses: [],\n methods: [],\n members: [],\n annotations: [],\n domId: MERMAID_DOM_ID_PREFIX + classId.className + '-' + classCounter\n };\n classCounter++;\n };\n /**\n * Function to lookup domId from id in the graph definition.\n * @param id\n * @public\n */\n\n\n var lookUpDomId = function lookUpDomId(id) {\n var classKeys = Object.keys(classes);\n\n for (var i = 0; i < classKeys.length; i++) {\n if (classes[classKeys[i]].id === id) {\n return classes[classKeys[i]].domId;\n }\n }\n };\n\n var clear = function clear() {\n relations = [];\n classes = {};\n funs = [];\n funs.push(setupToolTips);\n };\n\n var getClass = function getClass(id) {\n return classes[id];\n };\n\n var getClasses = function getClasses() {\n return classes;\n };\n\n var getRelations = function getRelations() {\n return relations;\n };\n\n var addRelation = function addRelation(relation) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].debug('Adding relation: ' + JSON.stringify(relation));\n\n addClass(relation.id1);\n addClass(relation.id2);\n relation.id1 = splitClassNameAndType(relation.id1).className;\n relation.id2 = splitClassNameAndType(relation.id2).className;\n relations.push(relation);\n };\n /**\n * Adds an annotation to the specified class\n * Annotations mark special properties of the given type (like 'interface' or 'service')\n * @param className The class name\n * @param annotation The name of the annotation without any brackets\n * @public\n */\n\n\n var addAnnotation = function addAnnotation(className, annotation) {\n var validatedClassName = splitClassNameAndType(className).className;\n classes[validatedClassName].annotations.push(annotation);\n };\n /**\n * Adds a member to the specified class\n * @param className The class name\n * @param member The full name of the member.\n * If the member is enclosed in <> it is treated as an annotation\n * If the member is ending with a closing bracket ) it is treated as a method\n * Otherwise the member will be treated as a normal property\n * @public\n */\n\n\n var addMember = function addMember(className, member) {\n var validatedClassName = splitClassNameAndType(className).className;\n var theClass = classes[validatedClassName];\n\n if (typeof member === 'string') {\n // Member can contain white spaces, we trim them out\n var memberString = member.trim();\n\n if (memberString.startsWith('<<') && memberString.endsWith('>>')) {\n // Remove leading and trailing brackets\n theClass.annotations.push(memberString.substring(2, memberString.length - 2));\n } else if (memberString.indexOf(')') > 0) {\n theClass.methods.push(memberString);\n } else if (memberString) {\n theClass.members.push(memberString);\n }\n }\n };\n\n var addMembers = function addMembers(className, members) {\n if (Array.isArray(members)) {\n members.reverse();\n members.forEach(function (member) {\n return addMember(className, member);\n });\n }\n };\n\n var cleanupLabel = function cleanupLabel(label) {\n if (label.substring(0, 1) === ':') {\n return label.substr(1).trim();\n } else {\n return label.trim();\n }\n };\n /**\n * Called by parser when a special node is found, e.g. a clickable element.\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\n\n\n var setCssClass = function setCssClass(ids, className) {\n ids.split(',').forEach(function (_id) {\n var id = _id;\n if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n\n if (typeof classes[id] !== 'undefined') {\n classes[id].cssClasses.push(className);\n }\n });\n };\n /**\n * Called by parser when a tooltip is found, e.g. a clickable element.\n * @param ids Comma separated list of ids\n * @param tooltip Tooltip to add\n */\n\n\n var setTooltip = function setTooltip(ids, tooltip) {\n var config = _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]();\n\n ids.split(',').forEach(function (id) {\n if (typeof tooltip !== 'undefined') {\n classes[id].tooltip = _common_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"].sanitizeText(tooltip, config);\n }\n });\n };\n /**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n * @param ids Comma separated list of ids\n * @param linkStr URL to create a link for\n * @param target Target of the link, _blank by default as originally defined in the svgDraw.js file\n */\n\n\n var setLink = function setLink(ids, linkStr, target) {\n var config = _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]();\n\n ids.split(',').forEach(function (_id) {\n var id = _id;\n if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n\n if (typeof classes[id] !== 'undefined') {\n classes[id].link = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].formatUrl(linkStr, config);\n\n if (typeof target === 'string') {\n classes[id].linkTarget = target;\n } else {\n classes[id].linkTarget = '_blank';\n }\n }\n });\n setCssClass(ids, 'clickable');\n };\n /**\n * Called by parser when a click definition is found. Registers an event handler.\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param functionArgs Function args the function should be called with\n */\n\n\n var setClickEvent = function setClickEvent(ids, functionName, functionArgs) {\n ids.split(',').forEach(function (id) {\n setClickFunc(id, functionName, functionArgs);\n classes[id].haveCallback = true;\n });\n setCssClass(ids, 'clickable');\n };\n\n var setClickFunc = function setClickFunc(domId, functionName, functionArgs) {\n var config = _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]();\n\n var id = domId;\n var elemId = lookUpDomId(id);\n\n if (config.securityLevel !== 'loose') {\n return;\n }\n\n if (typeof functionName === 'undefined') {\n return;\n }\n\n if (typeof classes[id] !== 'undefined') {\n var argList = [];\n\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n\n for (var i = 0; i < argList.length; i++) {\n var item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n\n /* This preserves all starting and ending whitespace inside */\n\n if (item.charAt(0) === '\"' && item.charAt(item.length - 1) === '\"') {\n item = item.substr(1, item.length - 2);\n }\n\n argList[i] = item;\n }\n }\n /* if no arguments passed into callback, default to passing in id */\n\n\n if (argList.length === 0) {\n argList.push(elemId);\n }\n\n funs.push(function () {\n var elem = document.querySelector(\"[id=\\\"\".concat(elemId, \"\\\"]\"));\n\n if (elem !== null) {\n elem.addEventListener('click', function () {\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].runFunc.apply(_utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"], [functionName].concat(_toConsumableArray(argList)));\n }, false);\n }\n });\n }\n };\n\n var bindFunctions = function bindFunctions(element) {\n funs.forEach(function (fun) {\n fun(element);\n });\n };\n\n var lineType = {\n LINE: 0,\n DOTTED_LINE: 1\n };\n var relationType = {\n AGGREGATION: 0,\n EXTENSION: 1,\n COMPOSITION: 2,\n DEPENDENCY: 3\n };\n\n var setupToolTips = function setupToolTips(element) {\n var tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('.mermaidTooltip');\n\n if ((tooltipElem._groups || tooltipElem)[0][0] === null) {\n tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);\n }\n\n var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(element).select('svg');\n var nodes = svg.selectAll('g.node');\n nodes.on('mouseover', function () {\n var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(this);\n var title = el.attr('title'); // Dont try to draw a tooltip if no data is provided\n\n if (title === null) {\n return;\n }\n\n var rect = this.getBoundingClientRect();\n tooltipElem.transition().duration(200).style('opacity', '.9');\n tooltipElem.html(el.attr('title')).style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px').style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px');\n el.classed('hover', true);\n }).on('mouseout', function () {\n tooltipElem.transition().duration(500).style('opacity', 0);\n var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(this);\n el.classed('hover', false);\n });\n };\n\n funs.push(setupToolTips);\n /* harmony default export */\n\n __webpack_exports__[\"default\"] = {\n parseDirective: parseDirective,\n getConfig: function getConfig() {\n return _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]()[\"class\"];\n },\n addClass: addClass,\n bindFunctions: bindFunctions,\n clear: clear,\n getClass: getClass,\n getClasses: getClasses,\n addAnnotation: addAnnotation,\n getRelations: getRelations,\n addRelation: addRelation,\n addMember: addMember,\n addMembers: addMembers,\n cleanupLabel: cleanupLabel,\n lineType: lineType,\n relationType: relationType,\n setClickEvent: setClickEvent,\n setCssClass: setCssClass,\n setLink: setLink,\n setTooltip: setTooltip,\n lookUpDomId: lookUpDomId\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/class/classRenderer-v2.js\":\n /*!************************************************!*\\\n !*** ./src/diagrams/class/classRenderer-v2.js ***!\n \\************************************************/\n\n /*! exports provided: addClasses, addRelations, setConf, drawOld, draw, default */\n\n /***/\n function srcDiagramsClassClassRendererV2Js(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addClasses\", function () {\n return addClasses;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addRelations\", function () {\n return addRelations;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawOld\", function () {\n return drawOld;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! dagre */\n \"dagre\");\n /* harmony import */\n\n\n var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__);\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! graphlib */\n \"graphlib\");\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ./classDb */\n \"./src/diagrams/class/classDb.js\");\n /* harmony import */\n\n\n var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ./parser/classDiagram */\n \"./src/diagrams/class/parser/classDiagram.jison\");\n /* harmony import */\n\n\n var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__);\n /* harmony import */\n\n\n var _svgDraw__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\n /*! ./svgDraw */\n \"./src/diagrams/class/svgDraw.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(\n /*! ../../dagre-wrapper/index.js */\n \"./src/dagre-wrapper/index.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n /* harmony import */\n\n\n var _common_common__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(\n /*! ../common/common */\n \"./src/diagrams/common/common.js\"); // import addHtmlLabel from 'dagre-d3/lib/label/add-html-label.js';\n\n\n _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n var idCache = {};\n var padding = 20;\n var conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10\n };\n /**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n * @param vert Object containing the vertices.\n * @param g The graph that is to be drawn.\n */\n\n var addClasses = function addClasses(classes, g) {\n // const svg = select(`[id=\"${svgId}\"]`);\n var keys = Object.keys(classes);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('keys:', keys);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info(classes); // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n\n\n keys.forEach(function (id) {\n var vertex = classes[id];\n /**\n * Variable for storing the classes for the vertex\n * @type {string}\n */\n\n var cssClassStr = '';\n\n if (vertex.cssClasses.length > 0) {\n cssClassStr = cssClassStr + ' ' + vertex.cssClasses.join(' ');\n } // if (vertex.classes.length > 0) {\n // classStr = vertex.classes.join(' ');\n // }\n\n\n var styles = {\n labelStyle: ''\n }; //getStylesFromArray(vertex.styles);\n // Use vertex id as text in the box if no text is provided by the graph definition\n\n var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually\n // let vertexNode;\n // if (getConfig().flowchart.htmlLabels) {\n // const node = {\n // label: vertexText.replace(\n // /fa[lrsb]?:fa-[\\w-]+/g,\n // s => ``\n // )\n // };\n // vertexNode = addHtmlLabel(svg, node).node();\n // vertexNode.parentNode.removeChild(vertexNode);\n // } else {\n // const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n // svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n // const rows = vertexText.split(common.lineBreakRegex);\n // for (let j = 0; j < rows.length; j++) {\n // const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n // tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n // tspan.setAttribute('dy', '1em');\n // tspan.setAttribute('x', '1');\n // tspan.textContent = rows[j];\n // svgLabel.appendChild(tspan);\n // }\n // vertexNode = svgLabel;\n // }\n\n var radious = 0;\n var _shape = ''; // Set the shape based parameters\n\n switch (vertex.type) {\n case 'class':\n _shape = 'class_box';\n break;\n\n default:\n _shape = 'class_box';\n } // Add the node\n\n\n g.setNode(vertex.id, {\n labelStyle: styles.labelStyle,\n shape: _shape,\n labelText: vertexText,\n classData: vertex,\n rx: radious,\n ry: radious,\n \"class\": cssClassStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.domId,\n haveCallback: vertex.haveCallback,\n link: vertex.link,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n padding: Object(_config__WEBPACK_IMPORTED_MODULE_7__[\"getConfig\"])().flowchart.padding\n });\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('setNode', {\n labelStyle: styles.labelStyle,\n shape: _shape,\n labelText: vertexText,\n rx: radious,\n ry: radious,\n \"class\": cssClassStr,\n style: styles.style,\n id: vertex.id,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n padding: Object(_config__WEBPACK_IMPORTED_MODULE_7__[\"getConfig\"])().flowchart.padding\n });\n });\n };\n /**\n * Add edges to graph based on parsed graph defninition\n * @param {Object} edges The edges to add to the graph\n * @param {Object} g The graph object\n */\n\n\n var addRelations = function addRelations(relations, g) {\n var cnt = 0;\n var defaultStyle;\n var defaultLabelStyle; // if (typeof relations.defaultStyle !== 'undefined') {\n // const defaultStyles = getStylesFromArray(relations.defaultStyle);\n // defaultStyle = defaultStyles.style;\n // defaultLabelStyle = defaultStyles.labelStyle;\n // }\n\n relations.forEach(function (edge) {\n cnt++;\n var edgeData = {}; //Set relationship style and line type\n\n edgeData.classes = 'relation';\n edgeData.pattern = edge.relation.lineType == 1 ? 'dashed' : 'solid';\n edgeData.id = 'id' + cnt; // Set link type for rendering\n\n if (edge.type === 'arrow_open') {\n edgeData.arrowhead = 'none';\n } else {\n edgeData.arrowhead = 'normal';\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info(edgeData, edge); //Set edge extra labels\n //edgeData.startLabelLeft = edge.relationTitle1;\n\n\n edgeData.startLabelRight = edge.relationTitle1 === 'none' ? '' : edge.relationTitle1;\n edgeData.endLabelLeft = edge.relationTitle2 === 'none' ? '' : edge.relationTitle2; //edgeData.endLabelRight = edge.relationTitle2;\n //Set relation arrow types\n\n edgeData.arrowTypeStart = getArrowMarker(edge.relation.type1);\n edgeData.arrowTypeEnd = getArrowMarker(edge.relation.type2);\n var style = '';\n var labelStyle = '';\n\n if (typeof edge.style !== 'undefined') {\n var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(edge.style);\n style = styles.style;\n labelStyle = styles.labelStyle;\n } else {\n style = 'fill:none';\n\n if (typeof defaultStyle !== 'undefined') {\n style = defaultStyle;\n }\n\n if (typeof defaultLabelStyle !== 'undefined') {\n labelStyle = defaultLabelStyle;\n }\n }\n\n edgeData.style = style;\n edgeData.labelStyle = labelStyle;\n\n if (typeof edge.interpolate !== 'undefined') {\n edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_0__[\"curveLinear\"]);\n } else if (typeof relations.defaultInterpolate !== 'undefined') {\n edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(relations.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_0__[\"curveLinear\"]);\n } else {\n edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_0__[\"curveLinear\"]);\n }\n\n edge.text = edge.title;\n\n if (typeof edge.text === 'undefined') {\n if (typeof edge.style !== 'undefined') {\n edgeData.arrowheadStyle = 'fill: #333';\n }\n } else {\n edgeData.arrowheadStyle = 'fill: #333';\n edgeData.labelpos = 'c';\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_7__[\"getConfig\"])().flowchart.htmlLabels && false) {\n // eslint-disable-line\n edgeData.labelType = 'html';\n edgeData.label = '' + edge.text + '';\n } else {\n edgeData.labelType = 'text';\n edgeData.label = edge.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_10__[\"default\"].lineBreakRegex, '\\n');\n\n if (typeof edge.style === 'undefined') {\n edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';\n }\n\n edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');\n }\n } // Add the edge to the graph\n\n\n g.setEdge(edge.id1, edge.id2, edgeData, cnt);\n });\n }; // Todo optimize\n\n\n var getGraphId = function getGraphId(label) {\n var keys = Object.keys(idCache);\n\n for (var i = 0; i < keys.length; i++) {\n if (idCache[keys[i]].label === label) {\n return keys[i];\n }\n }\n\n return undefined;\n };\n\n var setConf = function setConf(cnf) {\n var keys = Object.keys(cnf);\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n };\n /**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\n\n var drawOld = function drawOld(text, id) {\n idCache = {};\n\n _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].yy.clear();\n\n _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].parse(text);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found\n\n\n var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id='\".concat(id, \"']\")); // insertMarkers(diagram);\n // Layout graph, Create a new directed graph\n\n var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({\n multigraph: true\n }); // Set an object for the graph label\n\n g.setGraph({\n isMultiGraph: true\n }); // Default to assigning a new object as a label for each new edge.\n\n g.setDefaultEdgeLabel(function () {\n return {};\n });\n\n var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getClasses();\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('classes:');\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info(classes);\n\n var keys = Object.keys(classes);\n\n for (var i = 0; i < keys.length; i++) {\n var classDef = classes[keys[i]];\n\n var node = _svgDraw__WEBPACK_IMPORTED_MODULE_6__[\"default\"].drawClass(diagram, classDef, conf);\n\n idCache[node.id] = node; // Add nodes to the graph. The first argument is the node id. The second is\n // metadata about the node. In this case we're going to add labels to each of\n // our nodes.\n\n g.setNode(node.id, node);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Org height: ' + node.height);\n }\n\n var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getRelations();\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('relations:', relations);\n\n relations.forEach(function (relation) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation));\n\n g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), {\n relation: relation\n }, relation.title || 'DEFAULT');\n });\n dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g);\n g.nodes().forEach(function (v) {\n if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));\n\n Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + Object(_classDb__WEBPACK_IMPORTED_MODULE_4__[\"lookUpDomId\"])(v)).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )');\n }\n });\n g.edges().forEach(function (e) {\n if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_6__[\"default\"].drawEdge(diagram, g.edge(e), g.edge(e).relation, conf);\n }\n });\n var svgBounds = diagram.node().getBBox();\n var width = svgBounds.width + padding * 2;\n var height = svgBounds.height + padding * 2;\n Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"configureSvgSize\"])(diagram, height, width, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n\n var vBox = \"\".concat(svgBounds.x - padding, \" \").concat(svgBounds.y - padding, \" \").concat(width, \" \").concat(height);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug(\"viewBox \".concat(vBox));\n\n diagram.attr('viewBox', vBox);\n };\n\n var draw = function draw(text, id) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Drawing class');\n\n _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].clear(); // const parser = classDb.parser;\n // parser.yy = classDb;\n // Parse the graph definition\n // try {\n\n\n _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].parse(text); // } catch (err) {\n // log.debug('Parsing failed');\n // }\n // Fetch the default direction, use TD if none was found\n\n\n var dir = 'TD';\n var conf = Object(_config__WEBPACK_IMPORTED_MODULE_7__[\"getConfig\"])().flowchart;\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('config:', conf);\n\n var nodeSpacing = conf.nodeSpacing || 50;\n var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph\n\n var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: dir,\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function () {\n return {};\n }); // let subG;\n // const subGraphs = flowDb.getSubGraphs();\n // log.info('Subgraphs - ', subGraphs);\n // for (let i = subGraphs.length - 1; i >= 0; i--) {\n // subG = subGraphs[i];\n // log.info('Subgraph - ', subG);\n // flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes);\n // }\n // Fetch the verices/nodes and edges/links from the parsed graph definition\n\n var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getClasses();\n\n var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getRelations();\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info(relations); // let i = 0;\n // for (i = subGraphs.length - 1; i >= 0; i--) {\n // subG = subGraphs[i];\n // selectAll('cluster').append('text');\n // for (let j = 0; j < subG.nodes.length; j++) {\n // g.setParent(subG.nodes[j], subG.id);\n // }\n // }\n\n\n addClasses(classes, g, id);\n addRelations(relations, g); // Add custom shapes\n // flowChartShapes.addToRenderV2(addShape);\n // Set up an SVG group so that we can translate the final graph.\n\n var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\"));\n svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink'); // Run the renderer. This is what draws the final graph.\n\n var element = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + id + ' g');\n Object(_dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_8__[\"render\"])(element, g, ['aggregation', 'extension', 'composition', 'dependency'], 'classDiagram', id); // element.selectAll('g.node').attr('title', function() {\n // return flowDb.getTooltip(this.id);\n // });\n\n var padding = 8;\n var svgBounds = svg.node().getBBox();\n var width = svgBounds.width + padding * 2;\n var height = svgBounds.height + padding * 2;\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug(\"new ViewBox 0 0 \".concat(width, \" \").concat(height), \"translate(\".concat(padding - g._label.marginx, \", \").concat(padding - g._label.marginy, \")\"));\n\n Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"configureSvgSize\"])(svg, height, width, conf.useMaxWidth);\n svg.attr('viewBox', \"0 0 \".concat(width, \" \").concat(height));\n svg.select('g').attr('transform', \"translate(\".concat(padding - g._label.marginx, \", \").concat(padding - svgBounds.y, \")\")); // Index nodes\n // flowDb.indexNodes('subGraph' + i);\n // Add label rects for non html labels\n\n if (!conf.htmlLabels) {\n var labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n\n for (var k = 0; k < labels.length; k++) {\n var label = labels[k]; // Get dimensions of label\n\n var dim = label.getBBox();\n var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height);\n rect.setAttribute('style', 'fill:#e8e8e8;');\n label.insertBefore(rect, label.firstChild);\n }\n } // If node has a link, wrap it in an anchor SVG object.\n // const keys = Object.keys(classes);\n // keys.forEach(function(key) {\n // const vertex = classes[key];\n // if (vertex.link) {\n // const node = select('#' + id + ' [id=\"' + key + '\"]');\n // if (node) {\n // const link = document.createElementNS('http://www.w3.org/2000/svg', 'a');\n // link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));\n // link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);\n // link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n // const linkNode = node.insert(function() {\n // return link;\n // }, ':first-child');\n // const shape = node.select('.label-container');\n // if (shape) {\n // linkNode.append(function() {\n // return shape.node();\n // });\n // }\n // const label = node.select('.label');\n // if (label) {\n // linkNode.append(function() {\n // return label.node();\n // });\n // }\n // }\n // }\n // });\n\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setConf: setConf,\n draw: draw\n };\n\n function getArrowMarker(type) {\n var marker;\n\n switch (type) {\n case 0:\n marker = 'aggregation';\n break;\n\n case 1:\n marker = 'extension';\n break;\n\n case 2:\n marker = 'composition';\n break;\n\n case 3:\n marker = 'dependency';\n break;\n\n default:\n marker = 'none';\n }\n\n return marker;\n }\n /***/\n\n },\n\n /***/\n \"./src/diagrams/class/classRenderer.js\":\n /*!*********************************************!*\\\n !*** ./src/diagrams/class/classRenderer.js ***!\n \\*********************************************/\n\n /*! exports provided: setConf, draw, default */\n\n /***/\n function srcDiagramsClassClassRendererJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! dagre */\n \"dagre\");\n /* harmony import */\n\n\n var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__);\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! graphlib */\n \"graphlib\");\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ./classDb */\n \"./src/diagrams/class/classDb.js\");\n /* harmony import */\n\n\n var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ./parser/classDiagram */\n \"./src/diagrams/class/parser/classDiagram.jison\");\n /* harmony import */\n\n\n var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__);\n /* harmony import */\n\n\n var _svgDraw__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\n /*! ./svgDraw */\n \"./src/diagrams/class/svgDraw.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n\n _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"];\n var idCache = {};\n var padding = 20;\n var conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10\n }; // Todo optimize\n\n var getGraphId = function getGraphId(label) {\n var keys = Object.keys(idCache);\n\n for (var i = 0; i < keys.length; i++) {\n if (idCache[keys[i]].label === label) {\n return keys[i];\n }\n }\n\n return undefined;\n };\n /**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\n\n\n var insertMarkers = function insertMarkers(elem) {\n elem.append('defs').append('marker').attr('id', 'extensionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 1,7 L18,13 V 1 Z');\n elem.append('defs').append('marker').attr('id', 'extensionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n\n elem.append('defs').append('marker').attr('id', 'compositionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n elem.append('defs').append('marker').attr('id', 'compositionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n elem.append('defs').append('marker').attr('id', 'aggregationStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n elem.append('defs').append('marker').attr('id', 'aggregationEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n elem.append('defs').append('marker').attr('id', 'dependencyStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n elem.append('defs').append('marker').attr('id', 'dependencyEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n };\n\n var setConf = function setConf(cnf) {\n var keys = Object.keys(cnf);\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n };\n /**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\n\n var draw = function draw(text, id) {\n idCache = {};\n\n _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].yy.clear();\n\n _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__[\"parser\"].parse(text);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found\n\n\n var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id='\".concat(id, \"']\"));\n diagram.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n insertMarkers(diagram); // Layout graph, Create a new directed graph\n\n var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({\n multigraph: true\n }); // Set an object for the graph label\n\n g.setGraph({\n isMultiGraph: true\n }); // Default to assigning a new object as a label for each new edge.\n\n g.setDefaultEdgeLabel(function () {\n return {};\n });\n\n var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getClasses();\n\n var keys = Object.keys(classes);\n\n for (var i = 0; i < keys.length; i++) {\n var classDef = classes[keys[i]];\n\n var node = _svgDraw__WEBPACK_IMPORTED_MODULE_6__[\"default\"].drawClass(diagram, classDef, conf);\n\n idCache[node.id] = node; // Add nodes to the graph. The first argument is the node id. The second is\n // metadata about the node. In this case we're going to add labels to each of\n // our nodes.\n\n g.setNode(node.id, node);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Org height: ' + node.height);\n }\n\n var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getRelations();\n\n relations.forEach(function (relation) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation));\n\n g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), {\n relation: relation\n }, relation.title || 'DEFAULT');\n });\n dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g);\n g.nodes().forEach(function (v) {\n if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));\n\n Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + Object(_classDb__WEBPACK_IMPORTED_MODULE_4__[\"lookUpDomId\"])(v)).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )');\n }\n });\n g.edges().forEach(function (e) {\n if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_6__[\"default\"].drawEdge(diagram, g.edge(e), g.edge(e).relation, conf);\n }\n });\n var svgBounds = diagram.node().getBBox();\n var width = svgBounds.width + padding * 2;\n var height = svgBounds.height + padding * 2;\n Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"configureSvgSize\"])(diagram, height, width, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n\n var vBox = \"\".concat(svgBounds.x - padding, \" \").concat(svgBounds.y - padding, \" \").concat(width, \" \").concat(height);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug(\"viewBox \".concat(vBox));\n\n diagram.attr('viewBox', vBox);\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setConf: setConf,\n draw: draw\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/class/parser/classDiagram.jison\":\n /*!******************************************************!*\\\n !*** ./src/diagrams/class/parser/classDiagram.jison ***!\n \\******************************************************/\n\n /*! no static exports found */\n\n /***/\n function srcDiagramsClassParserClassDiagramJison(module, exports, __webpack_require__) {\n /* WEBPACK VAR INJECTION */\n (function (process, module) {\n /* parser generated by jison 0.4.18 */\n\n /*\n Returns a Parser object of the following structure:\n \n Parser: {\n yy: {}\n }\n \n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n \n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n \n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n \n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n \n \n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n \n \n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n */\n var parser = function () {\n var o = function o(k, v, _o, l) {\n for (_o = _o || {}, l = k.length; l--; _o[k[l]] = v) {\n ;\n }\n\n return _o;\n },\n $V0 = [1, 7],\n $V1 = [1, 6],\n $V2 = [1, 14],\n $V3 = [1, 25],\n $V4 = [1, 28],\n $V5 = [1, 26],\n $V6 = [1, 27],\n $V7 = [1, 29],\n $V8 = [1, 30],\n $V9 = [1, 31],\n $Va = [1, 32],\n $Vb = [1, 34],\n $Vc = [1, 35],\n $Vd = [1, 36],\n $Ve = [10, 19],\n $Vf = [1, 48],\n $Vg = [1, 49],\n $Vh = [1, 50],\n $Vi = [1, 51],\n $Vj = [1, 52],\n $Vk = [1, 53],\n $Vl = [10, 19, 25, 32, 33, 41, 44, 45, 46, 47, 48, 49, 54, 56],\n $Vm = [10, 19, 23, 25, 32, 33, 37, 41, 44, 45, 46, 47, 48, 49, 54, 56, 71, 72, 73],\n $Vn = [10, 13, 17, 19],\n $Vo = [41, 71, 72, 73],\n $Vp = [41, 48, 49, 71, 72, 73],\n $Vq = [41, 44, 45, 46, 47, 71, 72, 73],\n $Vr = [10, 19, 25],\n $Vs = [1, 85];\n\n var parser = {\n trace: function trace() {},\n yy: {},\n symbols_: {\n \"error\": 2,\n \"start\": 3,\n \"mermaidDoc\": 4,\n \"directive\": 5,\n \"graphConfig\": 6,\n \"openDirective\": 7,\n \"typeDirective\": 8,\n \"closeDirective\": 9,\n \"NEWLINE\": 10,\n \":\": 11,\n \"argDirective\": 12,\n \"open_directive\": 13,\n \"type_directive\": 14,\n \"arg_directive\": 15,\n \"close_directive\": 16,\n \"CLASS_DIAGRAM\": 17,\n \"statements\": 18,\n \"EOF\": 19,\n \"statement\": 20,\n \"className\": 21,\n \"alphaNumToken\": 22,\n \"GENERICTYPE\": 23,\n \"relationStatement\": 24,\n \"LABEL\": 25,\n \"classStatement\": 26,\n \"methodStatement\": 27,\n \"annotationStatement\": 28,\n \"clickStatement\": 29,\n \"cssClassStatement\": 30,\n \"CLASS\": 31,\n \"STYLE_SEPARATOR\": 32,\n \"STRUCT_START\": 33,\n \"members\": 34,\n \"STRUCT_STOP\": 35,\n \"ANNOTATION_START\": 36,\n \"ANNOTATION_END\": 37,\n \"MEMBER\": 38,\n \"SEPARATOR\": 39,\n \"relation\": 40,\n \"STR\": 41,\n \"relationType\": 42,\n \"lineType\": 43,\n \"AGGREGATION\": 44,\n \"EXTENSION\": 45,\n \"COMPOSITION\": 46,\n \"DEPENDENCY\": 47,\n \"LINE\": 48,\n \"DOTTED_LINE\": 49,\n \"CALLBACK\": 50,\n \"LINK\": 51,\n \"LINK_TARGET\": 52,\n \"CLICK\": 53,\n \"CALLBACK_NAME\": 54,\n \"CALLBACK_ARGS\": 55,\n \"HREF\": 56,\n \"CSSCLASS\": 57,\n \"commentToken\": 58,\n \"textToken\": 59,\n \"graphCodeTokens\": 60,\n \"textNoTagsToken\": 61,\n \"TAGSTART\": 62,\n \"TAGEND\": 63,\n \"==\": 64,\n \"--\": 65,\n \"PCT\": 66,\n \"DEFAULT\": 67,\n \"SPACE\": 68,\n \"MINUS\": 69,\n \"keywords\": 70,\n \"UNICODE_TEXT\": 71,\n \"NUM\": 72,\n \"ALPHA\": 73,\n \"$accept\": 0,\n \"$end\": 1\n },\n terminals_: {\n 2: \"error\",\n 10: \"NEWLINE\",\n 11: \":\",\n 13: \"open_directive\",\n 14: \"type_directive\",\n 15: \"arg_directive\",\n 16: \"close_directive\",\n 17: \"CLASS_DIAGRAM\",\n 19: \"EOF\",\n 23: \"GENERICTYPE\",\n 25: \"LABEL\",\n 31: \"CLASS\",\n 32: \"STYLE_SEPARATOR\",\n 33: \"STRUCT_START\",\n 35: \"STRUCT_STOP\",\n 36: \"ANNOTATION_START\",\n 37: \"ANNOTATION_END\",\n 38: \"MEMBER\",\n 39: \"SEPARATOR\",\n 41: \"STR\",\n 44: \"AGGREGATION\",\n 45: \"EXTENSION\",\n 46: \"COMPOSITION\",\n 47: \"DEPENDENCY\",\n 48: \"LINE\",\n 49: \"DOTTED_LINE\",\n 50: \"CALLBACK\",\n 51: \"LINK\",\n 52: \"LINK_TARGET\",\n 53: \"CLICK\",\n 54: \"CALLBACK_NAME\",\n 55: \"CALLBACK_ARGS\",\n 56: \"HREF\",\n 57: \"CSSCLASS\",\n 60: \"graphCodeTokens\",\n 62: \"TAGSTART\",\n 63: \"TAGEND\",\n 64: \"==\",\n 65: \"--\",\n 66: \"PCT\",\n 67: \"DEFAULT\",\n 68: \"SPACE\",\n 69: \"MINUS\",\n 70: \"keywords\",\n 71: \"UNICODE_TEXT\",\n 72: \"NUM\",\n 73: \"ALPHA\"\n },\n productions_: [0, [3, 1], [3, 2], [4, 1], [5, 4], [5, 6], [7, 1], [8, 1], [12, 1], [9, 1], [6, 4], [18, 1], [18, 2], [18, 3], [21, 1], [21, 2], [21, 3], [21, 2], [20, 1], [20, 2], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [26, 2], [26, 4], [26, 5], [26, 7], [28, 4], [34, 1], [34, 2], [27, 1], [27, 2], [27, 1], [27, 1], [24, 3], [24, 4], [24, 4], [24, 5], [40, 3], [40, 2], [40, 2], [40, 1], [42, 1], [42, 1], [42, 1], [42, 1], [43, 1], [43, 1], [29, 3], [29, 4], [29, 3], [29, 4], [29, 4], [29, 5], [29, 3], [29, 4], [29, 4], [29, 5], [29, 3], [29, 4], [29, 4], [29, 5], [30, 3], [58, 1], [58, 1], [59, 1], [59, 1], [59, 1], [59, 1], [59, 1], [59, 1], [59, 1], [61, 1], [61, 1], [61, 1], [61, 1], [22, 1], [22, 1], [22, 1]],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate\n /* action[1] */\n , $$\n /* vstack */\n , _$\n /* lstack */\n ) {\n /* this == yyval */\n var $0 = $$.length - 1;\n\n switch (yystate) {\n case 6:\n yy.parseDirective('%%{', 'open_directive');\n break;\n\n case 7:\n yy.parseDirective($$[$0], 'type_directive');\n break;\n\n case 8:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"');\n yy.parseDirective($$[$0], 'arg_directive');\n break;\n\n case 9:\n yy.parseDirective('}%%', 'close_directive', 'class');\n break;\n\n case 14:\n this.$ = $$[$0];\n break;\n\n case 15:\n this.$ = $$[$0 - 1] + $$[$0];\n break;\n\n case 16:\n this.$ = $$[$0 - 2] + '~' + $$[$0 - 1] + $$[$0];\n break;\n\n case 17:\n this.$ = $$[$0 - 1] + '~' + $$[$0];\n break;\n\n case 18:\n yy.addRelation($$[$0]);\n break;\n\n case 19:\n $$[$0 - 1].title = yy.cleanupLabel($$[$0]);\n yy.addRelation($$[$0 - 1]);\n break;\n\n case 26:\n yy.addClass($$[$0]);\n break;\n\n case 27:\n yy.addClass($$[$0 - 2]);\n yy.setCssClass($$[$0 - 2], $$[$0]);\n break;\n\n case 28:\n /*console.log($$[$0-3],JSON.stringify($$[$0-1]));*/\n yy.addClass($$[$0 - 3]);\n yy.addMembers($$[$0 - 3], $$[$0 - 1]);\n break;\n\n case 29:\n yy.addClass($$[$0 - 5]);\n yy.setCssClass($$[$0 - 5], $$[$0 - 3]);\n yy.addMembers($$[$0 - 5], $$[$0 - 1]);\n break;\n\n case 30:\n yy.addAnnotation($$[$0], $$[$0 - 2]);\n break;\n\n case 31:\n this.$ = [$$[$0]];\n break;\n\n case 32:\n $$[$0].push($$[$0 - 1]);\n this.$ = $$[$0];\n break;\n\n case 33:\n /*console.log('Rel found',$$[$0]);*/\n break;\n\n case 34:\n yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0]));\n break;\n\n case 35:\n /*console.warn('Member',$$[$0]);*/\n break;\n\n case 36:\n /*console.log('sep found',$$[$0]);*/\n break;\n\n case 37:\n this.$ = {\n 'id1': $$[$0 - 2],\n 'id2': $$[$0],\n relation: $$[$0 - 1],\n relationTitle1: 'none',\n relationTitle2: 'none'\n };\n break;\n\n case 38:\n this.$ = {\n id1: $$[$0 - 3],\n id2: $$[$0],\n relation: $$[$0 - 1],\n relationTitle1: $$[$0 - 2],\n relationTitle2: 'none'\n };\n break;\n\n case 39:\n this.$ = {\n id1: $$[$0 - 3],\n id2: $$[$0],\n relation: $$[$0 - 2],\n relationTitle1: 'none',\n relationTitle2: $$[$0 - 1]\n };\n break;\n\n case 40:\n this.$ = {\n id1: $$[$0 - 4],\n id2: $$[$0],\n relation: $$[$0 - 2],\n relationTitle1: $$[$0 - 3],\n relationTitle2: $$[$0 - 1]\n };\n break;\n\n case 41:\n this.$ = {\n type1: $$[$0 - 2],\n type2: $$[$0],\n lineType: $$[$0 - 1]\n };\n break;\n\n case 42:\n this.$ = {\n type1: 'none',\n type2: $$[$0],\n lineType: $$[$0 - 1]\n };\n break;\n\n case 43:\n this.$ = {\n type1: $$[$0 - 1],\n type2: 'none',\n lineType: $$[$0]\n };\n break;\n\n case 44:\n this.$ = {\n type1: 'none',\n type2: 'none',\n lineType: $$[$0]\n };\n break;\n\n case 45:\n this.$ = yy.relationType.AGGREGATION;\n break;\n\n case 46:\n this.$ = yy.relationType.EXTENSION;\n break;\n\n case 47:\n this.$ = yy.relationType.COMPOSITION;\n break;\n\n case 48:\n this.$ = yy.relationType.DEPENDENCY;\n break;\n\n case 49:\n this.$ = yy.lineType.LINE;\n break;\n\n case 50:\n this.$ = yy.lineType.DOTTED_LINE;\n break;\n\n case 51:\n case 57:\n this.$ = $$[$0 - 2];\n yy.setClickEvent($$[$0 - 1], $$[$0]);\n break;\n\n case 52:\n case 58:\n this.$ = $$[$0 - 3];\n yy.setClickEvent($$[$0 - 2], $$[$0 - 1]);\n yy.setTooltip($$[$0 - 2], $$[$0]);\n break;\n\n case 53:\n case 61:\n this.$ = $$[$0 - 2];\n yy.setLink($$[$0 - 1], $$[$0]);\n break;\n\n case 54:\n this.$ = $$[$0 - 3];\n yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]);\n break;\n\n case 55:\n case 63:\n this.$ = $$[$0 - 3];\n yy.setLink($$[$0 - 2], $$[$0 - 1]);\n yy.setTooltip($$[$0 - 2], $$[$0]);\n break;\n\n case 56:\n case 64:\n this.$ = $$[$0 - 4];\n yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);\n yy.setTooltip($$[$0 - 3], $$[$0 - 1]);\n break;\n\n case 59:\n this.$ = $$[$0 - 3];\n yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);\n break;\n\n case 60:\n this.$ = $$[$0 - 4];\n yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);\n yy.setTooltip($$[$0 - 3], $$[$0]);\n break;\n\n case 62:\n this.$ = $$[$0 - 3];\n yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]);\n break;\n\n case 65:\n yy.setCssClass($$[$0 - 1], $$[$0]);\n break;\n }\n },\n table: [{\n 3: 1,\n 4: 2,\n 5: 3,\n 6: 4,\n 7: 5,\n 13: $V0,\n 17: $V1\n }, {\n 1: [3]\n }, {\n 1: [2, 1]\n }, {\n 3: 8,\n 4: 2,\n 5: 3,\n 6: 4,\n 7: 5,\n 13: $V0,\n 17: $V1\n }, {\n 1: [2, 3]\n }, {\n 8: 9,\n 14: [1, 10]\n }, {\n 10: [1, 11]\n }, {\n 14: [2, 6]\n }, {\n 1: [2, 2]\n }, {\n 9: 12,\n 11: [1, 13],\n 16: $V2\n }, o([11, 16], [2, 7]), {\n 5: 23,\n 7: 5,\n 13: $V0,\n 18: 15,\n 20: 16,\n 21: 24,\n 22: 33,\n 24: 17,\n 26: 18,\n 27: 19,\n 28: 20,\n 29: 21,\n 30: 22,\n 31: $V3,\n 36: $V4,\n 38: $V5,\n 39: $V6,\n 50: $V7,\n 51: $V8,\n 53: $V9,\n 57: $Va,\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, {\n 10: [1, 37]\n }, {\n 12: 38,\n 15: [1, 39]\n }, {\n 10: [2, 9]\n }, {\n 19: [1, 40]\n }, {\n 10: [1, 41],\n 19: [2, 11]\n }, o($Ve, [2, 18], {\n 25: [1, 42]\n }), o($Ve, [2, 20]), o($Ve, [2, 21]), o($Ve, [2, 22]), o($Ve, [2, 23]), o($Ve, [2, 24]), o($Ve, [2, 25]), o($Ve, [2, 33], {\n 40: 43,\n 42: 46,\n 43: 47,\n 25: [1, 45],\n 41: [1, 44],\n 44: $Vf,\n 45: $Vg,\n 46: $Vh,\n 47: $Vi,\n 48: $Vj,\n 49: $Vk\n }), {\n 21: 54,\n 22: 33,\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, o($Ve, [2, 35]), o($Ve, [2, 36]), {\n 22: 55,\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, {\n 21: 56,\n 22: 33,\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, {\n 21: 57,\n 22: 33,\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, {\n 21: 58,\n 22: 33,\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, {\n 41: [1, 59]\n }, o($Vl, [2, 14], {\n 22: 33,\n 21: 60,\n 23: [1, 61],\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }), o($Vm, [2, 79]), o($Vm, [2, 80]), o($Vm, [2, 81]), o($Vn, [2, 4]), {\n 9: 62,\n 16: $V2\n }, {\n 16: [2, 8]\n }, {\n 1: [2, 10]\n }, {\n 5: 23,\n 7: 5,\n 13: $V0,\n 18: 63,\n 19: [2, 12],\n 20: 16,\n 21: 24,\n 22: 33,\n 24: 17,\n 26: 18,\n 27: 19,\n 28: 20,\n 29: 21,\n 30: 22,\n 31: $V3,\n 36: $V4,\n 38: $V5,\n 39: $V6,\n 50: $V7,\n 51: $V8,\n 53: $V9,\n 57: $Va,\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, o($Ve, [2, 19]), {\n 21: 64,\n 22: 33,\n 41: [1, 65],\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, {\n 40: 66,\n 42: 46,\n 43: 47,\n 44: $Vf,\n 45: $Vg,\n 46: $Vh,\n 47: $Vi,\n 48: $Vj,\n 49: $Vk\n }, o($Ve, [2, 34]), {\n 43: 67,\n 48: $Vj,\n 49: $Vk\n }, o($Vo, [2, 44], {\n 42: 68,\n 44: $Vf,\n 45: $Vg,\n 46: $Vh,\n 47: $Vi\n }), o($Vp, [2, 45]), o($Vp, [2, 46]), o($Vp, [2, 47]), o($Vp, [2, 48]), o($Vq, [2, 49]), o($Vq, [2, 50]), o($Ve, [2, 26], {\n 32: [1, 69],\n 33: [1, 70]\n }), {\n 37: [1, 71]\n }, {\n 41: [1, 72]\n }, {\n 41: [1, 73]\n }, {\n 54: [1, 74],\n 56: [1, 75]\n }, {\n 22: 76,\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, o($Vl, [2, 15]), o($Vl, [2, 17], {\n 22: 33,\n 21: 77,\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }), {\n 10: [1, 78]\n }, {\n 19: [2, 13]\n }, o($Vr, [2, 37]), {\n 21: 79,\n 22: 33,\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, {\n 21: 80,\n 22: 33,\n 41: [1, 81],\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, o($Vo, [2, 43], {\n 42: 82,\n 44: $Vf,\n 45: $Vg,\n 46: $Vh,\n 47: $Vi\n }), o($Vo, [2, 42]), {\n 22: 83,\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, {\n 34: 84,\n 38: $Vs\n }, {\n 21: 86,\n 22: 33,\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, o($Ve, [2, 51], {\n 41: [1, 87]\n }), o($Ve, [2, 53], {\n 41: [1, 89],\n 52: [1, 88]\n }), o($Ve, [2, 57], {\n 41: [1, 90],\n 55: [1, 91]\n }), o($Ve, [2, 61], {\n 41: [1, 93],\n 52: [1, 92]\n }), o($Ve, [2, 65]), o($Vl, [2, 16]), o($Vn, [2, 5]), o($Vr, [2, 39]), o($Vr, [2, 38]), {\n 21: 94,\n 22: 33,\n 71: $Vb,\n 72: $Vc,\n 73: $Vd\n }, o($Vo, [2, 41]), o($Ve, [2, 27], {\n 33: [1, 95]\n }), {\n 35: [1, 96]\n }, {\n 34: 97,\n 35: [2, 31],\n 38: $Vs\n }, o($Ve, [2, 30]), o($Ve, [2, 52]), o($Ve, [2, 54]), o($Ve, [2, 55], {\n 52: [1, 98]\n }), o($Ve, [2, 58]), o($Ve, [2, 59], {\n 41: [1, 99]\n }), o($Ve, [2, 62]), o($Ve, [2, 63], {\n 52: [1, 100]\n }), o($Vr, [2, 40]), {\n 34: 101,\n 38: $Vs\n }, o($Ve, [2, 28]), {\n 35: [2, 32]\n }, o($Ve, [2, 56]), o($Ve, [2, 60]), o($Ve, [2, 64]), {\n 35: [1, 102]\n }, o($Ve, [2, 29])],\n defaultActions: {\n 2: [2, 1],\n 4: [2, 3],\n 7: [2, 6],\n 8: [2, 2],\n 14: [2, 9],\n 39: [2, 8],\n 40: [2, 10],\n 63: [2, 13],\n 97: [2, 32]\n },\n parseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n },\n parse: function parse(input) {\n var self = this,\n stack = [0],\n tstack = [],\n vstack = [null],\n lstack = [],\n table = this.table,\n yytext = '',\n yylineno = 0,\n yyleng = 0,\n recovering = 0,\n TERROR = 2,\n EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = {\n yy: {}\n };\n\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n\n token = self.symbols_[token] || token;\n }\n\n return token;\n }\n\n var symbol,\n preErrorSymbol,\n state,\n action,\n a,\n r,\n yyval = {},\n p,\n len,\n newState,\n expected;\n\n while (true) {\n state = stack[stack.length - 1];\n\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n\n action = table[state] && table[state][symbol];\n }\n\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n\n break;\n\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n\n if (ranges) {\n yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n }\n\n r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));\n\n if (typeof r !== 'undefined') {\n return r;\n }\n\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n\n case 3:\n return true;\n }\n }\n\n return true;\n }\n };\n /* generated by jison-lex 0.3.4 */\n\n var lexer = function () {\n var lexer = {\n EOF: 1,\n parseError: function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n // resets the lexer, sets new input\n setInput: function setInput(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n\n this.offset = 0;\n return this;\n },\n // consumes and returns one char from the input\n input: function input() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n // unshifts one char (or a string) into the input\n unput: function unput(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;\n\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n\n this.yyleng = this.yytext.length;\n return this;\n },\n // When called from action, caches matched text and appends it on next action\n more: function more() {\n this._more = true;\n return this;\n },\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: function reject() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n\n return this;\n },\n // retain first n characters of the match\n less: function less(n) {\n this.unput(this.match.slice(n));\n },\n // displays already matched input, i.e. for error messages\n pastInput: function pastInput() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\\n/g, \"\");\n },\n // displays upcoming input, i.e. for error messages\n upcomingInput: function upcomingInput() {\n var next = this.match;\n\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n\n return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: function showPosition() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: function test_match(match, indexed_rule) {\n var token, lines, backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno += lines.length;\n }\n\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n\n if (this.done && this._input) {\n this.done = false;\n }\n\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n\n return false;\n },\n // return next match in input\n next: function next() {\n if (this.done) {\n return this.EOF;\n }\n\n if (!this._input) {\n this.done = true;\n }\n\n var token, match, tempMatch, index;\n\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n\n var rules = this._currentRules();\n\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n\n if (match) {\n token = this.test_match(match, rules[index]);\n\n if (token !== false) {\n return token;\n } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n\n\n return false;\n }\n\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n // return next match that has a token\n lex: function lex() {\n var r = this.next();\n\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: function begin(condition) {\n this.conditionStack.push(condition);\n },\n // pop the previously active lexer condition state off the condition stack\n popState: function popState() {\n var n = this.conditionStack.length - 1;\n\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n // alias for begin(condition)\n pushState: function pushState(condition) {\n this.begin(condition);\n },\n // return the number of states currently on the stack\n stateStackSize: function stateStackSize() {\n return this.conditionStack.length;\n },\n options: {},\n performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n\n switch ($avoiding_name_collisions) {\n case 0:\n this.begin('open_directive');\n return 13;\n break;\n\n case 1:\n this.begin('type_directive');\n return 14;\n break;\n\n case 2:\n this.popState();\n this.begin('arg_directive');\n return 11;\n break;\n\n case 3:\n this.popState();\n this.popState();\n return 16;\n break;\n\n case 4:\n return 15;\n break;\n\n case 5:\n /* skip comments */\n break;\n\n case 6:\n /* skip comments */\n break;\n\n case 7:\n return 10;\n break;\n\n case 8:\n /* skip whitespace */\n break;\n\n case 9:\n return 17;\n break;\n\n case 10:\n return 17;\n break;\n\n case 11:\n this.begin(\"struct\");\n /*console.log('Starting struct');*/\n\n return 33;\n break;\n\n case 12:\n return \"EOF_IN_STRUCT\";\n break;\n\n case 13:\n return \"OPEN_IN_STRUCT\";\n break;\n\n case 14:\n /*console.log('Ending struct');*/\n this.popState();\n return 35;\n break;\n\n case 15:\n /* nothing */\n break;\n\n case 16:\n /*console.log('lex-member: ' + yy_.yytext);*/\n return \"MEMBER\";\n break;\n\n case 17:\n return 31;\n break;\n\n case 18:\n return 57;\n break;\n\n case 19:\n return 50;\n break;\n\n case 20:\n return 51;\n break;\n\n case 21:\n return 53;\n break;\n\n case 22:\n return 36;\n break;\n\n case 23:\n return 37;\n break;\n\n case 24:\n this.begin(\"generic\");\n break;\n\n case 25:\n this.popState();\n break;\n\n case 26:\n return \"GENERICTYPE\";\n break;\n\n case 27:\n this.begin(\"string\");\n break;\n\n case 28:\n this.popState();\n break;\n\n case 29:\n return \"STR\";\n break;\n\n case 30:\n this.begin(\"href\");\n break;\n\n case 31:\n this.popState();\n break;\n\n case 32:\n return 56;\n break;\n\n case 33:\n this.begin(\"callback_name\");\n break;\n\n case 34:\n this.popState();\n break;\n\n case 35:\n this.popState();\n this.begin(\"callback_args\");\n break;\n\n case 36:\n return 54;\n break;\n\n case 37:\n this.popState();\n break;\n\n case 38:\n return 55;\n break;\n\n case 39:\n return 52;\n break;\n\n case 40:\n return 52;\n break;\n\n case 41:\n return 52;\n break;\n\n case 42:\n return 52;\n break;\n\n case 43:\n return 45;\n break;\n\n case 44:\n return 45;\n break;\n\n case 45:\n return 47;\n break;\n\n case 46:\n return 47;\n break;\n\n case 47:\n return 46;\n break;\n\n case 48:\n return 44;\n break;\n\n case 49:\n return 48;\n break;\n\n case 50:\n return 49;\n break;\n\n case 51:\n return 25;\n break;\n\n case 52:\n return 32;\n break;\n\n case 53:\n return 69;\n break;\n\n case 54:\n return 'DOT';\n break;\n\n case 55:\n return 'PLUS';\n break;\n\n case 56:\n return 66;\n break;\n\n case 57:\n return 'EQUALS';\n break;\n\n case 58:\n return 'EQUALS';\n break;\n\n case 59:\n return 73;\n break;\n\n case 60:\n return 'PUNCTUATION';\n break;\n\n case 61:\n return 72;\n break;\n\n case 62:\n return 71;\n break;\n\n case 63:\n return 68;\n break;\n\n case 64:\n return 19;\n break;\n }\n },\n rules: [/^(?:%%\\{)/, /^(?:((?:(?!\\}%%)[^:.])*))/, /^(?::)/, /^(?:\\}%%)/, /^(?:((?:(?!\\}%%).|\\n)*))/, /^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/, /^(?:%%[^\\n]*(\\r?\\n)*)/, /^(?:(\\r?\\n)+)/, /^(?:\\s+)/, /^(?:classDiagram-v2\\b)/, /^(?:classDiagram\\b)/, /^(?:[{])/, /^(?:$)/, /^(?:[{])/, /^(?:[}])/, /^(?:[\\n])/, /^(?:[^{}\\n]*)/, /^(?:class\\b)/, /^(?:cssClass\\b)/, /^(?:callback\\b)/, /^(?:link\\b)/, /^(?:click\\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:[~])/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:[\"])/, /^(?:[\"])/, /^(?:[^\"]*)/, /^(?:href[\\s]+[\"])/, /^(?:[\"])/, /^(?:[^\"]*)/, /^(?:call[\\s]+)/, /^(?:\\([\\s]*\\))/, /^(?:\\()/, /^(?:[^(]*)/, /^(?:\\))/, /^(?:[^)]*)/, /^(?:_self\\b)/, /^(?:_blank\\b)/, /^(?:_parent\\b)/, /^(?:_top\\b)/, /^(?:\\s*<\\|)/, /^(?:\\s*\\|>)/, /^(?:\\s*>)/, /^(?:\\s*<)/, /^(?:\\s*\\*)/, /^(?:\\s*o\\b)/, /^(?:--)/, /^(?:\\.\\.)/, /^(?::{1}[^:\\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\\.)/, /^(?:\\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\\w+)/, /^(?:[!\"#$%&'*+,-.`?\\\\/])/, /^(?:[0-9]+)/, /^(?:[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|[\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39]|[\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8]|[\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C]|[\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C]|[\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99]|[\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0]|[\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D]|[\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3]|[\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10]|[\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1]|[\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81]|[\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3]|[\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6]|[\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/, /^(?:\\s)/, /^(?:$)/],\n conditions: {\n \"arg_directive\": {\n \"rules\": [3, 4],\n \"inclusive\": false\n },\n \"type_directive\": {\n \"rules\": [2, 3],\n \"inclusive\": false\n },\n \"open_directive\": {\n \"rules\": [1],\n \"inclusive\": false\n },\n \"callback_args\": {\n \"rules\": [37, 38],\n \"inclusive\": false\n },\n \"callback_name\": {\n \"rules\": [34, 35, 36],\n \"inclusive\": false\n },\n \"href\": {\n \"rules\": [31, 32],\n \"inclusive\": false\n },\n \"struct\": {\n \"rules\": [12, 13, 14, 15, 16],\n \"inclusive\": false\n },\n \"generic\": {\n \"rules\": [25, 26],\n \"inclusive\": false\n },\n \"string\": {\n \"rules\": [28, 29],\n \"inclusive\": false\n },\n \"INITIAL\": {\n \"rules\": [0, 5, 6, 7, 8, 9, 10, 11, 17, 18, 19, 20, 21, 22, 23, 24, 27, 30, 33, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64],\n \"inclusive\": true\n }\n }\n };\n return lexer;\n }();\n\n parser.lexer = lexer;\n\n function Parser() {\n this.yy = {};\n }\n\n Parser.prototype = parser;\n parser.Parser = Parser;\n return new Parser();\n }();\n\n if (true) {\n exports.parser = parser;\n exports.Parser = parser.Parser;\n\n exports.parse = function () {\n return parser.parse.apply(parser, arguments);\n };\n\n exports.main = function commonjsMain(args) {\n if (!args[1]) {\n console.log('Usage: ' + args[0] + ' FILE');\n process.exit(1);\n }\n\n var source = __webpack_require__(\n /*! fs */\n \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(\n /*! path */\n \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n\n return exports.parser.parse(source);\n };\n\n if (true && __webpack_require__.c[__webpack_require__.s] === module) {\n exports.main(process.argv.slice(1));\n }\n }\n /* WEBPACK VAR INJECTION */\n\n }).call(this, __webpack_require__(\n /*! ./../../../../node_modules/process/browser.js */\n \"./node_modules/process/browser.js\"), __webpack_require__(\n /*! ./../../../../node_modules/webpack/buildin/module.js */\n \"./node_modules/webpack/buildin/module.js\")(module));\n /***/\n },\n\n /***/\n \"./src/diagrams/class/styles.js\":\n /*!**************************************!*\\\n !*** ./src/diagrams/class/styles.js ***!\n \\**************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDiagramsClassStylesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n\n var getStyles = function getStyles(options) {\n return \"g.classGroup text {\\n fill: \".concat(options.nodeBorder, \";\\n fill: \").concat(options.classText, \";\\n stroke: none;\\n font-family: \").concat(options.fontFamily, \";\\n font-size: 10px;\\n\\n .title {\\n font-weight: bolder;\\n }\\n\\n}\\n\\n.classTitle {\\n font-weight: bolder;\\n}\\n.node rect,\\n .node circle,\\n .node ellipse,\\n .node polygon,\\n .node path {\\n fill: \").concat(options.mainBkg, \";\\n stroke: \").concat(options.nodeBorder, \";\\n stroke-width: 1px;\\n }\\n\\n\\n.divider {\\n stroke: \").concat(options.nodeBorder, \";\\n stroke: 1;\\n}\\n\\ng.clickable {\\n cursor: pointer;\\n}\\n\\ng.classGroup rect {\\n fill: \").concat(options.mainBkg, \";\\n stroke: \").concat(options.nodeBorder, \";\\n}\\n\\ng.classGroup line {\\n stroke: \").concat(options.nodeBorder, \";\\n stroke-width: 1;\\n}\\n\\n.classLabel .box {\\n stroke: none;\\n stroke-width: 0;\\n fill: \").concat(options.mainBkg, \";\\n opacity: 0.5;\\n}\\n\\n.classLabel .label {\\n fill: \").concat(options.nodeBorder, \";\\n font-size: 10px;\\n}\\n\\n.relation {\\n stroke: \").concat(options.lineColor, \";\\n stroke-width: 1;\\n fill: none;\\n}\\n\\n.dashed-line{\\n stroke-dasharray: 3;\\n}\\n\\n#compositionStart, .composition {\\n fill: \").concat(options.lineColor, \" !important;\\n stroke: \").concat(options.lineColor, \" !important;\\n stroke-width: 1;\\n}\\n\\n#compositionEnd, .composition {\\n fill: \").concat(options.lineColor, \" !important;\\n stroke: \").concat(options.lineColor, \" !important;\\n stroke-width: 1;\\n}\\n\\n#dependencyStart, .dependency {\\n fill: \").concat(options.lineColor, \" !important;\\n stroke: \").concat(options.lineColor, \" !important;\\n stroke-width: 1;\\n}\\n\\n#dependencyStart, .dependency {\\n fill: \").concat(options.lineColor, \" !important;\\n stroke: \").concat(options.lineColor, \" !important;\\n stroke-width: 1;\\n}\\n\\n#extensionStart, .extension {\\n fill: \").concat(options.lineColor, \" !important;\\n stroke: \").concat(options.lineColor, \" !important;\\n stroke-width: 1;\\n}\\n\\n#extensionEnd, .extension {\\n fill: \").concat(options.lineColor, \" !important;\\n stroke: \").concat(options.lineColor, \" !important;\\n stroke-width: 1;\\n}\\n\\n#aggregationStart, .aggregation {\\n fill: \").concat(options.mainBkg, \" !important;\\n stroke: \").concat(options.lineColor, \" !important;\\n stroke-width: 1;\\n}\\n\\n#aggregationEnd, .aggregation {\\n fill: \").concat(options.mainBkg, \" !important;\\n stroke: \").concat(options.lineColor, \" !important;\\n stroke-width: 1;\\n}\\n\\n.edgeTerminals {\\n font-size: 11px;\\n}\\n\\n\");\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = getStyles;\n /***/\n },\n\n /***/\n \"./src/diagrams/class/svgDraw.js\":\n /*!***************************************!*\\\n !*** ./src/diagrams/class/svgDraw.js ***!\n \\***************************************/\n\n /*! exports provided: drawEdge, drawClass, parseMember, default */\n\n /***/\n function srcDiagramsClassSvgDrawJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawEdge\", function () {\n return drawEdge;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawClass\", function () {\n return drawClass;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"parseMember\", function () {\n return parseMember;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _classDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./classDb */\n \"./src/diagrams/class/classDb.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n\n var edgeCount = 0;\n\n var drawEdge = function drawEdge(elem, path, relation, conf) {\n var getRelationType = function getRelationType(type) {\n switch (type) {\n case _classDb__WEBPACK_IMPORTED_MODULE_1__[\"relationType\"].AGGREGATION:\n return 'aggregation';\n\n case _classDb__WEBPACK_IMPORTED_MODULE_1__[\"relationType\"].EXTENSION:\n return 'extension';\n\n case _classDb__WEBPACK_IMPORTED_MODULE_1__[\"relationType\"].COMPOSITION:\n return 'composition';\n\n case _classDb__WEBPACK_IMPORTED_MODULE_1__[\"relationType\"].DEPENDENCY:\n return 'dependency';\n }\n };\n\n path.points = path.points.filter(function (p) {\n return !Number.isNaN(p.y);\n }); // The data for our line\n\n var lineData = path.points; // This is the accessor function we talked about above\n\n var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"line\"])().x(function (d) {\n return d.x;\n }).y(function (d) {\n return d.y;\n }).curve(d3__WEBPACK_IMPORTED_MODULE_0__[\"curveBasis\"]);\n var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'relation');\n var url = '';\n\n if (conf.arrowMarkerAbsolute) {\n url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n if (relation.relation.lineType == 1) {\n svgPath.attr('class', 'relation dashed-line');\n }\n\n if (relation.relation.type1 !== 'none') {\n svgPath.attr('marker-start', 'url(' + url + '#' + getRelationType(relation.relation.type1) + 'Start' + ')');\n }\n\n if (relation.relation.type2 !== 'none') {\n svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(relation.relation.type2) + 'End' + ')');\n }\n\n var x, y;\n var l = path.points.length; // Calculate Label position\n\n var labelPosition = _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].calcLabelPosition(path.points);\n\n x = labelPosition.x;\n y = labelPosition.y;\n var p1_card_x, p1_card_y;\n var p2_card_x, p2_card_y;\n\n if (l % 2 !== 0 && l > 1) {\n var cardinality_1_point = _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].calcCardinalityPosition(relation.relation.type1 !== 'none', path.points, path.points[0]);\n\n var cardinality_2_point = _utils__WEBPACK_IMPORTED_MODULE_2__[\"default\"].calcCardinalityPosition(relation.relation.type2 !== 'none', path.points, path.points[l - 1]);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('cardinality_1_point ' + JSON.stringify(cardinality_1_point));\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('cardinality_2_point ' + JSON.stringify(cardinality_2_point));\n\n p1_card_x = cardinality_1_point.x;\n p1_card_y = cardinality_1_point.y;\n p2_card_x = cardinality_2_point.x;\n p2_card_y = cardinality_2_point.y;\n }\n\n if (typeof relation.title !== 'undefined') {\n var g = elem.append('g').attr('class', 'classLabel');\n var label = g.append('text').attr('class', 'label').attr('x', x).attr('y', y).attr('fill', 'red').attr('text-anchor', 'middle').text(relation.title);\n window.label = label;\n var bounds = label.node().getBBox();\n g.insert('rect', ':first-child').attr('class', 'box').attr('x', bounds.x - conf.padding / 2).attr('y', bounds.y - conf.padding / 2).attr('width', bounds.width + conf.padding).attr('height', bounds.height + conf.padding);\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Rendering relation ' + JSON.stringify(relation));\n\n if (typeof relation.relationTitle1 !== 'undefined' && relation.relationTitle1 !== 'none') {\n var _g = elem.append('g').attr('class', 'cardinality');\n\n _g.append('text').attr('class', 'type1').attr('x', p1_card_x).attr('y', p1_card_y).attr('fill', 'black').attr('font-size', '6').text(relation.relationTitle1);\n }\n\n if (typeof relation.relationTitle2 !== 'undefined' && relation.relationTitle2 !== 'none') {\n var _g2 = elem.append('g').attr('class', 'cardinality');\n\n _g2.append('text').attr('class', 'type2').attr('x', p2_card_x).attr('y', p2_card_y).attr('fill', 'black').attr('font-size', '6').text(relation.relationTitle2);\n }\n\n edgeCount++;\n };\n\n var drawClass = function drawClass(elem, classDef, conf) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('Rendering class ' + classDef);\n\n var id = classDef.id;\n var classInfo = {\n id: id,\n label: classDef.id,\n width: 0,\n height: 0\n }; // add class group\n\n var g = elem.append('g').attr('id', Object(_classDb__WEBPACK_IMPORTED_MODULE_1__[\"lookUpDomId\"])(id)).attr('class', 'classGroup'); // add title\n\n var title;\n\n if (classDef.link) {\n title = g.append('svg:a').attr('xlink:href', classDef.link).attr('target', classDef.linkTarget).append('text').attr('y', conf.textHeight + conf.padding).attr('x', 0);\n } else {\n title = g.append('text').attr('y', conf.textHeight + conf.padding).attr('x', 0);\n } // add annotations\n\n\n var isFirst = true;\n classDef.annotations.forEach(function (member) {\n var titleText2 = title.append('tspan').text('«' + member + '»');\n if (!isFirst) titleText2.attr('dy', conf.textHeight);\n isFirst = false;\n });\n var classTitleString = classDef.id;\n\n if (classDef.type !== undefined && classDef.type !== '') {\n classTitleString += '<' + classDef.type + '>';\n }\n\n var classTitle = title.append('tspan').text(classTitleString).attr('class', 'title'); // If class has annotations the title needs to have an offset of the text height\n\n if (!isFirst) classTitle.attr('dy', conf.textHeight);\n var titleHeight = title.node().getBBox().height;\n var membersLine = g.append('line') // text label for the x axis\n .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2).attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2);\n var members = g.append('text') // text label for the x axis\n .attr('x', conf.padding).attr('y', titleHeight + conf.dividerMargin + conf.textHeight).attr('fill', 'white').attr('class', 'classText');\n isFirst = true;\n classDef.members.forEach(function (member) {\n addTspan(members, member, isFirst, conf);\n isFirst = false;\n });\n var membersBox = members.node().getBBox();\n var methodsLine = g.append('line') // text label for the x axis\n .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height);\n var methods = g.append('text') // text label for the x axis\n .attr('x', conf.padding).attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr('fill', 'white').attr('class', 'classText');\n isFirst = true;\n classDef.methods.forEach(function (method) {\n addTspan(methods, method, isFirst, conf);\n isFirst = false;\n });\n var classBox = g.node().getBBox();\n var cssClassStr = ' ';\n\n if (classDef.cssClasses.length > 0) {\n cssClassStr = cssClassStr + classDef.cssClasses.join(' ');\n }\n\n var rect = g.insert('rect', ':first-child').attr('x', 0).attr('y', 0).attr('width', classBox.width + 2 * conf.padding).attr('height', classBox.height + conf.padding + 0.5 * conf.dividerMargin).attr('class', cssClassStr);\n var rectWidth = rect.node().getBBox().width; // Center title\n // We subtract the width of each text element from the class box width and divide it by 2\n\n title.node().childNodes.forEach(function (x) {\n x.setAttribute('x', (rectWidth - x.getBBox().width) / 2);\n });\n\n if (classDef.tooltip) {\n title.insert('title').text(classDef.tooltip);\n }\n\n membersLine.attr('x2', rectWidth);\n methodsLine.attr('x2', rectWidth);\n classInfo.width = rectWidth;\n classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;\n return classInfo;\n };\n\n var parseMember = function parseMember(text) {\n var fieldRegEx = /(\\+|-|~|#)?(\\w+)(~\\w+~|\\[\\])?\\s+(\\w+)/;\n var methodRegEx = /^([+|\\-|~|#])?(\\w+) *\\( *(.*)\\) *(\\*|\\$)? *(\\w*[~|[\\]]*\\s*\\w*~?)$/;\n var fieldMatch = text.match(fieldRegEx);\n var methodMatch = text.match(methodRegEx);\n\n if (fieldMatch && !methodMatch) {\n return buildFieldDisplay(fieldMatch);\n } else if (methodMatch) {\n return buildMethodDisplay(methodMatch);\n } else {\n return buildLegacyDisplay(text);\n }\n };\n\n var buildFieldDisplay = function buildFieldDisplay(parsedText) {\n var displayText = '';\n\n try {\n var visibility = parsedText[1] ? parsedText[1].trim() : '';\n var fieldType = parsedText[2] ? parsedText[2].trim() : '';\n var genericType = parsedText[3] ? parseGenericTypes(parsedText[3].trim()) : '';\n var fieldName = parsedText[4] ? parsedText[4].trim() : '';\n displayText = visibility + fieldType + genericType + ' ' + fieldName;\n } catch (err) {\n displayText = parsedText;\n }\n\n return {\n displayText: displayText,\n cssStyle: ''\n };\n };\n\n var buildMethodDisplay = function buildMethodDisplay(parsedText) {\n var cssStyle = '';\n var displayText = '';\n\n try {\n var visibility = parsedText[1] ? parsedText[1].trim() : '';\n var methodName = parsedText[2] ? parsedText[2].trim() : '';\n var parameters = parsedText[3] ? parseGenericTypes(parsedText[3].trim()) : '';\n var classifier = parsedText[4] ? parsedText[4].trim() : '';\n var returnType = parsedText[5] ? ' : ' + parseGenericTypes(parsedText[5]).trim() : '';\n displayText = visibility + methodName + '(' + parameters + ')' + returnType;\n cssStyle = parseClassifier(classifier);\n } catch (err) {\n displayText = parsedText;\n }\n\n return {\n displayText: displayText,\n cssStyle: cssStyle\n };\n };\n\n var buildLegacyDisplay = function buildLegacyDisplay(text) {\n // if for some reason we dont have any match, use old format to parse text\n var displayText = '';\n var cssStyle = '';\n var memberText = '';\n var returnType = '';\n var methodStart = text.indexOf('(');\n var methodEnd = text.indexOf(')');\n\n if (methodStart > 1 && methodEnd > methodStart && methodEnd <= text.length) {\n var visibility = '';\n var methodName = '';\n var firstChar = text.substring(0, 1);\n\n if (firstChar.match(/\\w/)) {\n methodName = text.substring(0, methodStart).trim();\n } else {\n if (firstChar.match(/\\+|-|~|#/)) {\n visibility = firstChar;\n }\n\n methodName = text.substring(1, methodStart).trim();\n }\n\n var parameters = text.substring(methodStart + 1, methodEnd);\n var classifier = text.substring(methodEnd + 1, 1);\n cssStyle = parseClassifier(classifier);\n displayText = visibility + methodName + '(' + parseGenericTypes(parameters.trim()) + ')';\n\n if (methodEnd < memberText.length) {\n returnType = text.substring(methodEnd + 2).trim();\n\n if (returnType !== '') {\n returnType = ' : ' + parseGenericTypes(returnType);\n }\n }\n } else {\n // finally - if all else fails, just send the text back as written (other than parsing for generic types)\n displayText = parseGenericTypes(text);\n }\n\n return {\n displayText: displayText,\n cssStyle: cssStyle\n };\n };\n\n var addTspan = function addTspan(textEl, txt, isFirst, conf) {\n var member = parseMember(txt);\n var tSpan = textEl.append('tspan').attr('x', conf.padding).text(member.displayText);\n\n if (member.cssStyle !== '') {\n tSpan.attr('style', member.cssStyle);\n }\n\n if (!isFirst) {\n tSpan.attr('dy', conf.textHeight);\n }\n };\n\n var parseGenericTypes = function parseGenericTypes(text) {\n var cleanedText = text;\n\n if (text.indexOf('~') != -1) {\n cleanedText = cleanedText.replace('~', '<');\n cleanedText = cleanedText.replace('~', '>');\n return parseGenericTypes(cleanedText);\n } else {\n return cleanedText;\n }\n };\n\n var parseClassifier = function parseClassifier(classifier) {\n switch (classifier) {\n case '*':\n return 'font-style:italic;';\n\n case '$':\n return 'text-decoration:underline;';\n\n default:\n return '';\n }\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n drawClass: drawClass,\n drawEdge: drawEdge,\n parseMember: parseMember\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/common/common.js\":\n /*!***************************************!*\\\n !*** ./src/diagrams/common/common.js ***!\n \\***************************************/\n\n /*! exports provided: getRows, removeScript, sanitizeText, lineBreakRegex, hasBreaks, splitBreaks, default */\n\n /***/\n function srcDiagramsCommonCommonJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getRows\", function () {\n return getRows;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"removeScript\", function () {\n return removeScript;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"sanitizeText\", function () {\n return sanitizeText;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"lineBreakRegex\", function () {\n return lineBreakRegex;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"hasBreaks\", function () {\n return hasBreaks;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"splitBreaks\", function () {\n return splitBreaks;\n });\n\n var getRows = function getRows(s) {\n if (!s) return 1;\n var str = breakToPlaceholder(s);\n str = str.replace(/\\\\n/g, '#br#');\n return str.split('#br#');\n };\n\n var removeScript = function removeScript(txt) {\n var rs = '';\n var idx = 0;\n\n while (idx >= 0) {\n idx = txt.indexOf('');\n\n if (idx >= 0) {\n idx += 9;\n txt = txt.substr(idx);\n }\n } else {\n rs += txt;\n idx = -1;\n break;\n }\n }\n\n return rs;\n };\n\n var sanitizeText = function sanitizeText(text, config) {\n var txt = text;\n var htmlLabels = true;\n\n if (config.flowchart && (config.flowchart.htmlLabels === false || config.flowchart.htmlLabels === 'false')) {\n htmlLabels = false;\n }\n\n if (htmlLabels) {\n var level = config.securityLevel;\n\n if (level === 'antiscript') {\n txt = removeScript(txt);\n } else if (level !== 'loose') {\n // eslint-disable-line\n txt = breakToPlaceholder(txt);\n txt = txt.replace(//g, '>');\n txt = txt.replace(/=/g, '=');\n txt = placeholderToBreak(txt);\n }\n }\n\n return txt;\n };\n\n var lineBreakRegex = /
/gi;\n\n var hasBreaks = function hasBreaks(text) {\n return /
/gi.test(text);\n };\n\n var splitBreaks = function splitBreaks(text) {\n return text.split(/
/gi);\n };\n\n var breakToPlaceholder = function breakToPlaceholder(s) {\n return s.replace(lineBreakRegex, '#br#');\n };\n\n var placeholderToBreak = function placeholderToBreak(s) {\n return s.replace(/#br#/g, '
');\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n getRows: getRows,\n sanitizeText: sanitizeText,\n hasBreaks: hasBreaks,\n splitBreaks: splitBreaks,\n lineBreakRegex: lineBreakRegex,\n removeScript: removeScript\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/er/erDb.js\":\n /*!*********************************!*\\\n !*** ./src/diagrams/er/erDb.js ***!\n \\*********************************/\n\n /*! exports provided: parseDirective, default */\n\n /***/\n function srcDiagramsErErDbJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"parseDirective\", function () {\n return parseDirective;\n });\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ../../mermaidAPI */\n \"./src/mermaidAPI.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /**\n *\n */\n\n\n var entities = {};\n var relationships = [];\n var title = '';\n var Cardinality = {\n ZERO_OR_ONE: 'ZERO_OR_ONE',\n ZERO_OR_MORE: 'ZERO_OR_MORE',\n ONE_OR_MORE: 'ONE_OR_MORE',\n ONLY_ONE: 'ONLY_ONE'\n };\n var Identification = {\n NON_IDENTIFYING: 'NON_IDENTIFYING',\n IDENTIFYING: 'IDENTIFYING'\n };\n\n var parseDirective = function parseDirective(statement, context, type) {\n _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"].parseDirective(this, statement, context, type);\n };\n\n var addEntity = function addEntity(name) {\n if (typeof entities[name] === 'undefined') {\n entities[name] = {\n attributes: []\n };\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Added new entity :', name);\n }\n\n return entities[name];\n };\n\n var getEntities = function getEntities() {\n return entities;\n };\n\n var addAttributes = function addAttributes(entityName, attribs) {\n var entity = addEntity(entityName); // May do nothing (if entity has already been added)\n // Process attribs in reverse order due to effect of recursive construction (last attribute is first)\n\n var i;\n\n for (i = attribs.length - 1; i >= 0; i--) {\n entity.attributes.push(attribs[i]);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Added attribute ', attribs[i].attributeName);\n }\n };\n /**\n * Add a relationship\n * @param entA The first entity in the relationship\n * @param rolA The role played by the first entity in relation to the second\n * @param entB The second entity in the relationship\n * @param rSpec The details of the relationship between the two entities\n */\n\n\n var addRelationship = function addRelationship(entA, rolA, entB, rSpec) {\n var rel = {\n entityA: entA,\n roleA: rolA,\n entityB: entB,\n relSpec: rSpec\n };\n relationships.push(rel);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Added new relationship :', rel);\n };\n\n var getRelationships = function getRelationships() {\n return relationships;\n }; // Keep this - TODO: revisit...allow the diagram to have a title\n\n\n var setTitle = function setTitle(txt) {\n title = txt;\n };\n\n var getTitle = function getTitle() {\n return title;\n };\n\n var clear = function clear() {\n entities = {};\n relationships = [];\n title = '';\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n Cardinality: Cardinality,\n Identification: Identification,\n parseDirective: parseDirective,\n getConfig: function getConfig() {\n return _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]().er;\n },\n addEntity: addEntity,\n addAttributes: addAttributes,\n getEntities: getEntities,\n addRelationship: addRelationship,\n getRelationships: getRelationships,\n clear: clear,\n setTitle: setTitle,\n getTitle: getTitle\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/er/erMarkers.js\":\n /*!**************************************!*\\\n !*** ./src/diagrams/er/erMarkers.js ***!\n \\**************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDiagramsErErMarkersJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n\n var ERMarkers = {\n ONLY_ONE_START: 'ONLY_ONE_START',\n ONLY_ONE_END: 'ONLY_ONE_END',\n ZERO_OR_ONE_START: 'ZERO_OR_ONE_START',\n ZERO_OR_ONE_END: 'ZERO_OR_ONE_END',\n ONE_OR_MORE_START: 'ONE_OR_MORE_START',\n ONE_OR_MORE_END: 'ONE_OR_MORE_END',\n ZERO_OR_MORE_START: 'ZERO_OR_MORE_START',\n ZERO_OR_MORE_END: 'ZERO_OR_MORE_END'\n };\n /**\n * Put the markers into the svg DOM for later use with edge paths\n */\n\n var insertMarkers = function insertMarkers(elem, conf) {\n var marker;\n elem.append('defs').append('marker').attr('id', ERMarkers.ONLY_ONE_START).attr('refX', 0).attr('refY', 9).attr('markerWidth', 18).attr('markerHeight', 18).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M9,0 L9,18 M15,0 L15,18');\n elem.append('defs').append('marker').attr('id', ERMarkers.ONLY_ONE_END).attr('refX', 18).attr('refY', 9).attr('markerWidth', 18).attr('markerHeight', 18).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M3,0 L3,18 M9,0 L9,18');\n marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_ONE_START).attr('refX', 0).attr('refY', 9).attr('markerWidth', 30).attr('markerHeight', 18).attr('orient', 'auto');\n marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 21).attr('cy', 9).attr('r', 6);\n marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M9,0 L9,18');\n marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_ONE_END).attr('refX', 30).attr('refY', 9).attr('markerWidth', 30).attr('markerHeight', 18).attr('orient', 'auto');\n marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 9).attr('cy', 9).attr('r', 6);\n marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M21,0 L21,18');\n elem.append('defs').append('marker').attr('id', ERMarkers.ONE_OR_MORE_START).attr('refX', 18).attr('refY', 18).attr('markerWidth', 45).attr('markerHeight', 36).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27');\n elem.append('defs').append('marker').attr('id', ERMarkers.ONE_OR_MORE_END).attr('refX', 27).attr('refY', 18).attr('markerWidth', 45).attr('markerHeight', 36).attr('orient', 'auto').append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18');\n marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_MORE_START).attr('refX', 18).attr('refY', 18).attr('markerWidth', 57).attr('markerHeight', 36).attr('orient', 'auto');\n marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 48).attr('cy', 18).attr('r', 6);\n marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M0,18 Q18,0 36,18 Q18,36 0,18');\n marker = elem.append('defs').append('marker').attr('id', ERMarkers.ZERO_OR_MORE_END).attr('refX', 39).attr('refY', 18).attr('markerWidth', 57).attr('markerHeight', 36).attr('orient', 'auto');\n marker.append('circle').attr('stroke', conf.stroke).attr('fill', 'white').attr('cx', 9).attr('cy', 18).attr('r', 6);\n marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M21,18 Q39,0 57,18 Q39,36 21,18');\n return;\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n ERMarkers: ERMarkers,\n insertMarkers: insertMarkers\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/er/erRenderer.js\":\n /*!***************************************!*\\\n !*** ./src/diagrams/er/erRenderer.js ***!\n \\***************************************/\n\n /*! exports provided: setConf, draw, default */\n\n /***/\n function srcDiagramsErErRendererJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! graphlib */\n \"graphlib\");\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__);\n /* harmony import */\n\n\n var _erDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./erDb */\n \"./src/diagrams/er/erDb.js\");\n /* harmony import */\n\n\n var _parser_erDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./parser/erDiagram */\n \"./src/diagrams/er/parser/erDiagram.jison\");\n /* harmony import */\n\n\n var _parser_erDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_erDiagram__WEBPACK_IMPORTED_MODULE_3__);\n /* harmony import */\n\n\n var dagre__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! dagre */\n \"dagre\");\n /* harmony import */\n\n\n var dagre__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_4__);\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _erMarkers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\n /*! ./erMarkers */\n \"./src/diagrams/er/erMarkers.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n\n var conf = {};\n /**\n * Allows the top-level API module to inject config specific to this renderer,\n * storing it in the local conf object. Note that generic config still needs to be\n * retrieved using getConfig() imported from the config module\n */\n\n var setConf = function setConf(cnf) {\n var keys = Object.keys(cnf);\n\n for (var i = 0; i < keys.length; i++) {\n conf[keys[i]] = cnf[keys[i]];\n }\n };\n /**\n * Draw attributes for an entity\n * @param groupNode the svg group node for the entity\n * @param entityTextNode the svg node for the entity label text\n * @param attributes an array of attributes defined for the entity (each attribute has a type and a name)\n * @return the bounding box of the entity, after attributes have been added\n */\n\n\n var drawAttributes = function drawAttributes(groupNode, entityTextNode, attributes) {\n var heightPadding = conf.entityPadding / 3; // Padding internal to attribute boxes\n\n var widthPadding = conf.entityPadding / 3; // Ditto\n\n var attrFontSize = conf.fontSize * 0.85;\n var labelBBox = entityTextNode.node().getBBox();\n var attributeNodes = []; // Intermediate storage for attribute nodes created so that we can do a second pass\n\n var maxTypeWidth = 0;\n var maxNameWidth = 0;\n var cumulativeHeight = labelBBox.height + heightPadding * 2;\n var attrNum = 1;\n attributes.forEach(function (item) {\n var attrPrefix = \"\".concat(entityTextNode.node().id, \"-attr-\").concat(attrNum); // Add a text node for the attribute type\n\n var typeNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', \"\".concat(attrPrefix, \"-type\")).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'left').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().fontFamily + '; font-size: ' + attrFontSize + 'px').text(item.attributeType); // Add a text node for the attribute name\n\n var nameNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', \"\".concat(attrPrefix, \"-name\")).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'left').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().fontFamily + '; font-size: ' + attrFontSize + 'px').text(item.attributeName); // Keep a reference to the nodes so that we can iterate through them later\n\n attributeNodes.push({\n tn: typeNode,\n nn: nameNode\n });\n var typeBBox = typeNode.node().getBBox();\n var nameBBox = nameNode.node().getBBox();\n maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width);\n maxNameWidth = Math.max(maxNameWidth, nameBBox.width);\n cumulativeHeight += Math.max(typeBBox.height, nameBBox.height) + heightPadding * 2;\n attrNum += 1;\n }); // Calculate the new bounding box of the overall entity, now that attributes have been added\n\n var bBox = {\n width: Math.max(conf.minEntityWidth, Math.max(labelBBox.width + conf.entityPadding * 2, maxTypeWidth + maxNameWidth + widthPadding * 4)),\n height: attributes.length > 0 ? cumulativeHeight : Math.max(conf.minEntityHeight, labelBBox.height + conf.entityPadding * 2)\n }; // There might be some spare width for padding out attributes if the entity name is very long\n\n var spareWidth = Math.max(0, bBox.width - (maxTypeWidth + maxNameWidth) - widthPadding * 4);\n\n if (attributes.length > 0) {\n // Position the entity label near the top of the entity bounding box\n entityTextNode.attr('transform', 'translate(' + bBox.width / 2 + ',' + (heightPadding + labelBBox.height / 2) + ')'); // Add rectangular boxes for the attribute types/names\n\n var heightOffset = labelBBox.height + heightPadding * 2; // Start at the bottom of the entity label\n\n var attribStyle = 'attributeBoxOdd'; // We will flip the style on alternate rows to achieve a banded effect\n\n attributeNodes.forEach(function (nodePair) {\n // Calculate the alignment y co-ordinate for the type/name of the attribute\n var alignY = heightOffset + heightPadding + Math.max(nodePair.tn.node().getBBox().height, nodePair.nn.node().getBBox().height) / 2; // Position the type of the attribute\n\n nodePair.tn.attr('transform', 'translate(' + widthPadding + ',' + alignY + ')'); // Insert a rectangle for the type\n\n var typeRect = groupNode.insert('rect', '#' + nodePair.tn.node().id).attr('class', \"er \".concat(attribStyle)).attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', 0).attr('y', heightOffset).attr('width', maxTypeWidth + widthPadding * 2 + spareWidth / 2).attr('height', nodePair.tn.node().getBBox().height + heightPadding * 2); // Position the name of the attribute\n\n nodePair.nn.attr('transform', 'translate(' + (parseFloat(typeRect.attr('width')) + widthPadding) + ',' + alignY + ')'); // Insert a rectangle for the name\n\n groupNode.insert('rect', '#' + nodePair.nn.node().id).attr('class', \"er \".concat(attribStyle)).attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', \"\".concat(typeRect.attr('x') + typeRect.attr('width'))) //.attr('x', maxTypeWidth + (widthPadding * 2))\n .attr('y', heightOffset).attr('width', maxNameWidth + widthPadding * 2 + spareWidth / 2).attr('height', nodePair.nn.node().getBBox().height + heightPadding * 2); // Increment the height offset to move to the next row\n\n heightOffset += Math.max(nodePair.tn.node().getBBox().height, nodePair.nn.node().getBBox().height) + heightPadding * 2; // Flip the attribute style for row banding\n\n attribStyle = attribStyle == 'attributeBoxOdd' ? 'attributeBoxEven' : 'attributeBoxOdd';\n });\n } else {\n // Ensure the entity box is a decent size without any attributes\n bBox.height = Math.max(conf.minEntityHeight, cumulativeHeight); // Position the entity label in the middle of the box\n\n entityTextNode.attr('transform', 'translate(' + bBox.width / 2 + ',' + bBox.height / 2 + ')');\n }\n\n return bBox;\n };\n /**\n * Use D3 to construct the svg elements for the entities\n * @param svgNode the svg node that contains the diagram\n * @param entities The entities to be drawn\n * @param graph The graph that contains the vertex and edge definitions post-layout\n * @return The first entity that was inserted\n */\n\n\n var drawEntities = function drawEntities(svgNode, entities, graph) {\n var keys = Object.keys(entities);\n var firstOne;\n keys.forEach(function (id) {\n // Create a group for each entity\n var groupNode = svgNode.append('g').attr('id', id);\n firstOne = firstOne === undefined ? id : firstOne; // Label the entity - this is done first so that we can get the bounding box\n // which then determines the size of the rectangle\n\n var textId = 'entity-' + id;\n var textNode = groupNode.append('text').attr('class', 'er entityLabel').attr('id', textId).attr('x', 0).attr('y', 0).attr('dominant-baseline', 'middle').attr('text-anchor', 'middle').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().fontFamily + '; font-size: ' + conf.fontSize + 'px').text(id);\n\n var _drawAttributes = drawAttributes(groupNode, textNode, entities[id].attributes),\n entityWidth = _drawAttributes.width,\n entityHeight = _drawAttributes.height; // Draw the rectangle - insert it before the text so that the text is not obscured\n\n\n var rectNode = groupNode.insert('rect', '#' + textId).attr('class', 'er entityBox').attr('fill', conf.fill).attr('fill-opacity', '100%').attr('stroke', conf.stroke).attr('x', 0).attr('y', 0).attr('width', entityWidth).attr('height', entityHeight);\n var rectBBox = rectNode.node().getBBox(); // Add the entity to the graph\n\n graph.setNode(id, {\n width: rectBBox.width,\n height: rectBBox.height,\n shape: 'rect',\n id: id\n });\n });\n return firstOne;\n }; // drawEntities\n\n\n var adjustEntities = function adjustEntities(svgNode, graph) {\n graph.nodes().forEach(function (v) {\n if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') {\n svgNode.select('#' + v).attr('transform', 'translate(' + (graph.node(v).x - graph.node(v).width / 2) + ',' + (graph.node(v).y - graph.node(v).height / 2) + ' )');\n }\n });\n return;\n };\n\n var getEdgeName = function getEdgeName(rel) {\n return (rel.entityA + rel.roleA + rel.entityB).replace(/\\s/g, '');\n };\n /**\n * Add each relationship to the graph\n * @param relationships the relationships to be added\n * @param g the graph\n * @return {Array} The array of relationships\n */\n\n\n var addRelationships = function addRelationships(relationships, g) {\n relationships.forEach(function (r) {\n g.setEdge(r.entityA, r.entityB, {\n relationship: r\n }, getEdgeName(r));\n });\n return relationships;\n }; // addRelationships\n\n\n var relCnt = 0;\n /**\n * Draw a relationship using edge information from the graph\n * @param svg the svg node\n * @param rel the relationship to draw in the svg\n * @param g the graph containing the edge information\n * @param insert the insertion point in the svg DOM (because relationships have markers that need to sit 'behind' opaque entity boxes)\n */\n\n var drawRelationshipFromLayout = function drawRelationshipFromLayout(svg, rel, g, insert) {\n relCnt++; // Find the edge relating to this relationship\n\n var edge = g.edge(rel.entityA, rel.entityB, getEdgeName(rel)); // Get a function that will generate the line path\n\n var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"line\"])().x(function (d) {\n return d.x;\n }).y(function (d) {\n return d.y;\n }).curve(d3__WEBPACK_IMPORTED_MODULE_1__[\"curveBasis\"]); // Insert the line at the right place\n\n var svgPath = svg.insert('path', '#' + insert).attr('class', 'er relationshipLine').attr('d', lineFunction(edge.points)).attr('stroke', conf.stroke).attr('fill', 'none'); // ...and with dashes if necessary\n\n if (rel.relSpec.relType === _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Identification.NON_IDENTIFYING) {\n svgPath.attr('stroke-dasharray', '8,8');\n } // TODO: Understand this better\n\n\n var url = '';\n\n if (conf.arrowMarkerAbsolute) {\n url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n } // Decide which start and end markers it needs. It may be possible to be more concise here\n // by reversing a start marker to make an end marker...but this will do for now\n // Note that the 'A' entity's marker is at the end of the relationship and the 'B' entity's marker is at the start\n\n\n switch (rel.relSpec.cardA) {\n case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ZERO_OR_ONE:\n svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ZERO_OR_ONE_END + ')');\n break;\n\n case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ZERO_OR_MORE:\n svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ZERO_OR_MORE_END + ')');\n break;\n\n case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ONE_OR_MORE:\n svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ONE_OR_MORE_END + ')');\n break;\n\n case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ONLY_ONE:\n svgPath.attr('marker-end', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ONLY_ONE_END + ')');\n break;\n }\n\n switch (rel.relSpec.cardB) {\n case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ZERO_OR_ONE:\n svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ZERO_OR_ONE_START + ')');\n break;\n\n case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ZERO_OR_MORE:\n svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ZERO_OR_MORE_START + ')');\n break;\n\n case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ONE_OR_MORE:\n svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ONE_OR_MORE_START + ')');\n break;\n\n case _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Cardinality.ONLY_ONE:\n svgPath.attr('marker-start', 'url(' + url + '#' + _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERMarkers.ONLY_ONE_START + ')');\n break;\n } // Now label the relationship\n // Find the half-way point\n\n\n var len = svgPath.node().getTotalLength();\n var labelPoint = svgPath.node().getPointAtLength(len * 0.5); // Append a text node containing the label\n\n var labelId = 'rel' + relCnt;\n var labelNode = svg.append('text').attr('class', 'er relationshipLabel').attr('id', labelId).attr('x', labelPoint.x).attr('y', labelPoint.y).attr('text-anchor', 'middle').attr('dominant-baseline', 'middle').attr('style', 'font-family: ' + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().fontFamily + '; font-size: ' + conf.fontSize + 'px').text(rel.roleA); // Figure out how big the opaque 'container' rectangle needs to be\n\n var labelBBox = labelNode.node().getBBox(); // Insert the opaque rectangle before the text label\n\n svg.insert('rect', '#' + labelId).attr('class', 'er relationshipLabelBox').attr('x', labelPoint.x - labelBBox.width / 2).attr('y', labelPoint.y - labelBBox.height / 2).attr('width', labelBBox.width).attr('height', labelBBox.height).attr('fill', 'white').attr('fill-opacity', '85%');\n return;\n };\n /**\n * Draw en E-R diagram in the tag with id: id based on the text definition of the diagram\n * @param text the text of the diagram\n * @param id the unique id of the DOM node that contains the diagram\n */\n\n\n var draw = function draw(text, id) {\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info('Drawing ER diagram');\n\n _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n\n var parser = _parser_erDiagram__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n parser.yy = _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; // Parse the text to populate erDb\n\n try {\n parser.parse(text);\n } catch (err) {\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].debug('Parsing failed');\n } // Get a reference to the svg node that contains the text\n\n\n var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(\"[id='\".concat(id, \"']\")); // Add cardinality marker definitions to the svg\n\n _erMarkers__WEBPACK_IMPORTED_MODULE_7__[\"default\"].insertMarkers(svg, conf); // Now we have to construct the diagram in a specific way:\n // ---\n // 1. Create all the entities in the svg node at 0,0, but with the correct dimensions (allowing for text content)\n // 2. Make sure they are all added to the graph\n // 3. Add all the edges (relationships) to the graph aswell\n // 4. Let dagre do its magic to layout the graph. This assigns:\n // - the centre co-ordinates for each node, bearing in mind the dimensions and edge relationships\n // - the path co-ordinates for each edge\n // But it has no impact on the svg child nodes - the diagram remains with every entity rooted at 0,0\n // 5. Now assign a transform to each entity in the svg node so that it gets drawn in the correct place, as determined by\n // its centre point, which is obtained from the graph, and it's width and height\n // 6. And finally, create all the edges in the svg node using information from the graph\n // ---\n // Create the graph\n\n\n var g; // TODO: Explore directed vs undirected graphs, and how the layout is affected\n // An E-R diagram could be said to be undirected, but there is merit in setting\n // the direction from parent to child in a one-to-many as this influences graphlib to\n // put the parent above the child (does it?), which is intuitive. Most relationships\n // in ER diagrams are one-to-many.\n\n g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({\n multigraph: true,\n directed: true,\n compound: false\n }).setGraph({\n rankdir: conf.layoutDirection,\n marginx: 20,\n marginy: 20,\n nodesep: 100,\n edgesep: 100,\n ranksep: 100\n }).setDefaultEdgeLabel(function () {\n return {};\n }); // Draw the entities (at 0,0), returning the first svg node that got\n // inserted - this represents the insertion point for relationship paths\n\n var firstEntity = drawEntities(svg, _erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getEntities(), g); // TODO: externalise the addition of entities to the graph - it's a bit 'buried' in the above\n // Add all the relationships to the graph\n\n var relationships = addRelationships(_erDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getRelationships(), g);\n dagre__WEBPACK_IMPORTED_MODULE_4___default.a.layout(g); // Node and edge positions will be updated\n // Adjust the positions of the entities so that they adhere to the layout\n\n adjustEntities(svg, g); // Draw the relationships\n\n relationships.forEach(function (rel) {\n drawRelationshipFromLayout(svg, rel, g, firstEntity);\n });\n var padding = conf.diagramPadding;\n var svgBounds = svg.node().getBBox();\n var width = svgBounds.width + padding * 2;\n var height = svgBounds.height + padding * 2;\n Object(_utils__WEBPACK_IMPORTED_MODULE_8__[\"configureSvgSize\"])(svg, height, width, conf.useMaxWidth);\n svg.attr('viewBox', \"\".concat(svgBounds.x - padding, \" \").concat(svgBounds.y - padding, \" \").concat(width, \" \").concat(height));\n }; // draw\n\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setConf: setConf,\n draw: draw\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/er/parser/erDiagram.jison\":\n /*!************************************************!*\\\n !*** ./src/diagrams/er/parser/erDiagram.jison ***!\n \\************************************************/\n\n /*! no static exports found */\n\n /***/\n function srcDiagramsErParserErDiagramJison(module, exports, __webpack_require__) {\n /* WEBPACK VAR INJECTION */\n (function (process, module) {\n /* parser generated by jison 0.4.18 */\n\n /*\n Returns a Parser object of the following structure:\n \n Parser: {\n yy: {}\n }\n \n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n \n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n \n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n \n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n \n \n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n \n \n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n */\n var parser = function () {\n var o = function o(k, v, _o2, l) {\n for (_o2 = _o2 || {}, l = k.length; l--; _o2[k[l]] = v) {\n ;\n }\n\n return _o2;\n },\n $V0 = [1, 2],\n $V1 = [1, 5],\n $V2 = [6, 9, 11, 23, 37],\n $V3 = [1, 17],\n $V4 = [1, 20],\n $V5 = [1, 25],\n $V6 = [1, 26],\n $V7 = [1, 27],\n $V8 = [1, 28],\n $V9 = [1, 37],\n $Va = [23, 34, 35],\n $Vb = [4, 6, 9, 11, 23, 37],\n $Vc = [30, 31, 32, 33],\n $Vd = [22, 27];\n\n var parser = {\n trace: function trace() {},\n yy: {},\n symbols_: {\n \"error\": 2,\n \"start\": 3,\n \"ER_DIAGRAM\": 4,\n \"document\": 5,\n \"EOF\": 6,\n \"directive\": 7,\n \"line\": 8,\n \"SPACE\": 9,\n \"statement\": 10,\n \"NEWLINE\": 11,\n \"openDirective\": 12,\n \"typeDirective\": 13,\n \"closeDirective\": 14,\n \":\": 15,\n \"argDirective\": 16,\n \"entityName\": 17,\n \"relSpec\": 18,\n \"role\": 19,\n \"BLOCK_START\": 20,\n \"attributes\": 21,\n \"BLOCK_STOP\": 22,\n \"ALPHANUM\": 23,\n \"attribute\": 24,\n \"attributeType\": 25,\n \"attributeName\": 26,\n \"ATTRIBUTE_WORD\": 27,\n \"cardinality\": 28,\n \"relType\": 29,\n \"ZERO_OR_ONE\": 30,\n \"ZERO_OR_MORE\": 31,\n \"ONE_OR_MORE\": 32,\n \"ONLY_ONE\": 33,\n \"NON_IDENTIFYING\": 34,\n \"IDENTIFYING\": 35,\n \"WORD\": 36,\n \"open_directive\": 37,\n \"type_directive\": 38,\n \"arg_directive\": 39,\n \"close_directive\": 40,\n \"$accept\": 0,\n \"$end\": 1\n },\n terminals_: {\n 2: \"error\",\n 4: \"ER_DIAGRAM\",\n 6: \"EOF\",\n 9: \"SPACE\",\n 11: \"NEWLINE\",\n 15: \":\",\n 20: \"BLOCK_START\",\n 22: \"BLOCK_STOP\",\n 23: \"ALPHANUM\",\n 27: \"ATTRIBUTE_WORD\",\n 30: \"ZERO_OR_ONE\",\n 31: \"ZERO_OR_MORE\",\n 32: \"ONE_OR_MORE\",\n 33: \"ONLY_ONE\",\n 34: \"NON_IDENTIFYING\",\n 35: \"IDENTIFYING\",\n 36: \"WORD\",\n 37: \"open_directive\",\n 38: \"type_directive\",\n 39: \"arg_directive\",\n 40: \"close_directive\"\n },\n productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 5], [10, 4], [10, 3], [10, 1], [17, 1], [21, 1], [21, 2], [24, 2], [25, 1], [26, 1], [18, 3], [28, 1], [28, 1], [28, 1], [28, 1], [29, 1], [29, 1], [19, 1], [19, 1], [12, 1], [13, 1], [16, 1], [14, 1]],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate\n /* action[1] */\n , $$\n /* vstack */\n , _$\n /* lstack */\n ) {\n /* this == yyval */\n var $0 = $$.length - 1;\n\n switch (yystate) {\n case 1:\n /*console.log('finished parsing');*/\n break;\n\n case 3:\n this.$ = [];\n break;\n\n case 4:\n $$[$0 - 1].push($$[$0]);\n this.$ = $$[$0 - 1];\n break;\n\n case 5:\n case 6:\n this.$ = $$[$0];\n break;\n\n case 7:\n case 8:\n this.$ = [];\n break;\n\n case 12:\n yy.addEntity($$[$0 - 4]);\n yy.addEntity($$[$0 - 2]);\n yy.addRelationship($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 3]);\n /*console.log($$[$0-4] + $$[$0-3] + $$[$0-2] + ':' + $$[$0]);*/\n\n break;\n\n case 13:\n /* console.log('detected block'); */\n yy.addEntity($$[$0 - 3]);\n yy.addAttributes($$[$0 - 3], $$[$0 - 1]);\n /* console.log('handled block'); */\n\n break;\n\n case 14:\n yy.addEntity($$[$0 - 2]);\n break;\n\n case 15:\n yy.addEntity($$[$0]);\n break;\n\n case 16:\n this.$ = $$[$0];\n /*console.log('Entity: ' + $$[$0]);*/\n\n break;\n\n case 17:\n this.$ = [$$[$0]];\n break;\n\n case 18:\n $$[$0].push($$[$0 - 1]);\n this.$ = $$[$0];\n break;\n\n case 19:\n this.$ = {\n attributeType: $$[$0 - 1],\n attributeName: $$[$0]\n };\n break;\n\n case 20:\n case 21:\n this.$ = $$[$0];\n break;\n\n case 22:\n this.$ = {\n cardA: $$[$0],\n relType: $$[$0 - 1],\n cardB: $$[$0 - 2]\n };\n /*console.log('relSpec: ' + $$[$0] + $$[$0-1] + $$[$0-2]);*/\n\n break;\n\n case 23:\n this.$ = yy.Cardinality.ZERO_OR_ONE;\n break;\n\n case 24:\n this.$ = yy.Cardinality.ZERO_OR_MORE;\n break;\n\n case 25:\n this.$ = yy.Cardinality.ONE_OR_MORE;\n break;\n\n case 26:\n this.$ = yy.Cardinality.ONLY_ONE;\n break;\n\n case 27:\n this.$ = yy.Identification.NON_IDENTIFYING;\n break;\n\n case 28:\n this.$ = yy.Identification.IDENTIFYING;\n break;\n\n case 29:\n this.$ = $$[$0].replace(/\"/g, '');\n break;\n\n case 30:\n this.$ = $$[$0];\n break;\n\n case 31:\n yy.parseDirective('%%{', 'open_directive');\n break;\n\n case 32:\n yy.parseDirective($$[$0], 'type_directive');\n break;\n\n case 33:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"');\n yy.parseDirective($$[$0], 'arg_directive');\n break;\n\n case 34:\n yy.parseDirective('}%%', 'close_directive', 'er');\n break;\n }\n },\n table: [{\n 3: 1,\n 4: $V0,\n 7: 3,\n 12: 4,\n 37: $V1\n }, {\n 1: [3]\n }, o($V2, [2, 3], {\n 5: 6\n }), {\n 3: 7,\n 4: $V0,\n 7: 3,\n 12: 4,\n 37: $V1\n }, {\n 13: 8,\n 38: [1, 9]\n }, {\n 38: [2, 31]\n }, {\n 6: [1, 10],\n 7: 15,\n 8: 11,\n 9: [1, 12],\n 10: 13,\n 11: [1, 14],\n 12: 4,\n 17: 16,\n 23: $V3,\n 37: $V1\n }, {\n 1: [2, 2]\n }, {\n 14: 18,\n 15: [1, 19],\n 40: $V4\n }, o([15, 40], [2, 32]), o($V2, [2, 8], {\n 1: [2, 1]\n }), o($V2, [2, 4]), {\n 7: 15,\n 10: 21,\n 12: 4,\n 17: 16,\n 23: $V3,\n 37: $V1\n }, o($V2, [2, 6]), o($V2, [2, 7]), o($V2, [2, 11]), o($V2, [2, 15], {\n 18: 22,\n 28: 24,\n 20: [1, 23],\n 30: $V5,\n 31: $V6,\n 32: $V7,\n 33: $V8\n }), o([6, 9, 11, 15, 20, 23, 30, 31, 32, 33, 37], [2, 16]), {\n 11: [1, 29]\n }, {\n 16: 30,\n 39: [1, 31]\n }, {\n 11: [2, 34]\n }, o($V2, [2, 5]), {\n 17: 32,\n 23: $V3\n }, {\n 21: 33,\n 22: [1, 34],\n 24: 35,\n 25: 36,\n 27: $V9\n }, {\n 29: 38,\n 34: [1, 39],\n 35: [1, 40]\n }, o($Va, [2, 23]), o($Va, [2, 24]), o($Va, [2, 25]), o($Va, [2, 26]), o($Vb, [2, 9]), {\n 14: 41,\n 40: $V4\n }, {\n 40: [2, 33]\n }, {\n 15: [1, 42]\n }, {\n 22: [1, 43]\n }, o($V2, [2, 14]), {\n 21: 44,\n 22: [2, 17],\n 24: 35,\n 25: 36,\n 27: $V9\n }, {\n 26: 45,\n 27: [1, 46]\n }, {\n 27: [2, 20]\n }, {\n 28: 47,\n 30: $V5,\n 31: $V6,\n 32: $V7,\n 33: $V8\n }, o($Vc, [2, 27]), o($Vc, [2, 28]), {\n 11: [1, 48]\n }, {\n 19: 49,\n 23: [1, 51],\n 36: [1, 50]\n }, o($V2, [2, 13]), {\n 22: [2, 18]\n }, o($Vd, [2, 19]), o($Vd, [2, 21]), {\n 23: [2, 22]\n }, o($Vb, [2, 10]), o($V2, [2, 12]), o($V2, [2, 29]), o($V2, [2, 30])],\n defaultActions: {\n 5: [2, 31],\n 7: [2, 2],\n 20: [2, 34],\n 31: [2, 33],\n 37: [2, 20],\n 44: [2, 18],\n 47: [2, 22]\n },\n parseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n },\n parse: function parse(input) {\n var self = this,\n stack = [0],\n tstack = [],\n vstack = [null],\n lstack = [],\n table = this.table,\n yytext = '',\n yylineno = 0,\n yyleng = 0,\n recovering = 0,\n TERROR = 2,\n EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = {\n yy: {}\n };\n\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n\n token = self.symbols_[token] || token;\n }\n\n return token;\n }\n\n var symbol,\n preErrorSymbol,\n state,\n action,\n a,\n r,\n yyval = {},\n p,\n len,\n newState,\n expected;\n\n while (true) {\n state = stack[stack.length - 1];\n\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n\n action = table[state] && table[state][symbol];\n }\n\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n\n break;\n\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n\n if (ranges) {\n yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n }\n\n r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));\n\n if (typeof r !== 'undefined') {\n return r;\n }\n\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n\n case 3:\n return true;\n }\n }\n\n return true;\n }\n };\n /* generated by jison-lex 0.3.4 */\n\n var lexer = function () {\n var lexer = {\n EOF: 1,\n parseError: function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n // resets the lexer, sets new input\n setInput: function setInput(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n\n this.offset = 0;\n return this;\n },\n // consumes and returns one char from the input\n input: function input() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n // unshifts one char (or a string) into the input\n unput: function unput(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;\n\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n\n this.yyleng = this.yytext.length;\n return this;\n },\n // When called from action, caches matched text and appends it on next action\n more: function more() {\n this._more = true;\n return this;\n },\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: function reject() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n\n return this;\n },\n // retain first n characters of the match\n less: function less(n) {\n this.unput(this.match.slice(n));\n },\n // displays already matched input, i.e. for error messages\n pastInput: function pastInput() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\\n/g, \"\");\n },\n // displays upcoming input, i.e. for error messages\n upcomingInput: function upcomingInput() {\n var next = this.match;\n\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n\n return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: function showPosition() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: function test_match(match, indexed_rule) {\n var token, lines, backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno += lines.length;\n }\n\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n\n if (this.done && this._input) {\n this.done = false;\n }\n\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n\n return false;\n },\n // return next match in input\n next: function next() {\n if (this.done) {\n return this.EOF;\n }\n\n if (!this._input) {\n this.done = true;\n }\n\n var token, match, tempMatch, index;\n\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n\n var rules = this._currentRules();\n\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n\n if (match) {\n token = this.test_match(match, rules[index]);\n\n if (token !== false) {\n return token;\n } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n\n\n return false;\n }\n\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n // return next match that has a token\n lex: function lex() {\n var r = this.next();\n\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: function begin(condition) {\n this.conditionStack.push(condition);\n },\n // pop the previously active lexer condition state off the condition stack\n popState: function popState() {\n var n = this.conditionStack.length - 1;\n\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n // alias for begin(condition)\n pushState: function pushState(condition) {\n this.begin(condition);\n },\n // return the number of states currently on the stack\n stateStackSize: function stateStackSize() {\n return this.conditionStack.length;\n },\n options: {\n \"case-insensitive\": true\n },\n performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n\n switch ($avoiding_name_collisions) {\n case 0:\n this.begin('open_directive');\n return 37;\n break;\n\n case 1:\n this.begin('type_directive');\n return 38;\n break;\n\n case 2:\n this.popState();\n this.begin('arg_directive');\n return 15;\n break;\n\n case 3:\n this.popState();\n this.popState();\n return 40;\n break;\n\n case 4:\n return 39;\n break;\n\n case 5:\n /* skip comments */\n break;\n\n case 6:\n /* skip comments */\n break;\n\n case 7:\n return 11;\n break;\n\n case 8:\n /* skip whitespace */\n break;\n\n case 9:\n return 9;\n break;\n\n case 10:\n return 36;\n break;\n\n case 11:\n return 4;\n break;\n\n case 12:\n this.begin(\"block\");\n return 20;\n break;\n\n case 13:\n /* skip whitespace in block */\n break;\n\n case 14:\n return 27;\n break;\n\n case 15:\n /* nothing */\n break;\n\n case 16:\n this.popState();\n return 22;\n break;\n\n case 17:\n return yy_.yytext[0];\n break;\n\n case 18:\n return 30;\n break;\n\n case 19:\n return 31;\n break;\n\n case 20:\n return 32;\n break;\n\n case 21:\n return 33;\n break;\n\n case 22:\n return 30;\n break;\n\n case 23:\n return 31;\n break;\n\n case 24:\n return 32;\n break;\n\n case 25:\n return 34;\n break;\n\n case 26:\n return 35;\n break;\n\n case 27:\n return 34;\n break;\n\n case 28:\n return 34;\n break;\n\n case 29:\n return 23;\n break;\n\n case 30:\n return yy_.yytext[0];\n break;\n\n case 31:\n return 6;\n break;\n }\n },\n rules: [/^(?:%%\\{)/i, /^(?:((?:(?!\\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\\}%%)/i, /^(?:((?:(?!\\}%%).|\\n)*))/i, /^(?:%(?!\\{)[^\\n]*)/i, /^(?:[^\\}]%%[^\\n]*)/i, /^(?:[\\n]+)/i, /^(?:\\s+)/i, /^(?:[\\s]+)/i, /^(?:\"[^\"]*\")/i, /^(?:erDiagram\\b)/i, /^(?:\\{)/i, /^(?:\\s+)/i, /^(?:[A-Za-z][A-Za-z0-9\\-_]*)/i, /^(?:[\\n]+)/i, /^(?:\\})/i, /^(?:.)/i, /^(?:\\|o\\b)/i, /^(?:\\}o\\b)/i, /^(?:\\}\\|)/i, /^(?:\\|\\|)/i, /^(?:o\\|)/i, /^(?:o\\{)/i, /^(?:\\|\\{)/i, /^(?:\\.\\.)/i, /^(?:--)/i, /^(?:\\.-)/i, /^(?:-\\.)/i, /^(?:[A-Za-z][A-Za-z0-9\\-_]*)/i, /^(?:.)/i, /^(?:$)/i],\n conditions: {\n \"open_directive\": {\n \"rules\": [1],\n \"inclusive\": false\n },\n \"type_directive\": {\n \"rules\": [2, 3],\n \"inclusive\": false\n },\n \"arg_directive\": {\n \"rules\": [3, 4],\n \"inclusive\": false\n },\n \"block\": {\n \"rules\": [13, 14, 15, 16, 17],\n \"inclusive\": false\n },\n \"INITIAL\": {\n \"rules\": [0, 5, 6, 7, 8, 9, 10, 11, 12, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31],\n \"inclusive\": true\n }\n }\n };\n return lexer;\n }();\n\n parser.lexer = lexer;\n\n function Parser() {\n this.yy = {};\n }\n\n Parser.prototype = parser;\n parser.Parser = Parser;\n return new Parser();\n }();\n\n if (true) {\n exports.parser = parser;\n exports.Parser = parser.Parser;\n\n exports.parse = function () {\n return parser.parse.apply(parser, arguments);\n };\n\n exports.main = function commonjsMain(args) {\n if (!args[1]) {\n console.log('Usage: ' + args[0] + ' FILE');\n process.exit(1);\n }\n\n var source = __webpack_require__(\n /*! fs */\n \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(\n /*! path */\n \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n\n return exports.parser.parse(source);\n };\n\n if (true && __webpack_require__.c[__webpack_require__.s] === module) {\n exports.main(process.argv.slice(1));\n }\n }\n /* WEBPACK VAR INJECTION */\n\n }).call(this, __webpack_require__(\n /*! ./../../../../node_modules/process/browser.js */\n \"./node_modules/process/browser.js\"), __webpack_require__(\n /*! ./../../../../node_modules/webpack/buildin/module.js */\n \"./node_modules/webpack/buildin/module.js\")(module));\n /***/\n },\n\n /***/\n \"./src/diagrams/er/styles.js\":\n /*!***********************************!*\\\n !*** ./src/diagrams/er/styles.js ***!\n \\***********************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDiagramsErStylesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n\n var getStyles = function getStyles(options) {\n return \"\\n .entityBox {\\n fill: \".concat(options.mainBkg, \";\\n stroke: \").concat(options.nodeBorder, \";\\n }\\n\\n .attributeBoxOdd {\\n fill: #ffffff;\\n stroke: \").concat(options.nodeBorder, \";\\n }\\n\\n .attributeBoxEven {\\n fill: #f2f2f2;\\n stroke: \").concat(options.nodeBorder, \";\\n }\\n\\n .relationshipLabelBox {\\n fill: \").concat(options.tertiaryColor, \";\\n opacity: 0.7;\\n background-color: \").concat(options.tertiaryColor, \";\\n rect {\\n opacity: 0.5;\\n }\\n }\\n\\n .relationshipLine {\\n stroke: \").concat(options.lineColor, \";\\n }\\n\");\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = getStyles;\n /***/\n },\n\n /***/\n \"./src/diagrams/flowchart/flowChartShapes.js\":\n /*!***************************************************!*\\\n !*** ./src/diagrams/flowchart/flowChartShapes.js ***!\n \\***************************************************/\n\n /*! exports provided: addToRender, addToRenderV2, default */\n\n /***/\n function srcDiagramsFlowchartFlowChartShapesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addToRender\", function () {\n return addToRender;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addToRenderV2\", function () {\n return addToRenderV2;\n });\n /* harmony import */\n\n\n var dagre_d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! dagre-d3 */\n \"dagre-d3\");\n /* harmony import */\n\n\n var dagre_d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dagre_d3__WEBPACK_IMPORTED_MODULE_0__);\n\n function question(parent, bbox, node) {\n var w = bbox.width;\n var h = bbox.height;\n var s = (w + h) * 0.9;\n var points = [{\n x: s / 2,\n y: 0\n }, {\n x: s,\n y: -s / 2\n }, {\n x: s / 2,\n y: -s\n }, {\n x: 0,\n y: -s / 2\n }];\n var shapeSvg = insertPolygonShape(parent, s, s, points);\n\n node.intersect = function (point) {\n return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n }\n\n function hexagon(parent, bbox, node) {\n var f = 4;\n var h = bbox.height;\n var m = h / f;\n var w = bbox.width + 2 * m;\n var points = [{\n x: m,\n y: 0\n }, {\n x: w - m,\n y: 0\n }, {\n x: w,\n y: -h / 2\n }, {\n x: w - m,\n y: -h\n }, {\n x: m,\n y: -h\n }, {\n x: 0,\n y: -h / 2\n }];\n var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n node.intersect = function (point) {\n return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n }\n\n function rect_left_inv_arrow(parent, bbox, node) {\n var w = bbox.width;\n var h = bbox.height;\n var points = [{\n x: -h / 2,\n y: 0\n }, {\n x: w,\n y: 0\n }, {\n x: w,\n y: -h\n }, {\n x: -h / 2,\n y: -h\n }, {\n x: 0,\n y: -h / 2\n }];\n var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n node.intersect = function (point) {\n return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n }\n\n function lean_right(parent, bbox, node) {\n var w = bbox.width;\n var h = bbox.height;\n var points = [{\n x: -2 * h / 6,\n y: 0\n }, {\n x: w - h / 6,\n y: 0\n }, {\n x: w + 2 * h / 6,\n y: -h\n }, {\n x: h / 6,\n y: -h\n }];\n var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n node.intersect = function (point) {\n return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n }\n\n function lean_left(parent, bbox, node) {\n var w = bbox.width;\n var h = bbox.height;\n var points = [{\n x: 2 * h / 6,\n y: 0\n }, {\n x: w + h / 6,\n y: 0\n }, {\n x: w - 2 * h / 6,\n y: -h\n }, {\n x: -h / 6,\n y: -h\n }];\n var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n node.intersect = function (point) {\n return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n }\n\n function trapezoid(parent, bbox, node) {\n var w = bbox.width;\n var h = bbox.height;\n var points = [{\n x: -2 * h / 6,\n y: 0\n }, {\n x: w + 2 * h / 6,\n y: 0\n }, {\n x: w - h / 6,\n y: -h\n }, {\n x: h / 6,\n y: -h\n }];\n var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n node.intersect = function (point) {\n return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n }\n\n function inv_trapezoid(parent, bbox, node) {\n var w = bbox.width;\n var h = bbox.height;\n var points = [{\n x: h / 6,\n y: 0\n }, {\n x: w - h / 6,\n y: 0\n }, {\n x: w + 2 * h / 6,\n y: -h\n }, {\n x: -2 * h / 6,\n y: -h\n }];\n var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n node.intersect = function (point) {\n return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n }\n\n function rect_right_inv_arrow(parent, bbox, node) {\n var w = bbox.width;\n var h = bbox.height;\n var points = [{\n x: 0,\n y: 0\n }, {\n x: w + h / 2,\n y: 0\n }, {\n x: w,\n y: -h / 2\n }, {\n x: w + h / 2,\n y: -h\n }, {\n x: 0,\n y: -h\n }];\n var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n node.intersect = function (point) {\n return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n }\n\n function stadium(parent, bbox, node) {\n var h = bbox.height;\n var w = bbox.width + h / 4;\n var shapeSvg = parent.insert('rect', ':first-child').attr('rx', h / 2).attr('ry', h / 2).attr('x', -w / 2).attr('y', -h / 2).attr('width', w).attr('height', h);\n\n node.intersect = function (point) {\n return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.rect(node, point);\n };\n\n return shapeSvg;\n }\n\n function subroutine(parent, bbox, node) {\n var w = bbox.width;\n var h = bbox.height;\n var points = [{\n x: 0,\n y: 0\n }, {\n x: w,\n y: 0\n }, {\n x: w,\n y: -h\n }, {\n x: 0,\n y: -h\n }, {\n x: 0,\n y: 0\n }, {\n x: -8,\n y: 0\n }, {\n x: w + 8,\n y: 0\n }, {\n x: w + 8,\n y: -h\n }, {\n x: -8,\n y: -h\n }, {\n x: -8,\n y: 0\n }];\n var shapeSvg = insertPolygonShape(parent, w, h, points);\n\n node.intersect = function (point) {\n return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n }\n\n function cylinder(parent, bbox, node) {\n var w = bbox.width;\n var rx = w / 2;\n var ry = rx / (2.5 + w / 50);\n var h = bbox.height + ry;\n var shape = 'M 0,' + ry + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 a ' + rx + ',' + ry + ' 0,0,0 ' + -w + ' 0 l 0,' + h + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 l 0,' + -h;\n var shapeSvg = parent.attr('label-offset-y', ry).insert('path', ':first-child').attr('d', shape).attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')');\n\n node.intersect = function (point) {\n var pos = dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.rect(node, point);\n var x = pos.x - node.x;\n\n if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {\n // ellipsis equation: x*x / a*a + y*y / b*b = 1\n // solve for y to get adjustion value for pos.y\n var y = ry * ry * (1 - x * x / (rx * rx));\n if (y != 0) y = Math.sqrt(y);\n y = ry - y;\n if (point.y - node.y > 0) y = -y;\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n }\n\n function addToRender(render) {\n render.shapes().question = question;\n render.shapes().hexagon = hexagon;\n render.shapes().stadium = stadium;\n render.shapes().subroutine = subroutine;\n render.shapes().cylinder = cylinder; // Add custom shape for box with inverted arrow on left side\n\n render.shapes().rect_left_inv_arrow = rect_left_inv_arrow; // Add custom shape for box with inverted arrow on left side\n\n render.shapes().lean_right = lean_right; // Add custom shape for box with inverted arrow on left side\n\n render.shapes().lean_left = lean_left; // Add custom shape for box with inverted arrow on left side\n\n render.shapes().trapezoid = trapezoid; // Add custom shape for box with inverted arrow on left side\n\n render.shapes().inv_trapezoid = inv_trapezoid; // Add custom shape for box with inverted arrow on right side\n\n render.shapes().rect_right_inv_arrow = rect_right_inv_arrow;\n }\n\n function addToRenderV2(addShape) {\n addShape({\n question: question\n });\n addShape({\n hexagon: hexagon\n });\n addShape({\n stadium: stadium\n });\n addShape({\n subroutine: subroutine\n });\n addShape({\n cylinder: cylinder\n }); // Add custom shape for box with inverted arrow on left side\n\n addShape({\n rect_left_inv_arrow: rect_left_inv_arrow\n }); // Add custom shape for box with inverted arrow on left side\n\n addShape({\n lean_right: lean_right\n }); // Add custom shape for box with inverted arrow on left side\n\n addShape({\n lean_left: lean_left\n }); // Add custom shape for box with inverted arrow on left side\n\n addShape({\n trapezoid: trapezoid\n }); // Add custom shape for box with inverted arrow on left side\n\n addShape({\n inv_trapezoid: inv_trapezoid\n }); // Add custom shape for box with inverted arrow on right side\n\n addShape({\n rect_right_inv_arrow: rect_right_inv_arrow\n });\n }\n\n function insertPolygonShape(parent, w, h, points) {\n return parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {\n return d.x + ',' + d.y;\n }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n }\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n addToRender: addToRender,\n addToRenderV2: addToRenderV2\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/flowchart/flowDb.js\":\n /*!******************************************!*\\\n !*** ./src/diagrams/flowchart/flowDb.js ***!\n \\******************************************/\n\n /*! exports provided: parseDirective, lookUpDomId, addVertex, addSingleLink, addLink, updateLinkInterpolate, updateLink, addClass, setDirection, setClass, setLink, getTooltip, setClickEvent, bindFunctions, getDirection, getVertices, getEdges, getClasses, clear, setGen, defaultStyle, addSubGraph, getDepthFirstPos, indexNodes, getSubGraphs, firstGraph, default */\n\n /***/\n function srcDiagramsFlowchartFlowDbJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"parseDirective\", function () {\n return parseDirective;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"lookUpDomId\", function () {\n return lookUpDomId;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addVertex\", function () {\n return addVertex;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addSingleLink\", function () {\n return addSingleLink;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addLink\", function () {\n return addLink;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"updateLinkInterpolate\", function () {\n return updateLinkInterpolate;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"updateLink\", function () {\n return updateLink;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addClass\", function () {\n return addClass;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setDirection\", function () {\n return setDirection;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setClass\", function () {\n return setClass;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setLink\", function () {\n return setLink;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getTooltip\", function () {\n return getTooltip;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setClickEvent\", function () {\n return setClickEvent;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"bindFunctions\", function () {\n return bindFunctions;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getDirection\", function () {\n return getDirection;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getVertices\", function () {\n return getVertices;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getEdges\", function () {\n return getEdges;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getClasses\", function () {\n return getClasses;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"clear\", function () {\n return clear;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setGen\", function () {\n return setGen;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"defaultStyle\", function () {\n return defaultStyle;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addSubGraph\", function () {\n return addSubGraph;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getDepthFirstPos\", function () {\n return getDepthFirstPos;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"indexNodes\", function () {\n return indexNodes;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getSubGraphs\", function () {\n return getSubGraphs;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"firstGraph\", function () {\n return firstGraph;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _common_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../common/common */\n \"./src/diagrams/common/common.js\");\n /* harmony import */\n\n\n var _mermaidAPI__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../../mermaidAPI */\n \"./src/mermaidAPI.js\");\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n }\n\n function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }\n\n function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n }\n\n var MERMAID_DOM_ID_PREFIX = 'flowchart-';\n var vertexCounter = 0;\n\n var config = _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]();\n\n var vertices = {};\n var edges = [];\n var classes = [];\n var subGraphs = [];\n var subGraphLookup = {};\n var tooltips = {};\n var subCount = 0;\n var firstGraphFlag = true;\n var direction;\n var version; // As in graph\n // Functions to be run after graph rendering\n\n var funs = [];\n\n var parseDirective = function parseDirective(statement, context, type) {\n _mermaidAPI__WEBPACK_IMPORTED_MODULE_4__[\"default\"].parseDirective(this, statement, context, type);\n };\n /**\n * Function to lookup domId from id in the graph definition.\n * @param id\n * @public\n */\n\n\n var lookUpDomId = function lookUpDomId(id) {\n var veritceKeys = Object.keys(vertices);\n\n for (var i = 0; i < veritceKeys.length; i++) {\n if (vertices[veritceKeys[i]].id === id) {\n return vertices[veritceKeys[i]].domId;\n }\n }\n\n return id;\n };\n /**\n * Function called by parser when a node definition has been found\n * @param id\n * @param text\n * @param type\n * @param style\n * @param classes\n */\n\n\n var addVertex = function addVertex(_id, text, type, style, classes) {\n var txt;\n var id = _id;\n\n if (typeof id === 'undefined') {\n return;\n }\n\n if (id.trim().length === 0) {\n return;\n } // if (id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n\n\n if (typeof vertices[id] === 'undefined') {\n vertices[id] = {\n id: id,\n domId: MERMAID_DOM_ID_PREFIX + id + '-' + vertexCounter,\n styles: [],\n classes: []\n };\n }\n\n vertexCounter++;\n\n if (typeof text !== 'undefined') {\n config = _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]();\n txt = _common_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"].sanitizeText(text.trim(), config); // strip quotes if string starts and ends with a quote\n\n if (txt[0] === '\"' && txt[txt.length - 1] === '\"') {\n txt = txt.substring(1, txt.length - 1);\n }\n\n vertices[id].text = txt;\n } else {\n if (typeof vertices[id].text === 'undefined') {\n vertices[id].text = _id;\n }\n }\n\n if (typeof type !== 'undefined') {\n vertices[id].type = type;\n }\n\n if (typeof style !== 'undefined') {\n if (style !== null) {\n style.forEach(function (s) {\n vertices[id].styles.push(s);\n });\n }\n }\n\n if (typeof classes !== 'undefined') {\n if (classes !== null) {\n classes.forEach(function (s) {\n vertices[id].classes.push(s);\n });\n }\n }\n };\n /**\n * Function called by parser when a link/edge definition has been found\n * @param start\n * @param end\n * @param type\n * @param linktext\n */\n\n\n var addSingleLink = function addSingleLink(_start, _end, type, linktext) {\n var start = _start;\n var end = _end; // if (start[0].match(/\\d/)) start = MERMAID_DOM_ID_PREFIX + start;\n // if (end[0].match(/\\d/)) end = MERMAID_DOM_ID_PREFIX + end;\n // log.info('Got edge...', start, end);\n\n var edge = {\n start: start,\n end: end,\n type: undefined,\n text: ''\n };\n linktext = type.text;\n\n if (typeof linktext !== 'undefined') {\n edge.text = _common_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"].sanitizeText(linktext.trim(), config); // strip quotes if string starts and exnds with a quote\n\n if (edge.text[0] === '\"' && edge.text[edge.text.length - 1] === '\"') {\n edge.text = edge.text.substring(1, edge.text.length - 1);\n }\n }\n\n if (typeof type !== 'undefined') {\n edge.type = type.type;\n edge.stroke = type.stroke;\n edge.length = type.length;\n }\n\n edges.push(edge);\n };\n\n var addLink = function addLink(_start, _end, type, linktext) {\n var i, j;\n\n for (i = 0; i < _start.length; i++) {\n for (j = 0; j < _end.length; j++) {\n addSingleLink(_start[i], _end[j], type, linktext);\n }\n }\n };\n /**\n * Updates a link's line interpolation algorithm\n * @param pos\n * @param interpolate\n */\n\n\n var updateLinkInterpolate = function updateLinkInterpolate(positions, interp) {\n positions.forEach(function (pos) {\n if (pos === 'default') {\n edges.defaultInterpolate = interp;\n } else {\n edges[pos].interpolate = interp;\n }\n });\n };\n /**\n * Updates a link with a style\n * @param pos\n * @param style\n */\n\n\n var updateLink = function updateLink(positions, style) {\n positions.forEach(function (pos) {\n if (pos === 'default') {\n edges.defaultStyle = style;\n } else {\n if (_utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isSubstringInArray('fill', style) === -1) {\n style.push('fill:none');\n }\n\n edges[pos].style = style;\n }\n });\n };\n\n var addClass = function addClass(id, style) {\n if (typeof classes[id] === 'undefined') {\n classes[id] = {\n id: id,\n styles: [],\n textStyles: []\n };\n }\n\n if (typeof style !== 'undefined') {\n if (style !== null) {\n style.forEach(function (s) {\n if (s.match('color')) {\n var newStyle1 = s.replace('fill', 'bgFill');\n var newStyle2 = newStyle1.replace('color', 'fill');\n classes[id].textStyles.push(newStyle2);\n }\n\n classes[id].styles.push(s);\n });\n }\n }\n };\n /**\n * Called by parser when a graph definition is found, stores the direction of the chart.\n * @param dir\n */\n\n\n var setDirection = function setDirection(dir) {\n direction = dir;\n\n if (direction.match(/.*)) {\n direction = 'RL';\n }\n\n if (direction.match(/.*\\^/)) {\n direction = 'BT';\n }\n\n if (direction.match(/.*>/)) {\n direction = 'LR';\n }\n\n if (direction.match(/.*v/)) {\n direction = 'TB';\n }\n };\n /**\n * Called by parser when a special node is found, e.g. a clickable element.\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\n\n\n var setClass = function setClass(ids, className) {\n ids.split(',').forEach(function (_id) {\n // let id = version === 'gen-2' ? lookUpDomId(_id) : _id;\n var id = _id; // if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n\n if (typeof vertices[id] !== 'undefined') {\n vertices[id].classes.push(className);\n }\n\n if (typeof subGraphLookup[id] !== 'undefined') {\n subGraphLookup[id].classes.push(className);\n }\n });\n };\n\n var setTooltip = function setTooltip(ids, tooltip) {\n ids.split(',').forEach(function (id) {\n if (typeof tooltip !== 'undefined') {\n tooltips[version === 'gen-1' ? lookUpDomId(id) : id] = _common_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"].sanitizeText(tooltip, config);\n }\n });\n };\n\n var setClickFun = function setClickFun(id, functionName, functionArgs) {\n var domId = lookUpDomId(id); // if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n\n if (_config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]().securityLevel !== 'loose') {\n return;\n }\n\n if (typeof functionName === 'undefined') {\n return;\n }\n\n var argList = [];\n\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n\n for (var i = 0; i < argList.length; i++) {\n var item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n\n /* This preserves all starting and ending whitespace inside */\n\n if (item.charAt(0) === '\"' && item.charAt(item.length - 1) === '\"') {\n item = item.substr(1, item.length - 2);\n }\n\n argList[i] = item;\n }\n }\n /* if no arguments passed into callback, default to passing in id */\n\n\n if (argList.length === 0) {\n argList.push(id);\n }\n\n if (typeof vertices[id] !== 'undefined') {\n vertices[id].haveCallback = true;\n funs.push(function () {\n var elem = document.querySelector(\"[id=\\\"\".concat(domId, \"\\\"]\"));\n\n if (elem !== null) {\n elem.addEventListener('click', function () {\n _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].runFunc.apply(_utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"], [functionName].concat(_toConsumableArray(argList)));\n }, false);\n }\n });\n }\n };\n /**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n * @param ids Comma separated list of ids\n * @param linkStr URL to create a link for\n */\n\n\n var setLink = function setLink(ids, linkStr, target) {\n ids.split(',').forEach(function (id) {\n if (typeof vertices[id] !== 'undefined') {\n vertices[id].link = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].formatUrl(linkStr, config);\n vertices[id].linkTarget = target;\n }\n });\n setClass(ids, 'clickable');\n };\n\n var getTooltip = function getTooltip(id) {\n return tooltips[id];\n };\n /**\n * Called by parser when a click definition is found. Registers an event handler.\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param tooltip Tooltip for the clickable element\n */\n\n\n var setClickEvent = function setClickEvent(ids, functionName, functionArgs) {\n ids.split(',').forEach(function (id) {\n setClickFun(id, functionName, functionArgs);\n });\n setClass(ids, 'clickable');\n };\n\n var bindFunctions = function bindFunctions(element) {\n funs.forEach(function (fun) {\n fun(element);\n });\n };\n\n var getDirection = function getDirection() {\n return direction.trim();\n };\n /**\n * Retrieval function for fetching the found nodes after parsing has completed.\n * @returns {{}|*|vertices}\n */\n\n\n var getVertices = function getVertices() {\n return vertices;\n };\n /**\n * Retrieval function for fetching the found links after parsing has completed.\n * @returns {{}|*|edges}\n */\n\n\n var getEdges = function getEdges() {\n return edges;\n };\n /**\n * Retrieval function for fetching the found class definitions after parsing has completed.\n * @returns {{}|*|classes}\n */\n\n\n var getClasses = function getClasses() {\n return classes;\n };\n\n var setupToolTips = function setupToolTips(element) {\n var tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('.mermaidTooltip');\n\n if ((tooltipElem._groups || tooltipElem)[0][0] === null) {\n tooltipElem = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);\n }\n\n var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(element).select('svg');\n var nodes = svg.selectAll('g.node');\n nodes.on('mouseover', function () {\n var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(this);\n var title = el.attr('title'); // Dont try to draw a tooltip if no data is provided\n\n if (title === null) {\n return;\n }\n\n var rect = this.getBoundingClientRect();\n tooltipElem.transition().duration(200).style('opacity', '.9');\n tooltipElem.html(el.attr('title')).style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px').style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px');\n el.classed('hover', true);\n }).on('mouseout', function () {\n tooltipElem.transition().duration(500).style('opacity', 0);\n var el = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(this);\n el.classed('hover', false);\n });\n };\n\n funs.push(setupToolTips);\n /**\n * Clears the internal graph db so that a new graph can be parsed.\n */\n\n var clear = function clear(ver) {\n vertices = {};\n classes = {};\n edges = [];\n funs = [];\n funs.push(setupToolTips);\n subGraphs = [];\n subGraphLookup = {};\n subCount = 0;\n tooltips = [];\n firstGraphFlag = true;\n version = ver || 'gen-1';\n };\n\n var setGen = function setGen(ver) {\n version = ver || 'gen-1';\n };\n /**\n *\n * @returns {string}\n */\n\n\n var defaultStyle = function defaultStyle() {\n return 'fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;';\n };\n /**\n * Clears the internal graph db so that a new graph can be parsed.\n */\n\n\n var addSubGraph = function addSubGraph(_id, list, _title) {\n var id = _id.trim();\n\n var title = _title;\n\n if (_id === _title && _title.match(/\\s/)) {\n id = undefined;\n }\n\n function uniq(a) {\n var prims = {\n \"boolean\": {},\n number: {},\n string: {}\n };\n var objs = [];\n return a.filter(function (item) {\n var type = _typeof(item);\n\n if (item.trim() === '') {\n return false;\n }\n\n if (type in prims) {\n return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true; // eslint-disable-line\n } else {\n return objs.indexOf(item) >= 0 ? false : objs.push(item);\n }\n });\n }\n\n var nodeList = [];\n nodeList = uniq(nodeList.concat.apply(nodeList, list));\n\n if (version === 'gen-1') {\n _logger__WEBPACK_IMPORTED_MODULE_5__[\"log\"].warn('LOOKING UP');\n\n for (var i = 0; i < nodeList.length; i++) {\n nodeList[i] = lookUpDomId(nodeList[i]);\n }\n }\n\n id = id || 'subGraph' + subCount; // if (id[0].match(/\\d/)) id = lookUpDomId(id);\n\n title = title || '';\n title = _common_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"].sanitizeText(title, config);\n subCount = subCount + 1;\n var subGraph = {\n id: id,\n nodes: nodeList,\n title: title.trim(),\n classes: []\n };\n\n _logger__WEBPACK_IMPORTED_MODULE_5__[\"log\"].info('Adding', subGraph.id, subGraph.nodes);\n /**\n * Deletes an id from all subgraphs\n */\n // const del = _id => {\n // subGraphs.forEach(sg => {\n // const pos = sg.nodes.indexOf(_id);\n // if (pos >= 0) {\n // sg.nodes.splice(pos, 1);\n // }\n // });\n // };\n // // Removes the members of this subgraph from any other subgraphs, a node only belong to one subgraph\n // subGraph.nodes.forEach(_id => del(_id));\n // Remove the members in the new subgraph if they already belong to another subgraph\n\n\n subGraph.nodes = makeUniq(subGraph, subGraphs).nodes;\n subGraphs.push(subGraph);\n subGraphLookup[id] = subGraph;\n return id;\n };\n\n var getPosForId = function getPosForId(id) {\n for (var i = 0; i < subGraphs.length; i++) {\n if (subGraphs[i].id === id) {\n return i;\n }\n }\n\n return -1;\n };\n\n var secCount = -1;\n var posCrossRef = [];\n\n var indexNodes2 = function indexNodes2(id, pos) {\n var nodes = subGraphs[pos].nodes;\n secCount = secCount + 1;\n\n if (secCount > 2000) {\n return;\n }\n\n posCrossRef[secCount] = pos; // Check if match\n\n if (subGraphs[pos].id === id) {\n return {\n result: true,\n count: 0\n };\n }\n\n var count = 0;\n var posCount = 1;\n\n while (count < nodes.length) {\n var childPos = getPosForId(nodes[count]); // Ignore regular nodes (pos will be -1)\n\n if (childPos >= 0) {\n var res = indexNodes2(id, childPos);\n\n if (res.result) {\n return {\n result: true,\n count: posCount + res.count\n };\n } else {\n posCount = posCount + res.count;\n }\n }\n\n count = count + 1;\n }\n\n return {\n result: false,\n count: posCount\n };\n };\n\n var getDepthFirstPos = function getDepthFirstPos(pos) {\n return posCrossRef[pos];\n };\n\n var indexNodes = function indexNodes() {\n secCount = -1;\n\n if (subGraphs.length > 0) {\n indexNodes2('none', subGraphs.length - 1, 0);\n }\n };\n\n var getSubGraphs = function getSubGraphs() {\n return subGraphs;\n };\n\n var firstGraph = function firstGraph() {\n if (firstGraphFlag) {\n firstGraphFlag = false;\n return true;\n }\n\n return false;\n };\n\n var destructStartLink = function destructStartLink(_str) {\n var str = _str.trim();\n\n var type = 'arrow_open';\n\n switch (str[0]) {\n case '<':\n type = 'arrow_point';\n str = str.slice(1);\n break;\n\n case 'x':\n type = 'arrow_cross';\n str = str.slice(1);\n break;\n\n case 'o':\n type = 'arrow_circle';\n str = str.slice(1);\n break;\n }\n\n var stroke = 'normal';\n\n if (str.indexOf('=') !== -1) {\n stroke = 'thick';\n }\n\n if (str.indexOf('.') !== -1) {\n stroke = 'dotted';\n }\n\n return {\n type: type,\n stroke: stroke\n };\n };\n\n var countChar = function countChar(_char, str) {\n var length = str.length;\n var count = 0;\n\n for (var i = 0; i < length; ++i) {\n if (str[i] === _char) {\n ++count;\n }\n }\n\n return count;\n };\n\n var destructEndLink = function destructEndLink(_str) {\n var str = _str.trim();\n\n var line = str.slice(0, -1);\n var type = 'arrow_open';\n\n switch (str.slice(-1)) {\n case 'x':\n type = 'arrow_cross';\n\n if (str[0] === 'x') {\n type = 'double_' + type;\n line = line.slice(1);\n }\n\n break;\n\n case '>':\n type = 'arrow_point';\n\n if (str[0] === '<') {\n type = 'double_' + type;\n line = line.slice(1);\n }\n\n break;\n\n case 'o':\n type = 'arrow_circle';\n\n if (str[0] === 'o') {\n type = 'double_' + type;\n line = line.slice(1);\n }\n\n break;\n }\n\n var stroke = 'normal';\n var length = line.length - 1;\n\n if (line[0] === '=') {\n stroke = 'thick';\n }\n\n var dots = countChar('.', line);\n\n if (dots) {\n stroke = 'dotted';\n length = dots;\n }\n\n return {\n type: type,\n stroke: stroke,\n length: length\n };\n };\n\n var destructLink = function destructLink(_str, _startStr) {\n var info = destructEndLink(_str);\n var startInfo;\n\n if (_startStr) {\n startInfo = destructStartLink(_startStr);\n\n if (startInfo.stroke !== info.stroke) {\n return {\n type: 'INVALID',\n stroke: 'INVALID'\n };\n }\n\n if (startInfo.type === 'arrow_open') {\n // -- xyz --> - take arrow type from ending\n startInfo.type = info.type;\n } else {\n // x-- xyz --> - not supported\n if (startInfo.type !== info.type) return {\n type: 'INVALID',\n stroke: 'INVALID'\n };\n startInfo.type = 'double_' + startInfo.type;\n }\n\n if (startInfo.type === 'double_arrow') {\n startInfo.type = 'double_arrow_point';\n }\n\n startInfo.length = info.length;\n return startInfo;\n }\n\n return info;\n }; // Todo optimizer this by caching existing nodes\n\n\n var exists = function exists(allSgs, _id) {\n var res = false;\n allSgs.forEach(function (sg) {\n var pos = sg.nodes.indexOf(_id);\n\n if (pos >= 0) {\n res = true;\n }\n });\n return res;\n };\n /**\n * Deletes an id from all subgraphs\n */\n\n\n var makeUniq = function makeUniq(sg, allSubgraphs) {\n var res = [];\n sg.nodes.forEach(function (_id, pos) {\n if (!exists(allSubgraphs, _id)) {\n res.push(sg.nodes[pos]);\n }\n });\n return {\n nodes: res\n };\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n parseDirective: parseDirective,\n defaultConfig: function defaultConfig() {\n return _config__WEBPACK_IMPORTED_MODULE_2__[\"defaultConfig\"].flowchart;\n },\n addVertex: addVertex,\n lookUpDomId: lookUpDomId,\n addLink: addLink,\n updateLinkInterpolate: updateLinkInterpolate,\n updateLink: updateLink,\n addClass: addClass,\n setDirection: setDirection,\n setClass: setClass,\n setTooltip: setTooltip,\n getTooltip: getTooltip,\n setClickEvent: setClickEvent,\n setLink: setLink,\n bindFunctions: bindFunctions,\n getDirection: getDirection,\n getVertices: getVertices,\n getEdges: getEdges,\n getClasses: getClasses,\n clear: clear,\n setGen: setGen,\n defaultStyle: defaultStyle,\n addSubGraph: addSubGraph,\n getDepthFirstPos: getDepthFirstPos,\n indexNodes: indexNodes,\n getSubGraphs: getSubGraphs,\n destructLink: destructLink,\n lex: {\n firstGraph: firstGraph\n },\n exists: exists,\n makeUniq: makeUniq\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/flowchart/flowRenderer-v2.js\":\n /*!***************************************************!*\\\n !*** ./src/diagrams/flowchart/flowRenderer-v2.js ***!\n \\***************************************************/\n\n /*! exports provided: setConf, addVertices, addEdges, getClasses, draw, default */\n\n /***/\n function srcDiagramsFlowchartFlowRendererV2Js(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addVertices\", function () {\n return addVertices;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addEdges\", function () {\n return addEdges;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getClasses\", function () {\n return getClasses;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! graphlib */\n \"graphlib\");\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__);\n /* harmony import */\n\n\n var _flowDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./flowDb */\n \"./src/diagrams/flowchart/flowDb.js\");\n /* harmony import */\n\n\n var _parser_flow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./parser/flow */\n \"./src/diagrams/flowchart/parser/flow.jison\");\n /* harmony import */\n\n\n var _parser_flow__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_flow__WEBPACK_IMPORTED_MODULE_3__);\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ../../dagre-wrapper/index.js */\n \"./src/dagre-wrapper/index.js\");\n /* harmony import */\n\n\n var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\n /*! dagre-d3/lib/label/add-html-label.js */\n \"dagre-d3/lib/label/add-html-label.js\");\n /* harmony import */\n\n\n var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _common_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(\n /*! ../common/common */\n \"./src/diagrams/common/common.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n\n var conf = {};\n\n var setConf = function setConf(cnf) {\n var keys = Object.keys(cnf);\n\n for (var i = 0; i < keys.length; i++) {\n conf[keys[i]] = cnf[keys[i]];\n }\n };\n /**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n * @param vert Object containing the vertices.\n * @param g The graph that is to be drawn.\n */\n\n\n var addVertices = function addVertices(vert, g, svgId) {\n var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(\"[id=\\\"\".concat(svgId, \"\\\"]\"));\n var keys = Object.keys(vert); // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n\n keys.forEach(function (id) {\n var vertex = vert[id];\n /**\n * Variable for storing the classes for the vertex\n * @type {string}\n */\n\n var classStr = 'default';\n\n if (vertex.classes.length > 0) {\n classStr = vertex.classes.join(' ');\n }\n\n var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(vertex.styles); // Use vertex id as text in the box if no text is provided by the graph definition\n\n var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually\n\n var vertexNode;\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.htmlLabels) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n var node = {\n label: vertexText.replace(/fa[lrsb]?:fa-[\\w-]+/g, function (s) {\n return \"\");\n })\n };\n vertexNode = dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default()(svg, node).node();\n vertexNode.parentNode.removeChild(vertexNode);\n } else {\n var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n var rows = vertexText.split(_common_common__WEBPACK_IMPORTED_MODULE_8__[\"default\"].lineBreakRegex);\n\n for (var j = 0; j < rows.length; j++) {\n var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '1');\n tspan.textContent = rows[j];\n svgLabel.appendChild(tspan);\n }\n\n vertexNode = svgLabel;\n }\n\n var radious = 0;\n var _shape = ''; // Set the shape based parameters\n\n switch (vertex.type) {\n case 'round':\n radious = 5;\n _shape = 'rect';\n break;\n\n case 'square':\n _shape = 'rect';\n break;\n\n case 'diamond':\n _shape = 'question';\n break;\n\n case 'hexagon':\n _shape = 'hexagon';\n break;\n\n case 'odd':\n _shape = 'rect_left_inv_arrow';\n break;\n\n case 'lean_right':\n _shape = 'lean_right';\n break;\n\n case 'lean_left':\n _shape = 'lean_left';\n break;\n\n case 'trapezoid':\n _shape = 'trapezoid';\n break;\n\n case 'inv_trapezoid':\n _shape = 'inv_trapezoid';\n break;\n\n case 'odd_right':\n _shape = 'rect_left_inv_arrow';\n break;\n\n case 'circle':\n _shape = 'circle';\n break;\n\n case 'ellipse':\n _shape = 'ellipse';\n break;\n\n case 'stadium':\n _shape = 'stadium';\n break;\n\n case 'subroutine':\n _shape = 'subroutine';\n break;\n\n case 'cylinder':\n _shape = 'cylinder';\n break;\n\n case 'group':\n _shape = 'rect';\n break;\n\n default:\n _shape = 'rect';\n } // Add the node\n\n\n g.setNode(vertex.id, {\n labelStyle: styles.labelStyle,\n shape: _shape,\n labelText: vertexText,\n rx: radious,\n ry: radious,\n \"class\": classStr,\n style: styles.style,\n id: vertex.id,\n link: vertex.link,\n linkTarget: vertex.linkTarget,\n tooltip: _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getTooltip(vertex.id) || '',\n domId: _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(vertex.id),\n haveCallback: vertex.haveCallback,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n padding: Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.padding\n });\n\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('setNode', {\n labelStyle: styles.labelStyle,\n shape: _shape,\n labelText: vertexText,\n rx: radious,\n ry: radious,\n \"class\": classStr,\n style: styles.style,\n id: vertex.id,\n domId: _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(vertex.id),\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n padding: Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.padding\n });\n });\n };\n /**\n * Add edges to graph based on parsed graph defninition\n * @param {Object} edges The edges to add to the graph\n * @param {Object} g The graph object\n */\n\n\n var addEdges = function addEdges(edges, g) {\n var cnt = 0;\n var defaultStyle;\n var defaultLabelStyle;\n\n if (typeof edges.defaultStyle !== 'undefined') {\n var defaultStyles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(edges.defaultStyle);\n defaultStyle = defaultStyles.style;\n defaultLabelStyle = defaultStyles.labelStyle;\n }\n\n edges.forEach(function (edge) {\n cnt++; // Identify Link\n\n var linkId = 'L-' + edge.start + '-' + edge.end;\n var linkNameStart = 'LS-' + edge.start;\n var linkNameEnd = 'LE-' + edge.end;\n var edgeData = {\n style: '',\n labelStyle: ''\n };\n edgeData.minlen = edge.length || 1; //edgeData.id = 'id' + cnt;\n // Set link type for rendering\n\n if (edge.type === 'arrow_open') {\n edgeData.arrowhead = 'none';\n } else {\n edgeData.arrowhead = 'normal';\n } // Check of arrow types, placed here in order not to break old rendering\n\n\n edgeData.arrowTypeStart = 'arrow_open';\n edgeData.arrowTypeEnd = 'arrow_open';\n /* eslint-disable no-fallthrough */\n\n switch (edge.type) {\n case 'double_arrow_cross':\n edgeData.arrowTypeStart = 'arrow_cross';\n\n case 'arrow_cross':\n edgeData.arrowTypeEnd = 'arrow_cross';\n break;\n\n case 'double_arrow_point':\n edgeData.arrowTypeStart = 'arrow_point';\n\n case 'arrow_point':\n edgeData.arrowTypeEnd = 'arrow_point';\n break;\n\n case 'double_arrow_circle':\n edgeData.arrowTypeStart = 'arrow_circle';\n\n case 'arrow_circle':\n edgeData.arrowTypeEnd = 'arrow_circle';\n break;\n }\n\n var style = '';\n var labelStyle = '';\n\n switch (edge.stroke) {\n case 'normal':\n style = 'fill:none;';\n\n if (typeof defaultStyle !== 'undefined') {\n style = defaultStyle;\n }\n\n if (typeof defaultLabelStyle !== 'undefined') {\n labelStyle = defaultLabelStyle;\n }\n\n edgeData.thickness = 'normal';\n edgeData.pattern = 'solid';\n break;\n\n case 'dotted':\n edgeData.thickness = 'normal';\n edgeData.pattern = 'dotted';\n edgeData.style = 'fill:none;stroke-width:2px;stroke-dasharray:3;';\n break;\n\n case 'thick':\n edgeData.thickness = 'thick';\n edgeData.pattern = 'solid';\n edgeData.style = 'stroke-width: 3.5px;fill:none;';\n break;\n }\n\n if (typeof edge.style !== 'undefined') {\n var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(edge.style);\n style = styles.style;\n labelStyle = styles.labelStyle;\n }\n\n edgeData.style = edgeData.style += style;\n edgeData.labelStyle = edgeData.labelStyle += labelStyle;\n\n if (typeof edge.interpolate !== 'undefined') {\n edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"]);\n } else if (typeof edges.defaultInterpolate !== 'undefined') {\n edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"]);\n } else {\n edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"]);\n }\n\n if (typeof edge.text === 'undefined') {\n if (typeof edge.style !== 'undefined') {\n edgeData.arrowheadStyle = 'fill: #333';\n }\n } else {\n edgeData.arrowheadStyle = 'fill: #333';\n edgeData.labelpos = 'c';\n } // if (getConfig().flowchart.htmlLabels && false) {\n // // eslint-disable-line\n // edgeData.labelType = 'html';\n // edgeData.label = `${edge.text}`;\n // } else {\n\n\n edgeData.labelType = 'text';\n edgeData.label = edge.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_8__[\"default\"].lineBreakRegex, '\\n');\n\n if (typeof edge.style === 'undefined') {\n edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none;';\n }\n\n edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:'); // }\n\n edgeData.id = linkId;\n edgeData.classes = 'flowchart-link ' + linkNameStart + ' ' + linkNameEnd; // Add the edge to the graph\n\n g.setEdge(edge.start, edge.end, edgeData, cnt);\n });\n };\n /**\n * Returns the all the styles from classDef statements in the graph definition.\n * @returns {object} classDef styles\n */\n\n\n var getClasses = function getClasses(text) {\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Extracting classes');\n\n _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n\n var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n\n try {\n // Parse the graph definition\n parser.parse(text);\n } catch (e) {\n return;\n }\n\n return _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getClasses();\n };\n /**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\n\n var draw = function draw(text, id) {\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Drawing flowchart');\n\n _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n\n _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].setGen('gen-2');\n\n var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; // Parse the graph definition\n // try {\n\n parser.parse(text); // } catch (err) {\n // log.debug('Parsing failed');\n // }\n // Fetch the default direction, use TD if none was found\n\n var dir = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getDirection();\n\n if (typeof dir === 'undefined') {\n dir = 'TD';\n }\n\n var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart;\n var nodeSpacing = conf.nodeSpacing || 50;\n var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph\n\n var g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: dir,\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function () {\n return {};\n });\n var subG;\n\n var subGraphs = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getSubGraphs();\n\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Subgraphs - ', subGraphs);\n\n for (var _i = subGraphs.length - 1; _i >= 0; _i--) {\n subG = subGraphs[_i];\n\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Subgraph - ', subG);\n\n _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].addVertex(subG.id, subG.title, 'group', undefined, subG.classes);\n } // Fetch the verices/nodes and edges/links from the parsed graph definition\n\n\n var vert = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getVertices();\n\n var edges = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getEdges();\n\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info(edges);\n\n var i = 0;\n\n for (i = subGraphs.length - 1; i >= 0; i--) {\n // for (let i = 0; i < subGraphs.length; i++) {\n subG = subGraphs[i];\n Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"selectAll\"])('cluster').append('text');\n\n for (var j = 0; j < subG.nodes.length; j++) {\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Setting up subgraphs', subG.nodes[j], subG.id);\n\n g.setParent(subG.nodes[j], subG.id);\n }\n }\n\n addVertices(vert, g, id);\n addEdges(edges, g); // Add custom shapes\n // flowChartShapes.addToRenderV2(addShape);\n // Set up an SVG group so that we can translate the final graph.\n\n var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\"));\n svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink'); // Run the renderer. This is what draws the final graph.\n\n var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#' + id + ' g');\n Object(_dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__[\"render\"])(element, g, ['point', 'circle', 'cross'], 'flowchart', id);\n var padding = conf.diagramPadding;\n var svgBounds = svg.node().getBBox();\n var width = svgBounds.width + padding * 2;\n var height = svgBounds.height + padding * 2;\n\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].debug(\"new ViewBox 0 0 \".concat(width, \" \").concat(height), \"translate(\".concat(padding - g._label.marginx, \", \").concat(padding - g._label.marginy, \")\"));\n\n Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"configureSvgSize\"])(svg, height, width, conf.useMaxWidth);\n svg.attr('viewBox', \"0 0 \".concat(width, \" \").concat(height));\n svg.select('g').attr('transform', \"translate(\".concat(padding - g._label.marginx, \", \").concat(padding - svgBounds.y, \")\")); // Index nodes\n\n _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].indexNodes('subGraph' + i); // Add label rects for non html labels\n\n\n if (!conf.htmlLabels) {\n var labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n\n for (var k = 0; k < labels.length; k++) {\n var label = labels[k]; // Get dimensions of label\n\n var dim = label.getBBox();\n var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height); // rect.setAttribute('style', 'fill:#e8e8e8;');\n\n label.insertBefore(rect, label.firstChild);\n }\n } // If node has a link, wrap it in an anchor SVG object.\n\n\n var keys = Object.keys(vert);\n keys.forEach(function (key) {\n var vertex = vert[key];\n\n if (vertex.link) {\n var node = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#' + id + ' [id=\"' + key + '\"]');\n\n if (node) {\n var link = document.createElementNS('http://www.w3.org/2000/svg', 'a');\n link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));\n link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);\n link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n\n if (vertex.linkTarget) {\n link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget);\n }\n\n var linkNode = node.insert(function () {\n return link;\n }, ':first-child');\n var shape = node.select('.label-container');\n\n if (shape) {\n linkNode.append(function () {\n return shape.node();\n });\n }\n\n var _label = node.select('.label');\n\n if (_label) {\n linkNode.append(function () {\n return _label.node();\n });\n }\n }\n }\n });\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setConf: setConf,\n addVertices: addVertices,\n addEdges: addEdges,\n getClasses: getClasses,\n draw: draw\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/flowchart/flowRenderer.js\":\n /*!************************************************!*\\\n !*** ./src/diagrams/flowchart/flowRenderer.js ***!\n \\************************************************/\n\n /*! exports provided: setConf, addVertices, addEdges, getClasses, draw, default */\n\n /***/\n function srcDiagramsFlowchartFlowRendererJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addVertices\", function () {\n return addVertices;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addEdges\", function () {\n return addEdges;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getClasses\", function () {\n return getClasses;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! graphlib */\n \"graphlib\");\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__);\n /* harmony import */\n\n\n var _flowDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./flowDb */\n \"./src/diagrams/flowchart/flowDb.js\");\n /* harmony import */\n\n\n var _parser_flow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./parser/flow */\n \"./src/diagrams/flowchart/parser/flow.jison\");\n /* harmony import */\n\n\n var _parser_flow__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_flow__WEBPACK_IMPORTED_MODULE_3__);\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var dagre_d3__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! dagre-d3 */\n \"dagre-d3\");\n /* harmony import */\n\n\n var dagre_d3__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(dagre_d3__WEBPACK_IMPORTED_MODULE_5__);\n /* harmony import */\n\n\n var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\n /*! dagre-d3/lib/label/add-html-label.js */\n \"dagre-d3/lib/label/add-html-label.js\");\n /* harmony import */\n\n\n var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _common_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(\n /*! ../common/common */\n \"./src/diagrams/common/common.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n /* harmony import */\n\n\n var _flowChartShapes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(\n /*! ./flowChartShapes */\n \"./src/diagrams/flowchart/flowChartShapes.js\");\n\n var conf = {};\n\n var setConf = function setConf(cnf) {\n var keys = Object.keys(cnf);\n\n for (var i = 0; i < keys.length; i++) {\n conf[keys[i]] = cnf[keys[i]];\n }\n };\n /**\n * Function that adds the vertices found in the graph definition to the graph to be rendered.\n * @param vert Object containing the vertices.\n * @param g The graph that is to be drawn.\n */\n\n\n var addVertices = function addVertices(vert, g, svgId) {\n var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(\"[id=\\\"\".concat(svgId, \"\\\"]\"));\n var keys = Object.keys(vert); // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n\n keys.forEach(function (id) {\n var vertex = vert[id];\n /**\n * Variable for storing the classes for the vertex\n * @type {string}\n */\n\n var classStr = 'default';\n\n if (vertex.classes.length > 0) {\n classStr = vertex.classes.join(' ');\n }\n\n var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(vertex.styles); // Use vertex id as text in the box if no text is provided by the graph definition\n\n var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually\n\n var vertexNode;\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.htmlLabels) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n var node = {\n label: vertexText.replace(/fa[lrsb]?:fa-[\\w-]+/g, function (s) {\n return \"\");\n })\n };\n vertexNode = dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default()(svg, node).node();\n vertexNode.parentNode.removeChild(vertexNode);\n } else {\n var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n var rows = vertexText.split(_common_common__WEBPACK_IMPORTED_MODULE_8__[\"default\"].lineBreakRegex);\n\n for (var j = 0; j < rows.length; j++) {\n var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '1');\n tspan.textContent = rows[j];\n svgLabel.appendChild(tspan);\n }\n\n vertexNode = svgLabel;\n }\n\n var radious = 0;\n var _shape = ''; // Set the shape based parameters\n\n switch (vertex.type) {\n case 'round':\n radious = 5;\n _shape = 'rect';\n break;\n\n case 'square':\n _shape = 'rect';\n break;\n\n case 'diamond':\n _shape = 'question';\n break;\n\n case 'hexagon':\n _shape = 'hexagon';\n break;\n\n case 'odd':\n _shape = 'rect_left_inv_arrow';\n break;\n\n case 'lean_right':\n _shape = 'lean_right';\n break;\n\n case 'lean_left':\n _shape = 'lean_left';\n break;\n\n case 'trapezoid':\n _shape = 'trapezoid';\n break;\n\n case 'inv_trapezoid':\n _shape = 'inv_trapezoid';\n break;\n\n case 'odd_right':\n _shape = 'rect_left_inv_arrow';\n break;\n\n case 'circle':\n _shape = 'circle';\n break;\n\n case 'ellipse':\n _shape = 'ellipse';\n break;\n\n case 'stadium':\n _shape = 'stadium';\n break;\n\n case 'subroutine':\n _shape = 'subroutine';\n break;\n\n case 'cylinder':\n _shape = 'cylinder';\n break;\n\n case 'group':\n _shape = 'rect';\n break;\n\n default:\n _shape = 'rect';\n } // Add the node\n\n\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].warn('Adding node', vertex.id, vertex.domId);\n\n g.setNode(_flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(vertex.id), {\n labelType: 'svg',\n labelStyle: styles.labelStyle,\n shape: _shape,\n label: vertexNode,\n rx: radious,\n ry: radious,\n \"class\": classStr,\n style: styles.style,\n id: _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(vertex.id)\n });\n });\n };\n /**\n * Add edges to graph based on parsed graph defninition\n * @param {Object} edges The edges to add to the graph\n * @param {Object} g The graph object\n */\n\n\n var addEdges = function addEdges(edges, g) {\n var cnt = 0;\n var defaultStyle;\n var defaultLabelStyle;\n\n if (typeof edges.defaultStyle !== 'undefined') {\n var defaultStyles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(edges.defaultStyle);\n defaultStyle = defaultStyles.style;\n defaultLabelStyle = defaultStyles.labelStyle;\n }\n\n edges.forEach(function (edge) {\n cnt++; // Identify Link\n\n var linkId = 'L-' + edge.start + '-' + edge.end;\n var linkNameStart = 'LS-' + edge.start;\n var linkNameEnd = 'LE-' + edge.end;\n var edgeData = {}; // Set link type for rendering\n\n if (edge.type === 'arrow_open') {\n edgeData.arrowhead = 'none';\n } else {\n edgeData.arrowhead = 'normal';\n }\n\n var style = '';\n var labelStyle = '';\n\n if (typeof edge.style !== 'undefined') {\n var styles = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"getStylesFromArray\"])(edge.style);\n style = styles.style;\n labelStyle = styles.labelStyle;\n } else {\n switch (edge.stroke) {\n case 'normal':\n style = 'fill:none';\n\n if (typeof defaultStyle !== 'undefined') {\n style = defaultStyle;\n }\n\n if (typeof defaultLabelStyle !== 'undefined') {\n labelStyle = defaultLabelStyle;\n }\n\n break;\n\n case 'dotted':\n style = 'fill:none;stroke-width:2px;stroke-dasharray:3;';\n break;\n\n case 'thick':\n style = ' stroke-width: 3.5px;fill:none';\n break;\n }\n }\n\n edgeData.style = style;\n edgeData.labelStyle = labelStyle;\n\n if (typeof edge.interpolate !== 'undefined') {\n edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"]);\n } else if (typeof edges.defaultInterpolate !== 'undefined') {\n edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"]);\n } else {\n edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"interpolateToCurve\"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"]);\n }\n\n if (typeof edge.text === 'undefined') {\n if (typeof edge.style !== 'undefined') {\n edgeData.arrowheadStyle = 'fill: #333';\n }\n } else {\n edgeData.arrowheadStyle = 'fill: #333';\n edgeData.labelpos = 'c';\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart.htmlLabels) {\n edgeData.labelType = 'html';\n edgeData.label = \"\").concat(edge.text.replace(/fa[lrsb]?:fa-[\\w-]+/g, function (s) {\n return \"\");\n }), \"\");\n } else {\n edgeData.labelType = 'text';\n edgeData.label = edge.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_8__[\"default\"].lineBreakRegex, '\\n');\n\n if (typeof edge.style === 'undefined') {\n edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';\n }\n\n edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');\n }\n }\n\n edgeData.id = linkId;\n edgeData[\"class\"] = linkNameStart + ' ' + linkNameEnd;\n edgeData.minlen = edge.length || 1; // Add the edge to the graph\n\n g.setEdge(_flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(edge.start), _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(edge.end), edgeData, cnt);\n });\n };\n /**\n * Returns the all the styles from classDef statements in the graph definition.\n * @returns {object} classDef styles\n */\n\n\n var getClasses = function getClasses(text) {\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Extracting classes');\n\n _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n\n try {\n var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; // Parse the graph definition\n\n parser.parse(text);\n return _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getClasses();\n } catch (e) {\n return;\n }\n };\n /**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\n\n var draw = function draw(text, id) {\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].info('Drawing flowchart');\n\n _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n\n _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].setGen('gen-1');\n\n var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; // Parse the graph definition\n // try {\n\n parser.parse(text); // } catch (err) {\n // log.debug('Parsing failed');\n // }\n // Fetch the default direction, use TD if none was found\n\n var dir = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getDirection();\n\n if (typeof dir === 'undefined') {\n dir = 'TD';\n }\n\n var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().flowchart;\n var nodeSpacing = conf.nodeSpacing || 50;\n var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph\n\n var g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: dir,\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function () {\n return {};\n });\n var subG;\n\n var subGraphs = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getSubGraphs();\n\n for (var _i = subGraphs.length - 1; _i >= 0; _i--) {\n subG = subGraphs[_i];\n\n _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].addVertex(subG.id, subG.title, 'group', undefined, subG.classes);\n } // Fetch the verices/nodes and edges/links from the parsed graph definition\n\n\n var vert = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getVertices();\n\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].warn('Get vertices', vert);\n\n var edges = _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getEdges();\n\n var i = 0;\n\n for (i = subGraphs.length - 1; i >= 0; i--) {\n subG = subGraphs[i];\n Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"selectAll\"])('cluster').append('text');\n\n for (var j = 0; j < subG.nodes.length; j++) {\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].warn('Setting subgraph', subG.nodes[j], _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(subG.nodes[j]), _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(subG.id));\n\n g.setParent(_flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(subG.nodes[j]), _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(subG.id));\n }\n }\n\n addVertices(vert, g, id);\n addEdges(edges, g); // Create the renderer\n\n var Render = dagre_d3__WEBPACK_IMPORTED_MODULE_5___default.a.render;\n var render = new Render(); // Add custom shapes\n\n _flowChartShapes__WEBPACK_IMPORTED_MODULE_10__[\"default\"].addToRender(render); // Add our custom arrow - an empty arrowhead\n\n\n render.arrows().none = function normal(parent, id, edge, type) {\n var marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto');\n var path = marker.append('path').attr('d', 'M 0 0 L 0 0 L 0 0 z');\n dagre_d3__WEBPACK_IMPORTED_MODULE_5___default.a.util.applyStyle(path, edge[type + 'Style']);\n }; // Override normal arrowhead defined in d3. Remove style & add class to allow css styling.\n\n\n render.arrows().normal = function normal(parent, id) {\n var marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto');\n marker.append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z').attr('class', 'arrowheadPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');\n }; // Set up an SVG group so that we can translate the final graph.\n\n\n var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\"));\n svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].warn(g); // Run the renderer. This is what draws the final graph.\n\n\n var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#' + id + ' g');\n render(element, g);\n element.selectAll('g.node').attr('title', function () {\n return _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getTooltip(this.id);\n });\n var padding = conf.diagramPadding;\n var svgBounds = svg.node().getBBox();\n var width = svgBounds.width + padding * 2;\n var height = svgBounds.height + padding * 2;\n Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"configureSvgSize\"])(svg, height, width, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n\n var vBox = \"\".concat(svgBounds.x - padding, \" \").concat(svgBounds.y - padding, \" \").concat(width, \" \").concat(height);\n\n _logger__WEBPACK_IMPORTED_MODULE_7__[\"log\"].debug(\"viewBox \".concat(vBox));\n\n svg.attr('viewBox', vBox); // Index nodes\n\n _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].indexNodes('subGraph' + i); // reposition labels\n\n\n for (i = 0; i < subGraphs.length; i++) {\n subG = subGraphs[i];\n\n if (subG.title !== 'undefined') {\n var clusterRects = document.querySelectorAll('#' + id + ' [id=\"' + _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(subG.id) + '\"] rect');\n var clusterEl = document.querySelectorAll('#' + id + ' [id=\"' + _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(subG.id) + '\"]');\n var xPos = clusterRects[0].x.baseVal.value;\n var yPos = clusterRects[0].y.baseVal.value;\n var _width = clusterRects[0].width.baseVal.value;\n var cluster = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(clusterEl[0]);\n var te = cluster.select('.label');\n te.attr('transform', \"translate(\".concat(xPos + _width / 2, \", \").concat(yPos + 14, \")\"));\n te.attr('id', id + 'Text');\n\n for (var _j = 0; _j < subG.classes.length; _j++) {\n clusterEl[0].classList.add(subG.classes[_j]);\n }\n }\n } // Add label rects for non html labels\n\n\n if (!conf.htmlLabels || true) {\n // eslint-disable-line\n var labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n\n for (var k = 0; k < labels.length; k++) {\n var label = labels[k]; // Get dimensions of label\n\n var dim = label.getBBox();\n var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height); // rect.setAttribute('style', 'fill:#e8e8e8;');\n\n label.insertBefore(rect, label.firstChild);\n }\n } // If node has a link, wrap it in an anchor SVG object.\n\n\n var keys = Object.keys(vert);\n keys.forEach(function (key) {\n var vertex = vert[key];\n\n if (vertex.link) {\n var node = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#' + id + ' [id=\"' + _flowDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lookUpDomId(key) + '\"]');\n\n if (node) {\n var link = document.createElementNS('http://www.w3.org/2000/svg', 'a');\n link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));\n link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);\n link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n\n if (vertex.linkTarget) {\n link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget);\n }\n\n var linkNode = node.insert(function () {\n return link;\n }, ':first-child');\n var shape = node.select('.label-container');\n\n if (shape) {\n linkNode.append(function () {\n return shape.node();\n });\n }\n\n var _label = node.select('.label');\n\n if (_label) {\n linkNode.append(function () {\n return _label.node();\n });\n }\n }\n }\n });\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setConf: setConf,\n addVertices: addVertices,\n addEdges: addEdges,\n getClasses: getClasses,\n draw: draw\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/flowchart/parser/flow.jison\":\n /*!**************************************************!*\\\n !*** ./src/diagrams/flowchart/parser/flow.jison ***!\n \\**************************************************/\n\n /*! no static exports found */\n\n /***/\n function srcDiagramsFlowchartParserFlowJison(module, exports, __webpack_require__) {\n /* WEBPACK VAR INJECTION */\n (function (process, module) {\n /* parser generated by jison 0.4.18 */\n\n /*\n Returns a Parser object of the following structure:\n \n Parser: {\n yy: {}\n }\n \n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n \n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n \n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n \n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n \n \n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n \n \n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n */\n var parser = function () {\n var o = function o(k, v, _o3, l) {\n for (_o3 = _o3 || {}, l = k.length; l--; _o3[k[l]] = v) {\n ;\n }\n\n return _o3;\n },\n $V0 = [1, 9],\n $V1 = [1, 7],\n $V2 = [1, 6],\n $V3 = [1, 8],\n $V4 = [1, 20, 21, 22, 23, 38, 46, 75, 76, 77, 78, 79, 80, 94, 95, 98, 99, 100, 102, 103, 109, 110, 111, 112, 113, 114],\n $V5 = [2, 10],\n $V6 = [1, 20],\n $V7 = [1, 21],\n $V8 = [1, 22],\n $V9 = [1, 23],\n $Va = [1, 30],\n $Vb = [1, 54],\n $Vc = [1, 32],\n $Vd = [1, 33],\n $Ve = [1, 34],\n $Vf = [1, 35],\n $Vg = [1, 36],\n $Vh = [1, 48],\n $Vi = [1, 43],\n $Vj = [1, 45],\n $Vk = [1, 40],\n $Vl = [1, 44],\n $Vm = [1, 47],\n $Vn = [1, 51],\n $Vo = [1, 52],\n $Vp = [1, 53],\n $Vq = [1, 42],\n $Vr = [1, 46],\n $Vs = [1, 49],\n $Vt = [1, 50],\n $Vu = [1, 41],\n $Vv = [1, 57],\n $Vw = [1, 62],\n $Vx = [1, 20, 21, 22, 23, 38, 42, 46, 75, 76, 77, 78, 79, 80, 94, 95, 98, 99, 100, 102, 103, 109, 110, 111, 112, 113, 114],\n $Vy = [1, 66],\n $Vz = [1, 65],\n $VA = [1, 67],\n $VB = [20, 21, 23, 69, 70],\n $VC = [1, 88],\n $VD = [1, 93],\n $VE = [1, 90],\n $VF = [1, 95],\n $VG = [1, 98],\n $VH = [1, 96],\n $VI = [1, 97],\n $VJ = [1, 91],\n $VK = [1, 103],\n $VL = [1, 102],\n $VM = [1, 92],\n $VN = [1, 94],\n $VO = [1, 99],\n $VP = [1, 100],\n $VQ = [1, 101],\n $VR = [1, 104],\n $VS = [20, 21, 22, 23, 69, 70],\n $VT = [20, 21, 22, 23, 47, 69, 70],\n $VU = [20, 21, 22, 23, 40, 46, 47, 49, 51, 53, 55, 57, 59, 61, 62, 64, 69, 70, 80, 94, 95, 98, 99, 100, 102, 103, 109, 110, 111, 112, 113, 114],\n $VV = [20, 21, 23],\n $VW = [20, 21, 23, 46, 69, 70, 80, 94, 95, 98, 99, 100, 102, 103, 109, 110, 111, 112, 113, 114],\n $VX = [1, 12, 20, 21, 22, 23, 24, 38, 42, 46, 75, 76, 77, 78, 79, 80, 94, 95, 98, 99, 100, 102, 103, 109, 110, 111, 112, 113, 114],\n $VY = [46, 80, 94, 95, 98, 99, 100, 102, 103, 109, 110, 111, 112, 113, 114],\n $VZ = [1, 136],\n $V_ = [1, 144],\n $V$ = [1, 145],\n $V01 = [1, 146],\n $V11 = [1, 147],\n $V21 = [1, 131],\n $V31 = [1, 132],\n $V41 = [1, 128],\n $V51 = [1, 139],\n $V61 = [1, 140],\n $V71 = [1, 141],\n $V81 = [1, 142],\n $V91 = [1, 143],\n $Va1 = [1, 148],\n $Vb1 = [1, 149],\n $Vc1 = [1, 134],\n $Vd1 = [1, 137],\n $Ve1 = [1, 133],\n $Vf1 = [1, 130],\n $Vg1 = [20, 21, 22, 23, 38, 42, 46, 75, 76, 77, 78, 79, 80, 94, 95, 98, 99, 100, 102, 103, 109, 110, 111, 112, 113, 114],\n $Vh1 = [1, 152],\n $Vi1 = [20, 21, 22, 23, 26, 46, 80, 94, 95, 98, 99, 100, 102, 103, 109, 110, 111, 112, 113, 114],\n $Vj1 = [20, 21, 22, 23, 24, 26, 38, 40, 41, 42, 46, 50, 52, 54, 56, 58, 60, 61, 63, 65, 69, 70, 71, 75, 76, 77, 78, 79, 80, 81, 84, 94, 95, 98, 99, 100, 102, 103, 104, 105, 109, 110, 111, 112, 113, 114],\n $Vk1 = [12, 21, 22, 24],\n $Vl1 = [22, 95],\n $Vm1 = [1, 233],\n $Vn1 = [1, 237],\n $Vo1 = [1, 234],\n $Vp1 = [1, 231],\n $Vq1 = [1, 228],\n $Vr1 = [1, 229],\n $Vs1 = [1, 230],\n $Vt1 = [1, 232],\n $Vu1 = [1, 235],\n $Vv1 = [1, 236],\n $Vw1 = [1, 238],\n $Vx1 = [1, 255],\n $Vy1 = [20, 21, 23, 95],\n $Vz1 = [20, 21, 22, 23, 75, 91, 94, 95, 98, 99, 100, 101, 102, 103, 104];\n\n var parser = {\n trace: function trace() {},\n yy: {},\n symbols_: {\n \"error\": 2,\n \"start\": 3,\n \"mermaidDoc\": 4,\n \"directive\": 5,\n \"openDirective\": 6,\n \"typeDirective\": 7,\n \"closeDirective\": 8,\n \"separator\": 9,\n \":\": 10,\n \"argDirective\": 11,\n \"open_directive\": 12,\n \"type_directive\": 13,\n \"arg_directive\": 14,\n \"close_directive\": 15,\n \"graphConfig\": 16,\n \"document\": 17,\n \"line\": 18,\n \"statement\": 19,\n \"SEMI\": 20,\n \"NEWLINE\": 21,\n \"SPACE\": 22,\n \"EOF\": 23,\n \"GRAPH\": 24,\n \"NODIR\": 25,\n \"DIR\": 26,\n \"FirstStmtSeperator\": 27,\n \"ending\": 28,\n \"endToken\": 29,\n \"spaceList\": 30,\n \"spaceListNewline\": 31,\n \"verticeStatement\": 32,\n \"styleStatement\": 33,\n \"linkStyleStatement\": 34,\n \"classDefStatement\": 35,\n \"classStatement\": 36,\n \"clickStatement\": 37,\n \"subgraph\": 38,\n \"text\": 39,\n \"SQS\": 40,\n \"SQE\": 41,\n \"end\": 42,\n \"link\": 43,\n \"node\": 44,\n \"vertex\": 45,\n \"AMP\": 46,\n \"STYLE_SEPARATOR\": 47,\n \"idString\": 48,\n \"PS\": 49,\n \"PE\": 50,\n \"(-\": 51,\n \"-)\": 52,\n \"STADIUMSTART\": 53,\n \"STADIUMEND\": 54,\n \"SUBROUTINESTART\": 55,\n \"SUBROUTINEEND\": 56,\n \"CYLINDERSTART\": 57,\n \"CYLINDEREND\": 58,\n \"DIAMOND_START\": 59,\n \"DIAMOND_STOP\": 60,\n \"TAGEND\": 61,\n \"TRAPSTART\": 62,\n \"TRAPEND\": 63,\n \"INVTRAPSTART\": 64,\n \"INVTRAPEND\": 65,\n \"linkStatement\": 66,\n \"arrowText\": 67,\n \"TESTSTR\": 68,\n \"START_LINK\": 69,\n \"LINK\": 70,\n \"PIPE\": 71,\n \"textToken\": 72,\n \"STR\": 73,\n \"keywords\": 74,\n \"STYLE\": 75,\n \"LINKSTYLE\": 76,\n \"CLASSDEF\": 77,\n \"CLASS\": 78,\n \"CLICK\": 79,\n \"DOWN\": 80,\n \"UP\": 81,\n \"textNoTags\": 82,\n \"textNoTagsToken\": 83,\n \"DEFAULT\": 84,\n \"stylesOpt\": 85,\n \"alphaNum\": 86,\n \"CALLBACKNAME\": 87,\n \"CALLBACKARGS\": 88,\n \"HREF\": 89,\n \"LINK_TARGET\": 90,\n \"HEX\": 91,\n \"numList\": 92,\n \"INTERPOLATE\": 93,\n \"NUM\": 94,\n \"COMMA\": 95,\n \"style\": 96,\n \"styleComponent\": 97,\n \"ALPHA\": 98,\n \"COLON\": 99,\n \"MINUS\": 100,\n \"UNIT\": 101,\n \"BRKT\": 102,\n \"DOT\": 103,\n \"PCT\": 104,\n \"TAGSTART\": 105,\n \"alphaNumToken\": 106,\n \"idStringToken\": 107,\n \"alphaNumStatement\": 108,\n \"PUNCTUATION\": 109,\n \"UNICODE_TEXT\": 110,\n \"PLUS\": 111,\n \"EQUALS\": 112,\n \"MULT\": 113,\n \"UNDERSCORE\": 114,\n \"graphCodeTokens\": 115,\n \"ARROW_CROSS\": 116,\n \"ARROW_POINT\": 117,\n \"ARROW_CIRCLE\": 118,\n \"ARROW_OPEN\": 119,\n \"QUOTE\": 120,\n \"$accept\": 0,\n \"$end\": 1\n },\n terminals_: {\n 2: \"error\",\n 10: \":\",\n 12: \"open_directive\",\n 13: \"type_directive\",\n 14: \"arg_directive\",\n 15: \"close_directive\",\n 20: \"SEMI\",\n 21: \"NEWLINE\",\n 22: \"SPACE\",\n 23: \"EOF\",\n 24: \"GRAPH\",\n 25: \"NODIR\",\n 26: \"DIR\",\n 38: \"subgraph\",\n 40: \"SQS\",\n 41: \"SQE\",\n 42: \"end\",\n 46: \"AMP\",\n 47: \"STYLE_SEPARATOR\",\n 49: \"PS\",\n 50: \"PE\",\n 51: \"(-\",\n 52: \"-)\",\n 53: \"STADIUMSTART\",\n 54: \"STADIUMEND\",\n 55: \"SUBROUTINESTART\",\n 56: \"SUBROUTINEEND\",\n 57: \"CYLINDERSTART\",\n 58: \"CYLINDEREND\",\n 59: \"DIAMOND_START\",\n 60: \"DIAMOND_STOP\",\n 61: \"TAGEND\",\n 62: \"TRAPSTART\",\n 63: \"TRAPEND\",\n 64: \"INVTRAPSTART\",\n 65: \"INVTRAPEND\",\n 68: \"TESTSTR\",\n 69: \"START_LINK\",\n 70: \"LINK\",\n 71: \"PIPE\",\n 73: \"STR\",\n 75: \"STYLE\",\n 76: \"LINKSTYLE\",\n 77: \"CLASSDEF\",\n 78: \"CLASS\",\n 79: \"CLICK\",\n 80: \"DOWN\",\n 81: \"UP\",\n 84: \"DEFAULT\",\n 87: \"CALLBACKNAME\",\n 88: \"CALLBACKARGS\",\n 89: \"HREF\",\n 90: \"LINK_TARGET\",\n 91: \"HEX\",\n 93: \"INTERPOLATE\",\n 94: \"NUM\",\n 95: \"COMMA\",\n 98: \"ALPHA\",\n 99: \"COLON\",\n 100: \"MINUS\",\n 101: \"UNIT\",\n 102: \"BRKT\",\n 103: \"DOT\",\n 104: \"PCT\",\n 105: \"TAGSTART\",\n 109: \"PUNCTUATION\",\n 110: \"UNICODE_TEXT\",\n 111: \"PLUS\",\n 112: \"EQUALS\",\n 113: \"MULT\",\n 114: \"UNDERSCORE\",\n 116: \"ARROW_CROSS\",\n 117: \"ARROW_POINT\",\n 118: \"ARROW_CIRCLE\",\n 119: \"ARROW_OPEN\",\n 120: \"QUOTE\"\n },\n productions_: [0, [3, 1], [3, 2], [5, 4], [5, 6], [6, 1], [7, 1], [11, 1], [8, 1], [4, 2], [17, 0], [17, 2], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [16, 2], [16, 2], [16, 2], [16, 3], [28, 2], [28, 1], [29, 1], [29, 1], [29, 1], [27, 1], [27, 1], [27, 2], [31, 2], [31, 2], [31, 1], [31, 1], [30, 2], [30, 1], [19, 2], [19, 2], [19, 2], [19, 2], [19, 2], [19, 2], [19, 9], [19, 6], [19, 4], [9, 1], [9, 1], [9, 1], [32, 3], [32, 4], [32, 2], [32, 1], [44, 1], [44, 5], [44, 3], [45, 4], [45, 6], [45, 4], [45, 4], [45, 4], [45, 4], [45, 4], [45, 4], [45, 6], [45, 4], [45, 4], [45, 4], [45, 4], [45, 4], [45, 1], [43, 2], [43, 3], [43, 3], [43, 1], [43, 3], [66, 1], [67, 3], [39, 1], [39, 2], [39, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [74, 1], [82, 1], [82, 2], [35, 5], [35, 5], [36, 5], [37, 2], [37, 4], [37, 3], [37, 5], [37, 2], [37, 4], [37, 4], [37, 6], [37, 2], [37, 4], [37, 2], [37, 4], [37, 4], [37, 6], [33, 5], [33, 5], [34, 5], [34, 5], [34, 9], [34, 9], [34, 7], [34, 7], [92, 1], [92, 3], [85, 1], [85, 3], [96, 1], [96, 2], [97, 1], [97, 1], [97, 1], [97, 1], [97, 1], [97, 1], [97, 1], [97, 1], [97, 1], [97, 1], [97, 1], [72, 1], [72, 1], [72, 1], [72, 1], [72, 1], [72, 1], [83, 1], [83, 1], [83, 1], [83, 1], [48, 1], [48, 2], [86, 1], [86, 2], [108, 1], [108, 1], [108, 1], [108, 1], [106, 1], [106, 1], [106, 1], [106, 1], [106, 1], [106, 1], [106, 1], [106, 1], [106, 1], [106, 1], [106, 1], [106, 1], [106, 1], [107, 1], [107, 1], [107, 1], [107, 1], [107, 1], [107, 1], [107, 1], [107, 1], [107, 1], [107, 1], [107, 1], [107, 1], [107, 1], [107, 1], [107, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1], [115, 1]],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate\n /* action[1] */\n , $$\n /* vstack */\n , _$\n /* lstack */\n ) {\n /* this == yyval */\n var $0 = $$.length - 1;\n\n switch (yystate) {\n case 5:\n yy.parseDirective('%%{', 'open_directive');\n break;\n\n case 6:\n yy.parseDirective($$[$0], 'type_directive');\n break;\n\n case 7:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"');\n yy.parseDirective($$[$0], 'arg_directive');\n break;\n\n case 8:\n yy.parseDirective('}%%', 'close_directive', 'flowchart');\n break;\n\n case 10:\n this.$ = [];\n break;\n\n case 11:\n if ($$[$0] !== []) {\n $$[$0 - 1].push($$[$0]);\n }\n\n this.$ = $$[$0 - 1];\n break;\n\n case 12:\n case 76:\n case 78:\n case 90:\n case 146:\n case 148:\n case 149:\n this.$ = $$[$0];\n break;\n\n case 19:\n yy.setDirection('TB');\n this.$ = 'TB';\n break;\n\n case 20:\n yy.setDirection($$[$0 - 1]);\n this.$ = $$[$0 - 1];\n break;\n\n case 35:\n /* console.warn('finat vs', $$[$0-1].nodes); */\n this.$ = $$[$0 - 1].nodes;\n break;\n\n case 36:\n case 37:\n case 38:\n case 39:\n case 40:\n this.$ = [];\n break;\n\n case 41:\n this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]);\n break;\n\n case 42:\n this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]);\n break;\n\n case 43:\n this.$ = yy.addSubGraph(undefined, $$[$0 - 1], undefined);\n break;\n\n case 47:\n /* console.warn('vs',$$[$0-2].stmt,$$[$0]); */\n yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]);\n this.$ = {\n stmt: $$[$0],\n nodes: $$[$0].concat($$[$0 - 2].nodes)\n };\n break;\n\n case 48:\n /* console.warn('vs',$$[$0-3].stmt,$$[$0-1]); */\n yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]);\n this.$ = {\n stmt: $$[$0 - 1],\n nodes: $$[$0 - 1].concat($$[$0 - 3].nodes)\n };\n break;\n\n case 49:\n /*console.warn('noda', $$[$0-1]);*/\n this.$ = {\n stmt: $$[$0 - 1],\n nodes: $$[$0 - 1]\n };\n break;\n\n case 50:\n /*console.warn('noda', $$[$0]);*/\n this.$ = {\n stmt: $$[$0],\n nodes: $$[$0]\n };\n break;\n\n case 51:\n /* console.warn('nod', $$[$0]); */\n this.$ = [$$[$0]];\n break;\n\n case 52:\n this.$ = $$[$0 - 4].concat($$[$0]);\n /* console.warn('pip', $$[$0-4][0], $$[$0], this.$); */\n\n break;\n\n case 53:\n this.$ = [$$[$0 - 2]];\n yy.setClass($$[$0 - 2], $$[$0]);\n break;\n\n case 54:\n this.$ = $$[$0 - 3];\n yy.addVertex($$[$0 - 3], $$[$0 - 1], 'square');\n break;\n\n case 55:\n this.$ = $$[$0 - 5];\n yy.addVertex($$[$0 - 5], $$[$0 - 2], 'circle');\n break;\n\n case 56:\n this.$ = $$[$0 - 3];\n yy.addVertex($$[$0 - 3], $$[$0 - 1], 'ellipse');\n break;\n\n case 57:\n this.$ = $$[$0 - 3];\n yy.addVertex($$[$0 - 3], $$[$0 - 1], 'stadium');\n break;\n\n case 58:\n this.$ = $$[$0 - 3];\n yy.addVertex($$[$0 - 3], $$[$0 - 1], 'subroutine');\n break;\n\n case 59:\n this.$ = $$[$0 - 3];\n yy.addVertex($$[$0 - 3], $$[$0 - 1], 'cylinder');\n break;\n\n case 60:\n this.$ = $$[$0 - 3];\n yy.addVertex($$[$0 - 3], $$[$0 - 1], 'round');\n break;\n\n case 61:\n this.$ = $$[$0 - 3];\n yy.addVertex($$[$0 - 3], $$[$0 - 1], 'diamond');\n break;\n\n case 62:\n this.$ = $$[$0 - 5];\n yy.addVertex($$[$0 - 5], $$[$0 - 2], 'hexagon');\n break;\n\n case 63:\n this.$ = $$[$0 - 3];\n yy.addVertex($$[$0 - 3], $$[$0 - 1], 'odd');\n break;\n\n case 64:\n this.$ = $$[$0 - 3];\n yy.addVertex($$[$0 - 3], $$[$0 - 1], 'trapezoid');\n break;\n\n case 65:\n this.$ = $$[$0 - 3];\n yy.addVertex($$[$0 - 3], $$[$0 - 1], 'inv_trapezoid');\n break;\n\n case 66:\n this.$ = $$[$0 - 3];\n yy.addVertex($$[$0 - 3], $$[$0 - 1], 'lean_right');\n break;\n\n case 67:\n this.$ = $$[$0 - 3];\n yy.addVertex($$[$0 - 3], $$[$0 - 1], 'lean_left');\n break;\n\n case 68:\n /*console.warn('h: ', $$[$0]);*/\n this.$ = $$[$0];\n yy.addVertex($$[$0]);\n break;\n\n case 69:\n $$[$0 - 1].text = $$[$0];\n this.$ = $$[$0 - 1];\n break;\n\n case 70:\n case 71:\n $$[$0 - 2].text = $$[$0 - 1];\n this.$ = $$[$0 - 2];\n break;\n\n case 72:\n this.$ = $$[$0];\n break;\n\n case 73:\n var inf = yy.destructLink($$[$0], $$[$0 - 2]);\n this.$ = {\n \"type\": inf.type,\n \"stroke\": inf.stroke,\n \"length\": inf.length,\n \"text\": $$[$0 - 1]\n };\n break;\n\n case 74:\n var inf = yy.destructLink($$[$0]);\n this.$ = {\n \"type\": inf.type,\n \"stroke\": inf.stroke,\n \"length\": inf.length\n };\n break;\n\n case 75:\n this.$ = $$[$0 - 1];\n break;\n\n case 77:\n case 91:\n case 147:\n this.$ = $$[$0 - 1] + '' + $$[$0];\n break;\n\n case 92:\n case 93:\n this.$ = $$[$0 - 4];\n yy.addClass($$[$0 - 2], $$[$0]);\n break;\n\n case 94:\n this.$ = $$[$0 - 4];\n yy.setClass($$[$0 - 2], $$[$0]);\n break;\n\n case 95:\n case 103:\n this.$ = $$[$0 - 1];\n yy.setClickEvent($$[$0 - 1], $$[$0]);\n break;\n\n case 96:\n case 104:\n this.$ = $$[$0 - 3];\n yy.setClickEvent($$[$0 - 3], $$[$0 - 2]);\n yy.setTooltip($$[$0 - 3], $$[$0]);\n break;\n\n case 97:\n this.$ = $$[$0 - 2];\n yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);\n break;\n\n case 98:\n this.$ = $$[$0 - 4];\n yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]);\n yy.setTooltip($$[$0 - 4], $$[$0]);\n break;\n\n case 99:\n case 105:\n this.$ = $$[$0 - 1];\n yy.setLink($$[$0 - 1], $$[$0]);\n break;\n\n case 100:\n case 106:\n this.$ = $$[$0 - 3];\n yy.setLink($$[$0 - 3], $$[$0 - 2]);\n yy.setTooltip($$[$0 - 3], $$[$0]);\n break;\n\n case 101:\n case 107:\n this.$ = $$[$0 - 3];\n yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);\n break;\n\n case 102:\n case 108:\n this.$ = $$[$0 - 5];\n yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]);\n yy.setTooltip($$[$0 - 5], $$[$0 - 2]);\n break;\n\n case 109:\n this.$ = $$[$0 - 4];\n yy.addVertex($$[$0 - 2], undefined, undefined, $$[$0]);\n break;\n\n case 110:\n case 112:\n this.$ = $$[$0 - 4];\n yy.updateLink($$[$0 - 2], $$[$0]);\n break;\n\n case 111:\n this.$ = $$[$0 - 4];\n yy.updateLink([$$[$0 - 2]], $$[$0]);\n break;\n\n case 113:\n this.$ = $$[$0 - 8];\n yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]);\n yy.updateLink([$$[$0 - 6]], $$[$0]);\n break;\n\n case 114:\n this.$ = $$[$0 - 8];\n yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]);\n yy.updateLink($$[$0 - 6], $$[$0]);\n break;\n\n case 115:\n this.$ = $$[$0 - 6];\n yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]);\n break;\n\n case 116:\n this.$ = $$[$0 - 6];\n yy.updateLinkInterpolate($$[$0 - 4], $$[$0]);\n break;\n\n case 117:\n case 119:\n this.$ = [$$[$0]];\n break;\n\n case 118:\n case 120:\n $$[$0 - 2].push($$[$0]);\n this.$ = $$[$0 - 2];\n break;\n\n case 122:\n this.$ = $$[$0 - 1] + $$[$0];\n break;\n\n case 144:\n this.$ = $$[$0];\n break;\n\n case 145:\n this.$ = $$[$0 - 1] + '' + $$[$0];\n break;\n\n case 150:\n this.$ = 'v';\n break;\n\n case 151:\n this.$ = '-';\n break;\n }\n },\n table: [{\n 3: 1,\n 4: 2,\n 5: 3,\n 6: 5,\n 12: $V0,\n 16: 4,\n 21: $V1,\n 22: $V2,\n 24: $V3\n }, {\n 1: [3]\n }, {\n 1: [2, 1]\n }, {\n 3: 10,\n 4: 2,\n 5: 3,\n 6: 5,\n 12: $V0,\n 16: 4,\n 21: $V1,\n 22: $V2,\n 24: $V3\n }, o($V4, $V5, {\n 17: 11\n }), {\n 7: 12,\n 13: [1, 13]\n }, {\n 16: 14,\n 21: $V1,\n 22: $V2,\n 24: $V3\n }, {\n 16: 15,\n 21: $V1,\n 22: $V2,\n 24: $V3\n }, {\n 25: [1, 16],\n 26: [1, 17]\n }, {\n 13: [2, 5]\n }, {\n 1: [2, 2]\n }, {\n 1: [2, 9],\n 18: 18,\n 19: 19,\n 20: $V6,\n 21: $V7,\n 22: $V8,\n 23: $V9,\n 32: 24,\n 33: 25,\n 34: 26,\n 35: 27,\n 36: 28,\n 37: 29,\n 38: $Va,\n 44: 31,\n 45: 37,\n 46: $Vb,\n 48: 38,\n 75: $Vc,\n 76: $Vd,\n 77: $Ve,\n 78: $Vf,\n 79: $Vg,\n 80: $Vh,\n 94: $Vi,\n 95: $Vj,\n 98: $Vk,\n 99: $Vl,\n 100: $Vm,\n 102: $Vn,\n 103: $Vo,\n 107: 39,\n 109: $Vp,\n 110: $Vq,\n 111: $Vr,\n 112: $Vs,\n 113: $Vt,\n 114: $Vu\n }, {\n 8: 55,\n 10: [1, 56],\n 15: $Vv\n }, o([10, 15], [2, 6]), o($V4, [2, 17]), o($V4, [2, 18]), o($V4, [2, 19]), {\n 20: [1, 59],\n 21: [1, 60],\n 22: $Vw,\n 27: 58,\n 30: 61\n }, o($Vx, [2, 11]), o($Vx, [2, 12]), o($Vx, [2, 13]), o($Vx, [2, 14]), o($Vx, [2, 15]), o($Vx, [2, 16]), {\n 9: 63,\n 20: $Vy,\n 21: $Vz,\n 23: $VA,\n 43: 64,\n 66: 68,\n 69: [1, 69],\n 70: [1, 70]\n }, {\n 9: 71,\n 20: $Vy,\n 21: $Vz,\n 23: $VA\n }, {\n 9: 72,\n 20: $Vy,\n 21: $Vz,\n 23: $VA\n }, {\n 9: 73,\n 20: $Vy,\n 21: $Vz,\n 23: $VA\n }, {\n 9: 74,\n 20: $Vy,\n 21: $Vz,\n 23: $VA\n }, {\n 9: 75,\n 20: $Vy,\n 21: $Vz,\n 23: $VA\n }, {\n 9: 77,\n 20: $Vy,\n 21: $Vz,\n 22: [1, 76],\n 23: $VA\n }, o($VB, [2, 50], {\n 30: 78,\n 22: $Vw\n }), {\n 22: [1, 79]\n }, {\n 22: [1, 80]\n }, {\n 22: [1, 81]\n }, {\n 22: [1, 82]\n }, {\n 26: $VC,\n 46: $VD,\n 73: [1, 86],\n 80: $VE,\n 86: 85,\n 87: [1, 83],\n 89: [1, 84],\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 106: 89,\n 108: 87,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, o($VS, [2, 51], {\n 47: [1, 105]\n }), o($VT, [2, 68], {\n 107: 116,\n 40: [1, 106],\n 46: $Vb,\n 49: [1, 107],\n 51: [1, 108],\n 53: [1, 109],\n 55: [1, 110],\n 57: [1, 111],\n 59: [1, 112],\n 61: [1, 113],\n 62: [1, 114],\n 64: [1, 115],\n 80: $Vh,\n 94: $Vi,\n 95: $Vj,\n 98: $Vk,\n 99: $Vl,\n 100: $Vm,\n 102: $Vn,\n 103: $Vo,\n 109: $Vp,\n 110: $Vq,\n 111: $Vr,\n 112: $Vs,\n 113: $Vt,\n 114: $Vu\n }), o($VU, [2, 144]), o($VU, [2, 165]), o($VU, [2, 166]), o($VU, [2, 167]), o($VU, [2, 168]), o($VU, [2, 169]), o($VU, [2, 170]), o($VU, [2, 171]), o($VU, [2, 172]), o($VU, [2, 173]), o($VU, [2, 174]), o($VU, [2, 175]), o($VU, [2, 176]), o($VU, [2, 177]), o($VU, [2, 178]), o($VU, [2, 179]), {\n 9: 117,\n 20: $Vy,\n 21: $Vz,\n 23: $VA\n }, {\n 11: 118,\n 14: [1, 119]\n }, o($VV, [2, 8]), o($V4, [2, 20]), o($V4, [2, 26]), o($V4, [2, 27]), {\n 21: [1, 120]\n }, o($VW, [2, 34], {\n 30: 121,\n 22: $Vw\n }), o($Vx, [2, 35]), {\n 44: 122,\n 45: 37,\n 46: $Vb,\n 48: 38,\n 80: $Vh,\n 94: $Vi,\n 95: $Vj,\n 98: $Vk,\n 99: $Vl,\n 100: $Vm,\n 102: $Vn,\n 103: $Vo,\n 107: 39,\n 109: $Vp,\n 110: $Vq,\n 111: $Vr,\n 112: $Vs,\n 113: $Vt,\n 114: $Vu\n }, o($VX, [2, 44]), o($VX, [2, 45]), o($VX, [2, 46]), o($VY, [2, 72], {\n 67: 123,\n 68: [1, 124],\n 71: [1, 125]\n }), {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 126,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, o([46, 68, 71, 80, 94, 95, 98, 99, 100, 102, 103, 109, 110, 111, 112, 113, 114], [2, 74]), o($Vx, [2, 36]), o($Vx, [2, 37]), o($Vx, [2, 38]), o($Vx, [2, 39]), o($Vx, [2, 40]), {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 150,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, o($Vg1, $V5, {\n 17: 151\n }), o($VB, [2, 49], {\n 46: $Vh1\n }), {\n 26: $VC,\n 46: $VD,\n 80: $VE,\n 86: 153,\n 91: [1, 154],\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 106: 89,\n 108: 87,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 84: [1, 155],\n 92: 156,\n 94: [1, 157]\n }, {\n 26: $VC,\n 46: $VD,\n 80: $VE,\n 84: [1, 158],\n 86: 159,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 106: 89,\n 108: 87,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 26: $VC,\n 46: $VD,\n 80: $VE,\n 86: 160,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 106: 89,\n 108: 87,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, o($VV, [2, 95], {\n 22: [1, 161],\n 88: [1, 162]\n }), o($VV, [2, 99], {\n 22: [1, 163]\n }), o($VV, [2, 103], {\n 106: 89,\n 108: 165,\n 22: [1, 164],\n 26: $VC,\n 46: $VD,\n 80: $VE,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }), o($VV, [2, 105], {\n 22: [1, 166]\n }), o($Vi1, [2, 146]), o($Vi1, [2, 148]), o($Vi1, [2, 149]), o($Vi1, [2, 150]), o($Vi1, [2, 151]), o($Vj1, [2, 152]), o($Vj1, [2, 153]), o($Vj1, [2, 154]), o($Vj1, [2, 155]), o($Vj1, [2, 156]), o($Vj1, [2, 157]), o($Vj1, [2, 158]), o($Vj1, [2, 159]), o($Vj1, [2, 160]), o($Vj1, [2, 161]), o($Vj1, [2, 162]), o($Vj1, [2, 163]), o($Vj1, [2, 164]), {\n 46: $Vb,\n 48: 167,\n 80: $Vh,\n 94: $Vi,\n 95: $Vj,\n 98: $Vk,\n 99: $Vl,\n 100: $Vm,\n 102: $Vn,\n 103: $Vo,\n 107: 39,\n 109: $Vp,\n 110: $Vq,\n 111: $Vr,\n 112: $Vs,\n 113: $Vt,\n 114: $Vu\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 168,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 170,\n 42: $V11,\n 46: $VD,\n 49: [1, 169],\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 171,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 172,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 173,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 174,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 175,\n 42: $V11,\n 46: $VD,\n 59: [1, 176],\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 177,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 178,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 179,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, o($VU, [2, 145]), o($Vk1, [2, 3]), {\n 8: 180,\n 15: $Vv\n }, {\n 15: [2, 7]\n }, o($V4, [2, 28]), o($VW, [2, 33]), o($VB, [2, 47], {\n 30: 181,\n 22: $Vw\n }), o($VY, [2, 69], {\n 22: [1, 182]\n }), {\n 22: [1, 183]\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 184,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 70: [1, 185],\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, o($Vj1, [2, 76]), o($Vj1, [2, 78]), o($Vj1, [2, 134]), o($Vj1, [2, 135]), o($Vj1, [2, 136]), o($Vj1, [2, 137]), o($Vj1, [2, 138]), o($Vj1, [2, 139]), o($Vj1, [2, 140]), o($Vj1, [2, 141]), o($Vj1, [2, 142]), o($Vj1, [2, 143]), o($Vj1, [2, 79]), o($Vj1, [2, 80]), o($Vj1, [2, 81]), o($Vj1, [2, 82]), o($Vj1, [2, 83]), o($Vj1, [2, 84]), o($Vj1, [2, 85]), o($Vj1, [2, 86]), o($Vj1, [2, 87]), o($Vj1, [2, 88]), o($Vj1, [2, 89]), {\n 9: 188,\n 20: $Vy,\n 21: $Vz,\n 22: $VZ,\n 23: $VA,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 40: [1, 187],\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 18: 18,\n 19: 19,\n 20: $V6,\n 21: $V7,\n 22: $V8,\n 23: $V9,\n 32: 24,\n 33: 25,\n 34: 26,\n 35: 27,\n 36: 28,\n 37: 29,\n 38: $Va,\n 42: [1, 189],\n 44: 31,\n 45: 37,\n 46: $Vb,\n 48: 38,\n 75: $Vc,\n 76: $Vd,\n 77: $Ve,\n 78: $Vf,\n 79: $Vg,\n 80: $Vh,\n 94: $Vi,\n 95: $Vj,\n 98: $Vk,\n 99: $Vl,\n 100: $Vm,\n 102: $Vn,\n 103: $Vo,\n 107: 39,\n 109: $Vp,\n 110: $Vq,\n 111: $Vr,\n 112: $Vs,\n 113: $Vt,\n 114: $Vu\n }, {\n 22: $Vw,\n 30: 190\n }, {\n 22: [1, 191],\n 26: $VC,\n 46: $VD,\n 80: $VE,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 106: 89,\n 108: 165,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: [1, 192]\n }, {\n 22: [1, 193]\n }, {\n 22: [1, 194],\n 95: [1, 195]\n }, o($Vl1, [2, 117]), {\n 22: [1, 196]\n }, {\n 22: [1, 197],\n 26: $VC,\n 46: $VD,\n 80: $VE,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 106: 89,\n 108: 165,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: [1, 198],\n 26: $VC,\n 46: $VD,\n 80: $VE,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 106: 89,\n 108: 165,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 73: [1, 199]\n }, o($VV, [2, 97], {\n 22: [1, 200]\n }), {\n 73: [1, 201],\n 90: [1, 202]\n }, {\n 73: [1, 203]\n }, o($Vi1, [2, 147]), {\n 73: [1, 204],\n 90: [1, 205]\n }, o($VS, [2, 53], {\n 107: 116,\n 46: $Vb,\n 80: $Vh,\n 94: $Vi,\n 95: $Vj,\n 98: $Vk,\n 99: $Vl,\n 100: $Vm,\n 102: $Vn,\n 103: $Vo,\n 109: $Vp,\n 110: $Vq,\n 111: $Vr,\n 112: $Vs,\n 113: $Vt,\n 114: $Vu\n }), {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 41: [1, 206],\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 207,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 42: $V11,\n 46: $VD,\n 50: [1, 208],\n 61: $V21,\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 42: $V11,\n 46: $VD,\n 52: [1, 209],\n 61: $V21,\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 42: $V11,\n 46: $VD,\n 54: [1, 210],\n 61: $V21,\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 42: $V11,\n 46: $VD,\n 56: [1, 211],\n 61: $V21,\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 42: $V11,\n 46: $VD,\n 58: [1, 212],\n 61: $V21,\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 42: $V11,\n 46: $VD,\n 60: [1, 213],\n 61: $V21,\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 214,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 41: [1, 215],\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 63: [1, 216],\n 65: [1, 217],\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 63: [1, 219],\n 65: [1, 218],\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 9: 220,\n 20: $Vy,\n 21: $Vz,\n 23: $VA\n }, o($VB, [2, 48], {\n 46: $Vh1\n }), o($VY, [2, 71]), o($VY, [2, 70]), {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 71: [1, 221],\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, o($VY, [2, 73]), o($Vj1, [2, 77]), {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 39: 222,\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 127,\n 73: $V41,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, o($Vg1, $V5, {\n 17: 223\n }), o($Vx, [2, 43]), {\n 45: 224,\n 46: $Vb,\n 48: 38,\n 80: $Vh,\n 94: $Vi,\n 95: $Vj,\n 98: $Vk,\n 99: $Vl,\n 100: $Vm,\n 102: $Vn,\n 103: $Vo,\n 107: 39,\n 109: $Vp,\n 110: $Vq,\n 111: $Vr,\n 112: $Vs,\n 113: $Vt,\n 114: $Vu\n }, {\n 22: $Vm1,\n 75: $Vn1,\n 85: 225,\n 91: $Vo1,\n 94: $Vp1,\n 96: 226,\n 97: 227,\n 98: $Vq1,\n 99: $Vr1,\n 100: $Vs1,\n 101: $Vt1,\n 102: $Vu1,\n 103: $Vv1,\n 104: $Vw1\n }, {\n 22: $Vm1,\n 75: $Vn1,\n 85: 239,\n 91: $Vo1,\n 94: $Vp1,\n 96: 226,\n 97: 227,\n 98: $Vq1,\n 99: $Vr1,\n 100: $Vs1,\n 101: $Vt1,\n 102: $Vu1,\n 103: $Vv1,\n 104: $Vw1\n }, {\n 22: $Vm1,\n 75: $Vn1,\n 85: 240,\n 91: $Vo1,\n 93: [1, 241],\n 94: $Vp1,\n 96: 226,\n 97: 227,\n 98: $Vq1,\n 99: $Vr1,\n 100: $Vs1,\n 101: $Vt1,\n 102: $Vu1,\n 103: $Vv1,\n 104: $Vw1\n }, {\n 22: $Vm1,\n 75: $Vn1,\n 85: 242,\n 91: $Vo1,\n 93: [1, 243],\n 94: $Vp1,\n 96: 226,\n 97: 227,\n 98: $Vq1,\n 99: $Vr1,\n 100: $Vs1,\n 101: $Vt1,\n 102: $Vu1,\n 103: $Vv1,\n 104: $Vw1\n }, {\n 94: [1, 244]\n }, {\n 22: $Vm1,\n 75: $Vn1,\n 85: 245,\n 91: $Vo1,\n 94: $Vp1,\n 96: 226,\n 97: 227,\n 98: $Vq1,\n 99: $Vr1,\n 100: $Vs1,\n 101: $Vt1,\n 102: $Vu1,\n 103: $Vv1,\n 104: $Vw1\n }, {\n 22: $Vm1,\n 75: $Vn1,\n 85: 246,\n 91: $Vo1,\n 94: $Vp1,\n 96: 226,\n 97: 227,\n 98: $Vq1,\n 99: $Vr1,\n 100: $Vs1,\n 101: $Vt1,\n 102: $Vu1,\n 103: $Vv1,\n 104: $Vw1\n }, {\n 26: $VC,\n 46: $VD,\n 80: $VE,\n 86: 247,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 106: 89,\n 108: 87,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, o($VV, [2, 96]), {\n 73: [1, 248]\n }, o($VV, [2, 100], {\n 22: [1, 249]\n }), o($VV, [2, 101]), o($VV, [2, 104]), o($VV, [2, 106], {\n 22: [1, 250]\n }), o($VV, [2, 107]), o($VT, [2, 54]), {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 42: $V11,\n 46: $VD,\n 50: [1, 251],\n 61: $V21,\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, o($VT, [2, 60]), o($VT, [2, 56]), o($VT, [2, 57]), o($VT, [2, 58]), o($VT, [2, 59]), o($VT, [2, 61]), {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 42: $V11,\n 46: $VD,\n 60: [1, 252],\n 61: $V21,\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, o($VT, [2, 63]), o($VT, [2, 64]), o($VT, [2, 66]), o($VT, [2, 65]), o($VT, [2, 67]), o($Vk1, [2, 4]), o([22, 46, 80, 94, 95, 98, 99, 100, 102, 103, 109, 110, 111, 112, 113, 114], [2, 75]), {\n 22: $VZ,\n 24: $V_,\n 26: $V$,\n 38: $V01,\n 41: [1, 253],\n 42: $V11,\n 46: $VD,\n 61: $V21,\n 69: $V31,\n 72: 186,\n 74: 138,\n 75: $V51,\n 76: $V61,\n 77: $V71,\n 78: $V81,\n 79: $V91,\n 80: $Va1,\n 81: $Vb1,\n 83: 129,\n 84: $Vc1,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $Vd1,\n 102: $VK,\n 103: $VL,\n 104: $Ve1,\n 105: $Vf1,\n 106: 135,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 18: 18,\n 19: 19,\n 20: $V6,\n 21: $V7,\n 22: $V8,\n 23: $V9,\n 32: 24,\n 33: 25,\n 34: 26,\n 35: 27,\n 36: 28,\n 37: 29,\n 38: $Va,\n 42: [1, 254],\n 44: 31,\n 45: 37,\n 46: $Vb,\n 48: 38,\n 75: $Vc,\n 76: $Vd,\n 77: $Ve,\n 78: $Vf,\n 79: $Vg,\n 80: $Vh,\n 94: $Vi,\n 95: $Vj,\n 98: $Vk,\n 99: $Vl,\n 100: $Vm,\n 102: $Vn,\n 103: $Vo,\n 107: 39,\n 109: $Vp,\n 110: $Vq,\n 111: $Vr,\n 112: $Vs,\n 113: $Vt,\n 114: $Vu\n }, o($VS, [2, 52]), o($VV, [2, 109], {\n 95: $Vx1\n }), o($Vy1, [2, 119], {\n 97: 256,\n 22: $Vm1,\n 75: $Vn1,\n 91: $Vo1,\n 94: $Vp1,\n 98: $Vq1,\n 99: $Vr1,\n 100: $Vs1,\n 101: $Vt1,\n 102: $Vu1,\n 103: $Vv1,\n 104: $Vw1\n }), o($Vz1, [2, 121]), o($Vz1, [2, 123]), o($Vz1, [2, 124]), o($Vz1, [2, 125]), o($Vz1, [2, 126]), o($Vz1, [2, 127]), o($Vz1, [2, 128]), o($Vz1, [2, 129]), o($Vz1, [2, 130]), o($Vz1, [2, 131]), o($Vz1, [2, 132]), o($Vz1, [2, 133]), o($VV, [2, 110], {\n 95: $Vx1\n }), o($VV, [2, 111], {\n 95: $Vx1\n }), {\n 22: [1, 257]\n }, o($VV, [2, 112], {\n 95: $Vx1\n }), {\n 22: [1, 258]\n }, o($Vl1, [2, 118]), o($VV, [2, 92], {\n 95: $Vx1\n }), o($VV, [2, 93], {\n 95: $Vx1\n }), o($VV, [2, 94], {\n 106: 89,\n 108: 165,\n 26: $VC,\n 46: $VD,\n 80: $VE,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }), o($VV, [2, 98]), {\n 90: [1, 259]\n }, {\n 90: [1, 260]\n }, {\n 50: [1, 261]\n }, {\n 60: [1, 262]\n }, {\n 9: 263,\n 20: $Vy,\n 21: $Vz,\n 23: $VA\n }, o($Vx, [2, 42]), {\n 22: $Vm1,\n 75: $Vn1,\n 91: $Vo1,\n 94: $Vp1,\n 96: 264,\n 97: 227,\n 98: $Vq1,\n 99: $Vr1,\n 100: $Vs1,\n 101: $Vt1,\n 102: $Vu1,\n 103: $Vv1,\n 104: $Vw1\n }, o($Vz1, [2, 122]), {\n 26: $VC,\n 46: $VD,\n 80: $VE,\n 86: 265,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 106: 89,\n 108: 87,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, {\n 26: $VC,\n 46: $VD,\n 80: $VE,\n 86: 266,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 106: 89,\n 108: 87,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }, o($VV, [2, 102]), o($VV, [2, 108]), o($VT, [2, 55]), o($VT, [2, 62]), o($Vg1, $V5, {\n 17: 267\n }), o($Vy1, [2, 120], {\n 97: 256,\n 22: $Vm1,\n 75: $Vn1,\n 91: $Vo1,\n 94: $Vp1,\n 98: $Vq1,\n 99: $Vr1,\n 100: $Vs1,\n 101: $Vt1,\n 102: $Vu1,\n 103: $Vv1,\n 104: $Vw1\n }), o($VV, [2, 115], {\n 106: 89,\n 108: 165,\n 22: [1, 268],\n 26: $VC,\n 46: $VD,\n 80: $VE,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }), o($VV, [2, 116], {\n 106: 89,\n 108: 165,\n 22: [1, 269],\n 26: $VC,\n 46: $VD,\n 80: $VE,\n 94: $VF,\n 95: $VG,\n 98: $VH,\n 99: $VI,\n 100: $VJ,\n 102: $VK,\n 103: $VL,\n 109: $VM,\n 110: $VN,\n 111: $VO,\n 112: $VP,\n 113: $VQ,\n 114: $VR\n }), {\n 18: 18,\n 19: 19,\n 20: $V6,\n 21: $V7,\n 22: $V8,\n 23: $V9,\n 32: 24,\n 33: 25,\n 34: 26,\n 35: 27,\n 36: 28,\n 37: 29,\n 38: $Va,\n 42: [1, 270],\n 44: 31,\n 45: 37,\n 46: $Vb,\n 48: 38,\n 75: $Vc,\n 76: $Vd,\n 77: $Ve,\n 78: $Vf,\n 79: $Vg,\n 80: $Vh,\n 94: $Vi,\n 95: $Vj,\n 98: $Vk,\n 99: $Vl,\n 100: $Vm,\n 102: $Vn,\n 103: $Vo,\n 107: 39,\n 109: $Vp,\n 110: $Vq,\n 111: $Vr,\n 112: $Vs,\n 113: $Vt,\n 114: $Vu\n }, {\n 22: $Vm1,\n 75: $Vn1,\n 85: 271,\n 91: $Vo1,\n 94: $Vp1,\n 96: 226,\n 97: 227,\n 98: $Vq1,\n 99: $Vr1,\n 100: $Vs1,\n 101: $Vt1,\n 102: $Vu1,\n 103: $Vv1,\n 104: $Vw1\n }, {\n 22: $Vm1,\n 75: $Vn1,\n 85: 272,\n 91: $Vo1,\n 94: $Vp1,\n 96: 226,\n 97: 227,\n 98: $Vq1,\n 99: $Vr1,\n 100: $Vs1,\n 101: $Vt1,\n 102: $Vu1,\n 103: $Vv1,\n 104: $Vw1\n }, o($Vx, [2, 41]), o($VV, [2, 113], {\n 95: $Vx1\n }), o($VV, [2, 114], {\n 95: $Vx1\n })],\n defaultActions: {\n 2: [2, 1],\n 9: [2, 5],\n 10: [2, 2],\n 119: [2, 7]\n },\n parseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n },\n parse: function parse(input) {\n var self = this,\n stack = [0],\n tstack = [],\n vstack = [null],\n lstack = [],\n table = this.table,\n yytext = '',\n yylineno = 0,\n yyleng = 0,\n recovering = 0,\n TERROR = 2,\n EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = {\n yy: {}\n };\n\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n\n token = self.symbols_[token] || token;\n }\n\n return token;\n }\n\n var symbol,\n preErrorSymbol,\n state,\n action,\n a,\n r,\n yyval = {},\n p,\n len,\n newState,\n expected;\n\n while (true) {\n state = stack[stack.length - 1];\n\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n\n action = table[state] && table[state][symbol];\n }\n\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n\n break;\n\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n\n if (ranges) {\n yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n }\n\n r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));\n\n if (typeof r !== 'undefined') {\n return r;\n }\n\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n\n case 3:\n return true;\n }\n }\n\n return true;\n }\n };\n /* generated by jison-lex 0.3.4 */\n\n var lexer = function () {\n var lexer = {\n EOF: 1,\n parseError: function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n // resets the lexer, sets new input\n setInput: function setInput(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n\n this.offset = 0;\n return this;\n },\n // consumes and returns one char from the input\n input: function input() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n // unshifts one char (or a string) into the input\n unput: function unput(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;\n\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n\n this.yyleng = this.yytext.length;\n return this;\n },\n // When called from action, caches matched text and appends it on next action\n more: function more() {\n this._more = true;\n return this;\n },\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: function reject() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n\n return this;\n },\n // retain first n characters of the match\n less: function less(n) {\n this.unput(this.match.slice(n));\n },\n // displays already matched input, i.e. for error messages\n pastInput: function pastInput() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\\n/g, \"\");\n },\n // displays upcoming input, i.e. for error messages\n upcomingInput: function upcomingInput() {\n var next = this.match;\n\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n\n return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: function showPosition() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: function test_match(match, indexed_rule) {\n var token, lines, backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno += lines.length;\n }\n\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n\n if (this.done && this._input) {\n this.done = false;\n }\n\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n\n return false;\n },\n // return next match in input\n next: function next() {\n if (this.done) {\n return this.EOF;\n }\n\n if (!this._input) {\n this.done = true;\n }\n\n var token, match, tempMatch, index;\n\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n\n var rules = this._currentRules();\n\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n\n if (match) {\n token = this.test_match(match, rules[index]);\n\n if (token !== false) {\n return token;\n } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n\n\n return false;\n }\n\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n // return next match that has a token\n lex: function lex() {\n var r = this.next();\n\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: function begin(condition) {\n this.conditionStack.push(condition);\n },\n // pop the previously active lexer condition state off the condition stack\n popState: function popState() {\n var n = this.conditionStack.length - 1;\n\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n // alias for begin(condition)\n pushState: function pushState(condition) {\n this.begin(condition);\n },\n // return the number of states currently on the stack\n stateStackSize: function stateStackSize() {\n return this.conditionStack.length;\n },\n options: {},\n performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n\n switch ($avoiding_name_collisions) {\n case 0:\n this.begin('open_directive');\n return 12;\n break;\n\n case 1:\n this.begin('type_directive');\n return 13;\n break;\n\n case 2:\n this.popState();\n this.begin('arg_directive');\n return 10;\n break;\n\n case 3:\n this.popState();\n this.popState();\n return 15;\n break;\n\n case 4:\n return 14;\n break;\n\n case 5:\n /* skip comments */\n break;\n\n case 6:\n /* skip comments */\n break;\n\n case 7:\n this.begin(\"string\");\n break;\n\n case 8:\n this.popState();\n break;\n\n case 9:\n return \"STR\";\n break;\n\n case 10:\n return 75;\n break;\n\n case 11:\n return 84;\n break;\n\n case 12:\n return 76;\n break;\n\n case 13:\n return 93;\n break;\n\n case 14:\n return 77;\n break;\n\n case 15:\n return 78;\n break;\n\n case 16:\n this.begin(\"href\");\n break;\n\n case 17:\n this.popState();\n break;\n\n case 18:\n return 89;\n break;\n\n case 19:\n this.begin(\"callbackname\");\n break;\n\n case 20:\n this.popState();\n break;\n\n case 21:\n this.popState();\n this.begin(\"callbackargs\");\n break;\n\n case 22:\n return 87;\n break;\n\n case 23:\n this.popState();\n break;\n\n case 24:\n return 88;\n break;\n\n case 25:\n this.begin(\"click\");\n break;\n\n case 26:\n this.popState();\n break;\n\n case 27:\n return 79;\n break;\n\n case 28:\n if (yy.lex.firstGraph()) {\n this.begin(\"dir\");\n }\n\n return 24;\n break;\n\n case 29:\n if (yy.lex.firstGraph()) {\n this.begin(\"dir\");\n }\n\n return 24;\n break;\n\n case 30:\n return 38;\n break;\n\n case 31:\n return 42;\n break;\n\n case 32:\n return 90;\n break;\n\n case 33:\n return 90;\n break;\n\n case 34:\n return 90;\n break;\n\n case 35:\n return 90;\n break;\n\n case 36:\n this.popState();\n return 25;\n break;\n\n case 37:\n this.popState();\n return 26;\n break;\n\n case 38:\n this.popState();\n return 26;\n break;\n\n case 39:\n this.popState();\n return 26;\n break;\n\n case 40:\n this.popState();\n return 26;\n break;\n\n case 41:\n this.popState();\n return 26;\n break;\n\n case 42:\n this.popState();\n return 26;\n break;\n\n case 43:\n this.popState();\n return 26;\n break;\n\n case 44:\n this.popState();\n return 26;\n break;\n\n case 45:\n this.popState();\n return 26;\n break;\n\n case 46:\n this.popState();\n return 26;\n break;\n\n case 47:\n return 94;\n break;\n\n case 48:\n return 102;\n break;\n\n case 49:\n return 47;\n break;\n\n case 50:\n return 99;\n break;\n\n case 51:\n return 46;\n break;\n\n case 52:\n return 20;\n break;\n\n case 53:\n return 95;\n break;\n\n case 54:\n return 113;\n break;\n\n case 55:\n return 70;\n break;\n\n case 56:\n return 70;\n break;\n\n case 57:\n return 70;\n break;\n\n case 58:\n return 69;\n break;\n\n case 59:\n return 69;\n break;\n\n case 60:\n return 69;\n break;\n\n case 61:\n return 51;\n break;\n\n case 62:\n return 52;\n break;\n\n case 63:\n return 53;\n break;\n\n case 64:\n return 54;\n break;\n\n case 65:\n return 55;\n break;\n\n case 66:\n return 56;\n break;\n\n case 67:\n return 57;\n break;\n\n case 68:\n return 58;\n break;\n\n case 69:\n return 100;\n break;\n\n case 70:\n return 103;\n break;\n\n case 71:\n return 114;\n break;\n\n case 72:\n return 111;\n break;\n\n case 73:\n return 104;\n break;\n\n case 74:\n return 112;\n break;\n\n case 75:\n return 112;\n break;\n\n case 76:\n return 105;\n break;\n\n case 77:\n return 61;\n break;\n\n case 78:\n return 81;\n break;\n\n case 79:\n return 'SEP';\n break;\n\n case 80:\n return 80;\n break;\n\n case 81:\n return 98;\n break;\n\n case 82:\n return 63;\n break;\n\n case 83:\n return 62;\n break;\n\n case 84:\n return 65;\n break;\n\n case 85:\n return 64;\n break;\n\n case 86:\n return 109;\n break;\n\n case 87:\n return 110;\n break;\n\n case 88:\n return 71;\n break;\n\n case 89:\n return 49;\n break;\n\n case 90:\n return 50;\n break;\n\n case 91:\n return 40;\n break;\n\n case 92:\n return 41;\n break;\n\n case 93:\n return 59;\n break;\n\n case 94:\n return 60;\n break;\n\n case 95:\n return 120;\n break;\n\n case 96:\n return 21;\n break;\n\n case 97:\n return 22;\n break;\n\n case 98:\n return 23;\n break;\n }\n },\n rules: [/^(?:%%\\{)/, /^(?:((?:(?!\\}%%)[^:.])*))/, /^(?::)/, /^(?:\\}%%)/, /^(?:((?:(?!\\}%%).|\\n)*))/, /^(?:%%(?!\\{)[^\\n]*)/, /^(?:[^\\}]%%[^\\n]*)/, /^(?:[\"])/, /^(?:[\"])/, /^(?:[^\"]*)/, /^(?:style\\b)/, /^(?:default\\b)/, /^(?:linkStyle\\b)/, /^(?:interpolate\\b)/, /^(?:classDef\\b)/, /^(?:class\\b)/, /^(?:href[\\s]+[\"])/, /^(?:[\"])/, /^(?:[^\"]*)/, /^(?:call[\\s]+)/, /^(?:\\([\\s]*\\))/, /^(?:\\()/, /^(?:[^(]*)/, /^(?:\\))/, /^(?:[^)]*)/, /^(?:click[\\s]+)/, /^(?:[\\s\\n])/, /^(?:[^\\s\\n]*)/, /^(?:graph\\b)/, /^(?:flowchart\\b)/, /^(?:subgraph\\b)/, /^(?:end\\b\\s*)/, /^(?:_self\\b)/, /^(?:_blank\\b)/, /^(?:_parent\\b)/, /^(?:_top\\b)/, /^(?:(\\r?\\n)*\\s*\\n)/, /^(?:\\s*LR\\b)/, /^(?:\\s*RL\\b)/, /^(?:\\s*TB\\b)/, /^(?:\\s*BT\\b)/, /^(?:\\s*TD\\b)/, /^(?:\\s*BR\\b)/, /^(?:\\s*<)/, /^(?:\\s*>)/, /^(?:\\s*\\^)/, /^(?:\\s*v\\b)/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::::)/, /^(?::)/, /^(?:&)/, /^(?:;)/, /^(?:,)/, /^(?:\\*)/, /^(?:\\s*[xo<]?--+[-xo>]\\s*)/, /^(?:\\s*[xo<]?==+[=xo>]\\s*)/, /^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/, /^(?:\\s*[xo<]?--\\s*)/, /^(?:\\s*[xo<]?==\\s*)/, /^(?:\\s*[xo<]?-\\.\\s*)/, /^(?:\\(-)/, /^(?:-\\))/, /^(?:\\(\\[)/, /^(?:\\]\\))/, /^(?:\\[\\[)/, /^(?:\\]\\])/, /^(?:\\[\\()/, /^(?:\\)\\])/, /^(?:-)/, /^(?:\\.)/, /^(?:[\\_])/, /^(?:\\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:<)/, /^(?:>)/, /^(?:\\^)/, /^(?:\\\\\\|)/, /^(?:v\\b)/, /^(?:[A-Za-z]+)/, /^(?:\\\\\\])/, /^(?:\\[\\/)/, /^(?:\\/\\])/, /^(?:\\[\\\\)/, /^(?:[!\"#$%&'*+,-.`?\\\\_/])/, /^(?:[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|[\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39]|[\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8]|[\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C]|[\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C]|[\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99]|[\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0]|[\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D]|[\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3]|[\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10]|[\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1]|[\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81]|[\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3]|[\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6]|[\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/, /^(?:\\|)/, /^(?:\\()/, /^(?:\\))/, /^(?:\\[)/, /^(?:\\])/, /^(?:\\{)/, /^(?:\\})/, /^(?:\")/, /^(?:(\\r?\\n)+)/, /^(?:\\s)/, /^(?:$)/],\n conditions: {\n \"close_directive\": {\n \"rules\": [],\n \"inclusive\": false\n },\n \"arg_directive\": {\n \"rules\": [3, 4],\n \"inclusive\": false\n },\n \"type_directive\": {\n \"rules\": [2, 3],\n \"inclusive\": false\n },\n \"open_directive\": {\n \"rules\": [1],\n \"inclusive\": false\n },\n \"callbackargs\": {\n \"rules\": [23, 24],\n \"inclusive\": false\n },\n \"callbackname\": {\n \"rules\": [20, 21, 22],\n \"inclusive\": false\n },\n \"href\": {\n \"rules\": [17, 18],\n \"inclusive\": false\n },\n \"click\": {\n \"rules\": [26, 27],\n \"inclusive\": false\n },\n \"vertex\": {\n \"rules\": [],\n \"inclusive\": false\n },\n \"dir\": {\n \"rules\": [36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46],\n \"inclusive\": false\n },\n \"string\": {\n \"rules\": [8, 9],\n \"inclusive\": false\n },\n \"INITIAL\": {\n \"rules\": [0, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 19, 25, 28, 29, 30, 31, 32, 33, 34, 35, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98],\n \"inclusive\": true\n }\n }\n };\n return lexer;\n }();\n\n parser.lexer = lexer;\n\n function Parser() {\n this.yy = {};\n }\n\n Parser.prototype = parser;\n parser.Parser = Parser;\n return new Parser();\n }();\n\n if (true) {\n exports.parser = parser;\n exports.Parser = parser.Parser;\n\n exports.parse = function () {\n return parser.parse.apply(parser, arguments);\n };\n\n exports.main = function commonjsMain(args) {\n if (!args[1]) {\n console.log('Usage: ' + args[0] + ' FILE');\n process.exit(1);\n }\n\n var source = __webpack_require__(\n /*! fs */\n \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(\n /*! path */\n \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n\n return exports.parser.parse(source);\n };\n\n if (true && __webpack_require__.c[__webpack_require__.s] === module) {\n exports.main(process.argv.slice(1));\n }\n }\n /* WEBPACK VAR INJECTION */\n\n }).call(this, __webpack_require__(\n /*! ./../../../../node_modules/process/browser.js */\n \"./node_modules/process/browser.js\"), __webpack_require__(\n /*! ./../../../../node_modules/webpack/buildin/module.js */\n \"./node_modules/webpack/buildin/module.js\")(module));\n /***/\n },\n\n /***/\n \"./src/diagrams/flowchart/styles.js\":\n /*!******************************************!*\\\n !*** ./src/diagrams/flowchart/styles.js ***!\n \\******************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDiagramsFlowchartStylesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n\n var getStyles = function getStyles(options) {\n return \".label {\\n font-family: \".concat(options.fontFamily, \";\\n color: \").concat(options.nodeTextColor || options.textColor, \";\\n }\\n .cluster-label text {\\n fill: \").concat(options.titleColor, \";\\n }\\n .cluster-label span {\\n color: \").concat(options.titleColor, \";\\n }\\n\\n .label text,span {\\n fill: \").concat(options.nodeTextColor || options.textColor, \";\\n color: \").concat(options.nodeTextColor || options.textColor, \";\\n }\\n\\n .node rect,\\n .node circle,\\n .node ellipse,\\n .node polygon,\\n .node path {\\n fill: \").concat(options.mainBkg, \";\\n stroke: \").concat(options.nodeBorder, \";\\n stroke-width: 1px;\\n }\\n\\n .node .label {\\n text-align: center;\\n }\\n .node.clickable {\\n cursor: pointer;\\n }\\n\\n .arrowheadPath {\\n fill: \").concat(options.arrowheadColor, \";\\n }\\n\\n .edgePath .path {\\n stroke: \").concat(options.lineColor, \";\\n stroke-width: 1.5px;\\n }\\n\\n .flowchart-link {\\n stroke: \").concat(options.lineColor, \";\\n fill: none;\\n }\\n\\n .edgeLabel {\\n background-color: \").concat(options.edgeLabelBackground, \";\\n rect {\\n opacity: 0.5;\\n background-color: \").concat(options.edgeLabelBackground, \";\\n fill: \").concat(options.edgeLabelBackground, \";\\n }\\n text-align: center;\\n }\\n\\n .cluster rect {\\n fill: \").concat(options.clusterBkg, \";\\n stroke: \").concat(options.clusterBorder, \";\\n stroke-width: 1px;\\n }\\n\\n .cluster text {\\n fill: \").concat(options.titleColor, \";\\n }\\n\\n .cluster span {\\n color: \").concat(options.titleColor, \";\\n }\\n // .cluster div {\\n // color: \").concat(options.titleColor, \";\\n // }\\n\\n div.mermaidTooltip {\\n position: absolute;\\n text-align: center;\\n max-width: 200px;\\n padding: 2px;\\n font-family: \").concat(options.fontFamily, \";\\n font-size: 12px;\\n background: \").concat(options.tertiaryColor, \";\\n border: 1px solid \").concat(options.border2, \";\\n border-radius: 2px;\\n pointer-events: none;\\n z-index: 100;\\n }\\n\");\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = getStyles;\n /***/\n },\n\n /***/\n \"./src/diagrams/gantt/ganttDb.js\":\n /*!***************************************!*\\\n !*** ./src/diagrams/gantt/ganttDb.js ***!\n \\***************************************/\n\n /*! exports provided: parseDirective, clear, setAxisFormat, getAxisFormat, setTodayMarker, getTodayMarker, setDateFormat, enableInclusiveEndDates, endDatesAreInclusive, getDateFormat, setExcludes, getExcludes, setTitle, getTitle, addSection, getSections, getTasks, addTask, findTaskById, addTaskOrg, setLink, setClass, setClickEvent, bindFunctions, default */\n\n /***/\n function srcDiagramsGanttGanttDbJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"parseDirective\", function () {\n return parseDirective;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"clear\", function () {\n return clear;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setAxisFormat\", function () {\n return setAxisFormat;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getAxisFormat\", function () {\n return getAxisFormat;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setTodayMarker\", function () {\n return setTodayMarker;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getTodayMarker\", function () {\n return getTodayMarker;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setDateFormat\", function () {\n return setDateFormat;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"enableInclusiveEndDates\", function () {\n return enableInclusiveEndDates;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"endDatesAreInclusive\", function () {\n return endDatesAreInclusive;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getDateFormat\", function () {\n return getDateFormat;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setExcludes\", function () {\n return setExcludes;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getExcludes\", function () {\n return getExcludes;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setTitle\", function () {\n return setTitle;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getTitle\", function () {\n return getTitle;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addSection\", function () {\n return addSection;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getSections\", function () {\n return getSections;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getTasks\", function () {\n return getTasks;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addTask\", function () {\n return addTask;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"findTaskById\", function () {\n return findTaskById;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addTaskOrg\", function () {\n return addTaskOrg;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setLink\", function () {\n return setLink;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setClass\", function () {\n return setClass;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setClickEvent\", function () {\n return setClickEvent;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"bindFunctions\", function () {\n return bindFunctions;\n });\n /* harmony import */\n\n\n var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! moment-mini */\n \"moment-mini\");\n /* harmony import */\n\n\n var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! @braintree/sanitize-url */\n \"@braintree/sanitize-url\");\n /* harmony import */\n\n\n var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n /* harmony import */\n\n\n var _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ../../mermaidAPI */\n \"./src/mermaidAPI.js\");\n\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n }\n\n function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }\n\n function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n }\n\n var dateFormat = '';\n var axisFormat = '';\n var todayMarker = '';\n var excludes = [];\n var title = '';\n var sections = [];\n var tasks = [];\n var currentSection = '';\n var tags = ['active', 'done', 'crit', 'milestone'];\n var funs = [];\n var inclusiveEndDates = false; // The serial order of the task in the script\n\n var lastOrder = 0;\n\n var parseDirective = function parseDirective(statement, context, type) {\n _mermaidAPI__WEBPACK_IMPORTED_MODULE_5__[\"default\"].parseDirective(this, statement, context, type);\n };\n\n var clear = function clear() {\n sections = [];\n tasks = [];\n currentSection = '';\n funs = [];\n title = '';\n taskCnt = 0;\n lastTask = undefined;\n lastTaskID = undefined;\n rawTasks = [];\n dateFormat = '';\n axisFormat = '';\n todayMarker = '';\n excludes = [];\n inclusiveEndDates = false;\n lastOrder = 0;\n };\n\n var setAxisFormat = function setAxisFormat(txt) {\n axisFormat = txt;\n };\n\n var getAxisFormat = function getAxisFormat() {\n return axisFormat;\n };\n\n var setTodayMarker = function setTodayMarker(txt) {\n todayMarker = txt;\n };\n\n var getTodayMarker = function getTodayMarker() {\n return todayMarker;\n };\n\n var setDateFormat = function setDateFormat(txt) {\n dateFormat = txt;\n };\n\n var enableInclusiveEndDates = function enableInclusiveEndDates() {\n inclusiveEndDates = true;\n };\n\n var endDatesAreInclusive = function endDatesAreInclusive() {\n return inclusiveEndDates;\n };\n\n var getDateFormat = function getDateFormat() {\n return dateFormat;\n };\n\n var setExcludes = function setExcludes(txt) {\n excludes = txt.toLowerCase().split(/[\\s,]+/);\n };\n\n var getExcludes = function getExcludes() {\n return excludes;\n };\n\n var setTitle = function setTitle(txt) {\n title = txt;\n };\n\n var getTitle = function getTitle() {\n return title;\n };\n\n var addSection = function addSection(txt) {\n currentSection = txt;\n sections.push(txt);\n };\n\n var getSections = function getSections() {\n return sections;\n };\n\n var getTasks = function getTasks() {\n var allItemsPricessed = compileTasks();\n var maxDepth = 10;\n var iterationCount = 0;\n\n while (!allItemsPricessed && iterationCount < maxDepth) {\n allItemsPricessed = compileTasks();\n iterationCount++;\n }\n\n tasks = rawTasks;\n return tasks;\n };\n\n var isInvalidDate = function isInvalidDate(date, dateFormat, excludes) {\n if (date.isoWeekday() >= 6 && excludes.indexOf('weekends') >= 0) {\n return true;\n }\n\n if (excludes.indexOf(date.format('dddd').toLowerCase()) >= 0) {\n return true;\n }\n\n return excludes.indexOf(date.format(dateFormat.trim())) >= 0;\n };\n\n var checkTaskDates = function checkTaskDates(task, dateFormat, excludes) {\n if (!excludes.length || task.manualEndTime) return;\n var startTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.startTime, dateFormat, true);\n startTime.add(1, 'd');\n var endTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.endTime, dateFormat, true);\n var renderEndTime = fixTaskDates(startTime, endTime, dateFormat, excludes);\n task.endTime = endTime.toDate();\n task.renderEndTime = renderEndTime;\n };\n\n var fixTaskDates = function fixTaskDates(startTime, endTime, dateFormat, excludes) {\n var invalid = false;\n var renderEndTime = null;\n\n while (startTime <= endTime) {\n if (!invalid) {\n renderEndTime = endTime.toDate();\n }\n\n invalid = isInvalidDate(startTime, dateFormat, excludes);\n\n if (invalid) {\n endTime.add(1, 'd');\n }\n\n startTime.add(1, 'd');\n }\n\n return renderEndTime;\n };\n\n var getStartDate = function getStartDate(prevTime, dateFormat, str) {\n str = str.trim(); // Test for after\n\n var re = /^after\\s+([\\d\\w- ]+)/;\n var afterStatement = re.exec(str.trim());\n\n if (afterStatement !== null) {\n // check all after ids and take the latest\n var latestEndingTask = null;\n afterStatement[1].split(' ').forEach(function (id) {\n var task = findTaskById(id);\n\n if (typeof task !== 'undefined') {\n if (!latestEndingTask) {\n latestEndingTask = task;\n } else {\n if (task.endTime > latestEndingTask.endTime) {\n latestEndingTask = task;\n }\n }\n }\n });\n\n if (!latestEndingTask) {\n var dt = new Date();\n dt.setHours(0, 0, 0, 0);\n return dt;\n } else {\n return latestEndingTask.endTime;\n }\n } // Check for actual date set\n\n\n var mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);\n\n if (mDate.isValid()) {\n return mDate.toDate();\n } else {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug('Invalid date:' + str);\n\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug('With date format:' + dateFormat.trim());\n } // Default date - now\n\n\n return new Date();\n };\n\n var durationToDate = function durationToDate(durationStatement, relativeTime) {\n if (durationStatement !== null) {\n switch (durationStatement[2]) {\n case 's':\n relativeTime.add(durationStatement[1], 'seconds');\n break;\n\n case 'm':\n relativeTime.add(durationStatement[1], 'minutes');\n break;\n\n case 'h':\n relativeTime.add(durationStatement[1], 'hours');\n break;\n\n case 'd':\n relativeTime.add(durationStatement[1], 'days');\n break;\n\n case 'w':\n relativeTime.add(durationStatement[1], 'weeks');\n break;\n }\n } // Default date - now\n\n\n return relativeTime.toDate();\n };\n\n var getEndDate = function getEndDate(prevTime, dateFormat, str, inclusive) {\n inclusive = inclusive || false;\n str = str.trim(); // Check for actual date\n\n var mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);\n\n if (mDate.isValid()) {\n if (inclusive) {\n mDate.add(1, 'd');\n }\n\n return mDate.toDate();\n }\n\n return durationToDate(/^([\\d]+)([wdhms])/.exec(str.trim()), moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(prevTime));\n };\n\n var taskCnt = 0;\n\n var parseId = function parseId(idStr) {\n if (typeof idStr === 'undefined') {\n taskCnt = taskCnt + 1;\n return 'task' + taskCnt;\n }\n\n return idStr;\n }; // id, startDate, endDate\n // id, startDate, length\n // id, after x, endDate\n // id, after x, length\n // startDate, endDate\n // startDate, length\n // after x, endDate\n // after x, length\n // endDate\n // length\n\n\n var compileData = function compileData(prevTask, dataStr) {\n var ds;\n\n if (dataStr.substr(0, 1) === ':') {\n ds = dataStr.substr(1, dataStr.length);\n } else {\n ds = dataStr;\n }\n\n var data = ds.split(',');\n var task = {}; // Get tags like active, done, crit and milestone\n\n getTaskTags(data, task, tags);\n\n for (var i = 0; i < data.length; i++) {\n data[i] = data[i].trim();\n }\n\n var endTimeData = '';\n\n switch (data.length) {\n case 1:\n task.id = parseId();\n task.startTime = prevTask.endTime;\n endTimeData = data[0];\n break;\n\n case 2:\n task.id = parseId();\n task.startTime = getStartDate(undefined, dateFormat, data[0]);\n endTimeData = data[1];\n break;\n\n case 3:\n task.id = parseId(data[0]);\n task.startTime = getStartDate(undefined, dateFormat, data[1]);\n endTimeData = data[2];\n break;\n\n default:\n }\n\n if (endTimeData) {\n task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);\n task.manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(endTimeData, 'YYYY-MM-DD', true).isValid();\n checkTaskDates(task, dateFormat, excludes);\n }\n\n return task;\n };\n\n var parseData = function parseData(prevTaskId, dataStr) {\n var ds;\n\n if (dataStr.substr(0, 1) === ':') {\n ds = dataStr.substr(1, dataStr.length);\n } else {\n ds = dataStr;\n }\n\n var data = ds.split(',');\n var task = {}; // Get tags like active, done, crit and milestone\n\n getTaskTags(data, task, tags);\n\n for (var i = 0; i < data.length; i++) {\n data[i] = data[i].trim();\n }\n\n switch (data.length) {\n case 1:\n task.id = parseId();\n task.startTime = {\n type: 'prevTaskEnd',\n id: prevTaskId\n };\n task.endTime = {\n data: data[0]\n };\n break;\n\n case 2:\n task.id = parseId();\n task.startTime = {\n type: 'getStartDate',\n startData: data[0]\n };\n task.endTime = {\n data: data[1]\n };\n break;\n\n case 3:\n task.id = parseId(data[0]);\n task.startTime = {\n type: 'getStartDate',\n startData: data[1]\n };\n task.endTime = {\n data: data[2]\n };\n break;\n\n default:\n }\n\n return task;\n };\n\n var lastTask;\n var lastTaskID;\n var rawTasks = [];\n var taskDb = {};\n\n var addTask = function addTask(descr, data) {\n var rawTask = {\n section: currentSection,\n type: currentSection,\n processed: false,\n manualEndTime: false,\n renderEndTime: null,\n raw: {\n data: data\n },\n task: descr,\n classes: []\n };\n var taskInfo = parseData(lastTaskID, data);\n rawTask.raw.startTime = taskInfo.startTime;\n rawTask.raw.endTime = taskInfo.endTime;\n rawTask.id = taskInfo.id;\n rawTask.prevTaskId = lastTaskID;\n rawTask.active = taskInfo.active;\n rawTask.done = taskInfo.done;\n rawTask.crit = taskInfo.crit;\n rawTask.milestone = taskInfo.milestone;\n rawTask.order = lastOrder;\n lastOrder++;\n var pos = rawTasks.push(rawTask);\n lastTaskID = rawTask.id; // Store cross ref\n\n taskDb[rawTask.id] = pos - 1;\n };\n\n var findTaskById = function findTaskById(id) {\n var pos = taskDb[id];\n return rawTasks[pos];\n };\n\n var addTaskOrg = function addTaskOrg(descr, data) {\n var newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: []\n };\n var taskInfo = compileData(lastTask, data);\n newTask.startTime = taskInfo.startTime;\n newTask.endTime = taskInfo.endTime;\n newTask.id = taskInfo.id;\n newTask.active = taskInfo.active;\n newTask.done = taskInfo.done;\n newTask.crit = taskInfo.crit;\n newTask.milestone = taskInfo.milestone;\n lastTask = newTask;\n tasks.push(newTask);\n };\n\n var compileTasks = function compileTasks() {\n var compileTask = function compileTask(pos) {\n var task = rawTasks[pos];\n var startTime = '';\n\n switch (rawTasks[pos].raw.startTime.type) {\n case 'prevTaskEnd':\n {\n var prevTask = findTaskById(task.prevTaskId);\n task.startTime = prevTask.endTime;\n break;\n }\n\n case 'getStartDate':\n startTime = getStartDate(undefined, dateFormat, rawTasks[pos].raw.startTime.startData);\n\n if (startTime) {\n rawTasks[pos].startTime = startTime;\n }\n\n break;\n }\n\n if (rawTasks[pos].startTime) {\n rawTasks[pos].endTime = getEndDate(rawTasks[pos].startTime, dateFormat, rawTasks[pos].raw.endTime.data, inclusiveEndDates);\n\n if (rawTasks[pos].endTime) {\n rawTasks[pos].processed = true;\n rawTasks[pos].manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(rawTasks[pos].raw.endTime.data, 'YYYY-MM-DD', true).isValid();\n checkTaskDates(rawTasks[pos], dateFormat, excludes);\n }\n }\n\n return rawTasks[pos].processed;\n };\n\n var allProcessed = true;\n\n for (var i = 0; i < rawTasks.length; i++) {\n compileTask(i);\n allProcessed = allProcessed && rawTasks[i].processed;\n }\n\n return allProcessed;\n };\n /**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n * @param ids Comma separated list of ids\n * @param linkStr URL to create a link for\n */\n\n\n var setLink = function setLink(ids, _linkStr) {\n var linkStr = _linkStr;\n\n if (_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"]().securityLevel !== 'loose') {\n linkStr = Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__[\"sanitizeUrl\"])(_linkStr);\n }\n\n ids.split(',').forEach(function (id) {\n var rawTask = findTaskById(id);\n\n if (typeof rawTask !== 'undefined') {\n pushFun(id, function () {\n window.open(linkStr, '_self');\n });\n }\n });\n setClass(ids, 'clickable');\n };\n /**\n * Called by parser when a special node is found, e.g. a clickable element.\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\n\n\n var setClass = function setClass(ids, className) {\n ids.split(',').forEach(function (id) {\n var rawTask = findTaskById(id);\n\n if (typeof rawTask !== 'undefined') {\n rawTask.classes.push(className);\n }\n });\n };\n\n var setClickFun = function setClickFun(id, functionName, functionArgs) {\n if (_config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"]().securityLevel !== 'loose') {\n return;\n }\n\n if (typeof functionName === 'undefined') {\n return;\n }\n\n var argList = [];\n\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n\n for (var i = 0; i < argList.length; i++) {\n var item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n\n /* This preserves all starting and ending whitespace inside */\n\n if (item.charAt(0) === '\"' && item.charAt(item.length - 1) === '\"') {\n item = item.substr(1, item.length - 2);\n }\n\n argList[i] = item;\n }\n }\n /* if no arguments passed into callback, default to passing in id */\n\n\n if (argList.length === 0) {\n argList.push(id);\n }\n\n var rawTask = findTaskById(id);\n\n if (typeof rawTask !== 'undefined') {\n pushFun(id, function () {\n _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].runFunc.apply(_utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"], [functionName].concat(_toConsumableArray(argList)));\n });\n }\n };\n /**\n * The callbackFunction is executed in a click event bound to the task with the specified id or the task's assigned text\n * @param id The task's id\n * @param callbackFunction A function to be executed when clicked on the task or the task's text\n */\n\n\n var pushFun = function pushFun(id, callbackFunction) {\n funs.push(function () {\n // const elem = d3.select(element).select(`[id=\"${id}\"]`)\n var elem = document.querySelector(\"[id=\\\"\".concat(id, \"\\\"]\"));\n\n if (elem !== null) {\n elem.addEventListener('click', function () {\n callbackFunction();\n });\n }\n });\n funs.push(function () {\n // const elem = d3.select(element).select(`[id=\"${id}-text\"]`)\n var elem = document.querySelector(\"[id=\\\"\".concat(id, \"-text\\\"]\"));\n\n if (elem !== null) {\n elem.addEventListener('click', function () {\n callbackFunction();\n });\n }\n });\n };\n /**\n * Called by parser when a click definition is found. Registers an event handler.\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param functionArgs Function args the function should be called with\n */\n\n\n var setClickEvent = function setClickEvent(ids, functionName, functionArgs) {\n ids.split(',').forEach(function (id) {\n setClickFun(id, functionName, functionArgs);\n });\n setClass(ids, 'clickable');\n };\n /**\n * Binds all functions previously added to fun (specified through click) to the element\n * @param element\n */\n\n\n var bindFunctions = function bindFunctions(element) {\n funs.forEach(function (fun) {\n fun(element);\n });\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n parseDirective: parseDirective,\n getConfig: function getConfig() {\n return _config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"]().gantt;\n },\n clear: clear,\n setDateFormat: setDateFormat,\n getDateFormat: getDateFormat,\n enableInclusiveEndDates: enableInclusiveEndDates,\n endDatesAreInclusive: endDatesAreInclusive,\n setAxisFormat: setAxisFormat,\n getAxisFormat: getAxisFormat,\n setTodayMarker: setTodayMarker,\n getTodayMarker: getTodayMarker,\n setTitle: setTitle,\n getTitle: getTitle,\n addSection: addSection,\n getSections: getSections,\n getTasks: getTasks,\n addTask: addTask,\n findTaskById: findTaskById,\n addTaskOrg: addTaskOrg,\n setExcludes: setExcludes,\n getExcludes: getExcludes,\n setClickEvent: setClickEvent,\n setLink: setLink,\n bindFunctions: bindFunctions,\n durationToDate: durationToDate\n };\n\n function getTaskTags(data, task, tags) {\n var matchFound = true;\n\n while (matchFound) {\n matchFound = false;\n tags.forEach(function (t) {\n var pattern = '^\\\\s*' + t + '\\\\s*$';\n var regex = new RegExp(pattern);\n\n if (data[0].match(regex)) {\n task[t] = true;\n data.shift(1);\n matchFound = true;\n }\n });\n }\n }\n /***/\n\n },\n\n /***/\n \"./src/diagrams/gantt/ganttRenderer.js\":\n /*!*********************************************!*\\\n !*** ./src/diagrams/gantt/ganttRenderer.js ***!\n \\*********************************************/\n\n /*! exports provided: setConf, draw, default */\n\n /***/\n function srcDiagramsGanttGanttRendererJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _parser_gantt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./parser/gantt */\n \"./src/diagrams/gantt/parser/gantt.jison\");\n /* harmony import */\n\n\n var _parser_gantt__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__);\n /* harmony import */\n\n\n var _common_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ../common/common */\n \"./src/diagrams/common/common.js\");\n /* harmony import */\n\n\n var _ganttDb__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./ganttDb */\n \"./src/diagrams/gantt/ganttDb.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n\n _parser_gantt__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy = _ganttDb__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n var conf = {\n titleTopMargin: 25,\n barHeight: 20,\n barGap: 4,\n topPadding: 50,\n rightPadding: 75,\n leftPadding: 75,\n gridLineStartPadding: 35,\n fontSize: 11,\n fontFamily: '\"Open-Sans\", \"sans-serif\"'\n };\n\n var setConf = function setConf(cnf) {\n var keys = Object.keys(cnf);\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n };\n\n var w;\n\n var draw = function draw(text, id) {\n _parser_gantt__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.clear();\n\n _parser_gantt__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].parse(text);\n\n var elem = document.getElementById(id);\n w = elem.parentElement.offsetWidth;\n\n if (typeof w === 'undefined') {\n w = 1200;\n }\n\n if (typeof conf.useWidth !== 'undefined') {\n w = conf.useWidth;\n }\n\n var taskArray = _parser_gantt__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.getTasks(); // Set height based on number of tasks\n\n\n var h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding; // Set viewBox\n\n elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);\n var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\")); // Set timescale\n\n var timeScale = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"scaleTime\"])().domain([Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"min\"])(taskArray, function (d) {\n return d.startTime;\n }), Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"max\"])(taskArray, function (d) {\n return d.endTime;\n })]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]);\n var categories = [];\n\n for (var i = 0; i < taskArray.length; i++) {\n categories.push(taskArray[i].type);\n }\n\n var catsUnfiltered = categories; // for vert labels\n\n categories = checkUnique(categories);\n\n function taskCompare(a, b) {\n var taskA = a.startTime;\n var taskB = b.startTime;\n var result = 0;\n\n if (taskA > taskB) {\n result = 1;\n } else if (taskA < taskB) {\n result = -1;\n }\n\n return result;\n } // Sort the task array using the above taskCompare() so that\n // tasks are created based on their order of startTime\n\n\n taskArray.sort(taskCompare);\n makeGant(taskArray, w, h);\n Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"configureSvgSize\"])(svg, h, w, conf.useMaxWidth);\n svg.append('text').text(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.getTitle()).attr('x', w / 2).attr('y', conf.titleTopMargin).attr('class', 'titleText');\n\n function makeGant(tasks, pageWidth, pageHeight) {\n var barHeight = conf.barHeight;\n var gap = barHeight + conf.barGap;\n var topPadding = conf.topPadding;\n var leftPadding = conf.leftPadding;\n var colorScale = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"scaleLinear\"])().domain([0, categories.length]).range(['#00B9FA', '#F95002']).interpolate(d3__WEBPACK_IMPORTED_MODULE_0__[\"interpolateHcl\"]);\n makeGrid(leftPadding, topPadding, pageWidth, pageHeight);\n drawRects(tasks, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight);\n vertLabels(gap, topPadding, leftPadding, barHeight, colorScale);\n drawToday(leftPadding, topPadding, pageWidth, pageHeight);\n }\n\n function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w) {\n // Draw background rects covering the entire width of the graph, these form the section rows.\n svg.append('g').selectAll('rect').data(theArray).enter().append('rect').attr('x', 0).attr('y', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + theTopPad - 2;\n }).attr('width', function () {\n return w - conf.rightPadding / 2;\n }).attr('height', theGap).attr('class', function (d) {\n for (var _i = 0; _i < categories.length; _i++) {\n if (d.type === categories[_i]) {\n return 'section section' + _i % conf.numberSectionStyles;\n }\n }\n\n return 'section section0';\n }); // Draw the rects representing the tasks\n\n var rectangles = svg.append('g').selectAll('rect').data(theArray).enter();\n rectangles.append('rect').attr('id', function (d) {\n return d.id;\n }).attr('rx', 3).attr('ry', 3).attr('x', function (d) {\n if (d.milestone) {\n return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;\n }\n\n return timeScale(d.startTime) + theSidePad;\n }).attr('y', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + theTopPad;\n }).attr('width', function (d) {\n if (d.milestone) {\n return theBarHeight;\n }\n\n return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);\n }).attr('height', theBarHeight).attr('transform-origin', function (d, i) {\n return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + 'px ' + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + 'px';\n }).attr('class', function (d) {\n var res = 'task';\n var classStr = '';\n\n if (d.classes.length > 0) {\n classStr = d.classes.join(' ');\n }\n\n var secNum = 0;\n\n for (var _i2 = 0; _i2 < categories.length; _i2++) {\n if (d.type === categories[_i2]) {\n secNum = _i2 % conf.numberSectionStyles;\n }\n }\n\n var taskClass = '';\n\n if (d.active) {\n if (d.crit) {\n taskClass += ' activeCrit';\n } else {\n taskClass = ' active';\n }\n } else if (d.done) {\n if (d.crit) {\n taskClass = ' doneCrit';\n } else {\n taskClass = ' done';\n }\n } else {\n if (d.crit) {\n taskClass += ' crit';\n }\n }\n\n if (taskClass.length === 0) {\n taskClass = ' task';\n }\n\n if (d.milestone) {\n taskClass = ' milestone ' + taskClass;\n }\n\n taskClass += secNum;\n taskClass += ' ' + classStr;\n return res + taskClass;\n }); // Append task labels\n\n rectangles.append('text').attr('id', function (d) {\n return d.id + '-text';\n }).text(function (d) {\n return d.task;\n }).attr('font-size', conf.fontSize).attr('x', function (d) {\n var startX = timeScale(d.startTime);\n var endX = timeScale(d.renderEndTime || d.endTime);\n\n if (d.milestone) {\n startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;\n }\n\n if (d.milestone) {\n endX = startX + theBarHeight;\n }\n\n var textWidth = this.getBBox().width; // Check id text width > width of rectangle\n\n if (textWidth > endX - startX) {\n if (endX + textWidth + 1.5 * conf.leftPadding > w) {\n return startX + theSidePad - 5;\n } else {\n return endX + theSidePad + 5;\n }\n } else {\n return (endX - startX) / 2 + startX + theSidePad;\n }\n }).attr('y', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;\n }).attr('text-height', theBarHeight).attr('class', function (d) {\n var startX = timeScale(d.startTime);\n var endX = timeScale(d.endTime);\n\n if (d.milestone) {\n endX = startX + theBarHeight;\n }\n\n var textWidth = this.getBBox().width;\n var classStr = '';\n\n if (d.classes.length > 0) {\n classStr = d.classes.join(' ');\n }\n\n var secNum = 0;\n\n for (var _i3 = 0; _i3 < categories.length; _i3++) {\n if (d.type === categories[_i3]) {\n secNum = _i3 % conf.numberSectionStyles;\n }\n }\n\n var taskType = '';\n\n if (d.active) {\n if (d.crit) {\n taskType = 'activeCritText' + secNum;\n } else {\n taskType = 'activeText' + secNum;\n }\n }\n\n if (d.done) {\n if (d.crit) {\n taskType = taskType + ' doneCritText' + secNum;\n } else {\n taskType = taskType + ' doneText' + secNum;\n }\n } else {\n if (d.crit) {\n taskType = taskType + ' critText' + secNum;\n }\n }\n\n if (d.milestone) {\n taskType += ' milestoneText';\n } // Check id text width > width of rectangle\n\n\n if (textWidth > endX - startX) {\n if (endX + textWidth + 1.5 * conf.leftPadding > w) {\n return classStr + ' taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType;\n } else {\n return classStr + ' taskTextOutsideRight taskTextOutside' + secNum + ' ' + taskType + ' width-' + textWidth;\n }\n } else {\n return classStr + ' taskText taskText' + secNum + ' ' + taskType + ' width-' + textWidth;\n }\n });\n }\n\n function makeGrid(theSidePad, theTopPad, w, h) {\n var xAxis = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"axisBottom\"])(timeScale).tickSize(-h + theTopPad + conf.gridLineStartPadding).tickFormat(Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"timeFormat\"])(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));\n svg.append('g').attr('class', 'grid').attr('transform', 'translate(' + theSidePad + ', ' + (h - 50) + ')').call(xAxis).selectAll('text').style('text-anchor', 'middle').attr('fill', '#000').attr('stroke', 'none').attr('font-size', 10).attr('dy', '1em');\n }\n\n function vertLabels(theGap, theTopPad) {\n var numOccurances = [];\n var prevGap = 0;\n\n for (var _i4 = 0; _i4 < categories.length; _i4++) {\n numOccurances[_i4] = [categories[_i4], getCount(categories[_i4], catsUnfiltered)];\n }\n\n svg.append('g') // without doing this, impossible to put grid lines behind text\n .selectAll('text').data(numOccurances).enter().append(function (d) {\n var rows = d[0].split(_common_common__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lineBreakRegex);\n var dy = -(rows.length - 1) / 2;\n var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('dy', dy + 'em');\n\n for (var j = 0; j < rows.length; j++) {\n var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttribute('alignment-baseline', 'central');\n tspan.setAttribute('x', '10');\n if (j > 0) tspan.setAttribute('dy', '1em');\n tspan.textContent = rows[j];\n svgLabel.appendChild(tspan);\n }\n\n return svgLabel;\n }).attr('x', 10).attr('y', function (d, i) {\n if (i > 0) {\n for (var j = 0; j < i; j++) {\n prevGap += numOccurances[i - 1][1];\n return d[1] * theGap / 2 + prevGap * theGap + theTopPad;\n }\n } else {\n return d[1] * theGap / 2 + theTopPad;\n }\n }).attr('class', function (d) {\n for (var _i5 = 0; _i5 < categories.length; _i5++) {\n if (d[0] === categories[_i5]) {\n return 'sectionTitle sectionTitle' + _i5 % conf.numberSectionStyles;\n }\n }\n\n return 'sectionTitle';\n });\n }\n\n function drawToday(theSidePad, theTopPad, w, h) {\n var todayMarker = _ganttDb__WEBPACK_IMPORTED_MODULE_3__[\"default\"].getTodayMarker();\n\n if (todayMarker === 'off') {\n return;\n }\n\n var todayG = svg.append('g').attr('class', 'today');\n var today = new Date();\n var todayLine = todayG.append('line');\n todayLine.attr('x1', timeScale(today) + theSidePad).attr('x2', timeScale(today) + theSidePad).attr('y1', conf.titleTopMargin).attr('y2', h - conf.titleTopMargin).attr('class', 'today');\n\n if (todayMarker !== '') {\n todayLine.attr('style', todayMarker.replace(/,/g, ';'));\n }\n } // from this stackexchange question: http://stackoverflow.com/questions/1890203/unique-for-arrays-in-javascript\n\n\n function checkUnique(arr) {\n var hash = {};\n var result = [];\n\n for (var _i6 = 0, l = arr.length; _i6 < l; ++_i6) {\n if (!hash.hasOwnProperty(arr[_i6])) {\n // eslint-disable-line\n // it works with objects! in FF, at least\n hash[arr[_i6]] = true;\n result.push(arr[_i6]);\n }\n }\n\n return result;\n } // from this stackexchange question: http://stackoverflow.com/questions/14227981/count-how-many-strings-in-an-array-have-duplicates-in-the-same-array\n\n\n function getCounts(arr) {\n var i = arr.length; // const to loop over\n\n var obj = {}; // obj to store results\n\n while (i) {\n obj[arr[--i]] = (obj[arr[i]] || 0) + 1; // count occurrences\n }\n\n return obj;\n } // get specific from everything\n\n\n function getCount(word, arr) {\n return getCounts(arr)[word] || 0;\n }\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setConf: setConf,\n draw: draw\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/gantt/parser/gantt.jison\":\n /*!***********************************************!*\\\n !*** ./src/diagrams/gantt/parser/gantt.jison ***!\n \\***********************************************/\n\n /*! no static exports found */\n\n /***/\n function srcDiagramsGanttParserGanttJison(module, exports, __webpack_require__) {\n /* WEBPACK VAR INJECTION */\n (function (process, module) {\n /* parser generated by jison 0.4.18 */\n\n /*\n Returns a Parser object of the following structure:\n \n Parser: {\n yy: {}\n }\n \n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n \n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n \n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n \n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n \n \n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n \n \n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n */\n var parser = function () {\n var o = function o(k, v, _o4, l) {\n for (_o4 = _o4 || {}, l = k.length; l--; _o4[k[l]] = v) {\n ;\n }\n\n return _o4;\n },\n $V0 = [1, 3],\n $V1 = [1, 5],\n $V2 = [7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 20, 27, 32],\n $V3 = [1, 15],\n $V4 = [1, 16],\n $V5 = [1, 17],\n $V6 = [1, 18],\n $V7 = [1, 19],\n $V8 = [1, 20],\n $V9 = [1, 21],\n $Va = [1, 23],\n $Vb = [1, 25],\n $Vc = [1, 28],\n $Vd = [5, 7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 20, 27, 32];\n\n var parser = {\n trace: function trace() {},\n yy: {},\n symbols_: {\n \"error\": 2,\n \"start\": 3,\n \"directive\": 4,\n \"gantt\": 5,\n \"document\": 6,\n \"EOF\": 7,\n \"line\": 8,\n \"SPACE\": 9,\n \"statement\": 10,\n \"NL\": 11,\n \"dateFormat\": 12,\n \"inclusiveEndDates\": 13,\n \"axisFormat\": 14,\n \"excludes\": 15,\n \"todayMarker\": 16,\n \"title\": 17,\n \"section\": 18,\n \"clickStatement\": 19,\n \"taskTxt\": 20,\n \"taskData\": 21,\n \"openDirective\": 22,\n \"typeDirective\": 23,\n \"closeDirective\": 24,\n \":\": 25,\n \"argDirective\": 26,\n \"click\": 27,\n \"callbackname\": 28,\n \"callbackargs\": 29,\n \"href\": 30,\n \"clickStatementDebug\": 31,\n \"open_directive\": 32,\n \"type_directive\": 33,\n \"arg_directive\": 34,\n \"close_directive\": 35,\n \"$accept\": 0,\n \"$end\": 1\n },\n terminals_: {\n 2: \"error\",\n 5: \"gantt\",\n 7: \"EOF\",\n 9: \"SPACE\",\n 11: \"NL\",\n 12: \"dateFormat\",\n 13: \"inclusiveEndDates\",\n 14: \"axisFormat\",\n 15: \"excludes\",\n 16: \"todayMarker\",\n 17: \"title\",\n 18: \"section\",\n 20: \"taskTxt\",\n 21: \"taskData\",\n 25: \":\",\n 27: \"click\",\n 28: \"callbackname\",\n 29: \"callbackargs\",\n 30: \"href\",\n 32: \"open_directive\",\n 33: \"type_directive\",\n 34: \"arg_directive\",\n 35: \"close_directive\"\n },\n productions_: [0, [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [8, 1], [8, 1], [8, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 1], [4, 4], [4, 6], [19, 2], [19, 3], [19, 3], [19, 4], [19, 3], [19, 4], [19, 2], [31, 2], [31, 3], [31, 3], [31, 4], [31, 3], [31, 4], [31, 2], [22, 1], [23, 1], [26, 1], [24, 1]],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate\n /* action[1] */\n , $$\n /* vstack */\n , _$\n /* lstack */\n ) {\n /* this == yyval */\n var $0 = $$.length - 1;\n\n switch (yystate) {\n case 2:\n return $$[$0 - 1];\n break;\n\n case 3:\n this.$ = [];\n break;\n\n case 4:\n $$[$0 - 1].push($$[$0]);\n this.$ = $$[$0 - 1];\n break;\n\n case 5:\n case 6:\n this.$ = $$[$0];\n break;\n\n case 7:\n case 8:\n this.$ = [];\n break;\n\n case 9:\n yy.setDateFormat($$[$0].substr(11));\n this.$ = $$[$0].substr(11);\n break;\n\n case 10:\n yy.enableInclusiveEndDates();\n this.$ = $$[$0].substr(18);\n break;\n\n case 11:\n yy.setAxisFormat($$[$0].substr(11));\n this.$ = $$[$0].substr(11);\n break;\n\n case 12:\n yy.setExcludes($$[$0].substr(9));\n this.$ = $$[$0].substr(9);\n break;\n\n case 13:\n yy.setTodayMarker($$[$0].substr(12));\n this.$ = $$[$0].substr(12);\n break;\n\n case 14:\n yy.setTitle($$[$0].substr(6));\n this.$ = $$[$0].substr(6);\n break;\n\n case 15:\n yy.addSection($$[$0].substr(8));\n this.$ = $$[$0].substr(8);\n break;\n\n case 17:\n yy.addTask($$[$0 - 1], $$[$0]);\n this.$ = 'task';\n break;\n\n case 21:\n this.$ = $$[$0 - 1];\n yy.setClickEvent($$[$0 - 1], $$[$0], null);\n break;\n\n case 22:\n this.$ = $$[$0 - 2];\n yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);\n break;\n\n case 23:\n this.$ = $$[$0 - 2];\n yy.setClickEvent($$[$0 - 2], $$[$0 - 1], null);\n yy.setLink($$[$0 - 2], $$[$0]);\n break;\n\n case 24:\n this.$ = $$[$0 - 3];\n yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);\n yy.setLink($$[$0 - 3], $$[$0]);\n break;\n\n case 25:\n this.$ = $$[$0 - 2];\n yy.setClickEvent($$[$0 - 2], $$[$0], null);\n yy.setLink($$[$0 - 2], $$[$0 - 1]);\n break;\n\n case 26:\n this.$ = $$[$0 - 3];\n yy.setClickEvent($$[$0 - 3], $$[$0 - 1], $$[$0]);\n yy.setLink($$[$0 - 3], $$[$0 - 2]);\n break;\n\n case 27:\n this.$ = $$[$0 - 1];\n yy.setLink($$[$0 - 1], $$[$0]);\n break;\n\n case 28:\n case 34:\n this.$ = $$[$0 - 1] + ' ' + $$[$0];\n break;\n\n case 29:\n case 30:\n case 32:\n this.$ = $$[$0 - 2] + ' ' + $$[$0 - 1] + ' ' + $$[$0];\n break;\n\n case 31:\n case 33:\n this.$ = $$[$0 - 3] + ' ' + $$[$0 - 2] + ' ' + $$[$0 - 1] + ' ' + $$[$0];\n break;\n\n case 35:\n yy.parseDirective('%%{', 'open_directive');\n break;\n\n case 36:\n yy.parseDirective($$[$0], 'type_directive');\n break;\n\n case 37:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"');\n yy.parseDirective($$[$0], 'arg_directive');\n break;\n\n case 38:\n yy.parseDirective('}%%', 'close_directive', 'gantt');\n break;\n }\n },\n table: [{\n 3: 1,\n 4: 2,\n 5: $V0,\n 22: 4,\n 32: $V1\n }, {\n 1: [3]\n }, {\n 3: 6,\n 4: 2,\n 5: $V0,\n 22: 4,\n 32: $V1\n }, o($V2, [2, 3], {\n 6: 7\n }), {\n 23: 8,\n 33: [1, 9]\n }, {\n 33: [2, 35]\n }, {\n 1: [2, 1]\n }, {\n 4: 24,\n 7: [1, 10],\n 8: 11,\n 9: [1, 12],\n 10: 13,\n 11: [1, 14],\n 12: $V3,\n 13: $V4,\n 14: $V5,\n 15: $V6,\n 16: $V7,\n 17: $V8,\n 18: $V9,\n 19: 22,\n 20: $Va,\n 22: 4,\n 27: $Vb,\n 32: $V1\n }, {\n 24: 26,\n 25: [1, 27],\n 35: $Vc\n }, o([25, 35], [2, 36]), o($V2, [2, 8], {\n 1: [2, 2]\n }), o($V2, [2, 4]), {\n 4: 24,\n 10: 29,\n 12: $V3,\n 13: $V4,\n 14: $V5,\n 15: $V6,\n 16: $V7,\n 17: $V8,\n 18: $V9,\n 19: 22,\n 20: $Va,\n 22: 4,\n 27: $Vb,\n 32: $V1\n }, o($V2, [2, 6]), o($V2, [2, 7]), o($V2, [2, 9]), o($V2, [2, 10]), o($V2, [2, 11]), o($V2, [2, 12]), o($V2, [2, 13]), o($V2, [2, 14]), o($V2, [2, 15]), o($V2, [2, 16]), {\n 21: [1, 30]\n }, o($V2, [2, 18]), {\n 28: [1, 31],\n 30: [1, 32]\n }, {\n 11: [1, 33]\n }, {\n 26: 34,\n 34: [1, 35]\n }, {\n 11: [2, 38]\n }, o($V2, [2, 5]), o($V2, [2, 17]), o($V2, [2, 21], {\n 29: [1, 36],\n 30: [1, 37]\n }), o($V2, [2, 27], {\n 28: [1, 38]\n }), o($Vd, [2, 19]), {\n 24: 39,\n 35: $Vc\n }, {\n 35: [2, 37]\n }, o($V2, [2, 22], {\n 30: [1, 40]\n }), o($V2, [2, 23]), o($V2, [2, 25], {\n 29: [1, 41]\n }), {\n 11: [1, 42]\n }, o($V2, [2, 24]), o($V2, [2, 26]), o($Vd, [2, 20])],\n defaultActions: {\n 5: [2, 35],\n 6: [2, 1],\n 28: [2, 38],\n 35: [2, 37]\n },\n parseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n },\n parse: function parse(input) {\n var self = this,\n stack = [0],\n tstack = [],\n vstack = [null],\n lstack = [],\n table = this.table,\n yytext = '',\n yylineno = 0,\n yyleng = 0,\n recovering = 0,\n TERROR = 2,\n EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = {\n yy: {}\n };\n\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n\n token = self.symbols_[token] || token;\n }\n\n return token;\n }\n\n var symbol,\n preErrorSymbol,\n state,\n action,\n a,\n r,\n yyval = {},\n p,\n len,\n newState,\n expected;\n\n while (true) {\n state = stack[stack.length - 1];\n\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n\n action = table[state] && table[state][symbol];\n }\n\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n\n break;\n\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n\n if (ranges) {\n yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n }\n\n r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));\n\n if (typeof r !== 'undefined') {\n return r;\n }\n\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n\n case 3:\n return true;\n }\n }\n\n return true;\n }\n };\n /* generated by jison-lex 0.3.4 */\n\n var lexer = function () {\n var lexer = {\n EOF: 1,\n parseError: function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n // resets the lexer, sets new input\n setInput: function setInput(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n\n this.offset = 0;\n return this;\n },\n // consumes and returns one char from the input\n input: function input() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n // unshifts one char (or a string) into the input\n unput: function unput(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;\n\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n\n this.yyleng = this.yytext.length;\n return this;\n },\n // When called from action, caches matched text and appends it on next action\n more: function more() {\n this._more = true;\n return this;\n },\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: function reject() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n\n return this;\n },\n // retain first n characters of the match\n less: function less(n) {\n this.unput(this.match.slice(n));\n },\n // displays already matched input, i.e. for error messages\n pastInput: function pastInput() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\\n/g, \"\");\n },\n // displays upcoming input, i.e. for error messages\n upcomingInput: function upcomingInput() {\n var next = this.match;\n\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n\n return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: function showPosition() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: function test_match(match, indexed_rule) {\n var token, lines, backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno += lines.length;\n }\n\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n\n if (this.done && this._input) {\n this.done = false;\n }\n\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n\n return false;\n },\n // return next match in input\n next: function next() {\n if (this.done) {\n return this.EOF;\n }\n\n if (!this._input) {\n this.done = true;\n }\n\n var token, match, tempMatch, index;\n\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n\n var rules = this._currentRules();\n\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n\n if (match) {\n token = this.test_match(match, rules[index]);\n\n if (token !== false) {\n return token;\n } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n\n\n return false;\n }\n\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n // return next match that has a token\n lex: function lex() {\n var r = this.next();\n\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: function begin(condition) {\n this.conditionStack.push(condition);\n },\n // pop the previously active lexer condition state off the condition stack\n popState: function popState() {\n var n = this.conditionStack.length - 1;\n\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n // alias for begin(condition)\n pushState: function pushState(condition) {\n this.begin(condition);\n },\n // return the number of states currently on the stack\n stateStackSize: function stateStackSize() {\n return this.conditionStack.length;\n },\n options: {\n \"case-insensitive\": true\n },\n performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n\n switch ($avoiding_name_collisions) {\n case 0:\n this.begin('open_directive');\n return 32;\n break;\n\n case 1:\n this.begin('type_directive');\n return 33;\n break;\n\n case 2:\n this.popState();\n this.begin('arg_directive');\n return 25;\n break;\n\n case 3:\n this.popState();\n this.popState();\n return 35;\n break;\n\n case 4:\n return 34;\n break;\n\n case 5:\n /* skip comments */\n break;\n\n case 6:\n /* skip comments */\n break;\n\n case 7:\n /* do nothing */\n break;\n\n case 8:\n return 11;\n break;\n\n case 9:\n /* skip whitespace */\n break;\n\n case 10:\n /* skip comments */\n break;\n\n case 11:\n /* skip comments */\n break;\n\n case 12:\n this.begin(\"href\");\n break;\n\n case 13:\n this.popState();\n break;\n\n case 14:\n return 30;\n break;\n\n case 15:\n this.begin(\"callbackname\");\n break;\n\n case 16:\n this.popState();\n break;\n\n case 17:\n this.popState();\n this.begin(\"callbackargs\");\n break;\n\n case 18:\n return 28;\n break;\n\n case 19:\n this.popState();\n break;\n\n case 20:\n return 29;\n break;\n\n case 21:\n this.begin(\"click\");\n break;\n\n case 22:\n this.popState();\n break;\n\n case 23:\n return 27;\n break;\n\n case 24:\n return 5;\n break;\n\n case 25:\n return 12;\n break;\n\n case 26:\n return 13;\n break;\n\n case 27:\n return 14;\n break;\n\n case 28:\n return 15;\n break;\n\n case 29:\n return 16;\n break;\n\n case 30:\n return 'date';\n break;\n\n case 31:\n return 17;\n break;\n\n case 32:\n return 18;\n break;\n\n case 33:\n return 20;\n break;\n\n case 34:\n return 21;\n break;\n\n case 35:\n return 25;\n break;\n\n case 36:\n return 7;\n break;\n\n case 37:\n return 'INVALID';\n break;\n }\n },\n rules: [/^(?:%%\\{)/i, /^(?:((?:(?!\\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\\}%%)/i, /^(?:((?:(?!\\}%%).|\\n)*))/i, /^(?:%%(?!\\{)*[^\\n]*)/i, /^(?:[^\\}]%%*[^\\n]*)/i, /^(?:%%*[^\\n]*[\\n]*)/i, /^(?:[\\n]+)/i, /^(?:\\s+)/i, /^(?:#[^\\n]*)/i, /^(?:%[^\\n]*)/i, /^(?:href[\\s]+[\"])/i, /^(?:[\"])/i, /^(?:[^\"]*)/i, /^(?:call[\\s]+)/i, /^(?:\\([\\s]*\\))/i, /^(?:\\()/i, /^(?:[^(]*)/i, /^(?:\\))/i, /^(?:[^)]*)/i, /^(?:click[\\s]+)/i, /^(?:[\\s\\n])/i, /^(?:[^\\s\\n]*)/i, /^(?:gantt\\b)/i, /^(?:dateFormat\\s[^#\\n;]+)/i, /^(?:inclusiveEndDates\\b)/i, /^(?:axisFormat\\s[^#\\n;]+)/i, /^(?:excludes\\s[^#\\n;]+)/i, /^(?:todayMarker\\s[^\\n;]+)/i, /^(?:\\d\\d\\d\\d-\\d\\d-\\d\\d\\b)/i, /^(?:title\\s[^#\\n;]+)/i, /^(?:section\\s[^#:\\n;]+)/i, /^(?:[^#:\\n;]+)/i, /^(?::[^#\\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],\n conditions: {\n \"close_directive\": {\n \"rules\": [],\n \"inclusive\": false\n },\n \"arg_directive\": {\n \"rules\": [3, 4],\n \"inclusive\": false\n },\n \"type_directive\": {\n \"rules\": [2, 3],\n \"inclusive\": false\n },\n \"open_directive\": {\n \"rules\": [1],\n \"inclusive\": false\n },\n \"callbackargs\": {\n \"rules\": [19, 20],\n \"inclusive\": false\n },\n \"callbackname\": {\n \"rules\": [16, 17, 18],\n \"inclusive\": false\n },\n \"href\": {\n \"rules\": [13, 14],\n \"inclusive\": false\n },\n \"click\": {\n \"rules\": [22, 23],\n \"inclusive\": false\n },\n \"INITIAL\": {\n \"rules\": [0, 5, 6, 7, 8, 9, 10, 11, 12, 15, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37],\n \"inclusive\": true\n }\n }\n };\n return lexer;\n }();\n\n parser.lexer = lexer;\n\n function Parser() {\n this.yy = {};\n }\n\n Parser.prototype = parser;\n parser.Parser = Parser;\n return new Parser();\n }();\n\n if (true) {\n exports.parser = parser;\n exports.Parser = parser.Parser;\n\n exports.parse = function () {\n return parser.parse.apply(parser, arguments);\n };\n\n exports.main = function commonjsMain(args) {\n if (!args[1]) {\n console.log('Usage: ' + args[0] + ' FILE');\n process.exit(1);\n }\n\n var source = __webpack_require__(\n /*! fs */\n \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(\n /*! path */\n \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n\n return exports.parser.parse(source);\n };\n\n if (true && __webpack_require__.c[__webpack_require__.s] === module) {\n exports.main(process.argv.slice(1));\n }\n }\n /* WEBPACK VAR INJECTION */\n\n }).call(this, __webpack_require__(\n /*! ./../../../../node_modules/process/browser.js */\n \"./node_modules/process/browser.js\"), __webpack_require__(\n /*! ./../../../../node_modules/webpack/buildin/module.js */\n \"./node_modules/webpack/buildin/module.js\")(module));\n /***/\n },\n\n /***/\n \"./src/diagrams/gantt/styles.js\":\n /*!**************************************!*\\\n !*** ./src/diagrams/gantt/styles.js ***!\n \\**************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDiagramsGanttStylesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n\n var getStyles = function getStyles(options) {\n return \"\\n .mermaid-main-font {\\n font-family: \\\"trebuchet ms\\\", verdana, arial, sans-serif;\\n font-family: var(--mermaid-font-family);\\n }\\n\\n .section {\\n stroke: none;\\n opacity: 0.2;\\n }\\n\\n .section0 {\\n fill: \".concat(options.sectionBkgColor, \";\\n }\\n\\n .section2 {\\n fill: \").concat(options.sectionBkgColor2, \";\\n }\\n\\n .section1,\\n .section3 {\\n fill: \").concat(options.altSectionBkgColor, \";\\n opacity: 0.2;\\n }\\n\\n .sectionTitle0 {\\n fill: \").concat(options.titleColor, \";\\n }\\n\\n .sectionTitle1 {\\n fill: \").concat(options.titleColor, \";\\n }\\n\\n .sectionTitle2 {\\n fill: \").concat(options.titleColor, \";\\n }\\n\\n .sectionTitle3 {\\n fill: \").concat(options.titleColor, \";\\n }\\n\\n .sectionTitle {\\n text-anchor: start;\\n font-size: 11px;\\n text-height: 14px;\\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n font-family: var(--mermaid-font-family);\\n\\n }\\n\\n\\n /* Grid and axis */\\n\\n .grid .tick {\\n stroke: \").concat(options.gridColor, \";\\n opacity: 0.8;\\n shape-rendering: crispEdges;\\n text {\\n font-family: \").concat(options.fontFamily, \";\\n fill: \").concat(options.textColor, \";\\n }\\n }\\n\\n .grid path {\\n stroke-width: 0;\\n }\\n\\n\\n /* Today line */\\n\\n .today {\\n fill: none;\\n stroke: \").concat(options.todayLineColor, \";\\n stroke-width: 2px;\\n }\\n\\n\\n /* Task styling */\\n\\n /* Default task */\\n\\n .task {\\n stroke-width: 2;\\n }\\n\\n .taskText {\\n text-anchor: middle;\\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n font-family: var(--mermaid-font-family);\\n }\\n\\n .taskText:not([font-size]) {\\n font-size: 11px;\\n }\\n\\n .taskTextOutsideRight {\\n fill: \").concat(options.taskTextDarkColor, \";\\n text-anchor: start;\\n font-size: 11px;\\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n font-family: var(--mermaid-font-family);\\n\\n }\\n\\n .taskTextOutsideLeft {\\n fill: \").concat(options.taskTextDarkColor, \";\\n text-anchor: end;\\n font-size: 11px;\\n }\\n\\n /* Special case clickable */\\n .task.clickable {\\n cursor: pointer;\\n }\\n .taskText.clickable {\\n cursor: pointer;\\n fill: \").concat(options.taskTextClickableColor, \" !important;\\n font-weight: bold;\\n }\\n\\n .taskTextOutsideLeft.clickable {\\n cursor: pointer;\\n fill: \").concat(options.taskTextClickableColor, \" !important;\\n font-weight: bold;\\n }\\n\\n .taskTextOutsideRight.clickable {\\n cursor: pointer;\\n fill: \").concat(options.taskTextClickableColor, \" !important;\\n font-weight: bold;\\n }\\n\\n /* Specific task settings for the sections*/\\n\\n .taskText0,\\n .taskText1,\\n .taskText2,\\n .taskText3 {\\n fill: \").concat(options.taskTextColor, \";\\n }\\n\\n .task0,\\n .task1,\\n .task2,\\n .task3 {\\n fill: \").concat(options.taskBkgColor, \";\\n stroke: \").concat(options.taskBorderColor, \";\\n }\\n\\n .taskTextOutside0,\\n .taskTextOutside2\\n {\\n fill: \").concat(options.taskTextOutsideColor, \";\\n }\\n\\n .taskTextOutside1,\\n .taskTextOutside3 {\\n fill: \").concat(options.taskTextOutsideColor, \";\\n }\\n\\n\\n /* Active task */\\n\\n .active0,\\n .active1,\\n .active2,\\n .active3 {\\n fill: \").concat(options.activeTaskBkgColor, \";\\n stroke: \").concat(options.activeTaskBorderColor, \";\\n }\\n\\n .activeText0,\\n .activeText1,\\n .activeText2,\\n .activeText3 {\\n fill: \").concat(options.taskTextDarkColor, \" !important;\\n }\\n\\n\\n /* Completed task */\\n\\n .done0,\\n .done1,\\n .done2,\\n .done3 {\\n stroke: \").concat(options.doneTaskBorderColor, \";\\n fill: \").concat(options.doneTaskBkgColor, \";\\n stroke-width: 2;\\n }\\n\\n .doneText0,\\n .doneText1,\\n .doneText2,\\n .doneText3 {\\n fill: \").concat(options.taskTextDarkColor, \" !important;\\n }\\n\\n\\n /* Tasks on the critical line */\\n\\n .crit0,\\n .crit1,\\n .crit2,\\n .crit3 {\\n stroke: \").concat(options.critBorderColor, \";\\n fill: \").concat(options.critBkgColor, \";\\n stroke-width: 2;\\n }\\n\\n .activeCrit0,\\n .activeCrit1,\\n .activeCrit2,\\n .activeCrit3 {\\n stroke: \").concat(options.critBorderColor, \";\\n fill: \").concat(options.activeTaskBkgColor, \";\\n stroke-width: 2;\\n }\\n\\n .doneCrit0,\\n .doneCrit1,\\n .doneCrit2,\\n .doneCrit3 {\\n stroke: \").concat(options.critBorderColor, \";\\n fill: \").concat(options.doneTaskBkgColor, \";\\n stroke-width: 2;\\n cursor: pointer;\\n shape-rendering: crispEdges;\\n }\\n\\n .milestone {\\n transform: rotate(45deg) scale(0.8,0.8);\\n }\\n\\n .milestoneText {\\n font-style: italic;\\n }\\n .doneCritText0,\\n .doneCritText1,\\n .doneCritText2,\\n .doneCritText3 {\\n fill: \").concat(options.taskTextDarkColor, \" !important;\\n }\\n\\n .activeCritText0,\\n .activeCritText1,\\n .activeCritText2,\\n .activeCritText3 {\\n fill: \").concat(options.taskTextDarkColor, \" !important;\\n }\\n\\n .titleText {\\n text-anchor: middle;\\n font-size: 18px;\\n fill: \").concat(options.textColor, \" ;\\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n font-family: var(--mermaid-font-family);\\n }\\n\");\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = getStyles;\n /***/\n },\n\n /***/\n \"./src/diagrams/git/gitGraphAst.js\":\n /*!*****************************************!*\\\n !*** ./src/diagrams/git/gitGraphAst.js ***!\n \\*****************************************/\n\n /*! exports provided: setDirection, setOptions, getOptions, commit, branch, merge, checkout, reset, prettyPrint, clear, getBranchesAsObjArray, getBranches, getCommits, getCommitsArray, getCurrentBranch, getDirection, getHead, default */\n\n /***/\n function srcDiagramsGitGitGraphAstJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setDirection\", function () {\n return setDirection;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setOptions\", function () {\n return setOptions;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getOptions\", function () {\n return getOptions;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"commit\", function () {\n return commit;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"branch\", function () {\n return branch;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"merge\", function () {\n return merge;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"checkout\", function () {\n return checkout;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"reset\", function () {\n return reset;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"prettyPrint\", function () {\n return prettyPrint;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"clear\", function () {\n return clear;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getBranchesAsObjArray\", function () {\n return getBranchesAsObjArray;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getBranches\", function () {\n return getBranches;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getCommits\", function () {\n return getCommits;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getCommitsArray\", function () {\n return getCommitsArray;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getCurrentBranch\", function () {\n return getCurrentBranch;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getDirection\", function () {\n return getDirection;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getHead\", function () {\n return getHead;\n });\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n\n var commits = {};\n var head = null;\n var branches = {\n master: head\n };\n var curBranch = 'master';\n var direction = 'LR';\n var seq = 0;\n\n function getId() {\n return Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"random\"])({\n length: 7\n });\n }\n\n function isfastforwardable(currentCommit, otherCommit) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Entering isfastforwardable:', currentCommit.id, otherCommit.id);\n\n while (currentCommit.seq <= otherCommit.seq && currentCommit !== otherCommit) {\n // only if other branch has more commits\n if (otherCommit.parent == null) break;\n\n if (Array.isArray(otherCommit.parent)) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('In merge commit:', otherCommit.parent);\n\n return isfastforwardable(currentCommit, commits[otherCommit.parent[0]]) || isfastforwardable(currentCommit, commits[otherCommit.parent[1]]);\n } else {\n otherCommit = commits[otherCommit.parent];\n }\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(currentCommit.id, otherCommit.id);\n\n return currentCommit.id === otherCommit.id;\n }\n\n function isReachableFrom(currentCommit, otherCommit) {\n var currentSeq = currentCommit.seq;\n var otherSeq = otherCommit.seq;\n if (currentSeq > otherSeq) return isfastforwardable(otherCommit, currentCommit);\n return false;\n }\n\n function uniqBy(list, fn) {\n var recordMap = Object.create(null);\n return list.reduce(function (out, item) {\n var key = fn(item);\n\n if (!recordMap[key]) {\n recordMap[key] = true;\n out.push(item);\n }\n\n return out;\n }, []);\n }\n\n var setDirection = function setDirection(dir) {\n direction = dir;\n };\n\n var options = {};\n\n var setOptions = function setOptions(rawOptString) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('options str', rawOptString);\n\n rawOptString = rawOptString && rawOptString.trim();\n rawOptString = rawOptString || '{}';\n\n try {\n options = JSON.parse(rawOptString);\n } catch (e) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].error('error while parsing gitGraph options', e.message);\n }\n };\n\n var getOptions = function getOptions() {\n return options;\n };\n\n var commit = function commit(msg) {\n var commit = {\n id: getId(),\n message: msg,\n seq: seq++,\n parent: head == null ? null : head.id\n };\n head = commit;\n commits[commit.id] = commit;\n branches[curBranch] = commit.id;\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('in pushCommit ' + commit.id);\n };\n\n var branch = function branch(name) {\n branches[name] = head != null ? head.id : null;\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('in createBranch');\n };\n\n var merge = function merge(otherBranch) {\n var currentCommit = commits[branches[curBranch]];\n var otherCommit = commits[branches[otherBranch]];\n\n if (isReachableFrom(currentCommit, otherCommit)) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Already merged');\n\n return;\n }\n\n if (isfastforwardable(currentCommit, otherCommit)) {\n branches[curBranch] = branches[otherBranch];\n head = commits[branches[curBranch]];\n } else {\n // create merge commit\n var _commit = {\n id: getId(),\n message: 'merged branch ' + otherBranch + ' into ' + curBranch,\n seq: seq++,\n parent: [head == null ? null : head.id, branches[otherBranch]]\n };\n head = _commit;\n commits[_commit.id] = _commit;\n branches[curBranch] = _commit.id;\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(branches);\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('in mergeBranch');\n };\n\n var checkout = function checkout(branch) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('in checkout');\n\n curBranch = branch;\n var id = branches[curBranch];\n head = commits[id];\n };\n\n var reset = function reset(commitRef) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('in reset', commitRef);\n\n var ref = commitRef.split(':')[0];\n var parentCount = parseInt(commitRef.split(':')[1]);\n var commit = ref === 'HEAD' ? head : commits[branches[ref]];\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(commit, parentCount);\n\n while (parentCount > 0) {\n commit = commits[commit.parent];\n parentCount--;\n\n if (!commit) {\n var err = 'Critical error - unique parent commit not found during reset';\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].error(err);\n\n throw err;\n }\n }\n\n head = commit;\n branches[curBranch] = commit.id;\n };\n\n function upsert(arr, key, newval) {\n var index = arr.indexOf(key);\n\n if (index === -1) {\n arr.push(newval);\n } else {\n arr.splice(index, 1, newval);\n }\n }\n\n function prettyPrintCommitHistory(commitArr) {\n var commit = commitArr.reduce(function (out, commit) {\n if (out.seq > commit.seq) return out;\n return commit;\n }, commitArr[0]);\n var line = '';\n commitArr.forEach(function (c) {\n if (c === commit) {\n line += '\\t*';\n } else {\n line += '\\t|';\n }\n });\n var label = [line, commit.id, commit.seq];\n\n for (var _branch in branches) {\n if (branches[_branch] === commit.id) label.push(_branch);\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(label.join(' '));\n\n if (Array.isArray(commit.parent)) {\n var newCommit = commits[commit.parent[0]];\n upsert(commitArr, commit, newCommit);\n commitArr.push(commits[commit.parent[1]]);\n } else if (commit.parent == null) {\n return;\n } else {\n var nextCommit = commits[commit.parent];\n upsert(commitArr, commit, nextCommit);\n }\n\n commitArr = uniqBy(commitArr, function (c) {\n return c.id;\n });\n prettyPrintCommitHistory(commitArr);\n }\n\n var prettyPrint = function prettyPrint() {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(commits);\n\n var node = getCommitsArray()[0];\n prettyPrintCommitHistory([node]);\n };\n\n var clear = function clear() {\n commits = {};\n head = null;\n branches = {\n master: head\n };\n curBranch = 'master';\n seq = 0;\n };\n\n var getBranchesAsObjArray = function getBranchesAsObjArray() {\n var branchArr = [];\n\n for (var _branch2 in branches) {\n branchArr.push({\n name: _branch2,\n commit: commits[branches[_branch2]]\n });\n }\n\n return branchArr;\n };\n\n var getBranches = function getBranches() {\n return branches;\n };\n\n var getCommits = function getCommits() {\n return commits;\n };\n\n var getCommitsArray = function getCommitsArray() {\n var commitArr = Object.keys(commits).map(function (key) {\n return commits[key];\n });\n commitArr.forEach(function (o) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug(o.id);\n });\n commitArr.sort(function (a, b) {\n return b.seq - a.seq;\n });\n return commitArr;\n };\n\n var getCurrentBranch = function getCurrentBranch() {\n return curBranch;\n };\n\n var getDirection = function getDirection() {\n return direction;\n };\n\n var getHead = function getHead() {\n return head;\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setDirection: setDirection,\n setOptions: setOptions,\n getOptions: getOptions,\n commit: commit,\n branch: branch,\n merge: merge,\n checkout: checkout,\n reset: reset,\n prettyPrint: prettyPrint,\n clear: clear,\n getBranchesAsObjArray: getBranchesAsObjArray,\n getBranches: getBranches,\n getCommits: getCommits,\n getCommitsArray: getCommitsArray,\n getCurrentBranch: getCurrentBranch,\n getDirection: getDirection,\n getHead: getHead\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/git/gitGraphRenderer.js\":\n /*!**********************************************!*\\\n !*** ./src/diagrams/git/gitGraphRenderer.js ***!\n \\**********************************************/\n\n /*! exports provided: setConf, draw, default */\n\n /***/\n function srcDiagramsGitGitGraphRendererJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./gitGraphAst */\n \"./src/diagrams/git/gitGraphAst.js\");\n /* harmony import */\n\n\n var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./parser/gitGraph */\n \"./src/diagrams/git/parser/gitGraph.jison\");\n /* harmony import */\n\n\n var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_gitGraph__WEBPACK_IMPORTED_MODULE_2__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n\n var allCommitsDict = {};\n var branchNum;\n var config = {\n nodeSpacing: 150,\n nodeFillColor: 'yellow',\n nodeStrokeWidth: 2,\n nodeStrokeColor: 'grey',\n lineStrokeWidth: 4,\n branchOffset: 50,\n lineColor: 'grey',\n leftMargin: 50,\n branchColors: ['#442f74', '#983351', '#609732', '#AA9A39'],\n nodeRadius: 10,\n nodeLabel: {\n width: 75,\n height: 100,\n x: -25,\n y: 0\n }\n };\n var apiConfig = {};\n\n var setConf = function setConf(c) {\n apiConfig = c;\n };\n\n function svgCreateDefs(svg) {\n svg.append('defs').append('g').attr('id', 'def-commit').append('circle').attr('r', config.nodeRadius).attr('cx', 0).attr('cy', 0);\n svg.select('#def-commit').append('foreignObject').attr('width', config.nodeLabel.width).attr('height', config.nodeLabel.height).attr('x', config.nodeLabel.x).attr('y', config.nodeLabel.y).attr('class', 'node-label').attr('requiredFeatures', 'http://www.w3.org/TR/SVG11/feature#Extensibility').append('p').html('');\n }\n\n function svgDrawLine(svg, points, colorIdx, interpolate) {\n var curve = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"interpolateToCurve\"])(interpolate, d3__WEBPACK_IMPORTED_MODULE_0__[\"curveBasis\"]);\n var color = config.branchColors[colorIdx % config.branchColors.length];\n var lineGen = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"line\"])().x(function (d) {\n return Math.round(d.x);\n }).y(function (d) {\n return Math.round(d.y);\n }).curve(curve);\n svg.append('svg:path').attr('d', lineGen(points)).style('stroke', color).style('stroke-width', config.lineStrokeWidth).style('fill', 'none');\n } // Pass in the element and its pre-transform coords\n\n\n function getElementCoords(element, coords) {\n coords = coords || element.node().getBBox();\n var ctm = element.node().getCTM();\n var xn = ctm.e + coords.x * ctm.a;\n var yn = ctm.f + coords.y * ctm.d;\n return {\n left: xn,\n top: yn,\n width: coords.width,\n height: coords.height\n };\n }\n\n function svgDrawLineForCommits(svg, fromId, toId, direction, color) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('svgDrawLineForCommits: ', fromId, toId);\n\n var fromBbox = getElementCoords(svg.select('#node-' + fromId + ' circle'));\n var toBbox = getElementCoords(svg.select('#node-' + toId + ' circle'));\n\n switch (direction) {\n case 'LR':\n // (toBbox)\n // +--------\n // + (fromBbox)\n if (fromBbox.left - toBbox.left > config.nodeSpacing) {\n var lineStart = {\n x: fromBbox.left - config.nodeSpacing,\n y: toBbox.top + toBbox.height / 2\n };\n var lineEnd = {\n x: toBbox.left + toBbox.width,\n y: toBbox.top + toBbox.height / 2\n };\n svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');\n svgDrawLine(svg, [{\n x: fromBbox.left,\n y: fromBbox.top + fromBbox.height / 2\n }, {\n x: fromBbox.left - config.nodeSpacing / 2,\n y: fromBbox.top + fromBbox.height / 2\n }, {\n x: fromBbox.left - config.nodeSpacing / 2,\n y: lineStart.y\n }, lineStart], color);\n } else {\n svgDrawLine(svg, [{\n x: fromBbox.left,\n y: fromBbox.top + fromBbox.height / 2\n }, {\n x: fromBbox.left - config.nodeSpacing / 2,\n y: fromBbox.top + fromBbox.height / 2\n }, {\n x: fromBbox.left - config.nodeSpacing / 2,\n y: toBbox.top + toBbox.height / 2\n }, {\n x: toBbox.left + toBbox.width,\n y: toBbox.top + toBbox.height / 2\n }], color);\n }\n\n break;\n\n case 'BT':\n // + (fromBbox)\n // |\n // |\n // + (toBbox)\n if (toBbox.top - fromBbox.top > config.nodeSpacing) {\n var _lineStart = {\n x: toBbox.left + toBbox.width / 2,\n y: fromBbox.top + fromBbox.height + config.nodeSpacing\n };\n var _lineEnd = {\n x: toBbox.left + toBbox.width / 2,\n y: toBbox.top\n };\n svgDrawLine(svg, [_lineStart, _lineEnd], color, 'linear');\n svgDrawLine(svg, [{\n x: fromBbox.left + fromBbox.width / 2,\n y: fromBbox.top + fromBbox.height\n }, {\n x: fromBbox.left + fromBbox.width / 2,\n y: fromBbox.top + fromBbox.height + config.nodeSpacing / 2\n }, {\n x: toBbox.left + toBbox.width / 2,\n y: _lineStart.y - config.nodeSpacing / 2\n }, _lineStart], color);\n } else {\n svgDrawLine(svg, [{\n x: fromBbox.left + fromBbox.width / 2,\n y: fromBbox.top + fromBbox.height\n }, {\n x: fromBbox.left + fromBbox.width / 2,\n y: fromBbox.top + config.nodeSpacing / 2\n }, {\n x: toBbox.left + toBbox.width / 2,\n y: toBbox.top - config.nodeSpacing / 2\n }, {\n x: toBbox.left + toBbox.width / 2,\n y: toBbox.top\n }], color);\n }\n\n break;\n }\n }\n\n function cloneNode(svg, selector) {\n return svg.select(selector).node().cloneNode(true);\n }\n\n function renderCommitHistory(svg, commitid, branches, direction) {\n var commit;\n var numCommits = Object.keys(allCommitsDict).length;\n\n if (typeof commitid === 'string') {\n do {\n commit = allCommitsDict[commitid];\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('in renderCommitHistory', commit.id, commit.seq);\n\n if (svg.select('#node-' + commitid).size() > 0) {\n return;\n }\n\n svg.append(function () {\n return cloneNode(svg, '#def-commit');\n }).attr('class', 'commit').attr('id', function () {\n return 'node-' + commit.id;\n }).attr('transform', function () {\n switch (direction) {\n case 'LR':\n return 'translate(' + (commit.seq * config.nodeSpacing + config.leftMargin) + ', ' + branchNum * config.branchOffset + ')';\n\n case 'BT':\n return 'translate(' + (branchNum * config.branchOffset + config.leftMargin) + ', ' + (numCommits - commit.seq) * config.nodeSpacing + ')';\n }\n }).attr('fill', config.nodeFillColor).attr('stroke', config.nodeStrokeColor).attr('stroke-width', config.nodeStrokeWidth);\n var branch = void 0;\n\n for (var branchName in branches) {\n if (branches[branchName].commit === commit) {\n branch = branches[branchName];\n break;\n }\n }\n\n if (branch) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('found branch ', branch.name);\n\n svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'branch-label').text(branch.name + ', ');\n }\n\n svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-id').text(commit.id);\n\n if (commit.message !== '' && direction === 'BT') {\n svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-msg').text(', ' + commit.message);\n }\n\n commitid = commit.parent;\n } while (commitid && allCommitsDict[commitid]);\n }\n\n if (Array.isArray(commitid)) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('found merge commmit', commitid);\n\n renderCommitHistory(svg, commitid[0], branches, direction);\n branchNum++;\n renderCommitHistory(svg, commitid[1], branches, direction);\n branchNum--;\n }\n }\n\n function renderLines(svg, commit, direction, branchColor) {\n branchColor = branchColor || 0;\n\n while (commit.seq > 0 && !commit.lineDrawn) {\n if (typeof commit.parent === 'string') {\n svgDrawLineForCommits(svg, commit.id, commit.parent, direction, branchColor);\n commit.lineDrawn = true;\n commit = allCommitsDict[commit.parent];\n } else if (Array.isArray(commit.parent)) {\n svgDrawLineForCommits(svg, commit.id, commit.parent[0], direction, branchColor);\n svgDrawLineForCommits(svg, commit.id, commit.parent[1], direction, branchColor + 1);\n renderLines(svg, allCommitsDict[commit.parent[1]], direction, branchColor + 1);\n commit.lineDrawn = true;\n commit = allCommitsDict[commit.parent[0]];\n }\n }\n }\n\n var draw = function draw(txt, id, ver) {\n try {\n var parser = _parser_gitGraph__WEBPACK_IMPORTED_MODULE_2___default.a.parser;\n parser.yy = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n parser.yy.clear();\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('in gitgraph renderer', txt + '\\n', 'id:', id, ver); // Parse the graph definition\n\n\n parser.parse(txt + '\\n');\n config = Object.assign(config, apiConfig, _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getOptions());\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('effective options', config);\n\n var direction = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getDirection();\n\n allCommitsDict = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getCommits();\n\n var branches = _gitGraphAst__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getBranchesAsObjArray();\n\n if (direction === 'BT') {\n config.nodeLabel.x = branches.length * config.branchOffset;\n config.nodeLabel.width = '100%';\n config.nodeLabel.y = -1 * 2 * config.nodeRadius;\n }\n\n var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\"));\n svgCreateDefs(svg);\n branchNum = 1;\n\n for (var branch in branches) {\n var v = branches[branch];\n renderCommitHistory(svg, v.commit.id, branches, direction);\n renderLines(svg, v.commit, direction);\n branchNum++;\n }\n\n svg.attr('height', function () {\n if (direction === 'BT') return Object.keys(allCommitsDict).length * config.nodeSpacing;\n return (branches.length + 1) * config.branchOffset;\n });\n } catch (e) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error('Error while rendering gitgraph');\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error(e.message);\n }\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setConf: setConf,\n draw: draw\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/git/parser/gitGraph.jison\":\n /*!************************************************!*\\\n !*** ./src/diagrams/git/parser/gitGraph.jison ***!\n \\************************************************/\n\n /*! no static exports found */\n\n /***/\n function srcDiagramsGitParserGitGraphJison(module, exports, __webpack_require__) {\n /* WEBPACK VAR INJECTION */\n (function (process, module) {\n /* parser generated by jison 0.4.18 */\n\n /*\n Returns a Parser object of the following structure:\n \n Parser: {\n yy: {}\n }\n \n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n \n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n \n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n \n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n \n \n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n \n \n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n */\n var parser = function () {\n var o = function o(k, v, _o5, l) {\n for (_o5 = _o5 || {}, l = k.length; l--; _o5[k[l]] = v) {\n ;\n }\n\n return _o5;\n },\n $V0 = [2, 3],\n $V1 = [1, 7],\n $V2 = [7, 12, 15, 17, 19, 20, 21],\n $V3 = [7, 11, 12, 15, 17, 19, 20, 21],\n $V4 = [2, 20],\n $V5 = [1, 32];\n\n var parser = {\n trace: function trace() {},\n yy: {},\n symbols_: {\n \"error\": 2,\n \"start\": 3,\n \"GG\": 4,\n \":\": 5,\n \"document\": 6,\n \"EOF\": 7,\n \"DIR\": 8,\n \"options\": 9,\n \"body\": 10,\n \"OPT\": 11,\n \"NL\": 12,\n \"line\": 13,\n \"statement\": 14,\n \"COMMIT\": 15,\n \"commit_arg\": 16,\n \"BRANCH\": 17,\n \"ID\": 18,\n \"CHECKOUT\": 19,\n \"MERGE\": 20,\n \"RESET\": 21,\n \"reset_arg\": 22,\n \"STR\": 23,\n \"HEAD\": 24,\n \"reset_parents\": 25,\n \"CARET\": 26,\n \"$accept\": 0,\n \"$end\": 1\n },\n terminals_: {\n 2: \"error\",\n 4: \"GG\",\n 5: \":\",\n 7: \"EOF\",\n 8: \"DIR\",\n 11: \"OPT\",\n 12: \"NL\",\n 15: \"COMMIT\",\n 17: \"BRANCH\",\n 18: \"ID\",\n 19: \"CHECKOUT\",\n 20: \"MERGE\",\n 21: \"RESET\",\n 23: \"STR\",\n 24: \"HEAD\",\n 26: \"CARET\"\n },\n productions_: [0, [3, 4], [3, 5], [6, 0], [6, 2], [9, 2], [9, 1], [10, 0], [10, 2], [13, 2], [13, 1], [14, 2], [14, 2], [14, 2], [14, 2], [14, 2], [16, 0], [16, 1], [22, 2], [22, 2], [25, 0], [25, 2]],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate\n /* action[1] */\n , $$\n /* vstack */\n , _$\n /* lstack */\n ) {\n /* this == yyval */\n var $0 = $$.length - 1;\n\n switch (yystate) {\n case 1:\n return $$[$0 - 1];\n break;\n\n case 2:\n yy.setDirection($$[$0 - 3]);\n return $$[$0 - 1];\n break;\n\n case 4:\n yy.setOptions($$[$0 - 1]);\n this.$ = $$[$0];\n break;\n\n case 5:\n $$[$0 - 1] += $$[$0];\n this.$ = $$[$0 - 1];\n break;\n\n case 7:\n this.$ = [];\n break;\n\n case 8:\n $$[$0 - 1].push($$[$0]);\n this.$ = $$[$0 - 1];\n break;\n\n case 9:\n this.$ = $$[$0 - 1];\n break;\n\n case 11:\n yy.commit($$[$0]);\n break;\n\n case 12:\n yy.branch($$[$0]);\n break;\n\n case 13:\n yy.checkout($$[$0]);\n break;\n\n case 14:\n yy.merge($$[$0]);\n break;\n\n case 15:\n yy.reset($$[$0]);\n break;\n\n case 16:\n this.$ = \"\";\n break;\n\n case 17:\n this.$ = $$[$0];\n break;\n\n case 18:\n this.$ = $$[$0 - 1] + \":\" + $$[$0];\n break;\n\n case 19:\n this.$ = $$[$0 - 1] + \":\" + yy.count;\n yy.count = 0;\n break;\n\n case 20:\n yy.count = 0;\n break;\n\n case 21:\n yy.count += 1;\n break;\n }\n },\n table: [{\n 3: 1,\n 4: [1, 2]\n }, {\n 1: [3]\n }, {\n 5: [1, 3],\n 8: [1, 4]\n }, {\n 6: 5,\n 7: $V0,\n 9: 6,\n 12: $V1\n }, {\n 5: [1, 8]\n }, {\n 7: [1, 9]\n }, o($V2, [2, 7], {\n 10: 10,\n 11: [1, 11]\n }), o($V3, [2, 6]), {\n 6: 12,\n 7: $V0,\n 9: 6,\n 12: $V1\n }, {\n 1: [2, 1]\n }, {\n 7: [2, 4],\n 12: [1, 15],\n 13: 13,\n 14: 14,\n 15: [1, 16],\n 17: [1, 17],\n 19: [1, 18],\n 20: [1, 19],\n 21: [1, 20]\n }, o($V3, [2, 5]), {\n 7: [1, 21]\n }, o($V2, [2, 8]), {\n 12: [1, 22]\n }, o($V2, [2, 10]), {\n 12: [2, 16],\n 16: 23,\n 23: [1, 24]\n }, {\n 18: [1, 25]\n }, {\n 18: [1, 26]\n }, {\n 18: [1, 27]\n }, {\n 18: [1, 30],\n 22: 28,\n 24: [1, 29]\n }, {\n 1: [2, 2]\n }, o($V2, [2, 9]), {\n 12: [2, 11]\n }, {\n 12: [2, 17]\n }, {\n 12: [2, 12]\n }, {\n 12: [2, 13]\n }, {\n 12: [2, 14]\n }, {\n 12: [2, 15]\n }, {\n 12: $V4,\n 25: 31,\n 26: $V5\n }, {\n 12: $V4,\n 25: 33,\n 26: $V5\n }, {\n 12: [2, 18]\n }, {\n 12: $V4,\n 25: 34,\n 26: $V5\n }, {\n 12: [2, 19]\n }, {\n 12: [2, 21]\n }],\n defaultActions: {\n 9: [2, 1],\n 21: [2, 2],\n 23: [2, 11],\n 24: [2, 17],\n 25: [2, 12],\n 26: [2, 13],\n 27: [2, 14],\n 28: [2, 15],\n 31: [2, 18],\n 33: [2, 19],\n 34: [2, 21]\n },\n parseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n },\n parse: function parse(input) {\n var self = this,\n stack = [0],\n tstack = [],\n vstack = [null],\n lstack = [],\n table = this.table,\n yytext = '',\n yylineno = 0,\n yyleng = 0,\n recovering = 0,\n TERROR = 2,\n EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = {\n yy: {}\n };\n\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n\n token = self.symbols_[token] || token;\n }\n\n return token;\n }\n\n var symbol,\n preErrorSymbol,\n state,\n action,\n a,\n r,\n yyval = {},\n p,\n len,\n newState,\n expected;\n\n while (true) {\n state = stack[stack.length - 1];\n\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n\n action = table[state] && table[state][symbol];\n }\n\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n\n break;\n\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n\n if (ranges) {\n yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n }\n\n r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));\n\n if (typeof r !== 'undefined') {\n return r;\n }\n\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n\n case 3:\n return true;\n }\n }\n\n return true;\n }\n };\n /* generated by jison-lex 0.3.4 */\n\n var lexer = function () {\n var lexer = {\n EOF: 1,\n parseError: function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n // resets the lexer, sets new input\n setInput: function setInput(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n\n this.offset = 0;\n return this;\n },\n // consumes and returns one char from the input\n input: function input() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n // unshifts one char (or a string) into the input\n unput: function unput(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;\n\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n\n this.yyleng = this.yytext.length;\n return this;\n },\n // When called from action, caches matched text and appends it on next action\n more: function more() {\n this._more = true;\n return this;\n },\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: function reject() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n\n return this;\n },\n // retain first n characters of the match\n less: function less(n) {\n this.unput(this.match.slice(n));\n },\n // displays already matched input, i.e. for error messages\n pastInput: function pastInput() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\\n/g, \"\");\n },\n // displays upcoming input, i.e. for error messages\n upcomingInput: function upcomingInput() {\n var next = this.match;\n\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n\n return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: function showPosition() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: function test_match(match, indexed_rule) {\n var token, lines, backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno += lines.length;\n }\n\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n\n if (this.done && this._input) {\n this.done = false;\n }\n\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n\n return false;\n },\n // return next match in input\n next: function next() {\n if (this.done) {\n return this.EOF;\n }\n\n if (!this._input) {\n this.done = true;\n }\n\n var token, match, tempMatch, index;\n\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n\n var rules = this._currentRules();\n\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n\n if (match) {\n token = this.test_match(match, rules[index]);\n\n if (token !== false) {\n return token;\n } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n\n\n return false;\n }\n\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n // return next match that has a token\n lex: function lex() {\n var r = this.next();\n\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: function begin(condition) {\n this.conditionStack.push(condition);\n },\n // pop the previously active lexer condition state off the condition stack\n popState: function popState() {\n var n = this.conditionStack.length - 1;\n\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n // alias for begin(condition)\n pushState: function pushState(condition) {\n this.begin(condition);\n },\n // return the number of states currently on the stack\n stateStackSize: function stateStackSize() {\n return this.conditionStack.length;\n },\n options: {\n \"case-insensitive\": true\n },\n performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n\n switch ($avoiding_name_collisions) {\n case 0:\n return 12;\n break;\n\n case 1:\n /* skip all whitespace */\n break;\n\n case 2:\n /* skip comments */\n break;\n\n case 3:\n /* skip comments */\n break;\n\n case 4:\n return 4;\n break;\n\n case 5:\n return 15;\n break;\n\n case 6:\n return 17;\n break;\n\n case 7:\n return 20;\n break;\n\n case 8:\n return 21;\n break;\n\n case 9:\n return 19;\n break;\n\n case 10:\n return 8;\n break;\n\n case 11:\n return 8;\n break;\n\n case 12:\n return 5;\n break;\n\n case 13:\n return 26;\n break;\n\n case 14:\n this.begin(\"options\");\n break;\n\n case 15:\n this.popState();\n break;\n\n case 16:\n return 11;\n break;\n\n case 17:\n this.begin(\"string\");\n break;\n\n case 18:\n this.popState();\n break;\n\n case 19:\n return 23;\n break;\n\n case 20:\n return 18;\n break;\n\n case 21:\n return 7;\n break;\n }\n },\n rules: [/^(?:(\\r?\\n)+)/i, /^(?:\\s+)/i, /^(?:#[^\\n]*)/i, /^(?:%[^\\n]*)/i, /^(?:gitGraph\\b)/i, /^(?:commit\\b)/i, /^(?:branch\\b)/i, /^(?:merge\\b)/i, /^(?:reset\\b)/i, /^(?:checkout\\b)/i, /^(?:LR\\b)/i, /^(?:BT\\b)/i, /^(?::)/i, /^(?:\\^)/i, /^(?:options\\r?\\n)/i, /^(?:end\\r?\\n)/i, /^(?:[^\\n]+\\r?\\n)/i, /^(?:[\"])/i, /^(?:[\"])/i, /^(?:[^\"]*)/i, /^(?:[a-zA-Z][-_\\.a-zA-Z0-9]*[-_a-zA-Z0-9])/i, /^(?:$)/i],\n conditions: {\n \"options\": {\n \"rules\": [15, 16],\n \"inclusive\": false\n },\n \"string\": {\n \"rules\": [18, 19],\n \"inclusive\": false\n },\n \"INITIAL\": {\n \"rules\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 20, 21],\n \"inclusive\": true\n }\n }\n };\n return lexer;\n }();\n\n parser.lexer = lexer;\n\n function Parser() {\n this.yy = {};\n }\n\n Parser.prototype = parser;\n parser.Parser = Parser;\n return new Parser();\n }();\n\n if (true) {\n exports.parser = parser;\n exports.Parser = parser.Parser;\n\n exports.parse = function () {\n return parser.parse.apply(parser, arguments);\n };\n\n exports.main = function commonjsMain(args) {\n if (!args[1]) {\n console.log('Usage: ' + args[0] + ' FILE');\n process.exit(1);\n }\n\n var source = __webpack_require__(\n /*! fs */\n \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(\n /*! path */\n \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n\n return exports.parser.parse(source);\n };\n\n if (true && __webpack_require__.c[__webpack_require__.s] === module) {\n exports.main(process.argv.slice(1));\n }\n }\n /* WEBPACK VAR INJECTION */\n\n }).call(this, __webpack_require__(\n /*! ./../../../../node_modules/process/browser.js */\n \"./node_modules/process/browser.js\"), __webpack_require__(\n /*! ./../../../../node_modules/webpack/buildin/module.js */\n \"./node_modules/webpack/buildin/module.js\")(module));\n /***/\n },\n\n /***/\n \"./src/diagrams/git/styles.js\":\n /*!************************************!*\\\n !*** ./src/diagrams/git/styles.js ***!\n \\************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDiagramsGitStylesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n\n var getStyles = function getStyles() {\n return \"\\n .commit-id,\\n .commit-msg,\\n .branch-label {\\n fill: lightgrey;\\n color: lightgrey;\\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n font-family: var(--mermaid-font-family);\\n }\\n\";\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = getStyles;\n /***/\n },\n\n /***/\n \"./src/diagrams/info/infoDb.js\":\n /*!*************************************!*\\\n !*** ./src/diagrams/info/infoDb.js ***!\n \\*************************************/\n\n /*! exports provided: setMessage, getMessage, setInfo, getInfo, default */\n\n /***/\n function srcDiagramsInfoInfoDbJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setMessage\", function () {\n return setMessage;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getMessage\", function () {\n return getMessage;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setInfo\", function () {\n return setInfo;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getInfo\", function () {\n return getInfo;\n });\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /**\n * Created by knut on 15-01-14.\n */\n\n\n var message = '';\n var info = false;\n\n var setMessage = function setMessage(txt) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Setting message to: ' + txt);\n\n message = txt;\n };\n\n var getMessage = function getMessage() {\n return message;\n };\n\n var setInfo = function setInfo(inf) {\n info = inf;\n };\n\n var getInfo = function getInfo() {\n return info;\n }; // export const parseError = (err, hash) => {\n // global.mermaidAPI.parseError(err, hash)\n // }\n\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setMessage: setMessage,\n getMessage: getMessage,\n setInfo: setInfo,\n getInfo: getInfo // parseError\n\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/info/infoRenderer.js\":\n /*!*******************************************!*\\\n !*** ./src/diagrams/info/infoRenderer.js ***!\n \\*******************************************/\n\n /*! exports provided: setConf, draw, default */\n\n /***/\n function srcDiagramsInfoInfoRendererJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _infoDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./infoDb */\n \"./src/diagrams/info/infoDb.js\");\n /* harmony import */\n\n\n var _parser_info__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./parser/info */\n \"./src/diagrams/info/parser/info.jison\");\n /* harmony import */\n\n\n var _parser_info__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_info__WEBPACK_IMPORTED_MODULE_2__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /**\n * Created by knut on 14-12-11.\n */\n\n\n var conf = {};\n\n var setConf = function setConf(cnf) {\n var keys = Object.keys(cnf);\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n };\n /**\n * Draws a an info picture in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\n\n var draw = function draw(txt, id, ver) {\n try {\n var parser = _parser_info__WEBPACK_IMPORTED_MODULE_2___default.a.parser;\n parser.yy = _infoDb__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Renering info diagram\\n' + txt); // Parse the graph definition\n\n\n parser.parse(txt);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Parsed info diagram'); // Fetch the default direction, use TD if none was found\n\n\n var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + id);\n var g = svg.append('g');\n g.append('text') // text label for the x axis\n .attr('x', 100).attr('y', 40).attr('class', 'version').attr('font-size', '32px').style('text-anchor', 'middle').text('v ' + ver);\n svg.attr('height', 100);\n svg.attr('width', 400); // svg.attr('viewBox', '0 0 300 150');\n } catch (e) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error('Error while rendering info diagram');\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error(e.message);\n }\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setConf: setConf,\n draw: draw\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/info/parser/info.jison\":\n /*!*********************************************!*\\\n !*** ./src/diagrams/info/parser/info.jison ***!\n \\*********************************************/\n\n /*! no static exports found */\n\n /***/\n function srcDiagramsInfoParserInfoJison(module, exports, __webpack_require__) {\n /* WEBPACK VAR INJECTION */\n (function (process, module) {\n /* parser generated by jison 0.4.18 */\n\n /*\n Returns a Parser object of the following structure:\n \n Parser: {\n yy: {}\n }\n \n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n \n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n \n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n \n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n \n \n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n \n \n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n */\n var parser = function () {\n var o = function o(k, v, _o6, l) {\n for (_o6 = _o6 || {}, l = k.length; l--; _o6[k[l]] = v) {\n ;\n }\n\n return _o6;\n },\n $V0 = [6, 9, 10];\n\n var parser = {\n trace: function trace() {},\n yy: {},\n symbols_: {\n \"error\": 2,\n \"start\": 3,\n \"info\": 4,\n \"document\": 5,\n \"EOF\": 6,\n \"line\": 7,\n \"statement\": 8,\n \"NL\": 9,\n \"showInfo\": 10,\n \"$accept\": 0,\n \"$end\": 1\n },\n terminals_: {\n 2: \"error\",\n 4: \"info\",\n 6: \"EOF\",\n 9: \"NL\",\n 10: \"showInfo\"\n },\n productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1]],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate\n /* action[1] */\n , $$\n /* vstack */\n , _$\n /* lstack */\n ) {\n /* this == yyval */\n var $0 = $$.length - 1;\n\n switch (yystate) {\n case 1:\n return yy;\n break;\n\n case 4:\n break;\n\n case 6:\n yy.setInfo(true);\n break;\n }\n },\n table: [{\n 3: 1,\n 4: [1, 2]\n }, {\n 1: [3]\n }, o($V0, [2, 2], {\n 5: 3\n }), {\n 6: [1, 4],\n 7: 5,\n 8: 6,\n 9: [1, 7],\n 10: [1, 8]\n }, {\n 1: [2, 1]\n }, o($V0, [2, 3]), o($V0, [2, 4]), o($V0, [2, 5]), o($V0, [2, 6])],\n defaultActions: {\n 4: [2, 1]\n },\n parseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n },\n parse: function parse(input) {\n var self = this,\n stack = [0],\n tstack = [],\n vstack = [null],\n lstack = [],\n table = this.table,\n yytext = '',\n yylineno = 0,\n yyleng = 0,\n recovering = 0,\n TERROR = 2,\n EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = {\n yy: {}\n };\n\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n\n token = self.symbols_[token] || token;\n }\n\n return token;\n }\n\n var symbol,\n preErrorSymbol,\n state,\n action,\n a,\n r,\n yyval = {},\n p,\n len,\n newState,\n expected;\n\n while (true) {\n state = stack[stack.length - 1];\n\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n\n action = table[state] && table[state][symbol];\n }\n\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n\n break;\n\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n\n if (ranges) {\n yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n }\n\n r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));\n\n if (typeof r !== 'undefined') {\n return r;\n }\n\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n\n case 3:\n return true;\n }\n }\n\n return true;\n }\n };\n /* generated by jison-lex 0.3.4 */\n\n var lexer = function () {\n var lexer = {\n EOF: 1,\n parseError: function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n // resets the lexer, sets new input\n setInput: function setInput(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n\n this.offset = 0;\n return this;\n },\n // consumes and returns one char from the input\n input: function input() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n // unshifts one char (or a string) into the input\n unput: function unput(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;\n\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n\n this.yyleng = this.yytext.length;\n return this;\n },\n // When called from action, caches matched text and appends it on next action\n more: function more() {\n this._more = true;\n return this;\n },\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: function reject() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n\n return this;\n },\n // retain first n characters of the match\n less: function less(n) {\n this.unput(this.match.slice(n));\n },\n // displays already matched input, i.e. for error messages\n pastInput: function pastInput() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\\n/g, \"\");\n },\n // displays upcoming input, i.e. for error messages\n upcomingInput: function upcomingInput() {\n var next = this.match;\n\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n\n return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: function showPosition() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: function test_match(match, indexed_rule) {\n var token, lines, backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno += lines.length;\n }\n\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n\n if (this.done && this._input) {\n this.done = false;\n }\n\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n\n return false;\n },\n // return next match in input\n next: function next() {\n if (this.done) {\n return this.EOF;\n }\n\n if (!this._input) {\n this.done = true;\n }\n\n var token, match, tempMatch, index;\n\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n\n var rules = this._currentRules();\n\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n\n if (match) {\n token = this.test_match(match, rules[index]);\n\n if (token !== false) {\n return token;\n } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n\n\n return false;\n }\n\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n // return next match that has a token\n lex: function lex() {\n var r = this.next();\n\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: function begin(condition) {\n this.conditionStack.push(condition);\n },\n // pop the previously active lexer condition state off the condition stack\n popState: function popState() {\n var n = this.conditionStack.length - 1;\n\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n // alias for begin(condition)\n pushState: function pushState(condition) {\n this.begin(condition);\n },\n // return the number of states currently on the stack\n stateStackSize: function stateStackSize() {\n return this.conditionStack.length;\n },\n options: {\n \"case-insensitive\": true\n },\n performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n // Pre-lexer code can go here\n var YYSTATE = YY_START;\n\n switch ($avoiding_name_collisions) {\n case 0:\n return 4;\n break;\n\n case 1:\n return 9;\n break;\n\n case 2:\n return 'space';\n break;\n\n case 3:\n return 10;\n break;\n\n case 4:\n return 6;\n break;\n\n case 5:\n return 'TXT';\n break;\n }\n },\n rules: [/^(?:info\\b)/i, /^(?:[\\s\\n\\r]+)/i, /^(?:[\\s]+)/i, /^(?:showInfo\\b)/i, /^(?:$)/i, /^(?:.)/i],\n conditions: {\n \"INITIAL\": {\n \"rules\": [0, 1, 2, 3, 4, 5],\n \"inclusive\": true\n }\n }\n };\n return lexer;\n }();\n\n parser.lexer = lexer;\n\n function Parser() {\n this.yy = {};\n }\n\n Parser.prototype = parser;\n parser.Parser = Parser;\n return new Parser();\n }();\n\n if (true) {\n exports.parser = parser;\n exports.Parser = parser.Parser;\n\n exports.parse = function () {\n return parser.parse.apply(parser, arguments);\n };\n\n exports.main = function commonjsMain(args) {\n if (!args[1]) {\n console.log('Usage: ' + args[0] + ' FILE');\n process.exit(1);\n }\n\n var source = __webpack_require__(\n /*! fs */\n \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(\n /*! path */\n \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n\n return exports.parser.parse(source);\n };\n\n if (true && __webpack_require__.c[__webpack_require__.s] === module) {\n exports.main(process.argv.slice(1));\n }\n }\n /* WEBPACK VAR INJECTION */\n\n }).call(this, __webpack_require__(\n /*! ./../../../../node_modules/process/browser.js */\n \"./node_modules/process/browser.js\"), __webpack_require__(\n /*! ./../../../../node_modules/webpack/buildin/module.js */\n \"./node_modules/webpack/buildin/module.js\")(module));\n /***/\n },\n\n /***/\n \"./src/diagrams/info/styles.js\":\n /*!*************************************!*\\\n !*** ./src/diagrams/info/styles.js ***!\n \\*************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDiagramsInfoStylesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n\n var getStyles = function getStyles() {\n return \"\";\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = getStyles;\n /***/\n },\n\n /***/\n \"./src/diagrams/pie/parser/pie.jison\":\n /*!*******************************************!*\\\n !*** ./src/diagrams/pie/parser/pie.jison ***!\n \\*******************************************/\n\n /*! no static exports found */\n\n /***/\n function srcDiagramsPieParserPieJison(module, exports, __webpack_require__) {\n /* WEBPACK VAR INJECTION */\n (function (process, module) {\n /* parser generated by jison 0.4.18 */\n\n /*\n Returns a Parser object of the following structure:\n \n Parser: {\n yy: {}\n }\n \n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n \n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n \n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n \n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n \n \n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n \n \n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n */\n var parser = function () {\n var o = function o(k, v, _o7, l) {\n for (_o7 = _o7 || {}, l = k.length; l--; _o7[k[l]] = v) {\n ;\n }\n\n return _o7;\n },\n $V0 = [1, 4],\n $V1 = [1, 5],\n $V2 = [1, 6],\n $V3 = [1, 7],\n $V4 = [1, 9],\n $V5 = [1, 10, 12, 19, 20, 21, 22],\n $V6 = [1, 6, 10, 12, 19, 20, 21, 22],\n $V7 = [19, 20, 21],\n $V8 = [1, 22],\n $V9 = [6, 19, 20, 21, 22];\n\n var parser = {\n trace: function trace() {},\n yy: {},\n symbols_: {\n \"error\": 2,\n \"start\": 3,\n \"eol\": 4,\n \"directive\": 5,\n \"PIE\": 6,\n \"document\": 7,\n \"line\": 8,\n \"statement\": 9,\n \"txt\": 10,\n \"value\": 11,\n \"title\": 12,\n \"title_value\": 13,\n \"openDirective\": 14,\n \"typeDirective\": 15,\n \"closeDirective\": 16,\n \":\": 17,\n \"argDirective\": 18,\n \"NEWLINE\": 19,\n \";\": 20,\n \"EOF\": 21,\n \"open_directive\": 22,\n \"type_directive\": 23,\n \"arg_directive\": 24,\n \"close_directive\": 25,\n \"$accept\": 0,\n \"$end\": 1\n },\n terminals_: {\n 2: \"error\",\n 6: \"PIE\",\n 10: \"txt\",\n 11: \"value\",\n 12: \"title\",\n 13: \"title_value\",\n 17: \":\",\n 19: \"NEWLINE\",\n 20: \";\",\n 21: \"EOF\",\n 22: \"open_directive\",\n 23: \"type_directive\",\n 24: \"arg_directive\",\n 25: \"close_directive\"\n },\n productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [9, 0], [9, 2], [9, 2], [9, 1], [5, 3], [5, 5], [4, 1], [4, 1], [4, 1], [14, 1], [15, 1], [18, 1], [16, 1]],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate\n /* action[1] */\n , $$\n /* vstack */\n , _$\n /* lstack */\n ) {\n /* this == yyval */\n var $0 = $$.length - 1;\n\n switch (yystate) {\n case 6:\n this.$ = $$[$0 - 1];\n break;\n\n case 8:\n yy.addSection($$[$0 - 1], yy.cleanupValue($$[$0]));\n break;\n\n case 9:\n this.$ = $$[$0].trim();\n yy.setTitle(this.$);\n break;\n\n case 16:\n yy.parseDirective('%%{', 'open_directive');\n break;\n\n case 17:\n yy.parseDirective($$[$0], 'type_directive');\n break;\n\n case 18:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"');\n yy.parseDirective($$[$0], 'arg_directive');\n break;\n\n case 19:\n yy.parseDirective('}%%', 'close_directive', 'pie');\n break;\n }\n },\n table: [{\n 3: 1,\n 4: 2,\n 5: 3,\n 6: $V0,\n 14: 8,\n 19: $V1,\n 20: $V2,\n 21: $V3,\n 22: $V4\n }, {\n 1: [3]\n }, {\n 3: 10,\n 4: 2,\n 5: 3,\n 6: $V0,\n 14: 8,\n 19: $V1,\n 20: $V2,\n 21: $V3,\n 22: $V4\n }, {\n 3: 11,\n 4: 2,\n 5: 3,\n 6: $V0,\n 14: 8,\n 19: $V1,\n 20: $V2,\n 21: $V3,\n 22: $V4\n }, o($V5, [2, 4], {\n 7: 12\n }), o($V6, [2, 13]), o($V6, [2, 14]), o($V6, [2, 15]), {\n 15: 13,\n 23: [1, 14]\n }, {\n 23: [2, 16]\n }, {\n 1: [2, 1]\n }, {\n 1: [2, 2]\n }, o($V7, [2, 7], {\n 14: 8,\n 8: 15,\n 9: 16,\n 5: 19,\n 1: [2, 3],\n 10: [1, 17],\n 12: [1, 18],\n 22: $V4\n }), {\n 16: 20,\n 17: [1, 21],\n 25: $V8\n }, o([17, 25], [2, 17]), o($V5, [2, 5]), {\n 4: 23,\n 19: $V1,\n 20: $V2,\n 21: $V3\n }, {\n 11: [1, 24]\n }, {\n 13: [1, 25]\n }, o($V7, [2, 10]), o($V9, [2, 11]), {\n 18: 26,\n 24: [1, 27]\n }, o($V9, [2, 19]), o($V5, [2, 6]), o($V7, [2, 8]), o($V7, [2, 9]), {\n 16: 28,\n 25: $V8\n }, {\n 25: [2, 18]\n }, o($V9, [2, 12])],\n defaultActions: {\n 9: [2, 16],\n 10: [2, 1],\n 11: [2, 2],\n 27: [2, 18]\n },\n parseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n },\n parse: function parse(input) {\n var self = this,\n stack = [0],\n tstack = [],\n vstack = [null],\n lstack = [],\n table = this.table,\n yytext = '',\n yylineno = 0,\n yyleng = 0,\n recovering = 0,\n TERROR = 2,\n EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = {\n yy: {}\n };\n\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n\n token = self.symbols_[token] || token;\n }\n\n return token;\n }\n\n var symbol,\n preErrorSymbol,\n state,\n action,\n a,\n r,\n yyval = {},\n p,\n len,\n newState,\n expected;\n\n while (true) {\n state = stack[stack.length - 1];\n\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n\n action = table[state] && table[state][symbol];\n }\n\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n\n break;\n\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n\n if (ranges) {\n yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n }\n\n r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));\n\n if (typeof r !== 'undefined') {\n return r;\n }\n\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n\n case 3:\n return true;\n }\n }\n\n return true;\n }\n };\n /* generated by jison-lex 0.3.4 */\n\n var lexer = function () {\n var lexer = {\n EOF: 1,\n parseError: function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n // resets the lexer, sets new input\n setInput: function setInput(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n\n this.offset = 0;\n return this;\n },\n // consumes and returns one char from the input\n input: function input() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n // unshifts one char (or a string) into the input\n unput: function unput(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;\n\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n\n this.yyleng = this.yytext.length;\n return this;\n },\n // When called from action, caches matched text and appends it on next action\n more: function more() {\n this._more = true;\n return this;\n },\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: function reject() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n\n return this;\n },\n // retain first n characters of the match\n less: function less(n) {\n this.unput(this.match.slice(n));\n },\n // displays already matched input, i.e. for error messages\n pastInput: function pastInput() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\\n/g, \"\");\n },\n // displays upcoming input, i.e. for error messages\n upcomingInput: function upcomingInput() {\n var next = this.match;\n\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n\n return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: function showPosition() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: function test_match(match, indexed_rule) {\n var token, lines, backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno += lines.length;\n }\n\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n\n if (this.done && this._input) {\n this.done = false;\n }\n\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n\n return false;\n },\n // return next match in input\n next: function next() {\n if (this.done) {\n return this.EOF;\n }\n\n if (!this._input) {\n this.done = true;\n }\n\n var token, match, tempMatch, index;\n\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n\n var rules = this._currentRules();\n\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n\n if (match) {\n token = this.test_match(match, rules[index]);\n\n if (token !== false) {\n return token;\n } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n\n\n return false;\n }\n\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n // return next match that has a token\n lex: function lex() {\n var r = this.next();\n\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: function begin(condition) {\n this.conditionStack.push(condition);\n },\n // pop the previously active lexer condition state off the condition stack\n popState: function popState() {\n var n = this.conditionStack.length - 1;\n\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n // alias for begin(condition)\n pushState: function pushState(condition) {\n this.begin(condition);\n },\n // return the number of states currently on the stack\n stateStackSize: function stateStackSize() {\n return this.conditionStack.length;\n },\n options: {\n \"case-insensitive\": true\n },\n performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n\n switch ($avoiding_name_collisions) {\n case 0:\n this.begin('open_directive');\n return 22;\n break;\n\n case 1:\n this.begin('type_directive');\n return 23;\n break;\n\n case 2:\n this.popState();\n this.begin('arg_directive');\n return 17;\n break;\n\n case 3:\n this.popState();\n this.popState();\n return 25;\n break;\n\n case 4:\n return 24;\n break;\n\n case 5:\n /* skip comments */\n break;\n\n case 6:\n /* skip comments */\n {\n /*console.log('');*/\n }\n break;\n\n case 7:\n return 19;\n break;\n\n case 8:\n /* do nothing */\n break;\n\n case 9:\n /* ignore */\n break;\n\n case 10:\n this.begin(\"title\");\n return 12;\n break;\n\n case 11:\n this.popState();\n return \"title_value\";\n break;\n\n case 12:\n this.begin(\"string\");\n break;\n\n case 13:\n this.popState();\n break;\n\n case 14:\n return \"txt\";\n break;\n\n case 15:\n return 6;\n break;\n\n case 16:\n return \"value\";\n break;\n\n case 17:\n return 21;\n break;\n }\n },\n rules: [/^(?:%%\\{)/i, /^(?:((?:(?!\\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\\}%%)/i, /^(?:((?:(?!\\}%%).|\\n)*))/i, /^(?:%%(?!\\{)[^\\n]*)/i, /^(?:[^\\}]%%[^\\n]*)/i, /^(?:[\\n\\r]+)/i, /^(?:%%[^\\n]*)/i, /^(?:[\\s]+)/i, /^(?:title\\b)/i, /^(?:(?!\\n||)*[^\\n]*)/i, /^(?:[\"])/i, /^(?:[\"])/i, /^(?:[^\"]*)/i, /^(?:pie\\b)/i, /^(?::[\\s]*[\\d]+(?:\\.[\\d]+)?)/i, /^(?:$)/i],\n conditions: {\n \"close_directive\": {\n \"rules\": [],\n \"inclusive\": false\n },\n \"arg_directive\": {\n \"rules\": [3, 4],\n \"inclusive\": false\n },\n \"type_directive\": {\n \"rules\": [2, 3],\n \"inclusive\": false\n },\n \"open_directive\": {\n \"rules\": [1],\n \"inclusive\": false\n },\n \"title\": {\n \"rules\": [11],\n \"inclusive\": false\n },\n \"string\": {\n \"rules\": [13, 14],\n \"inclusive\": false\n },\n \"INITIAL\": {\n \"rules\": [0, 5, 6, 7, 8, 9, 10, 12, 15, 16, 17],\n \"inclusive\": true\n }\n }\n };\n return lexer;\n }();\n\n parser.lexer = lexer;\n\n function Parser() {\n this.yy = {};\n }\n\n Parser.prototype = parser;\n parser.Parser = Parser;\n return new Parser();\n }();\n\n if (true) {\n exports.parser = parser;\n exports.Parser = parser.Parser;\n\n exports.parse = function () {\n return parser.parse.apply(parser, arguments);\n };\n\n exports.main = function commonjsMain(args) {\n if (!args[1]) {\n console.log('Usage: ' + args[0] + ' FILE');\n process.exit(1);\n }\n\n var source = __webpack_require__(\n /*! fs */\n \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(\n /*! path */\n \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n\n return exports.parser.parse(source);\n };\n\n if (true && __webpack_require__.c[__webpack_require__.s] === module) {\n exports.main(process.argv.slice(1));\n }\n }\n /* WEBPACK VAR INJECTION */\n\n }).call(this, __webpack_require__(\n /*! ./../../../../node_modules/process/browser.js */\n \"./node_modules/process/browser.js\"), __webpack_require__(\n /*! ./../../../../node_modules/webpack/buildin/module.js */\n \"./node_modules/webpack/buildin/module.js\")(module));\n /***/\n },\n\n /***/\n \"./src/diagrams/pie/pieDb.js\":\n /*!***********************************!*\\\n !*** ./src/diagrams/pie/pieDb.js ***!\n \\***********************************/\n\n /*! exports provided: parseDirective, default */\n\n /***/\n function srcDiagramsPiePieDbJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"parseDirective\", function () {\n return parseDirective;\n });\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ../../mermaidAPI */\n \"./src/mermaidAPI.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /**\n *\n */\n\n\n var sections = {};\n var title = '';\n\n var parseDirective = function parseDirective(statement, context, type) {\n _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__[\"default\"].parseDirective(this, statement, context, type);\n };\n\n var addSection = function addSection(id, value) {\n if (typeof sections[id] === 'undefined') {\n sections[id] = value;\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].debug('Added new section :', id);\n }\n };\n\n var getSections = function getSections() {\n return sections;\n };\n\n var setTitle = function setTitle(txt) {\n title = txt;\n };\n\n var getTitle = function getTitle() {\n return title;\n };\n\n var cleanupValue = function cleanupValue(value) {\n if (value.substring(0, 1) === ':') {\n value = value.substring(1).trim();\n return Number(value.trim());\n } else {\n return Number(value.trim());\n }\n };\n\n var clear = function clear() {\n sections = {};\n title = '';\n }; // export const parseError = (err, hash) => {\n // global.mermaidAPI.parseError(err, hash)\n // }\n\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n parseDirective: parseDirective,\n getConfig: function getConfig() {\n return _config__WEBPACK_IMPORTED_MODULE_2__[\"getConfig\"]().pie;\n },\n addSection: addSection,\n getSections: getSections,\n cleanupValue: cleanupValue,\n clear: clear,\n setTitle: setTitle,\n getTitle: getTitle // parseError\n\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/pie/pieRenderer.js\":\n /*!*****************************************!*\\\n !*** ./src/diagrams/pie/pieRenderer.js ***!\n \\*****************************************/\n\n /*! exports provided: setConf, draw, default */\n\n /***/\n function srcDiagramsPiePieRendererJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _pieDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./pieDb */\n \"./src/diagrams/pie/pieDb.js\");\n /* harmony import */\n\n\n var _parser_pie__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./parser/pie */\n \"./src/diagrams/pie/parser/pie.jison\");\n /* harmony import */\n\n\n var _parser_pie__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_pie__WEBPACK_IMPORTED_MODULE_2__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n /**\n * Created by AshishJ on 11-09-2019.\n */\n\n\n var conf = {};\n\n var setConf = function setConf(cnf) {\n var keys = Object.keys(cnf);\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n };\n /**\n * Draws a Pie Chart with the data given in text.\n * @param text\n * @param id\n */\n\n\n var width;\n var height = 450;\n\n var draw = function draw(txt, id) {\n try {\n var parser = _parser_pie__WEBPACK_IMPORTED_MODULE_2___default.a.parser;\n parser.yy = _pieDb__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Rendering info diagram\\n' + txt); // Parse the Pie Chart definition\n\n\n parser.yy.clear();\n parser.parse(txt);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Parsed info diagram');\n\n var elem = document.getElementById(id);\n width = elem.parentElement.offsetWidth;\n\n if (typeof width === 'undefined') {\n width = 1200;\n }\n\n if (typeof conf.useWidth !== 'undefined') {\n width = conf.useWidth;\n }\n\n var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + id);\n Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"configureSvgSize\"])(diagram, height, width, conf.useMaxWidth); // Set viewBox\n\n elem.setAttribute('viewBox', '0 0 ' + width + ' ' + height); // Fetch the default direction, use TD if none was found\n\n var margin = 40;\n var legendRectSize = 18;\n var legendSpacing = 4;\n var radius = Math.min(width, height) / 2 - margin;\n var svg = diagram.append('g').attr('transform', 'translate(' + width / 2 + ',' + height / 2 + ')');\n\n var data = _pieDb__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getSections();\n\n var sum = 0;\n Object.keys(data).forEach(function (key) {\n sum += data[key];\n }); // Set the color scale\n\n var color = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"scaleOrdinal\"])().domain(data).range(d3__WEBPACK_IMPORTED_MODULE_0__[\"schemeSet2\"]); // Compute the position of each group on the pie:\n\n var pie = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"pie\"])().value(function (d) {\n return d.value;\n });\n var dataReady = pie(Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"entries\"])(data)); // Shape helper to build arcs:\n\n var arcGenerator = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"arc\"])().innerRadius(0).outerRadius(radius); // Build the pie chart: each part of the pie is a path that we build using the arc function.\n\n svg.selectAll('mySlices').data(dataReady).enter().append('path').attr('d', arcGenerator).attr('fill', function (d) {\n return color(d.data.key);\n }).attr('stroke', 'black').style('stroke-width', '2px').style('opacity', 0.7); // Now add the percentage.\n // Use the centroid method to get the best coordinates.\n\n svg.selectAll('mySlices').data(dataReady.filter(function (value) {\n return value.data.value !== 0;\n })).enter().append('text').text(function (d) {\n return (d.data.value / sum * 100).toFixed(0) + '%';\n }).attr('transform', function (d) {\n return 'translate(' + arcGenerator.centroid(d) + ')';\n }).style('text-anchor', 'middle').attr('class', 'slice').style('font-size', 17);\n svg.append('text').text(parser.yy.getTitle()).attr('x', 0).attr('y', -(height - 50) / 2).attr('class', 'pieTitleText'); // Add the legends/annotations for each section\n\n var legend = svg.selectAll('.legend').data(color.domain()).enter().append('g').attr('class', 'legend').attr('transform', function (d, i) {\n var height = legendRectSize + legendSpacing;\n var offset = height * color.domain().length / 2;\n var horz = 12 * legendRectSize;\n var vert = i * height - offset;\n return 'translate(' + horz + ',' + vert + ')';\n });\n legend.append('rect').attr('width', legendRectSize).attr('height', legendRectSize).style('fill', color).style('stroke', color);\n legend.append('text').attr('x', legendRectSize + legendSpacing).attr('y', legendRectSize - legendSpacing).text(function (d) {\n return d;\n });\n } catch (e) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error('Error while rendering info diagram');\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error(e);\n }\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setConf: setConf,\n draw: draw\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/pie/styles.js\":\n /*!************************************!*\\\n !*** ./src/diagrams/pie/styles.js ***!\n \\************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDiagramsPieStylesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n\n var getStyles = function getStyles(options) {\n return \".pieTitleText {\\n text-anchor: middle;\\n font-size: 25px;\\n fill: \".concat(options.taskTextDarkColor, \";\\n font-family: \").concat(options.fontFamily, \";\\n }\\n .slice {\\n font-family: \").concat(options.fontFamily, \";\\n fill: \").concat(options.textColor, \";\\n // fill: white;\\n }\\n .legend text {\\n fill: \").concat(options.taskTextDarkColor, \";\\n font-family: \").concat(options.fontFamily, \";\\n font-size: 17px;\\n }\\n\");\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = getStyles;\n /***/\n },\n\n /***/\n \"./src/diagrams/sequence/parser/sequenceDiagram.jison\":\n /*!************************************************************!*\\\n !*** ./src/diagrams/sequence/parser/sequenceDiagram.jison ***!\n \\************************************************************/\n\n /*! no static exports found */\n\n /***/\n function srcDiagramsSequenceParserSequenceDiagramJison(module, exports, __webpack_require__) {\n /* WEBPACK VAR INJECTION */\n (function (process, module) {\n /* parser generated by jison 0.4.18 */\n\n /*\n Returns a Parser object of the following structure:\n \n Parser: {\n yy: {}\n }\n \n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n \n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n \n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n \n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n \n \n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n \n \n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n */\n var parser = function () {\n var o = function o(k, v, _o8, l) {\n for (_o8 = _o8 || {}, l = k.length; l--; _o8[k[l]] = v) {\n ;\n }\n\n return _o8;\n },\n $V0 = [1, 2],\n $V1 = [1, 3],\n $V2 = [1, 5],\n $V3 = [1, 7],\n $V4 = [2, 5],\n $V5 = [1, 15],\n $V6 = [1, 17],\n $V7 = [1, 18],\n $V8 = [1, 20],\n $V9 = [1, 21],\n $Va = [1, 22],\n $Vb = [1, 24],\n $Vc = [1, 25],\n $Vd = [1, 26],\n $Ve = [1, 27],\n $Vf = [1, 28],\n $Vg = [1, 29],\n $Vh = [1, 32],\n $Vi = [1, 33],\n $Vj = [1, 36],\n $Vk = [1, 4, 5, 16, 21, 22, 23, 25, 27, 28, 29, 30, 31, 33, 35, 36, 37, 48, 58],\n $Vl = [1, 44],\n $Vm = [4, 5, 16, 21, 22, 23, 25, 27, 28, 29, 30, 31, 33, 37, 48, 58],\n $Vn = [4, 5, 16, 21, 22, 23, 25, 27, 28, 29, 30, 31, 33, 36, 37, 48, 58],\n $Vo = [4, 5, 16, 21, 22, 23, 25, 27, 28, 29, 30, 31, 33, 35, 37, 48, 58],\n $Vp = [46, 47, 48],\n $Vq = [1, 4, 5, 7, 16, 21, 22, 23, 25, 27, 28, 29, 30, 31, 33, 35, 36, 37, 48, 58];\n\n var parser = {\n trace: function trace() {},\n yy: {},\n symbols_: {\n \"error\": 2,\n \"start\": 3,\n \"SPACE\": 4,\n \"NEWLINE\": 5,\n \"directive\": 6,\n \"SD\": 7,\n \"document\": 8,\n \"line\": 9,\n \"statement\": 10,\n \"openDirective\": 11,\n \"typeDirective\": 12,\n \"closeDirective\": 13,\n \":\": 14,\n \"argDirective\": 15,\n \"participant\": 16,\n \"actor\": 17,\n \"AS\": 18,\n \"restOfLine\": 19,\n \"signal\": 20,\n \"autonumber\": 21,\n \"activate\": 22,\n \"deactivate\": 23,\n \"note_statement\": 24,\n \"title\": 25,\n \"text2\": 26,\n \"loop\": 27,\n \"end\": 28,\n \"rect\": 29,\n \"opt\": 30,\n \"alt\": 31,\n \"else_sections\": 32,\n \"par\": 33,\n \"par_sections\": 34,\n \"and\": 35,\n \"else\": 36,\n \"note\": 37,\n \"placement\": 38,\n \"over\": 39,\n \"actor_pair\": 40,\n \"spaceList\": 41,\n \",\": 42,\n \"left_of\": 43,\n \"right_of\": 44,\n \"signaltype\": 45,\n \"+\": 46,\n \"-\": 47,\n \"ACTOR\": 48,\n \"SOLID_OPEN_ARROW\": 49,\n \"DOTTED_OPEN_ARROW\": 50,\n \"SOLID_ARROW\": 51,\n \"DOTTED_ARROW\": 52,\n \"SOLID_CROSS\": 53,\n \"DOTTED_CROSS\": 54,\n \"SOLID_POINT\": 55,\n \"DOTTED_POINT\": 56,\n \"TXT\": 57,\n \"open_directive\": 58,\n \"type_directive\": 59,\n \"arg_directive\": 60,\n \"close_directive\": 61,\n \"$accept\": 0,\n \"$end\": 1\n },\n terminals_: {\n 2: \"error\",\n 4: \"SPACE\",\n 5: \"NEWLINE\",\n 7: \"SD\",\n 14: \":\",\n 16: \"participant\",\n 18: \"AS\",\n 19: \"restOfLine\",\n 21: \"autonumber\",\n 22: \"activate\",\n 23: \"deactivate\",\n 25: \"title\",\n 27: \"loop\",\n 28: \"end\",\n 29: \"rect\",\n 30: \"opt\",\n 31: \"alt\",\n 33: \"par\",\n 35: \"and\",\n 36: \"else\",\n 37: \"note\",\n 39: \"over\",\n 42: \",\",\n 43: \"left_of\",\n 44: \"right_of\",\n 46: \"+\",\n 47: \"-\",\n 48: \"ACTOR\",\n 49: \"SOLID_OPEN_ARROW\",\n 50: \"DOTTED_OPEN_ARROW\",\n 51: \"SOLID_ARROW\",\n 52: \"DOTTED_ARROW\",\n 53: \"SOLID_CROSS\",\n 54: \"DOTTED_CROSS\",\n 55: \"SOLID_POINT\",\n 56: \"DOTTED_POINT\",\n 57: \"TXT\",\n 58: \"open_directive\",\n 59: \"type_directive\",\n 60: \"arg_directive\",\n 61: \"close_directive\"\n },\n productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [9, 1], [9, 1], [6, 4], [6, 6], [10, 5], [10, 3], [10, 2], [10, 1], [10, 3], [10, 3], [10, 2], [10, 3], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 1], [34, 1], [34, 4], [32, 1], [32, 4], [24, 4], [24, 4], [41, 2], [41, 1], [40, 3], [40, 1], [38, 1], [38, 1], [20, 5], [20, 5], [20, 4], [17, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [26, 1], [11, 1], [12, 1], [15, 1], [13, 1]],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate\n /* action[1] */\n , $$\n /* vstack */\n , _$\n /* lstack */\n ) {\n /* this == yyval */\n var $0 = $$.length - 1;\n\n switch (yystate) {\n case 4:\n yy.apply($$[$0]);\n return $$[$0];\n break;\n\n case 5:\n this.$ = [];\n break;\n\n case 6:\n $$[$0 - 1].push($$[$0]);\n this.$ = $$[$0 - 1];\n break;\n\n case 7:\n case 8:\n this.$ = $$[$0];\n break;\n\n case 9:\n this.$ = [];\n break;\n\n case 12:\n $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]);\n this.$ = $$[$0 - 3];\n break;\n\n case 13:\n this.$ = $$[$0 - 1];\n break;\n\n case 15:\n yy.enableSequenceNumbers();\n break;\n\n case 16:\n this.$ = {\n type: 'activeStart',\n signalType: yy.LINETYPE.ACTIVE_START,\n actor: $$[$0 - 1]\n };\n break;\n\n case 17:\n this.$ = {\n type: 'activeEnd',\n signalType: yy.LINETYPE.ACTIVE_END,\n actor: $$[$0 - 1]\n };\n break;\n\n case 19:\n this.$ = [{\n type: 'setTitle',\n text: $$[$0 - 1]\n }];\n break;\n\n case 20:\n $$[$0 - 1].unshift({\n type: 'loopStart',\n loopText: yy.parseMessage($$[$0 - 2]),\n signalType: yy.LINETYPE.LOOP_START\n });\n $$[$0 - 1].push({\n type: 'loopEnd',\n loopText: $$[$0 - 2],\n signalType: yy.LINETYPE.LOOP_END\n });\n this.$ = $$[$0 - 1];\n break;\n\n case 21:\n $$[$0 - 1].unshift({\n type: 'rectStart',\n color: yy.parseMessage($$[$0 - 2]),\n signalType: yy.LINETYPE.RECT_START\n });\n $$[$0 - 1].push({\n type: 'rectEnd',\n color: yy.parseMessage($$[$0 - 2]),\n signalType: yy.LINETYPE.RECT_END\n });\n this.$ = $$[$0 - 1];\n break;\n\n case 22:\n $$[$0 - 1].unshift({\n type: 'optStart',\n optText: yy.parseMessage($$[$0 - 2]),\n signalType: yy.LINETYPE.OPT_START\n });\n $$[$0 - 1].push({\n type: 'optEnd',\n optText: yy.parseMessage($$[$0 - 2]),\n signalType: yy.LINETYPE.OPT_END\n });\n this.$ = $$[$0 - 1];\n break;\n\n case 23:\n // Alt start\n $$[$0 - 1].unshift({\n type: 'altStart',\n altText: yy.parseMessage($$[$0 - 2]),\n signalType: yy.LINETYPE.ALT_START\n }); // Content in alt is already in $$[$0-1]\n // End\n\n $$[$0 - 1].push({\n type: 'altEnd',\n signalType: yy.LINETYPE.ALT_END\n });\n this.$ = $$[$0 - 1];\n break;\n\n case 24:\n // Parallel start\n $$[$0 - 1].unshift({\n type: 'parStart',\n parText: yy.parseMessage($$[$0 - 2]),\n signalType: yy.LINETYPE.PAR_START\n }); // Content in par is already in $$[$0-1]\n // End\n\n $$[$0 - 1].push({\n type: 'parEnd',\n signalType: yy.LINETYPE.PAR_END\n });\n this.$ = $$[$0 - 1];\n break;\n\n case 27:\n this.$ = $$[$0 - 3].concat([{\n type: 'and',\n parText: yy.parseMessage($$[$0 - 1]),\n signalType: yy.LINETYPE.PAR_AND\n }, $$[$0]]);\n break;\n\n case 29:\n this.$ = $$[$0 - 3].concat([{\n type: 'else',\n altText: yy.parseMessage($$[$0 - 1]),\n signalType: yy.LINETYPE.ALT_ELSE\n }, $$[$0]]);\n break;\n\n case 30:\n this.$ = [$$[$0 - 1], {\n type: 'addNote',\n placement: $$[$0 - 2],\n actor: $$[$0 - 1].actor,\n text: $$[$0]\n }];\n break;\n\n case 31:\n // Coerce actor_pair into a [to, from, ...] array\n $$[$0 - 2] = [].concat($$[$0 - 1], $$[$0 - 1]).slice(0, 2);\n $$[$0 - 2][0] = $$[$0 - 2][0].actor;\n $$[$0 - 2][1] = $$[$0 - 2][1].actor;\n this.$ = [$$[$0 - 1], {\n type: 'addNote',\n placement: yy.PLACEMENT.OVER,\n actor: $$[$0 - 2].slice(0, 2),\n text: $$[$0]\n }];\n break;\n\n case 34:\n this.$ = [$$[$0 - 2], $$[$0]];\n break;\n\n case 35:\n this.$ = $$[$0];\n break;\n\n case 36:\n this.$ = yy.PLACEMENT.LEFTOF;\n break;\n\n case 37:\n this.$ = yy.PLACEMENT.RIGHTOF;\n break;\n\n case 38:\n this.$ = [$$[$0 - 4], $$[$0 - 1], {\n type: 'addMessage',\n from: $$[$0 - 4].actor,\n to: $$[$0 - 1].actor,\n signalType: $$[$0 - 3],\n msg: $$[$0]\n }, {\n type: 'activeStart',\n signalType: yy.LINETYPE.ACTIVE_START,\n actor: $$[$0 - 1]\n }];\n break;\n\n case 39:\n this.$ = [$$[$0 - 4], $$[$0 - 1], {\n type: 'addMessage',\n from: $$[$0 - 4].actor,\n to: $$[$0 - 1].actor,\n signalType: $$[$0 - 3],\n msg: $$[$0]\n }, {\n type: 'activeEnd',\n signalType: yy.LINETYPE.ACTIVE_END,\n actor: $$[$0 - 4]\n }];\n break;\n\n case 40:\n this.$ = [$$[$0 - 3], $$[$0 - 1], {\n type: 'addMessage',\n from: $$[$0 - 3].actor,\n to: $$[$0 - 1].actor,\n signalType: $$[$0 - 2],\n msg: $$[$0]\n }];\n break;\n\n case 41:\n this.$ = {\n type: 'addActor',\n actor: $$[$0]\n };\n break;\n\n case 42:\n this.$ = yy.LINETYPE.SOLID_OPEN;\n break;\n\n case 43:\n this.$ = yy.LINETYPE.DOTTED_OPEN;\n break;\n\n case 44:\n this.$ = yy.LINETYPE.SOLID;\n break;\n\n case 45:\n this.$ = yy.LINETYPE.DOTTED;\n break;\n\n case 46:\n this.$ = yy.LINETYPE.SOLID_CROSS;\n break;\n\n case 47:\n this.$ = yy.LINETYPE.DOTTED_CROSS;\n break;\n\n case 48:\n this.$ = yy.LINETYPE.SOLID_POINT;\n break;\n\n case 49:\n this.$ = yy.LINETYPE.DOTTED_POINT;\n break;\n\n case 50:\n this.$ = yy.parseMessage($$[$0].trim().substring(1));\n break;\n\n case 51:\n yy.parseDirective('%%{', 'open_directive');\n break;\n\n case 52:\n yy.parseDirective($$[$0], 'type_directive');\n break;\n\n case 53:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"');\n yy.parseDirective($$[$0], 'arg_directive');\n break;\n\n case 54:\n yy.parseDirective('}%%', 'close_directive', 'sequence');\n break;\n }\n },\n table: [{\n 3: 1,\n 4: $V0,\n 5: $V1,\n 6: 4,\n 7: $V2,\n 11: 6,\n 58: $V3\n }, {\n 1: [3]\n }, {\n 3: 8,\n 4: $V0,\n 5: $V1,\n 6: 4,\n 7: $V2,\n 11: 6,\n 58: $V3\n }, {\n 3: 9,\n 4: $V0,\n 5: $V1,\n 6: 4,\n 7: $V2,\n 11: 6,\n 58: $V3\n }, {\n 3: 10,\n 4: $V0,\n 5: $V1,\n 6: 4,\n 7: $V2,\n 11: 6,\n 58: $V3\n }, o([1, 4, 5, 16, 21, 22, 23, 25, 27, 29, 30, 31, 33, 37, 48, 58], $V4, {\n 8: 11\n }), {\n 12: 12,\n 59: [1, 13]\n }, {\n 59: [2, 51]\n }, {\n 1: [2, 1]\n }, {\n 1: [2, 2]\n }, {\n 1: [2, 3]\n }, {\n 1: [2, 4],\n 4: $V5,\n 5: $V6,\n 6: 30,\n 9: 14,\n 10: 16,\n 11: 6,\n 16: $V7,\n 17: 31,\n 20: 19,\n 21: $V8,\n 22: $V9,\n 23: $Va,\n 24: 23,\n 25: $Vb,\n 27: $Vc,\n 29: $Vd,\n 30: $Ve,\n 31: $Vf,\n 33: $Vg,\n 37: $Vh,\n 48: $Vi,\n 58: $V3\n }, {\n 13: 34,\n 14: [1, 35],\n 61: $Vj\n }, o([14, 61], [2, 52]), o($Vk, [2, 6]), {\n 6: 30,\n 10: 37,\n 11: 6,\n 16: $V7,\n 17: 31,\n 20: 19,\n 21: $V8,\n 22: $V9,\n 23: $Va,\n 24: 23,\n 25: $Vb,\n 27: $Vc,\n 29: $Vd,\n 30: $Ve,\n 31: $Vf,\n 33: $Vg,\n 37: $Vh,\n 48: $Vi,\n 58: $V3\n }, o($Vk, [2, 8]), o($Vk, [2, 9]), {\n 17: 38,\n 48: $Vi\n }, {\n 5: [1, 39]\n }, o($Vk, [2, 15]), {\n 17: 40,\n 48: $Vi\n }, {\n 17: 41,\n 48: $Vi\n }, {\n 5: [1, 42]\n }, {\n 26: 43,\n 57: $Vl\n }, {\n 19: [1, 45]\n }, {\n 19: [1, 46]\n }, {\n 19: [1, 47]\n }, {\n 19: [1, 48]\n }, {\n 19: [1, 49]\n }, o($Vk, [2, 25]), {\n 45: 50,\n 49: [1, 51],\n 50: [1, 52],\n 51: [1, 53],\n 52: [1, 54],\n 53: [1, 55],\n 54: [1, 56],\n 55: [1, 57],\n 56: [1, 58]\n }, {\n 38: 59,\n 39: [1, 60],\n 43: [1, 61],\n 44: [1, 62]\n }, o([5, 18, 42, 49, 50, 51, 52, 53, 54, 55, 56, 57], [2, 41]), {\n 5: [1, 63]\n }, {\n 15: 64,\n 60: [1, 65]\n }, {\n 5: [2, 54]\n }, o($Vk, [2, 7]), {\n 5: [1, 67],\n 18: [1, 66]\n }, o($Vk, [2, 14]), {\n 5: [1, 68]\n }, {\n 5: [1, 69]\n }, o($Vk, [2, 18]), {\n 5: [1, 70]\n }, {\n 5: [2, 50]\n }, o($Vm, $V4, {\n 8: 71\n }), o($Vm, $V4, {\n 8: 72\n }), o($Vm, $V4, {\n 8: 73\n }), o($Vn, $V4, {\n 32: 74,\n 8: 75\n }), o($Vo, $V4, {\n 34: 76,\n 8: 77\n }), {\n 17: 80,\n 46: [1, 78],\n 47: [1, 79],\n 48: $Vi\n }, o($Vp, [2, 42]), o($Vp, [2, 43]), o($Vp, [2, 44]), o($Vp, [2, 45]), o($Vp, [2, 46]), o($Vp, [2, 47]), o($Vp, [2, 48]), o($Vp, [2, 49]), {\n 17: 81,\n 48: $Vi\n }, {\n 17: 83,\n 40: 82,\n 48: $Vi\n }, {\n 48: [2, 36]\n }, {\n 48: [2, 37]\n }, o($Vq, [2, 10]), {\n 13: 84,\n 61: $Vj\n }, {\n 61: [2, 53]\n }, {\n 19: [1, 85]\n }, o($Vk, [2, 13]), o($Vk, [2, 16]), o($Vk, [2, 17]), o($Vk, [2, 19]), {\n 4: $V5,\n 5: $V6,\n 6: 30,\n 9: 14,\n 10: 16,\n 11: 6,\n 16: $V7,\n 17: 31,\n 20: 19,\n 21: $V8,\n 22: $V9,\n 23: $Va,\n 24: 23,\n 25: $Vb,\n 27: $Vc,\n 28: [1, 86],\n 29: $Vd,\n 30: $Ve,\n 31: $Vf,\n 33: $Vg,\n 37: $Vh,\n 48: $Vi,\n 58: $V3\n }, {\n 4: $V5,\n 5: $V6,\n 6: 30,\n 9: 14,\n 10: 16,\n 11: 6,\n 16: $V7,\n 17: 31,\n 20: 19,\n 21: $V8,\n 22: $V9,\n 23: $Va,\n 24: 23,\n 25: $Vb,\n 27: $Vc,\n 28: [1, 87],\n 29: $Vd,\n 30: $Ve,\n 31: $Vf,\n 33: $Vg,\n 37: $Vh,\n 48: $Vi,\n 58: $V3\n }, {\n 4: $V5,\n 5: $V6,\n 6: 30,\n 9: 14,\n 10: 16,\n 11: 6,\n 16: $V7,\n 17: 31,\n 20: 19,\n 21: $V8,\n 22: $V9,\n 23: $Va,\n 24: 23,\n 25: $Vb,\n 27: $Vc,\n 28: [1, 88],\n 29: $Vd,\n 30: $Ve,\n 31: $Vf,\n 33: $Vg,\n 37: $Vh,\n 48: $Vi,\n 58: $V3\n }, {\n 28: [1, 89]\n }, {\n 4: $V5,\n 5: $V6,\n 6: 30,\n 9: 14,\n 10: 16,\n 11: 6,\n 16: $V7,\n 17: 31,\n 20: 19,\n 21: $V8,\n 22: $V9,\n 23: $Va,\n 24: 23,\n 25: $Vb,\n 27: $Vc,\n 28: [2, 28],\n 29: $Vd,\n 30: $Ve,\n 31: $Vf,\n 33: $Vg,\n 36: [1, 90],\n 37: $Vh,\n 48: $Vi,\n 58: $V3\n }, {\n 28: [1, 91]\n }, {\n 4: $V5,\n 5: $V6,\n 6: 30,\n 9: 14,\n 10: 16,\n 11: 6,\n 16: $V7,\n 17: 31,\n 20: 19,\n 21: $V8,\n 22: $V9,\n 23: $Va,\n 24: 23,\n 25: $Vb,\n 27: $Vc,\n 28: [2, 26],\n 29: $Vd,\n 30: $Ve,\n 31: $Vf,\n 33: $Vg,\n 35: [1, 92],\n 37: $Vh,\n 48: $Vi,\n 58: $V3\n }, {\n 17: 93,\n 48: $Vi\n }, {\n 17: 94,\n 48: $Vi\n }, {\n 26: 95,\n 57: $Vl\n }, {\n 26: 96,\n 57: $Vl\n }, {\n 26: 97,\n 57: $Vl\n }, {\n 42: [1, 98],\n 57: [2, 35]\n }, {\n 5: [1, 99]\n }, {\n 5: [1, 100]\n }, o($Vk, [2, 20]), o($Vk, [2, 21]), o($Vk, [2, 22]), o($Vk, [2, 23]), {\n 19: [1, 101]\n }, o($Vk, [2, 24]), {\n 19: [1, 102]\n }, {\n 26: 103,\n 57: $Vl\n }, {\n 26: 104,\n 57: $Vl\n }, {\n 5: [2, 40]\n }, {\n 5: [2, 30]\n }, {\n 5: [2, 31]\n }, {\n 17: 105,\n 48: $Vi\n }, o($Vq, [2, 11]), o($Vk, [2, 12]), o($Vn, $V4, {\n 8: 75,\n 32: 106\n }), o($Vo, $V4, {\n 8: 77,\n 34: 107\n }), {\n 5: [2, 38]\n }, {\n 5: [2, 39]\n }, {\n 57: [2, 34]\n }, {\n 28: [2, 29]\n }, {\n 28: [2, 27]\n }],\n defaultActions: {\n 7: [2, 51],\n 8: [2, 1],\n 9: [2, 2],\n 10: [2, 3],\n 36: [2, 54],\n 44: [2, 50],\n 61: [2, 36],\n 62: [2, 37],\n 65: [2, 53],\n 95: [2, 40],\n 96: [2, 30],\n 97: [2, 31],\n 103: [2, 38],\n 104: [2, 39],\n 105: [2, 34],\n 106: [2, 29],\n 107: [2, 27]\n },\n parseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n },\n parse: function parse(input) {\n var self = this,\n stack = [0],\n tstack = [],\n vstack = [null],\n lstack = [],\n table = this.table,\n yytext = '',\n yylineno = 0,\n yyleng = 0,\n recovering = 0,\n TERROR = 2,\n EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = {\n yy: {}\n };\n\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n\n token = self.symbols_[token] || token;\n }\n\n return token;\n }\n\n var symbol,\n preErrorSymbol,\n state,\n action,\n a,\n r,\n yyval = {},\n p,\n len,\n newState,\n expected;\n\n while (true) {\n state = stack[stack.length - 1];\n\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n\n action = table[state] && table[state][symbol];\n }\n\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n\n break;\n\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n\n if (ranges) {\n yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n }\n\n r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));\n\n if (typeof r !== 'undefined') {\n return r;\n }\n\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n\n case 3:\n return true;\n }\n }\n\n return true;\n }\n };\n /* generated by jison-lex 0.3.4 */\n\n var lexer = function () {\n var lexer = {\n EOF: 1,\n parseError: function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n // resets the lexer, sets new input\n setInput: function setInput(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n\n this.offset = 0;\n return this;\n },\n // consumes and returns one char from the input\n input: function input() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n // unshifts one char (or a string) into the input\n unput: function unput(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;\n\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n\n this.yyleng = this.yytext.length;\n return this;\n },\n // When called from action, caches matched text and appends it on next action\n more: function more() {\n this._more = true;\n return this;\n },\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: function reject() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n\n return this;\n },\n // retain first n characters of the match\n less: function less(n) {\n this.unput(this.match.slice(n));\n },\n // displays already matched input, i.e. for error messages\n pastInput: function pastInput() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\\n/g, \"\");\n },\n // displays upcoming input, i.e. for error messages\n upcomingInput: function upcomingInput() {\n var next = this.match;\n\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n\n return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: function showPosition() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: function test_match(match, indexed_rule) {\n var token, lines, backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno += lines.length;\n }\n\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n\n if (this.done && this._input) {\n this.done = false;\n }\n\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n\n return false;\n },\n // return next match in input\n next: function next() {\n if (this.done) {\n return this.EOF;\n }\n\n if (!this._input) {\n this.done = true;\n }\n\n var token, match, tempMatch, index;\n\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n\n var rules = this._currentRules();\n\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n\n if (match) {\n token = this.test_match(match, rules[index]);\n\n if (token !== false) {\n return token;\n } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n\n\n return false;\n }\n\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n // return next match that has a token\n lex: function lex() {\n var r = this.next();\n\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: function begin(condition) {\n this.conditionStack.push(condition);\n },\n // pop the previously active lexer condition state off the condition stack\n popState: function popState() {\n var n = this.conditionStack.length - 1;\n\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n // alias for begin(condition)\n pushState: function pushState(condition) {\n this.begin(condition);\n },\n // return the number of states currently on the stack\n stateStackSize: function stateStackSize() {\n return this.conditionStack.length;\n },\n options: {\n \"case-insensitive\": true\n },\n performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n\n switch ($avoiding_name_collisions) {\n case 0:\n this.begin('open_directive');\n return 58;\n break;\n\n case 1:\n this.begin('type_directive');\n return 59;\n break;\n\n case 2:\n this.popState();\n this.begin('arg_directive');\n return 14;\n break;\n\n case 3:\n this.popState();\n this.popState();\n return 61;\n break;\n\n case 4:\n return 60;\n break;\n\n case 5:\n return 5;\n break;\n\n case 6:\n /* skip all whitespace */\n break;\n\n case 7:\n /* skip same-line whitespace */\n break;\n\n case 8:\n /* skip comments */\n break;\n\n case 9:\n /* skip comments */\n break;\n\n case 10:\n /* skip comments */\n break;\n\n case 11:\n this.begin('ID');\n return 16;\n break;\n\n case 12:\n yy_.yytext = yy_.yytext.trim();\n this.begin('ALIAS');\n return 48;\n break;\n\n case 13:\n this.popState();\n this.popState();\n this.begin('LINE');\n return 18;\n break;\n\n case 14:\n this.popState();\n this.popState();\n return 5;\n break;\n\n case 15:\n this.begin('LINE');\n return 27;\n break;\n\n case 16:\n this.begin('LINE');\n return 29;\n break;\n\n case 17:\n this.begin('LINE');\n return 30;\n break;\n\n case 18:\n this.begin('LINE');\n return 31;\n break;\n\n case 19:\n this.begin('LINE');\n return 36;\n break;\n\n case 20:\n this.begin('LINE');\n return 33;\n break;\n\n case 21:\n this.begin('LINE');\n return 35;\n break;\n\n case 22:\n this.popState();\n return 19;\n break;\n\n case 23:\n return 28;\n break;\n\n case 24:\n return 43;\n break;\n\n case 25:\n return 44;\n break;\n\n case 26:\n return 39;\n break;\n\n case 27:\n return 37;\n break;\n\n case 28:\n this.begin('ID');\n return 22;\n break;\n\n case 29:\n this.begin('ID');\n return 23;\n break;\n\n case 30:\n return 25;\n break;\n\n case 31:\n return 7;\n break;\n\n case 32:\n return 21;\n break;\n\n case 33:\n return 42;\n break;\n\n case 34:\n return 5;\n break;\n\n case 35:\n yy_.yytext = yy_.yytext.trim();\n return 48;\n break;\n\n case 36:\n return 51;\n break;\n\n case 37:\n return 52;\n break;\n\n case 38:\n return 49;\n break;\n\n case 39:\n return 50;\n break;\n\n case 40:\n return 53;\n break;\n\n case 41:\n return 54;\n break;\n\n case 42:\n return 55;\n break;\n\n case 43:\n return 56;\n break;\n\n case 44:\n return 57;\n break;\n\n case 45:\n return 46;\n break;\n\n case 46:\n return 47;\n break;\n\n case 47:\n return 5;\n break;\n\n case 48:\n return 'INVALID';\n break;\n }\n },\n rules: [/^(?:%%\\{)/i, /^(?:((?:(?!\\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\\}%%)/i, /^(?:((?:(?!\\}%%).|\\n)*))/i, /^(?:[\\n]+)/i, /^(?:\\s+)/i, /^(?:((?!\\n)\\s)+)/i, /^(?:#[^\\n]*)/i, /^(?:%(?!\\{)[^\\n]*)/i, /^(?:[^\\}]%%[^\\n]*)/i, /^(?:participant\\b)/i, /^(?:[^\\->:\\n,;]+?(?=((?!\\n)\\s)+as(?!\\n)\\s|[#\\n;]|$))/i, /^(?:as\\b)/i, /^(?:(?:))/i, /^(?:loop\\b)/i, /^(?:rect\\b)/i, /^(?:opt\\b)/i, /^(?:alt\\b)/i, /^(?:else\\b)/i, /^(?:par\\b)/i, /^(?:and\\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\\n;]*)/i, /^(?:end\\b)/i, /^(?:left of\\b)/i, /^(?:right of\\b)/i, /^(?:over\\b)/i, /^(?:note\\b)/i, /^(?:activate\\b)/i, /^(?:deactivate\\b)/i, /^(?:title\\b)/i, /^(?:sequenceDiagram\\b)/i, /^(?:autonumber\\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\\+\\->:\\n,;]+((?!(-x|--x|-\\)|--\\)))[\\-]*[^\\+\\->:\\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\\)])/i, /^(?:--[\\)])/i, /^(?::(?:(?:no)?wrap)?[^#\\n;]+)/i, /^(?:\\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],\n conditions: {\n \"open_directive\": {\n \"rules\": [1, 8],\n \"inclusive\": false\n },\n \"type_directive\": {\n \"rules\": [2, 3, 8],\n \"inclusive\": false\n },\n \"arg_directive\": {\n \"rules\": [3, 4, 8],\n \"inclusive\": false\n },\n \"ID\": {\n \"rules\": [7, 8, 12],\n \"inclusive\": false\n },\n \"ALIAS\": {\n \"rules\": [7, 8, 13, 14],\n \"inclusive\": false\n },\n \"LINE\": {\n \"rules\": [7, 8, 22],\n \"inclusive\": false\n },\n \"INITIAL\": {\n \"rules\": [0, 5, 6, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48],\n \"inclusive\": true\n }\n }\n };\n return lexer;\n }();\n\n parser.lexer = lexer;\n\n function Parser() {\n this.yy = {};\n }\n\n Parser.prototype = parser;\n parser.Parser = Parser;\n return new Parser();\n }();\n\n if (true) {\n exports.parser = parser;\n exports.Parser = parser.Parser;\n\n exports.parse = function () {\n return parser.parse.apply(parser, arguments);\n };\n\n exports.main = function commonjsMain(args) {\n if (!args[1]) {\n console.log('Usage: ' + args[0] + ' FILE');\n process.exit(1);\n }\n\n var source = __webpack_require__(\n /*! fs */\n \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(\n /*! path */\n \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n\n return exports.parser.parse(source);\n };\n\n if (true && __webpack_require__.c[__webpack_require__.s] === module) {\n exports.main(process.argv.slice(1));\n }\n }\n /* WEBPACK VAR INJECTION */\n\n }).call(this, __webpack_require__(\n /*! ./../../../../node_modules/process/browser.js */\n \"./node_modules/process/browser.js\"), __webpack_require__(\n /*! ./../../../../node_modules/webpack/buildin/module.js */\n \"./node_modules/webpack/buildin/module.js\")(module));\n /***/\n },\n\n /***/\n \"./src/diagrams/sequence/sequenceDb.js\":\n /*!*********************************************!*\\\n !*** ./src/diagrams/sequence/sequenceDb.js ***!\n \\*********************************************/\n\n /*! exports provided: parseDirective, addActor, addMessage, addSignal, getMessages, getActors, getActor, getActorKeys, getTitle, getTitleWrapped, enableSequenceNumbers, showSequenceNumbers, setWrap, autoWrap, clear, parseMessage, LINETYPE, ARROWTYPE, PLACEMENT, addNote, setTitle, apply, default */\n\n /***/\n function srcDiagramsSequenceSequenceDbJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"parseDirective\", function () {\n return parseDirective;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addActor\", function () {\n return addActor;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addMessage\", function () {\n return addMessage;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addSignal\", function () {\n return addSignal;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getMessages\", function () {\n return getMessages;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getActors\", function () {\n return getActors;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getActor\", function () {\n return getActor;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getActorKeys\", function () {\n return getActorKeys;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getTitle\", function () {\n return getTitle;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getTitleWrapped\", function () {\n return getTitleWrapped;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"enableSequenceNumbers\", function () {\n return enableSequenceNumbers;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"showSequenceNumbers\", function () {\n return showSequenceNumbers;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setWrap\", function () {\n return setWrap;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"autoWrap\", function () {\n return autoWrap;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"clear\", function () {\n return clear;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"parseMessage\", function () {\n return parseMessage;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"LINETYPE\", function () {\n return LINETYPE;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"ARROWTYPE\", function () {\n return ARROWTYPE;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"PLACEMENT\", function () {\n return PLACEMENT;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addNote\", function () {\n return addNote;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setTitle\", function () {\n return setTitle;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"apply\", function () {\n return apply;\n });\n /* harmony import */\n\n\n var _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ../../mermaidAPI */\n \"./src/mermaidAPI.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n\n var prevActor = undefined;\n var actors = {};\n var messages = [];\n var notes = [];\n var title = '';\n var titleWrapped = false;\n var sequenceNumbersEnabled = false;\n var wrapEnabled = false;\n\n var parseDirective = function parseDirective(statement, context, type) {\n _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__[\"default\"].parseDirective(this, statement, context, type);\n };\n\n var addActor = function addActor(id, name, description) {\n // Don't allow description nulling\n var old = actors[id];\n if (old && name === old.name && description == null) return; // Don't allow null descriptions, either\n\n if (description == null || description.text == null) {\n description = {\n text: name,\n wrap: null\n };\n }\n\n actors[id] = {\n name: name,\n description: description.text,\n wrap: description.wrap === undefined && autoWrap() || !!description.wrap,\n prevActor: prevActor\n };\n\n if (prevActor && actors[prevActor]) {\n actors[prevActor].nextActor = id;\n }\n\n prevActor = id;\n };\n\n var activationCount = function activationCount(part) {\n var i;\n var count = 0;\n\n for (i = 0; i < messages.length; i++) {\n if (messages[i].type === LINETYPE.ACTIVE_START) {\n if (messages[i].from.actor === part) {\n count++;\n }\n }\n\n if (messages[i].type === LINETYPE.ACTIVE_END) {\n if (messages[i].from.actor === part) {\n count--;\n }\n }\n }\n\n return count;\n };\n\n var addMessage = function addMessage(idFrom, idTo, message, answer) {\n messages.push({\n from: idFrom,\n to: idTo,\n message: message.text,\n wrap: message.wrap === undefined && autoWrap() || !!message.wrap,\n answer: answer\n });\n };\n\n var addSignal = function addSignal(idFrom, idTo) {\n var message = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n text: undefined,\n wrap: undefined\n };\n var messageType = arguments.length > 3 ? arguments[3] : undefined;\n\n if (messageType === LINETYPE.ACTIVE_END) {\n var cnt = activationCount(idFrom.actor);\n\n if (cnt < 1) {\n // Bail out as there is an activation signal from an inactive participant\n var error = new Error('Trying to inactivate an inactive participant (' + idFrom.actor + ')');\n error.hash = {\n text: '->>-',\n token: '->>-',\n line: '1',\n loc: {\n first_line: 1,\n last_line: 1,\n first_column: 1,\n last_column: 1\n },\n expected: [\"'ACTIVE_PARTICIPANT'\"]\n };\n throw error;\n }\n }\n\n messages.push({\n from: idFrom,\n to: idTo,\n message: message.text,\n wrap: message.wrap === undefined && autoWrap() || !!message.wrap,\n type: messageType\n });\n return true;\n };\n\n var getMessages = function getMessages() {\n return messages;\n };\n\n var getActors = function getActors() {\n return actors;\n };\n\n var getActor = function getActor(id) {\n return actors[id];\n };\n\n var getActorKeys = function getActorKeys() {\n return Object.keys(actors);\n };\n\n var getTitle = function getTitle() {\n return title;\n };\n\n var getTitleWrapped = function getTitleWrapped() {\n return titleWrapped;\n };\n\n var enableSequenceNumbers = function enableSequenceNumbers() {\n sequenceNumbersEnabled = true;\n };\n\n var showSequenceNumbers = function showSequenceNumbers() {\n return sequenceNumbersEnabled;\n };\n\n var setWrap = function setWrap(wrapSetting) {\n wrapEnabled = wrapSetting;\n };\n\n var autoWrap = function autoWrap() {\n return wrapEnabled;\n };\n\n var clear = function clear() {\n actors = {};\n messages = [];\n };\n\n var parseMessage = function parseMessage(str) {\n var _str = str.trim();\n\n var message = {\n text: _str.replace(/^[:]?(?:no)?wrap:/, '').trim(),\n wrap: _str.match(/^[:]?wrap:/) !== null ? true : _str.match(/^[:]?nowrap:/) !== null ? false : undefined\n };\n\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug('parseMessage:', message);\n\n return message;\n };\n\n var LINETYPE = {\n SOLID: 0,\n DOTTED: 1,\n NOTE: 2,\n SOLID_CROSS: 3,\n DOTTED_CROSS: 4,\n SOLID_OPEN: 5,\n DOTTED_OPEN: 6,\n LOOP_START: 10,\n LOOP_END: 11,\n ALT_START: 12,\n ALT_ELSE: 13,\n ALT_END: 14,\n OPT_START: 15,\n OPT_END: 16,\n ACTIVE_START: 17,\n ACTIVE_END: 18,\n PAR_START: 19,\n PAR_AND: 20,\n PAR_END: 21,\n RECT_START: 22,\n RECT_END: 23,\n SOLID_POINT: 24,\n DOTTED_POINT: 25\n };\n var ARROWTYPE = {\n FILLED: 0,\n OPEN: 1\n };\n var PLACEMENT = {\n LEFTOF: 0,\n RIGHTOF: 1,\n OVER: 2\n };\n\n var addNote = function addNote(actor, placement, message) {\n var note = {\n actor: actor,\n placement: placement,\n message: message.text,\n wrap: message.wrap === undefined && autoWrap() || !!message.wrap\n }; // Coerce actor into a [to, from, ...] array\n\n var actors = [].concat(actor, actor);\n notes.push(note);\n messages.push({\n from: actors[0],\n to: actors[1],\n message: message.text,\n wrap: message.wrap === undefined && autoWrap() || !!message.wrap,\n type: LINETYPE.NOTE,\n placement: placement\n });\n };\n\n var setTitle = function setTitle(titleWrap) {\n title = titleWrap.text;\n titleWrapped = titleWrap.wrap === undefined && autoWrap() || !!titleWrap.wrap;\n };\n\n var apply = function apply(param) {\n if (param instanceof Array) {\n param.forEach(function (item) {\n apply(item);\n });\n } else {\n switch (param.type) {\n case 'addActor':\n addActor(param.actor, param.actor, param.description);\n break;\n\n case 'activeStart':\n addSignal(param.actor, undefined, undefined, param.signalType);\n break;\n\n case 'activeEnd':\n addSignal(param.actor, undefined, undefined, param.signalType);\n break;\n\n case 'addNote':\n addNote(param.actor, param.placement, param.text);\n break;\n\n case 'addMessage':\n addSignal(param.from, param.to, param.msg, param.signalType);\n break;\n\n case 'loopStart':\n addSignal(undefined, undefined, param.loopText, param.signalType);\n break;\n\n case 'loopEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n\n case 'rectStart':\n addSignal(undefined, undefined, param.color, param.signalType);\n break;\n\n case 'rectEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n\n case 'optStart':\n addSignal(undefined, undefined, param.optText, param.signalType);\n break;\n\n case 'optEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n\n case 'altStart':\n addSignal(undefined, undefined, param.altText, param.signalType);\n break;\n\n case 'else':\n addSignal(undefined, undefined, param.altText, param.signalType);\n break;\n\n case 'altEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n\n case 'setTitle':\n setTitle(param.text);\n break;\n\n case 'parStart':\n addSignal(undefined, undefined, param.parText, param.signalType);\n break;\n\n case 'and':\n addSignal(undefined, undefined, param.parText, param.signalType);\n break;\n\n case 'parEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n }\n }\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n addActor: addActor,\n addMessage: addMessage,\n addSignal: addSignal,\n autoWrap: autoWrap,\n setWrap: setWrap,\n enableSequenceNumbers: enableSequenceNumbers,\n showSequenceNumbers: showSequenceNumbers,\n getMessages: getMessages,\n getActors: getActors,\n getActor: getActor,\n getActorKeys: getActorKeys,\n getTitle: getTitle,\n parseDirective: parseDirective,\n getConfig: function getConfig() {\n return _config__WEBPACK_IMPORTED_MODULE_1__[\"getConfig\"]().sequence;\n },\n getTitleWrapped: getTitleWrapped,\n clear: clear,\n parseMessage: parseMessage,\n LINETYPE: LINETYPE,\n ARROWTYPE: ARROWTYPE,\n PLACEMENT: PLACEMENT,\n addNote: addNote,\n setTitle: setTitle,\n apply: apply\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/sequence/sequenceRenderer.js\":\n /*!***************************************************!*\\\n !*** ./src/diagrams/sequence/sequenceRenderer.js ***!\n \\***************************************************/\n\n /*! exports provided: bounds, drawActors, setConf, draw, default */\n\n /***/\n function srcDiagramsSequenceSequenceRendererJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"bounds\", function () {\n return bounds;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawActors\", function () {\n return drawActors;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _svgDraw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./svgDraw */\n \"./src/diagrams/sequence/svgDraw.js\");\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./parser/sequenceDiagram */\n \"./src/diagrams/sequence/parser/sequenceDiagram.jison\");\n /* harmony import */\n\n\n var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__);\n /* harmony import */\n\n\n var _common_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../common/common */\n \"./src/diagrams/common/common.js\");\n /* harmony import */\n\n\n var _sequenceDb__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ./sequenceDb */\n \"./src/diagrams/sequence/sequenceDb.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n\n _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy = _sequenceDb__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\n var conf = {};\n var bounds = {\n data: {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined\n },\n verticalPos: 0,\n sequenceItems: [],\n activations: [],\n models: {\n getHeight: function getHeight() {\n return Math.max.apply(null, this.actors.length === 0 ? [0] : this.actors.map(function (actor) {\n return actor.height || 0;\n })) + (this.loops.length === 0 ? 0 : this.loops.map(function (it) {\n return it.height || 0;\n }).reduce(function (acc, h) {\n return acc + h;\n })) + (this.messages.length === 0 ? 0 : this.messages.map(function (it) {\n return it.height || 0;\n }).reduce(function (acc, h) {\n return acc + h;\n })) + (this.notes.length === 0 ? 0 : this.notes.map(function (it) {\n return it.height || 0;\n }).reduce(function (acc, h) {\n return acc + h;\n }));\n },\n clear: function clear() {\n this.actors = [];\n this.loops = [];\n this.messages = [];\n this.notes = [];\n },\n addActor: function addActor(actorModel) {\n this.actors.push(actorModel);\n },\n addLoop: function addLoop(loopModel) {\n this.loops.push(loopModel);\n },\n addMessage: function addMessage(msgModel) {\n this.messages.push(msgModel);\n },\n addNote: function addNote(noteModel) {\n this.notes.push(noteModel);\n },\n lastActor: function lastActor() {\n return this.actors[this.actors.length - 1];\n },\n lastLoop: function lastLoop() {\n return this.loops[this.loops.length - 1];\n },\n lastMessage: function lastMessage() {\n return this.messages[this.messages.length - 1];\n },\n lastNote: function lastNote() {\n return this.notes[this.notes.length - 1];\n },\n actors: [],\n loops: [],\n messages: [],\n notes: []\n },\n init: function init() {\n this.sequenceItems = [];\n this.activations = [];\n this.models.clear();\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined\n };\n this.verticalPos = 0;\n setConf(_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.getConfig());\n },\n updateVal: function updateVal(obj, key, val, fun) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n },\n updateBounds: function updateBounds(startx, starty, stopx, stopy) {\n var _self = this;\n\n var cnt = 0;\n\n function updateFn(type) {\n return function updateItemBounds(item) {\n cnt++; // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems\n\n var n = _self.sequenceItems.length - cnt + 1;\n\n _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);\n\n _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);\n\n _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n if (!(type === 'activation')) {\n _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);\n\n _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);\n\n _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);\n }\n };\n }\n\n this.sequenceItems.forEach(updateFn());\n this.activations.forEach(updateFn('activation'));\n },\n insert: function insert(startx, starty, stopx, stopy) {\n var _startx = Math.min(startx, stopx);\n\n var _stopx = Math.max(startx, stopx);\n\n var _starty = Math.min(starty, stopy);\n\n var _stopy = Math.max(starty, stopy);\n\n this.updateVal(bounds.data, 'startx', _startx, Math.min);\n this.updateVal(bounds.data, 'starty', _starty, Math.min);\n this.updateVal(bounds.data, 'stopx', _stopx, Math.max);\n this.updateVal(bounds.data, 'stopy', _stopy, Math.max);\n this.updateBounds(_startx, _starty, _stopx, _stopy);\n },\n newActivation: function newActivation(message, diagram, actors) {\n var actorRect = actors[message.from.actor];\n var stackedSize = actorActivations(message.from.actor).length || 0;\n var x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;\n this.activations.push({\n startx: x,\n starty: this.verticalPos + 2,\n stopx: x + conf.activationWidth,\n stopy: undefined,\n actor: message.from.actor,\n anchored: _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].anchorElement(diagram)\n });\n },\n endActivation: function endActivation(message) {\n // find most recent activation for given actor\n var lastActorActivationIdx = this.activations.map(function (activation) {\n return activation.actor;\n }).lastIndexOf(message.from.actor);\n return this.activations.splice(lastActorActivationIdx, 1)[0];\n },\n createLoop: function createLoop() {\n var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n message: undefined,\n wrap: false,\n width: undefined\n };\n var fill = arguments.length > 1 ? arguments[1] : undefined;\n return {\n startx: undefined,\n starty: this.verticalPos,\n stopx: undefined,\n stopy: undefined,\n title: title.message,\n wrap: title.wrap,\n width: title.width,\n height: 0,\n fill: fill\n };\n },\n newLoop: function newLoop() {\n var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n message: undefined,\n wrap: false,\n width: undefined\n };\n var fill = arguments.length > 1 ? arguments[1] : undefined;\n this.sequenceItems.push(this.createLoop(title, fill));\n },\n endLoop: function endLoop() {\n return this.sequenceItems.pop();\n },\n addSectionToLoop: function addSectionToLoop(message) {\n var loop = this.sequenceItems.pop();\n loop.sections = loop.sections || [];\n loop.sectionTitles = loop.sectionTitles || [];\n loop.sections.push({\n y: bounds.getVerticalPos(),\n height: 0\n });\n loop.sectionTitles.push(message);\n this.sequenceItems.push(loop);\n },\n bumpVerticalPos: function bumpVerticalPos(bump) {\n this.verticalPos = this.verticalPos + bump;\n this.data.stopy = this.verticalPos;\n },\n getVerticalPos: function getVerticalPos() {\n return this.verticalPos;\n },\n getBounds: function getBounds() {\n return {\n bounds: this.data,\n models: this.models\n };\n }\n };\n /**\n * Draws an note in the diagram with the attached line\n * @param elem - The diagram to draw to.\n * @param noteModel:{x: number, y: number, message: string, width: number} - startx: x axis start position, verticalPos: y axis position, messsage: the message to be shown, width: Set this with a custom width to override the default configured width.\n */\n\n var drawNote = function drawNote(elem, noteModel) {\n bounds.bumpVerticalPos(conf.boxMargin);\n noteModel.height = conf.boxMargin;\n noteModel.starty = bounds.getVerticalPos();\n\n var rect = _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getNoteRect();\n\n rect.x = noteModel.startx;\n rect.y = noteModel.starty;\n rect.width = noteModel.width || conf.width;\n rect[\"class\"] = 'note';\n var g = elem.append('g');\n\n var rectElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawRect(g, rect);\n\n var textObj = _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getTextObj();\n\n textObj.x = noteModel.startx;\n textObj.y = noteModel.starty;\n textObj.width = rect.width;\n textObj.dy = '1em';\n textObj.text = noteModel.message;\n textObj[\"class\"] = 'noteText';\n textObj.fontFamily = conf.noteFontFamily;\n textObj.fontSize = conf.noteFontSize;\n textObj.fontWeight = conf.noteFontWeight;\n textObj.anchor = conf.noteAlign;\n textObj.textMargin = conf.noteMargin;\n textObj.valign = conf.noteAlign;\n var textElem = Object(_svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"drawText\"])(g, textObj);\n var textHeight = Math.round(textElem.map(function (te) {\n return (te._groups || te)[0][0].getBBox().height;\n }).reduce(function (acc, curr) {\n return acc + curr;\n }));\n rectElem.attr('height', textHeight + 2 * conf.noteMargin);\n noteModel.height += textHeight + 2 * conf.noteMargin;\n bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);\n noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin;\n noteModel.stopx = noteModel.startx + rect.width;\n bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy);\n bounds.models.addNote(noteModel);\n };\n\n var messageFont = function messageFont(cnf) {\n return {\n fontFamily: cnf.messageFontFamily,\n fontSize: cnf.messageFontSize,\n fontWeight: cnf.messageFontWeight\n };\n };\n\n var noteFont = function noteFont(cnf) {\n return {\n fontFamily: cnf.noteFontFamily,\n fontSize: cnf.noteFontSize,\n fontWeight: cnf.noteFontWeight\n };\n };\n\n var actorFont = function actorFont(cnf) {\n return {\n fontFamily: cnf.actorFontFamily,\n fontSize: cnf.actorFontSize,\n fontWeight: cnf.actorFontWeight\n };\n };\n /**\n * Draws a message\n * @param g - the parent of the message element\n * @param msgModel - the model containing fields describing a message\n */\n\n\n var drawMessage = function drawMessage(g, msgModel) {\n bounds.bumpVerticalPos(10);\n var startx = msgModel.startx,\n stopx = msgModel.stopx,\n starty = msgModel.starty,\n message = msgModel.message,\n type = msgModel.type,\n sequenceIndex = msgModel.sequenceIndex;\n\n var lines = _common_common__WEBPACK_IMPORTED_MODULE_4__[\"default\"].splitBreaks(message).length;\n\n var textDims = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(message, messageFont(conf));\n\n var lineHeight = textDims.height / lines;\n msgModel.height += lineHeight;\n bounds.bumpVerticalPos(lineHeight);\n\n var textObj = _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getTextObj();\n\n textObj.x = startx;\n textObj.y = starty + 10;\n textObj.width = stopx - startx;\n textObj[\"class\"] = 'messageText';\n textObj.dy = '1em';\n textObj.text = message;\n textObj.fontFamily = conf.messageFontFamily;\n textObj.fontSize = conf.messageFontSize;\n textObj.fontWeight = conf.messageFontWeight;\n textObj.anchor = conf.messageAlign;\n textObj.valign = conf.messageAlign;\n textObj.textMargin = conf.wrapPadding;\n textObj.tspan = false;\n Object(_svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"drawText\"])(g, textObj);\n var totalOffset = textDims.height - 10;\n var textWidth = textDims.width;\n var line, lineStarty;\n\n if (startx === stopx) {\n lineStarty = bounds.getVerticalPos() + totalOffset;\n\n if (conf.rightAngles) {\n line = g.append('path').attr('d', \"M \".concat(startx, \",\").concat(lineStarty, \" H \").concat(startx + Math.max(conf.width / 2, textWidth / 2), \" V \").concat(lineStarty + 25, \" H \").concat(startx));\n } else {\n totalOffset += conf.boxMargin;\n lineStarty = bounds.getVerticalPos() + totalOffset;\n line = g.append('path').attr('d', 'M ' + startx + ',' + lineStarty + ' C ' + (startx + 60) + ',' + (lineStarty - 10) + ' ' + (startx + 60) + ',' + (lineStarty + 30) + ' ' + startx + ',' + (lineStarty + 20));\n }\n\n totalOffset += 30;\n var dx = Math.max(textWidth / 2, conf.width / 2);\n bounds.insert(startx - dx, bounds.getVerticalPos() - 10 + totalOffset, stopx + dx, bounds.getVerticalPos() + 30 + totalOffset);\n } else {\n totalOffset += conf.boxMargin;\n lineStarty = bounds.getVerticalPos() + totalOffset;\n line = g.append('line');\n line.attr('x1', startx);\n line.attr('y1', lineStarty);\n line.attr('x2', stopx);\n line.attr('y2', lineStarty);\n bounds.insert(startx, lineStarty - 10, stopx, lineStarty);\n } // Make an SVG Container\n // Draw the line\n\n\n if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_CROSS || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_POINT || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_OPEN) {\n line.style('stroke-dasharray', '3, 3');\n line.attr('class', 'messageLine1');\n } else {\n line.attr('class', 'messageLine0');\n }\n\n var url = '';\n\n if (conf.arrowMarkerAbsolute) {\n url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n line.attr('stroke-width', 2);\n line.attr('stroke', 'none'); // handled by theme/css anyway\n\n line.style('fill', 'none'); // remove any fill colour\n\n if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED) {\n line.attr('marker-end', 'url(' + url + '#arrowhead)');\n }\n\n if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_POINT || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_POINT) {\n line.attr('marker-end', 'url(' + url + '#filled-head)');\n }\n\n if (type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_CROSS || type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_CROSS) {\n line.attr('marker-end', 'url(' + url + '#crosshead)');\n } // add node number\n\n\n if (_sequenceDb__WEBPACK_IMPORTED_MODULE_5__[\"default\"].showSequenceNumbers() || conf.showSequenceNumbers) {\n line.attr('marker-start', 'url(' + url + '#sequencenumber)');\n g.append('text').attr('x', startx).attr('y', lineStarty + 4).attr('font-family', 'sans-serif').attr('font-size', '12px').attr('text-anchor', 'middle').attr('textLength', '16px').attr('class', 'sequenceNumber').text(sequenceIndex);\n }\n\n bounds.bumpVerticalPos(totalOffset);\n msgModel.height += totalOffset;\n msgModel.stopy = msgModel.starty + msgModel.height;\n bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy);\n };\n\n var drawActors = function drawActors(diagram, actors, actorKeys, verticalPos) {\n // Draw the actors\n var prevWidth = 0;\n var prevMargin = 0;\n\n for (var i = 0; i < actorKeys.length; i++) {\n var actor = actors[actorKeys[i]]; // Add some rendering data to the object\n\n actor.width = actor.width || conf.width;\n actor.height = Math.max(actor.height || conf.height, conf.height);\n actor.margin = actor.margin || conf.actorMargin;\n actor.x = prevWidth + prevMargin;\n actor.y = verticalPos; // Draw the box with the attached line\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawActor(diagram, actor, conf);\n\n bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height);\n prevWidth += actor.width;\n prevMargin += actor.margin;\n bounds.models.addActor(actor);\n } // Add a margin between the actor boxes and the first arrow\n\n\n bounds.bumpVerticalPos(conf.height);\n };\n\n var setConf = function setConf(cnf) {\n Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"assignWithDepth\"])(conf, cnf);\n\n if (cnf.fontFamily) {\n conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily;\n }\n\n if (cnf.fontSize) {\n conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize;\n }\n\n if (cnf.fontWeight) {\n conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight;\n }\n };\n\n var actorActivations = function actorActivations(actor) {\n return bounds.activations.filter(function (activation) {\n return activation.actor === actor;\n });\n };\n\n var activationBounds = function activationBounds(actor, actors) {\n // handle multiple stacked activations for same actor\n var actorObj = actors[actor];\n var activations = actorActivations(actor);\n var left = activations.reduce(function (acc, activation) {\n return Math.min(acc, activation.startx);\n }, actorObj.x + actorObj.width / 2);\n var right = activations.reduce(function (acc, activation) {\n return Math.max(acc, activation.stopx);\n }, actorObj.x + actorObj.width / 2);\n return [left, right];\n };\n\n function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) {\n bounds.bumpVerticalPos(preMargin);\n var heightAdjust = postMargin;\n\n if (msg.id && msg.message && loopWidths[msg.id]) {\n var loopWidth = loopWidths[msg.id].width;\n var textConf = messageFont(conf);\n msg.message = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(\"[\".concat(msg.message, \"]\"), loopWidth - 2 * conf.wrapPadding, textConf);\n msg.width = loopWidth;\n msg.wrap = true; // const lines = common.splitBreaks(msg.message).length;\n\n var textDims = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(msg.message, textConf);\n\n var totalOffset = Math.max(textDims.height, conf.labelBoxHeight);\n heightAdjust = postMargin + totalOffset;\n\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug(\"\".concat(totalOffset, \" - \").concat(msg.message));\n }\n\n addLoopFn(msg);\n bounds.bumpVerticalPos(heightAdjust);\n }\n /**\n * Draws a sequenceDiagram in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\n\n var draw = function draw(text, id) {\n conf = _config__WEBPACK_IMPORTED_MODULE_6__[\"getConfig\"]().sequence;\n\n _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.clear();\n\n _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.setWrap(conf.wrap);\n\n _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].parse(text + '\\n');\n\n bounds.init();\n\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug(\"C:\".concat(JSON.stringify(conf, null, 2)));\n\n var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\")); // Fetch data from the parsing\n\n var actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.getActors();\n\n var actorKeys = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.getActorKeys();\n\n var messages = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.getMessages();\n\n var title = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.getTitle();\n\n var maxMessageWidthPerActor = getMaxMessageWidthPerActor(actors, messages);\n conf.height = calculateActorMargins(actors, maxMessageWidthPerActor);\n drawActors(diagram, actors, actorKeys, 0);\n var loopWidths = calculateLoopBounds(messages, actors, maxMessageWidthPerActor); // The arrow head definition is attached to the svg once\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].insertArrowHead(diagram);\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].insertArrowCrossHead(diagram);\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].insertArrowFilledHead(diagram);\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].insertSequenceNumber(diagram);\n\n function activeEnd(msg, verticalPos) {\n var activationData = bounds.endActivation(msg);\n\n if (activationData.starty + 18 > verticalPos) {\n activationData.starty = verticalPos - 6;\n verticalPos += 12;\n }\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawActivation(diagram, activationData, verticalPos, conf, actorActivations(msg.from.actor).length);\n\n bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);\n } // Draw the messages/signals\n\n\n var sequenceIndex = 1;\n messages.forEach(function (msg) {\n var loopModel, noteModel, msgModel;\n\n switch (msg.type) {\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.NOTE:\n noteModel = msg.noteModel;\n drawNote(diagram, noteModel);\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ACTIVE_START:\n bounds.newActivation(msg, diagram, actors);\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ACTIVE_END:\n activeEnd(msg, bounds.getVerticalPos());\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.LOOP_START:\n adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) {\n return bounds.newLoop(message);\n });\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.LOOP_END:\n loopModel = bounds.endLoop();\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawLoop(diagram, loopModel, 'loop', conf);\n\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.RECT_START:\n adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin, function (message) {\n return bounds.newLoop(undefined, message.message);\n });\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.RECT_END:\n loopModel = bounds.endLoop();\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawBackgroundRect(diagram, loopModel);\n\n bounds.models.addLoop(loopModel);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.OPT_START:\n adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) {\n return bounds.newLoop(message);\n });\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.OPT_END:\n loopModel = bounds.endLoop();\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawLoop(diagram, loopModel, 'opt', conf);\n\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ALT_START:\n adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) {\n return bounds.newLoop(message);\n });\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ALT_ELSE:\n adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, function (message) {\n return bounds.addSectionToLoop(message);\n });\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ALT_END:\n loopModel = bounds.endLoop();\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawLoop(diagram, loopModel, 'alt', conf);\n\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.PAR_START:\n adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin + conf.boxTextMargin, function (message) {\n return bounds.newLoop(message);\n });\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.PAR_AND:\n adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin + conf.boxTextMargin, conf.boxMargin, function (message) {\n return bounds.addSectionToLoop(message);\n });\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.PAR_END:\n loopModel = bounds.endLoop();\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_1__[\"default\"].drawLoop(diagram, loopModel, 'par', conf);\n\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n\n default:\n try {\n // lastMsg = msg\n msgModel = msg.msgModel;\n msgModel.starty = bounds.getVerticalPos();\n msgModel.sequenceIndex = sequenceIndex;\n drawMessage(diagram, msgModel);\n bounds.models.addMessage(msgModel);\n } catch (e) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].error('error while drawing message', e);\n }\n\n } // Increment sequence counter if msg.type is a line (and not another event like activation or note, etc)\n\n\n if ([_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_POINT, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_POINT].includes(msg.type)) {\n sequenceIndex++;\n }\n });\n\n if (conf.mirrorActors) {\n // Draw actors below diagram\n bounds.bumpVerticalPos(conf.boxMargin * 2);\n drawActors(diagram, actors, actorKeys, bounds.getVerticalPos());\n }\n\n var _bounds$getBounds = bounds.getBounds(),\n box = _bounds$getBounds.bounds; // Adjust line height of actor lines now that the height of the diagram is known\n\n\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug('For line height fix Querying: #' + id + ' .actor-line');\n\n var actorLines = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"selectAll\"])('#' + id + ' .actor-line');\n actorLines.attr('y2', box.stopy);\n var height = box.stopy - box.starty + 2 * conf.diagramMarginY;\n\n if (conf.mirrorActors) {\n height = height - conf.boxMargin + conf.bottomMarginAdj;\n }\n\n var width = box.stopx - box.startx + 2 * conf.diagramMarginX;\n\n if (title) {\n diagram.append('text').text(title).attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr('y', -25);\n }\n\n Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"configureSvgSize\"])(diagram, height, width, conf.useMaxWidth);\n var extraVertForTitle = title ? 40 : 0;\n diagram.attr('viewBox', box.startx - conf.diagramMarginX + ' -' + (conf.diagramMarginY + extraVertForTitle) + ' ' + width + ' ' + (height + extraVertForTitle));\n\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug(\"models:\", bounds.models);\n };\n /**\n * Retrieves the max message width of each actor, supports signals (messages, loops)\n * and notes.\n *\n * It will enumerate each given message, and will determine its text width, in relation\n * to the actor it originates from, and destined to.\n *\n * @param actors - The actors map\n * @param messages - A list of message objects to iterate\n */\n\n\n var getMaxMessageWidthPerActor = function getMaxMessageWidthPerActor(actors, messages) {\n var maxMessageWidthPerActor = {};\n messages.forEach(function (msg) {\n if (actors[msg.to] && actors[msg.from]) {\n var actor = actors[msg.to]; // If this is the first actor, and the message is left of it, no need to calculate the margin\n\n if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.LEFTOF && !actor.prevActor) {\n return;\n } // If this is the last actor, and the message is right of it, no need to calculate the margin\n\n\n if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.RIGHTOF && !actor.nextActor) {\n return;\n }\n\n var isNote = msg.placement !== undefined;\n var isMessage = !isNote;\n var textFont = isNote ? noteFont(conf) : messageFont(conf);\n var wrappedMessage = msg.wrap ? _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont) : msg.message;\n\n var messageDimensions = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(wrappedMessage, textFont);\n\n var messageWidth = messageDimensions.width + 2 * conf.wrapPadding;\n /*\n * The following scenarios should be supported:\n *\n * - There's a message (non-note) between fromActor and toActor\n * - If fromActor is on the right and toActor is on the left, we should\n * define the toActor's margin\n * - If fromActor is on the left and toActor is on the right, we should\n * define the fromActor's margin\n * - There's a note, in which case fromActor == toActor\n * - If the note is to the left of the actor, we should define the previous actor\n * margin\n * - If the note is on the actor, we should define both the previous and next actor\n * margins, each being the half of the note size\n * - If the note is on the right of the actor, we should define the current actor\n * margin\n */\n\n if (isMessage && msg.from === actor.nextActor) {\n maxMessageWidthPerActor[msg.to] = Math.max(maxMessageWidthPerActor[msg.to] || 0, messageWidth);\n } else if (isMessage && msg.from === actor.prevActor) {\n maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth);\n } else if (isMessage && msg.from === msg.to) {\n maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth / 2);\n maxMessageWidthPerActor[msg.to] = Math.max(maxMessageWidthPerActor[msg.to] || 0, messageWidth / 2);\n } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.RIGHTOF) {\n maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth);\n } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.LEFTOF) {\n maxMessageWidthPerActor[actor.prevActor] = Math.max(maxMessageWidthPerActor[actor.prevActor] || 0, messageWidth);\n } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.OVER) {\n if (actor.prevActor) {\n maxMessageWidthPerActor[actor.prevActor] = Math.max(maxMessageWidthPerActor[actor.prevActor] || 0, messageWidth / 2);\n }\n\n if (actor.nextActor) {\n maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth / 2);\n }\n }\n }\n });\n\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug('maxMessageWidthPerActor:', maxMessageWidthPerActor);\n\n return maxMessageWidthPerActor;\n };\n /**\n * This will calculate the optimal margin for each given actor, for a given\n * actor->messageWidth map.\n *\n * An actor's margin is determined by the width of the actor, the width of the\n * largest message that originates from it, and the configured conf.actorMargin.\n *\n * @param actors - The actors map to calculate margins for\n * @param actorToMessageWidth - A map of actor key -> max message width it holds\n */\n\n\n var calculateActorMargins = function calculateActorMargins(actors, actorToMessageWidth) {\n var maxHeight = 0;\n Object.keys(actors).forEach(function (prop) {\n var actor = actors[prop];\n\n if (actor.wrap) {\n actor.description = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(actor.description, conf.width - 2 * conf.wrapPadding, actorFont(conf));\n }\n\n var actDims = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(actor.description, actorFont(conf));\n\n actor.width = actor.wrap ? conf.width : Math.max(conf.width, actDims.width + 2 * conf.wrapPadding);\n actor.height = actor.wrap ? Math.max(actDims.height, conf.height) : conf.height;\n maxHeight = Math.max(maxHeight, actor.height);\n });\n\n for (var actorKey in actorToMessageWidth) {\n var actor = actors[actorKey];\n\n if (!actor) {\n continue;\n }\n\n var nextActor = actors[actor.nextActor]; // No need to space out an actor that doesn't have a next link\n\n if (!nextActor) {\n continue;\n }\n\n var messageWidth = actorToMessageWidth[actorKey];\n var actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2;\n actor.margin = Math.max(actorWidth, conf.actorMargin);\n }\n\n return Math.max(maxHeight, conf.height);\n };\n\n var buildNoteModel = function buildNoteModel(msg, actors) {\n var startx = actors[msg.from].x;\n var stopx = actors[msg.to].x;\n var shouldWrap = msg.wrap && msg.message;\n\n var textDimensions = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(shouldWrap ? _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message, noteFont(conf));\n\n var noteModel = {\n width: shouldWrap ? conf.width : Math.max(conf.width, textDimensions.width + 2 * conf.noteMargin),\n height: 0,\n startx: actors[msg.from].x,\n stopx: 0,\n starty: 0,\n stopy: 0,\n message: msg.message\n };\n\n if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.RIGHTOF) {\n noteModel.width = shouldWrap ? Math.max(conf.width, textDimensions.width) : Math.max(actors[msg.from].width / 2 + actors[msg.to].width / 2, textDimensions.width + 2 * conf.noteMargin);\n noteModel.startx = startx + (actors[msg.from].width + conf.actorMargin) / 2;\n } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.PLACEMENT.LEFTOF) {\n noteModel.width = shouldWrap ? Math.max(conf.width, textDimensions.width + 2 * conf.noteMargin) : Math.max(actors[msg.from].width / 2 + actors[msg.to].width / 2, textDimensions.width + 2 * conf.noteMargin);\n noteModel.startx = startx - noteModel.width + (actors[msg.from].width - conf.actorMargin) / 2;\n } else if (msg.to === msg.from) {\n textDimensions = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(shouldWrap ? _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(msg.message, Math.max(conf.width, actors[msg.from].width), noteFont(conf)) : msg.message, noteFont(conf));\n noteModel.width = shouldWrap ? Math.max(conf.width, actors[msg.from].width) : Math.max(actors[msg.from].width, conf.width, textDimensions.width + 2 * conf.noteMargin);\n noteModel.startx = startx + (actors[msg.from].width - noteModel.width) / 2;\n } else {\n noteModel.width = Math.abs(startx + actors[msg.from].width / 2 - (stopx + actors[msg.to].width / 2)) + conf.actorMargin;\n noteModel.startx = startx < stopx ? startx + actors[msg.from].width / 2 - conf.actorMargin / 2 : stopx + actors[msg.to].width / 2 - conf.actorMargin / 2;\n }\n\n if (shouldWrap) {\n noteModel.message = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(msg.message, noteModel.width - 2 * conf.wrapPadding, noteFont(conf));\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug(\"NM:[\".concat(noteModel.startx, \",\").concat(noteModel.stopx, \",\").concat(noteModel.starty, \",\").concat(noteModel.stopy, \":\").concat(noteModel.width, \",\").concat(noteModel.height, \"=\").concat(msg.message, \"]\"));\n\n return noteModel;\n };\n\n var buildMessageModel = function buildMessageModel(msg, actors) {\n var process = false;\n\n if ([_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.SOLID_POINT, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.DOTTED_POINT].includes(msg.type)) {\n process = true;\n }\n\n if (!process) {\n return {};\n }\n\n var fromBounds = activationBounds(msg.from, actors);\n var toBounds = activationBounds(msg.to, actors);\n var fromIdx = fromBounds[0] <= toBounds[0] ? 1 : 0;\n var toIdx = fromBounds[0] < toBounds[0] ? 0 : 1;\n var allBounds = fromBounds.concat(toBounds);\n var boundedWidth = Math.abs(toBounds[toIdx] - fromBounds[fromIdx]);\n\n if (msg.wrap && msg.message) {\n msg.message = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].wrapLabel(msg.message, Math.max(boundedWidth + 2 * conf.wrapPadding, conf.width), messageFont(conf));\n }\n\n var msgDims = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].calculateTextDimensions(msg.message, messageFont(conf));\n\n return {\n width: Math.max(msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding, boundedWidth + 2 * conf.wrapPadding, conf.width),\n height: 0,\n startx: fromBounds[fromIdx],\n stopx: toBounds[toIdx],\n starty: 0,\n stopy: 0,\n message: msg.message,\n type: msg.type,\n wrap: msg.wrap,\n fromBounds: Math.min.apply(null, allBounds),\n toBounds: Math.max.apply(null, allBounds)\n };\n };\n\n var calculateLoopBounds = function calculateLoopBounds(messages, actors) {\n var loops = {};\n var stack = [];\n var current, noteModel, msgModel;\n messages.forEach(function (msg) {\n msg.id = _utils__WEBPACK_IMPORTED_MODULE_7__[\"default\"].random({\n length: 10\n });\n\n switch (msg.type) {\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.LOOP_START:\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ALT_START:\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.OPT_START:\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.PAR_START:\n stack.push({\n id: msg.id,\n msg: msg.message,\n from: Number.MAX_SAFE_INTEGER,\n to: Number.MIN_SAFE_INTEGER,\n width: 0\n });\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ALT_ELSE:\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.PAR_AND:\n if (msg.message) {\n current = stack.pop();\n loops[current.id] = current;\n loops[msg.id] = current;\n stack.push(current);\n }\n\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.LOOP_END:\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ALT_END:\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.OPT_END:\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.PAR_END:\n current = stack.pop();\n loops[current.id] = current;\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ACTIVE_START:\n {\n var actorRect = actors[msg.from ? msg.from.actor : msg.to.actor];\n var stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length;\n var x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;\n var toAdd = {\n startx: x,\n stopx: x + conf.activationWidth,\n actor: msg.from.actor,\n enabled: true\n };\n bounds.activations.push(toAdd);\n }\n break;\n\n case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__[\"parser\"].yy.LINETYPE.ACTIVE_END:\n {\n var lastActorActivationIdx = bounds.activations.map(function (a) {\n return a.actor;\n }).lastIndexOf(msg.from.actor);\n delete bounds.activations.splice(lastActorActivationIdx, 1)[0];\n }\n break;\n }\n\n var isNote = msg.placement !== undefined;\n\n if (isNote) {\n noteModel = buildNoteModel(msg, actors);\n msg.noteModel = noteModel;\n stack.forEach(function (stk) {\n current = stk;\n current.from = Math.min(current.from, noteModel.startx);\n current.to = Math.max(current.to, noteModel.startx + noteModel.width);\n current.width = Math.max(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth;\n });\n } else {\n msgModel = buildMessageModel(msg, actors);\n msg.msgModel = msgModel;\n\n if (msgModel.startx && msgModel.stopx && stack.length > 0) {\n stack.forEach(function (stk) {\n current = stk;\n\n if (msgModel.startx === msgModel.stopx) {\n var from = actors[msg.from];\n var to = actors[msg.to];\n current.from = Math.min(from.x - msgModel.width / 2, from.x - from.width / 2, current.from);\n current.to = Math.max(to.x + msgModel.width / 2, to.x + from.width / 2, current.to);\n current.width = Math.max(current.width, Math.abs(current.to - current.from)) - conf.labelBoxWidth;\n } else {\n current.from = Math.min(msgModel.startx, current.from);\n current.to = Math.max(msgModel.stopx, current.to);\n current.width = Math.max(current.width, msgModel.width) - conf.labelBoxWidth;\n }\n });\n }\n }\n });\n bounds.activations = [];\n\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"log\"].debug('Loop type widths:', loops);\n\n return loops;\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n bounds: bounds,\n drawActors: drawActors,\n setConf: setConf,\n draw: draw\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/sequence/styles.js\":\n /*!*****************************************!*\\\n !*** ./src/diagrams/sequence/styles.js ***!\n \\*****************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDiagramsSequenceStylesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n\n var getStyles = function getStyles(options) {\n return \".actor {\\n stroke: \".concat(options.actorBorder, \";\\n fill: \").concat(options.actorBkg, \";\\n }\\n\\n text.actor > tspan {\\n fill: \").concat(options.actorTextColor, \";\\n stroke: none;\\n }\\n\\n .actor-line {\\n stroke: \").concat(options.actorLineColor, \";\\n }\\n\\n .messageLine0 {\\n stroke-width: 1.5;\\n stroke-dasharray: none;\\n stroke: \").concat(options.signalColor, \";\\n }\\n\\n .messageLine1 {\\n stroke-width: 1.5;\\n stroke-dasharray: 2, 2;\\n stroke: \").concat(options.signalColor, \";\\n }\\n\\n #arrowhead path {\\n fill: \").concat(options.signalColor, \";\\n stroke: \").concat(options.signalColor, \";\\n }\\n\\n .sequenceNumber {\\n fill: \").concat(options.sequenceNumberColor, \";\\n }\\n\\n #sequencenumber {\\n fill: \").concat(options.signalColor, \";\\n }\\n\\n #crosshead path {\\n fill: \").concat(options.signalColor, \";\\n stroke: \").concat(options.signalColor, \";\\n }\\n\\n .messageText {\\n fill: \").concat(options.signalTextColor, \";\\n stroke: \").concat(options.signalTextColor, \";\\n }\\n\\n .labelBox {\\n stroke: \").concat(options.labelBoxBorderColor, \";\\n fill: \").concat(options.labelBoxBkgColor, \";\\n }\\n\\n .labelText, .labelText > tspan {\\n fill: \").concat(options.labelTextColor, \";\\n stroke: none;\\n }\\n\\n .loopText, .loopText > tspan {\\n fill: \").concat(options.loopTextColor, \";\\n stroke: none;\\n }\\n\\n .loopLine {\\n stroke-width: 2px;\\n stroke-dasharray: 2, 2;\\n stroke: \").concat(options.labelBoxBorderColor, \";\\n fill: \").concat(options.labelBoxBorderColor, \";\\n }\\n\\n .note {\\n //stroke: #decc93;\\n stroke: \").concat(options.noteBorderColor, \";\\n fill: \").concat(options.noteBkgColor, \";\\n }\\n\\n .noteText, .noteText > tspan {\\n fill: \").concat(options.noteTextColor, \";\\n stroke: none;\\n }\\n\\n .activation0 {\\n fill: \").concat(options.activationBkgColor, \";\\n stroke: \").concat(options.activationBorderColor, \";\\n }\\n\\n .activation1 {\\n fill: \").concat(options.activationBkgColor, \";\\n stroke: \").concat(options.activationBorderColor, \";\\n }\\n\\n .activation2 {\\n fill: \").concat(options.activationBkgColor, \";\\n stroke: \").concat(options.activationBorderColor, \";\\n }\\n\");\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = getStyles;\n /***/\n },\n\n /***/\n \"./src/diagrams/sequence/svgDraw.js\":\n /*!******************************************!*\\\n !*** ./src/diagrams/sequence/svgDraw.js ***!\n \\******************************************/\n\n /*! exports provided: drawRect, drawText, drawLabel, drawActor, anchorElement, drawActivation, drawLoop, drawBackgroundRect, insertArrowHead, insertArrowFilledHead, insertSequenceNumber, insertArrowCrossHead, getTextObj, getNoteRect, default */\n\n /***/\n function srcDiagramsSequenceSvgDrawJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawRect\", function () {\n return drawRect;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawText\", function () {\n return drawText;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawLabel\", function () {\n return drawLabel;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawActor\", function () {\n return drawActor;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"anchorElement\", function () {\n return anchorElement;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawActivation\", function () {\n return drawActivation;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawLoop\", function () {\n return drawLoop;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawBackgroundRect\", function () {\n return drawBackgroundRect;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"insertArrowHead\", function () {\n return insertArrowHead;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"insertArrowFilledHead\", function () {\n return insertArrowFilledHead;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"insertSequenceNumber\", function () {\n return insertSequenceNumber;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"insertArrowCrossHead\", function () {\n return insertArrowCrossHead;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getTextObj\", function () {\n return getTextObj;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getNoteRect\", function () {\n return getNoteRect;\n });\n /* harmony import */\n\n\n var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ../common/common */\n \"./src/diagrams/common/common.js\");\n\n var drawRect = function drawRect(elem, rectData) {\n var rectElem = elem.append('rect');\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.y);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', rectData.width);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n\n if (typeof rectData[\"class\"] !== 'undefined') {\n rectElem.attr('class', rectData[\"class\"]);\n }\n\n return rectElem;\n };\n\n var drawText = function drawText(elem, textData) {\n var prevTextHeight = 0,\n textHeight = 0;\n var lines = textData.text.split(_common_common__WEBPACK_IMPORTED_MODULE_0__[\"default\"].lineBreakRegex);\n var textElems = [];\n var dy = 0;\n\n var yfunc = function yfunc() {\n return textData.y;\n };\n\n if (typeof textData.valign !== 'undefined' && typeof textData.textMargin !== 'undefined' && textData.textMargin > 0) {\n switch (textData.valign) {\n case 'top':\n case 'start':\n yfunc = function yfunc() {\n return Math.round(textData.y + textData.textMargin);\n };\n\n break;\n\n case 'middle':\n case 'center':\n yfunc = function yfunc() {\n return Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2);\n };\n\n break;\n\n case 'bottom':\n case 'end':\n yfunc = function yfunc() {\n return Math.round(textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin);\n };\n\n break;\n }\n }\n\n if (typeof textData.anchor !== 'undefined' && typeof textData.textMargin !== 'undefined' && typeof textData.width !== 'undefined') {\n switch (textData.anchor) {\n case 'left':\n case 'start':\n textData.x = Math.round(textData.x + textData.textMargin);\n textData.anchor = 'start';\n textData.dominantBaseline = 'text-after-edge';\n textData.alignmentBaseline = 'middle';\n break;\n\n case 'middle':\n case 'center':\n textData.x = Math.round(textData.x + textData.width / 2);\n textData.anchor = 'middle';\n textData.dominantBaseline = 'middle';\n textData.alignmentBaseline = 'middle';\n break;\n\n case 'right':\n case 'end':\n textData.x = Math.round(textData.x + textData.width - textData.textMargin);\n textData.anchor = 'end';\n textData.dominantBaseline = 'text-before-edge';\n textData.alignmentBaseline = 'middle';\n break;\n }\n }\n\n for (var i = 0; i < lines.length; i++) {\n var line = lines[i];\n\n if (typeof textData.textMargin !== 'undefined' && textData.textMargin === 0 && typeof textData.fontSize !== 'undefined') {\n dy = i * textData.fontSize;\n }\n\n var textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', yfunc());\n\n if (typeof textData.anchor !== 'undefined') {\n textElem.attr('text-anchor', textData.anchor).attr('dominant-baseline', textData.dominantBaseline).attr('alignment-baseline', textData.alignmentBaseline);\n }\n\n if (typeof textData.fontFamily !== 'undefined') {\n textElem.style('font-family', textData.fontFamily);\n }\n\n if (typeof textData.fontSize !== 'undefined') {\n textElem.style('font-size', textData.fontSize);\n }\n\n if (typeof textData.fontWeight !== 'undefined') {\n textElem.style('font-weight', textData.fontWeight);\n }\n\n if (typeof textData.fill !== 'undefined') {\n textElem.attr('fill', textData.fill);\n }\n\n if (typeof textData[\"class\"] !== 'undefined') {\n textElem.attr('class', textData[\"class\"]);\n }\n\n if (typeof textData.dy !== 'undefined') {\n textElem.attr('dy', textData.dy);\n } else if (dy !== 0) {\n textElem.attr('dy', dy);\n }\n\n if (textData.tspan) {\n var span = textElem.append('tspan');\n span.attr('x', textData.x);\n\n if (typeof textData.fill !== 'undefined') {\n span.attr('fill', textData.fill);\n }\n\n span.text(line);\n } else {\n textElem.text(line);\n }\n\n if (typeof textData.valign !== 'undefined' && typeof textData.textMargin !== 'undefined' && textData.textMargin > 0) {\n textHeight += (textElem._groups || textElem)[0][0].getBBox().height;\n prevTextHeight = textHeight;\n }\n\n textElems.push(textElem);\n }\n\n return textElems;\n };\n\n var drawLabel = function drawLabel(elem, txtObject) {\n function genPoints(x, y, width, height, cut) {\n return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height);\n }\n\n var polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7));\n polygon.attr('class', 'labelBox');\n txtObject.y = txtObject.y + txtObject.height / 2;\n drawText(elem, txtObject);\n return polygon;\n };\n\n var actorCnt = -1;\n /**\n * Draws an actor in the diagram with the attached line\n * @param elem - The diagram we'll draw to.\n * @param actor - The actor to draw.\n * @param conf - drawText implementation discriminator object\n */\n\n var drawActor = function drawActor(elem, actor, conf) {\n var center = actor.x + actor.width / 2;\n var g = elem.append('g');\n\n if (actor.y === 0) {\n actorCnt++;\n g.append('line').attr('id', 'actor' + actorCnt).attr('x1', center).attr('y1', 5).attr('x2', center).attr('y2', 2000).attr('class', 'actor-line').attr('stroke-width', '0.5px').attr('stroke', '#999');\n }\n\n var rect = getNoteRect();\n rect.x = actor.x;\n rect.y = actor.y;\n rect.fill = '#eaeaea';\n rect.width = actor.width;\n rect.height = actor.height;\n rect[\"class\"] = 'actor';\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n _drawTextCandidateFunc(conf)(actor.description, g, rect.x, rect.y, rect.width, rect.height, {\n \"class\": 'actor'\n }, conf);\n };\n\n var anchorElement = function anchorElement(elem) {\n return elem.append('g');\n };\n /**\n * Draws an activation in the diagram\n * @param elem - element to append activation rect.\n * @param bounds - activation box bounds.\n * @param verticalPos - precise y cooridnate of bottom activation box edge.\n * @param conf - sequence diagram config object.\n * @param actorActivations - number of activations on the actor.\n */\n\n\n var drawActivation = function drawActivation(elem, bounds, verticalPos, conf, actorActivations) {\n var rect = getNoteRect();\n var g = bounds.anchored;\n rect.x = bounds.startx;\n rect.y = bounds.starty;\n rect[\"class\"] = 'activation' + actorActivations % 3; // Will evaluate to 0, 1 or 2\n\n rect.width = bounds.stopx - bounds.startx;\n rect.height = verticalPos - bounds.starty;\n drawRect(g, rect);\n };\n /**\n * Draws a loop in the diagram\n * @param elem - elemenet to append the loop to.\n * @param loopModel - loopModel of the given loop.\n * @param labelText - Text within the loop.\n * @param conf - diagrom configuration\n */\n\n\n var drawLoop = function drawLoop(elem, loopModel, labelText, conf) {\n var boxMargin = conf.boxMargin,\n boxTextMargin = conf.boxTextMargin,\n labelBoxHeight = conf.labelBoxHeight,\n labelBoxWidth = conf.labelBoxWidth,\n fontFamily = conf.messageFontFamily,\n fontSize = conf.messageFontSize,\n fontWeight = conf.messageFontWeight;\n var g = elem.append('g');\n\n var drawLoopLine = function drawLoopLine(startx, starty, stopx, stopy) {\n return g.append('line').attr('x1', startx).attr('y1', starty).attr('x2', stopx).attr('y2', stopy).attr('class', 'loopLine');\n };\n\n drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty);\n drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy);\n drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy);\n drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy);\n\n if (typeof loopModel.sections !== 'undefined') {\n loopModel.sections.forEach(function (item) {\n drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style('stroke-dasharray', '3, 3');\n });\n }\n\n var txt = getTextObj();\n txt.text = labelText;\n txt.x = loopModel.startx;\n txt.y = loopModel.starty;\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.tspan = false;\n txt.width = labelBoxWidth || 50;\n txt.height = labelBoxHeight || 20;\n txt.textMargin = boxTextMargin;\n txt[\"class\"] = 'labelText';\n drawLabel(g, txt);\n txt = getTextObj();\n txt.text = loopModel.title;\n txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2;\n txt.y = loopModel.starty + boxMargin + boxTextMargin;\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.textMargin = boxTextMargin;\n txt[\"class\"] = 'loopText';\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.wrap = true;\n var textElem = drawText(g, txt);\n\n if (typeof loopModel.sectionTitles !== 'undefined') {\n loopModel.sectionTitles.forEach(function (item, idx) {\n if (item.message) {\n txt.text = item.message;\n txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2;\n txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin;\n txt[\"class\"] = 'loopText';\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.tspan = false;\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.wrap = loopModel.wrap;\n textElem = drawText(g, txt);\n var sectionHeight = Math.round(textElem.map(function (te) {\n return (te._groups || te)[0][0].getBBox().height;\n }).reduce(function (acc, curr) {\n return acc + curr;\n }));\n loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin);\n }\n });\n }\n\n loopModel.height = Math.round(loopModel.stopy - loopModel.starty);\n return g;\n };\n /**\n * Draws a background rectangle\n * @param elem diagram (reference for bounds)\n * @param bounds shape of the rectangle\n */\n\n\n var drawBackgroundRect = function drawBackgroundRect(elem, bounds) {\n var rectElem = drawRect(elem, {\n x: bounds.startx,\n y: bounds.starty,\n width: bounds.stopx - bounds.startx,\n height: bounds.stopy - bounds.starty,\n fill: bounds.fill,\n \"class\": 'rect'\n });\n rectElem.lower();\n };\n /**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\n\n\n var insertArrowHead = function insertArrowHead(elem) {\n elem.append('defs').append('marker').attr('id', 'arrowhead').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'userSpaceOnUse').attr('markerWidth', 12).attr('markerHeight', 12).attr('orient', 'auto').append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z'); // this is actual shape for arrowhead\n };\n /**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\n\n\n var insertArrowFilledHead = function insertArrowFilledHead(elem) {\n elem.append('defs').append('marker').attr('id', 'filled-head').attr('refX', 18).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n };\n /**\n * Setup node number. The result is appended to the svg.\n */\n\n\n var insertSequenceNumber = function insertSequenceNumber(elem) {\n elem.append('defs').append('marker').attr('id', 'sequencenumber').attr('refX', 15).attr('refY', 15).attr('markerWidth', 60).attr('markerHeight', 40).attr('orient', 'auto').append('circle').attr('cx', 15).attr('cy', 15).attr('r', 6); // .style(\"fill\", '#f00');\n };\n /**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\n\n\n var insertArrowCrossHead = function insertArrowCrossHead(elem) {\n var defs = elem.append('defs');\n var marker = defs.append('marker').attr('id', 'crosshead').attr('markerWidth', 15).attr('markerHeight', 8).attr('orient', 'auto').attr('refX', 16).attr('refY', 4); // The arrow\n\n marker.append('path').attr('fill', 'black').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 9,2 V 6 L16,4 Z'); // The cross\n\n marker.append('path').attr('fill', 'none').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7'); // this is actual shape for arrowhead\n };\n\n var getTextObj = function getTextObj() {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n anchor: undefined,\n style: '#666',\n width: undefined,\n height: undefined,\n textMargin: 0,\n rx: 0,\n ry: 0,\n tspan: true,\n valign: undefined\n };\n };\n\n var getNoteRect = function getNoteRect() {\n return {\n x: 0,\n y: 0,\n fill: '#EDF2AE',\n stroke: '#666',\n width: 100,\n anchor: 'start',\n height: 100,\n rx: 0,\n ry: 0\n };\n };\n\n var _drawTextCandidateFunc = function () {\n function byText(content, g, x, y, width, height, textAttrs) {\n var text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('text-anchor', 'middle').text(content);\n\n _setTextAttrs(text, textAttrs);\n }\n\n function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n var actorFontSize = conf.actorFontSize,\n actorFontFamily = conf.actorFontFamily,\n actorFontWeight = conf.actorFontWeight;\n var lines = content.split(_common_common__WEBPACK_IMPORTED_MODULE_0__[\"default\"].lineBreakRegex);\n\n for (var i = 0; i < lines.length; i++) {\n var dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2;\n var text = g.append('text').attr('x', x + width / 2).attr('y', y).style('text-anchor', 'middle').style('font-size', actorFontSize).style('font-weight', actorFontWeight).style('font-family', actorFontFamily);\n text.append('tspan').attr('x', x + width / 2).attr('dy', dy).text(lines[i]);\n text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n var s = g.append('switch');\n var f = s.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height);\n var text = f.append('div').style('display', 'table').style('height', '100%').style('width', '100%');\n text.append('div').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle').text(content);\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n\n _setTextAttrs(text, textAttrs);\n }\n\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (var key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) {\n // eslint-disable-line\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n }();\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n drawRect: drawRect,\n drawText: drawText,\n drawLabel: drawLabel,\n drawActor: drawActor,\n anchorElement: anchorElement,\n drawActivation: drawActivation,\n drawLoop: drawLoop,\n drawBackgroundRect: drawBackgroundRect,\n insertArrowHead: insertArrowHead,\n insertArrowFilledHead: insertArrowFilledHead,\n insertSequenceNumber: insertSequenceNumber,\n insertArrowCrossHead: insertArrowCrossHead,\n getTextObj: getTextObj,\n getNoteRect: getNoteRect\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/state/id-cache.js\":\n /*!****************************************!*\\\n !*** ./src/diagrams/state/id-cache.js ***!\n \\****************************************/\n\n /*! exports provided: set, get, keys, size, default */\n\n /***/\n function srcDiagramsStateIdCacheJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"set\", function () {\n return set;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"get\", function () {\n return get;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"keys\", function () {\n return keys;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"size\", function () {\n return size;\n });\n\n var idCache = {};\n\n var set = function set(key, val) {\n idCache[key] = val;\n };\n\n var get = function get(k) {\n return idCache[k];\n };\n\n var keys = function keys() {\n return Object.keys(idCache);\n };\n\n var size = function size() {\n return keys().length;\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n get: get,\n set: set,\n keys: keys,\n size: size\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/state/parser/stateDiagram.jison\":\n /*!******************************************************!*\\\n !*** ./src/diagrams/state/parser/stateDiagram.jison ***!\n \\******************************************************/\n\n /*! no static exports found */\n\n /***/\n function srcDiagramsStateParserStateDiagramJison(module, exports, __webpack_require__) {\n /* WEBPACK VAR INJECTION */\n (function (process, module) {\n /* parser generated by jison 0.4.18 */\n\n /*\n Returns a Parser object of the following structure:\n \n Parser: {\n yy: {}\n }\n \n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n \n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n \n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n \n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n \n \n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n \n \n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n */\n var parser = function () {\n var o = function o(k, v, _o9, l) {\n for (_o9 = _o9 || {}, l = k.length; l--; _o9[k[l]] = v) {\n ;\n }\n\n return _o9;\n },\n $V0 = [1, 2],\n $V1 = [1, 3],\n $V2 = [1, 5],\n $V3 = [1, 7],\n $V4 = [2, 5],\n $V5 = [1, 15],\n $V6 = [1, 17],\n $V7 = [1, 19],\n $V8 = [1, 20],\n $V9 = [1, 21],\n $Va = [1, 22],\n $Vb = [1, 28],\n $Vc = [1, 23],\n $Vd = [1, 24],\n $Ve = [1, 25],\n $Vf = [1, 26],\n $Vg = [1, 29],\n $Vh = [1, 32],\n $Vi = [1, 4, 5, 14, 15, 17, 19, 20, 22, 23, 24, 25, 26, 36, 39],\n $Vj = [1, 4, 5, 12, 13, 14, 15, 17, 19, 20, 22, 23, 24, 25, 26, 36, 39],\n $Vk = [1, 4, 5, 7, 14, 15, 17, 19, 20, 22, 23, 24, 25, 26, 36, 39],\n $Vl = [4, 5, 14, 15, 17, 19, 20, 22, 23, 24, 25, 26, 36, 39];\n\n var parser = {\n trace: function trace() {},\n yy: {},\n symbols_: {\n \"error\": 2,\n \"start\": 3,\n \"SPACE\": 4,\n \"NL\": 5,\n \"directive\": 6,\n \"SD\": 7,\n \"document\": 8,\n \"line\": 9,\n \"statement\": 10,\n \"idStatement\": 11,\n \"DESCR\": 12,\n \"-->\": 13,\n \"HIDE_EMPTY\": 14,\n \"scale\": 15,\n \"WIDTH\": 16,\n \"COMPOSIT_STATE\": 17,\n \"STRUCT_START\": 18,\n \"STRUCT_STOP\": 19,\n \"STATE_DESCR\": 20,\n \"AS\": 21,\n \"ID\": 22,\n \"FORK\": 23,\n \"JOIN\": 24,\n \"CONCURRENT\": 25,\n \"note\": 26,\n \"notePosition\": 27,\n \"NOTE_TEXT\": 28,\n \"openDirective\": 29,\n \"typeDirective\": 30,\n \"closeDirective\": 31,\n \":\": 32,\n \"argDirective\": 33,\n \"eol\": 34,\n \";\": 35,\n \"EDGE_STATE\": 36,\n \"left_of\": 37,\n \"right_of\": 38,\n \"open_directive\": 39,\n \"type_directive\": 40,\n \"arg_directive\": 41,\n \"close_directive\": 42,\n \"$accept\": 0,\n \"$end\": 1\n },\n terminals_: {\n 2: \"error\",\n 4: \"SPACE\",\n 5: \"NL\",\n 7: \"SD\",\n 12: \"DESCR\",\n 13: \"-->\",\n 14: \"HIDE_EMPTY\",\n 15: \"scale\",\n 16: \"WIDTH\",\n 17: \"COMPOSIT_STATE\",\n 18: \"STRUCT_START\",\n 19: \"STRUCT_STOP\",\n 20: \"STATE_DESCR\",\n 21: \"AS\",\n 22: \"ID\",\n 23: \"FORK\",\n 24: \"JOIN\",\n 25: \"CONCURRENT\",\n 26: \"note\",\n 28: \"NOTE_TEXT\",\n 32: \":\",\n 35: \";\",\n 36: \"EDGE_STATE\",\n 37: \"left_of\",\n 38: \"right_of\",\n 39: \"open_directive\",\n 40: \"type_directive\",\n 41: \"arg_directive\",\n 42: \"close_directive\"\n },\n productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [9, 1], [9, 1], [10, 1], [10, 2], [10, 3], [10, 4], [10, 1], [10, 2], [10, 1], [10, 4], [10, 3], [10, 6], [10, 1], [10, 1], [10, 1], [10, 4], [10, 4], [10, 1], [6, 3], [6, 5], [34, 1], [34, 1], [11, 1], [11, 1], [27, 1], [27, 1], [29, 1], [30, 1], [33, 1], [31, 1]],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate\n /* action[1] */\n , $$\n /* vstack */\n , _$\n /* lstack */\n ) {\n /* this == yyval */\n var $0 = $$.length - 1;\n\n switch (yystate) {\n case 4:\n /*console.warn('Root document', $$[$0]);*/\n yy.setRootDoc($$[$0]);\n return $$[$0];\n break;\n\n case 5:\n this.$ = [];\n break;\n\n case 6:\n if ($$[$0] != 'nl') {\n $$[$0 - 1].push($$[$0]);\n this.$ = $$[$0 - 1];\n } // console.warn('Got document',$$[$0-1], $$[$0]);\n\n\n break;\n\n case 7:\n case 8:\n this.$ = $$[$0];\n break;\n\n case 9:\n this.$ = 'nl';\n break;\n\n case 10:\n /*console.warn('got id and descr', $$[$0]);*/\n this.$ = {\n stmt: 'state',\n id: $$[$0],\n type: 'default',\n description: ''\n };\n break;\n\n case 11:\n /*console.warn('got id and descr', $$[$0-1], $$[$0].trim());*/\n this.$ = {\n stmt: 'state',\n id: $$[$0 - 1],\n type: 'default',\n description: yy.trimColon($$[$0])\n };\n break;\n\n case 12:\n /*console.warn('got id', $$[$0-2]);yy.addRelation($$[$0-2], $$[$0]);*/\n this.$ = {\n stmt: 'relation',\n state1: {\n stmt: 'state',\n id: $$[$0 - 2],\n type: 'default',\n description: ''\n },\n state2: {\n stmt: 'state',\n id: $$[$0],\n type: 'default',\n description: ''\n }\n };\n break;\n\n case 13:\n /*yy.addRelation($$[$0-3], $$[$0-1], $$[$0].substr(1).trim());*/\n this.$ = {\n stmt: 'relation',\n state1: {\n stmt: 'state',\n id: $$[$0 - 3],\n type: 'default',\n description: ''\n },\n state2: {\n stmt: 'state',\n id: $$[$0 - 1],\n type: 'default',\n description: ''\n },\n description: $$[$0].substr(1).trim()\n };\n break;\n\n case 17:\n /* console.warn('Adding document for state without id ', $$[$0-3]);*/\n this.$ = {\n stmt: 'state',\n id: $$[$0 - 3],\n type: 'default',\n description: '',\n doc: $$[$0 - 1]\n };\n break;\n\n case 18:\n var id = $$[$0];\n var description = $$[$0 - 2].trim();\n\n if ($$[$0].match(':')) {\n var parts = $$[$0].split(':');\n id = parts[0];\n description = [description, parts[1]];\n }\n\n this.$ = {\n stmt: 'state',\n id: id,\n type: 'default',\n description: description\n };\n break;\n\n case 19:\n //console.warn('Adding document for state with id ', $$[$0-3], $$[$0-2]); yy.addDocument($$[$0-3]);\n this.$ = {\n stmt: 'state',\n id: $$[$0 - 3],\n type: 'default',\n description: $$[$0 - 5],\n doc: $$[$0 - 1]\n };\n break;\n\n case 20:\n this.$ = {\n stmt: 'state',\n id: $$[$0],\n type: 'fork'\n };\n break;\n\n case 21:\n this.$ = {\n stmt: 'state',\n id: $$[$0],\n type: 'join'\n };\n break;\n\n case 22:\n this.$ = {\n stmt: 'state',\n id: yy.getDividerId(),\n type: 'divider'\n };\n break;\n\n case 23:\n /*console.warn('got NOTE, position: ', $$[$0-2].trim(), 'id = ', $$[$0-1].trim(), 'note: ', $$[$0]);*/\n this.$ = {\n stmt: 'state',\n id: $$[$0 - 1].trim(),\n note: {\n position: $$[$0 - 2].trim(),\n text: $$[$0].trim()\n }\n };\n break;\n\n case 30:\n case 31:\n this.$ = $$[$0];\n break;\n\n case 34:\n yy.parseDirective('%%{', 'open_directive');\n break;\n\n case 35:\n yy.parseDirective($$[$0], 'type_directive');\n break;\n\n case 36:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"');\n yy.parseDirective($$[$0], 'arg_directive');\n break;\n\n case 37:\n yy.parseDirective('}%%', 'close_directive', 'state');\n break;\n }\n },\n table: [{\n 3: 1,\n 4: $V0,\n 5: $V1,\n 6: 4,\n 7: $V2,\n 29: 6,\n 39: $V3\n }, {\n 1: [3]\n }, {\n 3: 8,\n 4: $V0,\n 5: $V1,\n 6: 4,\n 7: $V2,\n 29: 6,\n 39: $V3\n }, {\n 3: 9,\n 4: $V0,\n 5: $V1,\n 6: 4,\n 7: $V2,\n 29: 6,\n 39: $V3\n }, {\n 3: 10,\n 4: $V0,\n 5: $V1,\n 6: 4,\n 7: $V2,\n 29: 6,\n 39: $V3\n }, o([1, 4, 5, 14, 15, 17, 20, 22, 23, 24, 25, 26, 36, 39], $V4, {\n 8: 11\n }), {\n 30: 12,\n 40: [1, 13]\n }, {\n 40: [2, 34]\n }, {\n 1: [2, 1]\n }, {\n 1: [2, 2]\n }, {\n 1: [2, 3]\n }, {\n 1: [2, 4],\n 4: $V5,\n 5: $V6,\n 6: 27,\n 9: 14,\n 10: 16,\n 11: 18,\n 14: $V7,\n 15: $V8,\n 17: $V9,\n 20: $Va,\n 22: $Vb,\n 23: $Vc,\n 24: $Vd,\n 25: $Ve,\n 26: $Vf,\n 29: 6,\n 36: $Vg,\n 39: $V3\n }, {\n 31: 30,\n 32: [1, 31],\n 42: $Vh\n }, o([32, 42], [2, 35]), o($Vi, [2, 6]), {\n 6: 27,\n 10: 33,\n 11: 18,\n 14: $V7,\n 15: $V8,\n 17: $V9,\n 20: $Va,\n 22: $Vb,\n 23: $Vc,\n 24: $Vd,\n 25: $Ve,\n 26: $Vf,\n 29: 6,\n 36: $Vg,\n 39: $V3\n }, o($Vi, [2, 8]), o($Vi, [2, 9]), o($Vi, [2, 10], {\n 12: [1, 34],\n 13: [1, 35]\n }), o($Vi, [2, 14]), {\n 16: [1, 36]\n }, o($Vi, [2, 16], {\n 18: [1, 37]\n }), {\n 21: [1, 38]\n }, o($Vi, [2, 20]), o($Vi, [2, 21]), o($Vi, [2, 22]), {\n 27: 39,\n 28: [1, 40],\n 37: [1, 41],\n 38: [1, 42]\n }, o($Vi, [2, 25]), o($Vj, [2, 30]), o($Vj, [2, 31]), o($Vk, [2, 26]), {\n 33: 43,\n 41: [1, 44]\n }, o($Vk, [2, 37]), o($Vi, [2, 7]), o($Vi, [2, 11]), {\n 11: 45,\n 22: $Vb,\n 36: $Vg\n }, o($Vi, [2, 15]), o($Vl, $V4, {\n 8: 46\n }), {\n 22: [1, 47]\n }, {\n 22: [1, 48]\n }, {\n 21: [1, 49]\n }, {\n 22: [2, 32]\n }, {\n 22: [2, 33]\n }, {\n 31: 50,\n 42: $Vh\n }, {\n 42: [2, 36]\n }, o($Vi, [2, 12], {\n 12: [1, 51]\n }), {\n 4: $V5,\n 5: $V6,\n 6: 27,\n 9: 14,\n 10: 16,\n 11: 18,\n 14: $V7,\n 15: $V8,\n 17: $V9,\n 19: [1, 52],\n 20: $Va,\n 22: $Vb,\n 23: $Vc,\n 24: $Vd,\n 25: $Ve,\n 26: $Vf,\n 29: 6,\n 36: $Vg,\n 39: $V3\n }, o($Vi, [2, 18], {\n 18: [1, 53]\n }), {\n 28: [1, 54]\n }, {\n 22: [1, 55]\n }, o($Vk, [2, 27]), o($Vi, [2, 13]), o($Vi, [2, 17]), o($Vl, $V4, {\n 8: 56\n }), o($Vi, [2, 23]), o($Vi, [2, 24]), {\n 4: $V5,\n 5: $V6,\n 6: 27,\n 9: 14,\n 10: 16,\n 11: 18,\n 14: $V7,\n 15: $V8,\n 17: $V9,\n 19: [1, 57],\n 20: $Va,\n 22: $Vb,\n 23: $Vc,\n 24: $Vd,\n 25: $Ve,\n 26: $Vf,\n 29: 6,\n 36: $Vg,\n 39: $V3\n }, o($Vi, [2, 19])],\n defaultActions: {\n 7: [2, 34],\n 8: [2, 1],\n 9: [2, 2],\n 10: [2, 3],\n 41: [2, 32],\n 42: [2, 33],\n 44: [2, 36]\n },\n parseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n },\n parse: function parse(input) {\n var self = this,\n stack = [0],\n tstack = [],\n vstack = [null],\n lstack = [],\n table = this.table,\n yytext = '',\n yylineno = 0,\n yyleng = 0,\n recovering = 0,\n TERROR = 2,\n EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = {\n yy: {}\n };\n\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n\n token = self.symbols_[token] || token;\n }\n\n return token;\n }\n\n var symbol,\n preErrorSymbol,\n state,\n action,\n a,\n r,\n yyval = {},\n p,\n len,\n newState,\n expected;\n\n while (true) {\n state = stack[stack.length - 1];\n\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n\n action = table[state] && table[state][symbol];\n }\n\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n\n break;\n\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n\n if (ranges) {\n yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n }\n\n r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));\n\n if (typeof r !== 'undefined') {\n return r;\n }\n\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n\n case 3:\n return true;\n }\n }\n\n return true;\n }\n };\n /* generated by jison-lex 0.3.4 */\n\n var lexer = function () {\n var lexer = {\n EOF: 1,\n parseError: function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n // resets the lexer, sets new input\n setInput: function setInput(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n\n this.offset = 0;\n return this;\n },\n // consumes and returns one char from the input\n input: function input() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n // unshifts one char (or a string) into the input\n unput: function unput(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;\n\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n\n this.yyleng = this.yytext.length;\n return this;\n },\n // When called from action, caches matched text and appends it on next action\n more: function more() {\n this._more = true;\n return this;\n },\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: function reject() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n\n return this;\n },\n // retain first n characters of the match\n less: function less(n) {\n this.unput(this.match.slice(n));\n },\n // displays already matched input, i.e. for error messages\n pastInput: function pastInput() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\\n/g, \"\");\n },\n // displays upcoming input, i.e. for error messages\n upcomingInput: function upcomingInput() {\n var next = this.match;\n\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n\n return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: function showPosition() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: function test_match(match, indexed_rule) {\n var token, lines, backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno += lines.length;\n }\n\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n\n if (this.done && this._input) {\n this.done = false;\n }\n\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n\n return false;\n },\n // return next match in input\n next: function next() {\n if (this.done) {\n return this.EOF;\n }\n\n if (!this._input) {\n this.done = true;\n }\n\n var token, match, tempMatch, index;\n\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n\n var rules = this._currentRules();\n\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n\n if (match) {\n token = this.test_match(match, rules[index]);\n\n if (token !== false) {\n return token;\n } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n\n\n return false;\n }\n\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n // return next match that has a token\n lex: function lex() {\n var r = this.next();\n\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: function begin(condition) {\n this.conditionStack.push(condition);\n },\n // pop the previously active lexer condition state off the condition stack\n popState: function popState() {\n var n = this.conditionStack.length - 1;\n\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n // alias for begin(condition)\n pushState: function pushState(condition) {\n this.begin(condition);\n },\n // return the number of states currently on the stack\n stateStackSize: function stateStackSize() {\n return this.conditionStack.length;\n },\n options: {\n \"case-insensitive\": true\n },\n performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n\n switch ($avoiding_name_collisions) {\n case 0:\n this.begin('open_directive');\n return 39;\n break;\n\n case 1:\n this.begin('type_directive');\n return 40;\n break;\n\n case 2:\n this.popState();\n this.begin('arg_directive');\n return 32;\n break;\n\n case 3:\n this.popState();\n this.popState();\n return 42;\n break;\n\n case 4:\n return 41;\n break;\n\n case 5:\n /* skip comments */\n break;\n\n case 6:\n /* skip comments */\n {\n console.log('Crap after close');\n }\n break;\n\n case 7:\n return 5;\n break;\n\n case 8:\n /* skip all whitespace */\n break;\n\n case 9:\n /* skip same-line whitespace */\n break;\n\n case 10:\n /* skip comments */\n break;\n\n case 11:\n /* skip comments */\n break;\n\n case 12:\n this.pushState('SCALE');\n /* console.log('Got scale', yy_.yytext);*/\n\n return 15;\n break;\n\n case 13:\n return 16;\n break;\n\n case 14:\n this.popState();\n break;\n\n case 15:\n this.pushState('STATE');\n break;\n\n case 16:\n this.popState();\n yy_.yytext = yy_.yytext.slice(0, -8).trim();\n /*console.warn('Fork Fork: ',yy_.yytext);*/\n\n return 23;\n break;\n\n case 17:\n this.popState();\n yy_.yytext = yy_.yytext.slice(0, -8).trim();\n /*console.warn('Fork Join: ',yy_.yytext);*/\n\n return 24;\n break;\n\n case 18:\n this.popState();\n yy_.yytext = yy_.yytext.slice(0, -8).trim();\n /*console.warn('Fork Fork: ',yy_.yytext);*/\n\n return 23;\n break;\n\n case 19:\n this.popState();\n yy_.yytext = yy_.yytext.slice(0, -8).trim();\n /*console.warn('Fork Join: ',yy_.yytext);*/\n\n return 24;\n break;\n\n case 20:\n this.begin(\"STATE_STRING\");\n break;\n\n case 21:\n this.popState();\n this.pushState('STATE_ID');\n return \"AS\";\n break;\n\n case 22:\n this.popState();\n /* console.log('STATE_ID', yy_.yytext);*/\n\n return \"ID\";\n break;\n\n case 23:\n this.popState();\n break;\n\n case 24:\n /*console.log('Long description:', yy_.yytext);*/\n return \"STATE_DESCR\";\n break;\n\n case 25:\n /*console.log('COMPOSIT_STATE', yy_.yytext);*/\n return 17;\n break;\n\n case 26:\n this.popState();\n break;\n\n case 27:\n this.popState();\n this.pushState('struct');\n /*console.log('begin struct', yy_.yytext);*/\n\n return 18;\n break;\n\n case 28:\n /*console.log('Ending struct');*/\n this.popState();\n return 19;\n break;\n\n case 29:\n /* nothing */\n break;\n\n case 30:\n this.begin('NOTE');\n return 26;\n break;\n\n case 31:\n this.popState();\n this.pushState('NOTE_ID');\n return 37;\n break;\n\n case 32:\n this.popState();\n this.pushState('NOTE_ID');\n return 38;\n break;\n\n case 33:\n this.popState();\n this.pushState('FLOATING_NOTE');\n break;\n\n case 34:\n this.popState();\n this.pushState('FLOATING_NOTE_ID');\n return \"AS\";\n break;\n\n case 35:\n /**/\n break;\n\n case 36:\n /*console.log('Floating note text: ', yy_.yytext);*/\n return \"NOTE_TEXT\";\n break;\n\n case 37:\n this.popState();\n /*console.log('Floating note ID', yy_.yytext);*/\n\n return \"ID\";\n break;\n\n case 38:\n this.popState();\n this.pushState('NOTE_TEXT');\n /*console.log('Got ID for note', yy_.yytext);*/\n\n return 22;\n break;\n\n case 39:\n this.popState();\n /*console.log('Got NOTE_TEXT for note',yy_.yytext);*/\n\n yy_.yytext = yy_.yytext.substr(2).trim();\n return 28;\n break;\n\n case 40:\n this.popState();\n /*console.log('Got NOTE_TEXT for note',yy_.yytext);*/\n\n yy_.yytext = yy_.yytext.slice(0, -8).trim();\n return 28;\n break;\n\n case 41:\n /*console.log('Got state diagram', yy_.yytext,'#');*/\n return 7;\n break;\n\n case 42:\n /*console.log('Got state diagram', yy_.yytext,'#');*/\n return 7;\n break;\n\n case 43:\n /*console.log('HIDE_EMPTY', yy_.yytext,'#');*/\n return 14;\n break;\n\n case 44:\n /*console.log('EDGE_STATE=',yy_.yytext);*/\n return 36;\n break;\n\n case 45:\n /*console.log('=>ID=',yy_.yytext);*/\n return 22;\n break;\n\n case 46:\n yy_.yytext = yy_.yytext.trim();\n /*console.log('Descr = ', yy_.yytext);*/\n\n return 12;\n break;\n\n case 47:\n return 13;\n break;\n\n case 48:\n return 25;\n break;\n\n case 49:\n return 5;\n break;\n\n case 50:\n return 'INVALID';\n break;\n }\n },\n rules: [/^(?:%%\\{)/i, /^(?:((?:(?!\\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\\}%%)/i, /^(?:((?:(?!\\}%%).|\\n)*))/i, /^(?:%%(?!\\{)[^\\n]*)/i, /^(?:[^\\}]%%[^\\n]*)/i, /^(?:[\\n]+)/i, /^(?:[\\s]+)/i, /^(?:((?!\\n)\\s)+)/i, /^(?:#[^\\n]*)/i, /^(?:%[^\\n]*)/i, /^(?:scale\\s+)/i, /^(?:\\d+)/i, /^(?:\\s+width\\b)/i, /^(?:state\\s+)/i, /^(?:.*<>)/i, /^(?:.*<>)/i, /^(?:.*\\[\\[fork\\]\\])/i, /^(?:.*\\[\\[join\\]\\])/i, /^(?:[\"])/i, /^(?:\\s*as\\s+)/i, /^(?:[^\\n\\{]*)/i, /^(?:[\"])/i, /^(?:[^\"]*)/i, /^(?:[^\\n\\s\\{]+)/i, /^(?:\\n)/i, /^(?:\\{)/i, /^(?:\\})/i, /^(?:[\\n])/i, /^(?:note\\s+)/i, /^(?:left of\\b)/i, /^(?:right of\\b)/i, /^(?:\")/i, /^(?:\\s*as\\s*)/i, /^(?:[\"])/i, /^(?:[^\"]*)/i, /^(?:[^\\n]*)/i, /^(?:\\s*[^:\\n\\s\\-]+)/i, /^(?:\\s*:[^:\\n;]+)/i, /^(?:[\\s\\S]*?end note\\b)/i, /^(?:stateDiagram\\s+)/i, /^(?:stateDiagram-v2\\s+)/i, /^(?:hide empty description\\b)/i, /^(?:\\[\\*\\])/i, /^(?:[^:\\n\\s\\-\\{]+)/i, /^(?:\\s*:[^:\\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?:$)/i, /^(?:.)/i],\n conditions: {\n \"LINE\": {\n \"rules\": [9, 10],\n \"inclusive\": false\n },\n \"close_directive\": {\n \"rules\": [9, 10],\n \"inclusive\": false\n },\n \"arg_directive\": {\n \"rules\": [3, 4, 9, 10],\n \"inclusive\": false\n },\n \"type_directive\": {\n \"rules\": [2, 3, 9, 10],\n \"inclusive\": false\n },\n \"open_directive\": {\n \"rules\": [1, 9, 10],\n \"inclusive\": false\n },\n \"struct\": {\n \"rules\": [9, 10, 15, 28, 29, 30, 44, 45, 46, 47, 48],\n \"inclusive\": false\n },\n \"FLOATING_NOTE_ID\": {\n \"rules\": [37],\n \"inclusive\": false\n },\n \"FLOATING_NOTE\": {\n \"rules\": [34, 35, 36],\n \"inclusive\": false\n },\n \"NOTE_TEXT\": {\n \"rules\": [39, 40],\n \"inclusive\": false\n },\n \"NOTE_ID\": {\n \"rules\": [38],\n \"inclusive\": false\n },\n \"NOTE\": {\n \"rules\": [31, 32, 33],\n \"inclusive\": false\n },\n \"SCALE\": {\n \"rules\": [13, 14],\n \"inclusive\": false\n },\n \"ALIAS\": {\n \"rules\": [],\n \"inclusive\": false\n },\n \"STATE_ID\": {\n \"rules\": [22],\n \"inclusive\": false\n },\n \"STATE_STRING\": {\n \"rules\": [23, 24],\n \"inclusive\": false\n },\n \"FORK_STATE\": {\n \"rules\": [],\n \"inclusive\": false\n },\n \"STATE\": {\n \"rules\": [9, 10, 16, 17, 18, 19, 20, 21, 25, 26, 27],\n \"inclusive\": false\n },\n \"ID\": {\n \"rules\": [9, 10],\n \"inclusive\": false\n },\n \"INITIAL\": {\n \"rules\": [0, 5, 6, 7, 8, 10, 11, 12, 15, 27, 30, 41, 42, 43, 44, 45, 46, 47, 49, 50],\n \"inclusive\": true\n }\n }\n };\n return lexer;\n }();\n\n parser.lexer = lexer;\n\n function Parser() {\n this.yy = {};\n }\n\n Parser.prototype = parser;\n parser.Parser = Parser;\n return new Parser();\n }();\n\n if (true) {\n exports.parser = parser;\n exports.Parser = parser.Parser;\n\n exports.parse = function () {\n return parser.parse.apply(parser, arguments);\n };\n\n exports.main = function commonjsMain(args) {\n if (!args[1]) {\n console.log('Usage: ' + args[0] + ' FILE');\n process.exit(1);\n }\n\n var source = __webpack_require__(\n /*! fs */\n \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(\n /*! path */\n \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n\n return exports.parser.parse(source);\n };\n\n if (true && __webpack_require__.c[__webpack_require__.s] === module) {\n exports.main(process.argv.slice(1));\n }\n }\n /* WEBPACK VAR INJECTION */\n\n }).call(this, __webpack_require__(\n /*! ./../../../../node_modules/process/browser.js */\n \"./node_modules/process/browser.js\"), __webpack_require__(\n /*! ./../../../../node_modules/webpack/buildin/module.js */\n \"./node_modules/webpack/buildin/module.js\")(module));\n /***/\n },\n\n /***/\n \"./src/diagrams/state/shapes.js\":\n /*!**************************************!*\\\n !*** ./src/diagrams/state/shapes.js ***!\n \\**************************************/\n\n /*! exports provided: drawStartState, drawDivider, drawSimpleState, drawDescrState, addTitleAndBox, drawText, drawNote, drawState, drawEdge */\n\n /***/\n function srcDiagramsStateShapesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawStartState\", function () {\n return drawStartState;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawDivider\", function () {\n return drawDivider;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawSimpleState\", function () {\n return drawSimpleState;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawDescrState\", function () {\n return drawDescrState;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addTitleAndBox\", function () {\n return addTitleAndBox;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawText\", function () {\n return drawText;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawNote\", function () {\n return drawNote;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawState\", function () {\n return drawState;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawEdge\", function () {\n return drawEdge;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _id_cache_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./id-cache.js */\n \"./src/diagrams/state/id-cache.js\");\n /* harmony import */\n\n\n var _stateDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./stateDb */\n \"./src/diagrams/state/stateDb.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n /* harmony import */\n\n\n var _common_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../common/common */\n \"./src/diagrams/common/common.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\"); // let conf;\n\n /**\n * Draws a start state as a black circle\n */\n\n\n var drawStartState = function drawStartState(g) {\n return g.append('circle') // .style('stroke', 'black')\n // .style('fill', 'black')\n .attr('class', 'start-state').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit);\n };\n /**\n * Draws a start state as a black circle\n */\n\n\n var drawDivider = function drawDivider(g) {\n return g.append('line').style('stroke', 'grey').style('stroke-dasharray', '3').attr('x1', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight).attr('class', 'divider').attr('x2', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight * 2).attr('y1', 0).attr('y2', 0);\n };\n /**\n * Draws a an end state as a black circle\n */\n\n\n var drawSimpleState = function drawSimpleState(g, stateDef) {\n var state = g.append('text').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.fontSize).attr('class', 'state-title').text(stateDef.id);\n var classBox = state.node().getBBox();\n g.insert('rect', ':first-child').attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('width', classBox.width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('height', classBox.height + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.radius);\n return state;\n };\n /**\n * Draws a state with descriptions\n * @param {*} g\n * @param {*} stateDef\n */\n\n\n var drawDescrState = function drawDescrState(g, stateDef) {\n var addTspan = function addTspan(textEl, txt, isFirst) {\n var tSpan = textEl.append('tspan').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).text(txt);\n\n if (!isFirst) {\n tSpan.attr('dy', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight);\n }\n };\n\n var title = g.append('text').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight + 1.3 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.fontSize).attr('class', 'state-title').text(stateDef.descriptions[0]);\n var titleBox = title.node().getBBox();\n var titleHeight = titleBox.height;\n var description = g.append('text') // text label for the x axis\n .attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y', titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding * 0.4 + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.dividerMargin + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight).attr('class', 'state-description');\n var isFirst = true;\n var isSecond = true;\n stateDef.descriptions.forEach(function (descr) {\n if (!isFirst) {\n addTspan(description, descr, isSecond);\n isSecond = false;\n }\n\n isFirst = false;\n });\n var descrLine = g.append('line') // text label for the x axis\n .attr('x1', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y1', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.dividerMargin / 2).attr('y2', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.dividerMargin / 2).attr('class', 'descr-divider');\n var descrBox = description.node().getBBox();\n var width = Math.max(descrBox.width, titleBox.width);\n descrLine.attr('x2', width + 3 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding); // const classBox = title.node().getBBox();\n\n g.insert('rect', ':first-child').attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('width', width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('height', descrBox.height + titleHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.radius);\n return g;\n };\n /**\n * Adds the creates a box around the existing content and adds a\n * panel for the id on top of the content.\n */\n\n /**\n * Function that creates an title row and a frame around a substate for a composit state diagram.\n * The function returns a new d3 svg object with updated width and height properties;\n * @param {*} g The d3 svg object for the substate to framed\n * @param {*} stateDef The info about the\n */\n\n\n var addTitleAndBox = function addTitleAndBox(g, stateDef, altBkg) {\n var pad = Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding;\n var dblPad = 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding;\n var orgBox = g.node().getBBox();\n var orgWidth = orgBox.width;\n var orgX = orgBox.x;\n var title = g.append('text').attr('x', 0).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.titleShift).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.fontSize).attr('class', 'state-title').text(stateDef.id);\n var titleBox = title.node().getBBox();\n var titleWidth = titleBox.width + dblPad;\n var width = Math.max(titleWidth, orgWidth); // + dblPad;\n\n if (width === orgWidth) {\n width = width + dblPad;\n }\n\n var startX; // const lineY = 1 - getConfig().state.textHeight;\n // const descrLine = g\n // .append('line') // text label for the x axis\n // .attr('x1', 0)\n // .attr('y1', lineY)\n // .attr('y2', lineY)\n // .attr('class', 'descr-divider');\n\n var graphBox = g.node().getBBox(); // descrLine.attr('x2', graphBox.width + getConfig().state.padding);\n\n if (stateDef.doc) {// cnsole.warn(\n // stateDef.id,\n // 'orgX: ',\n // orgX,\n // 'width: ',\n // width,\n // 'titleWidth: ',\n // titleWidth,\n // 'orgWidth: ',\n // orgWidth,\n // 'width',\n // width\n // );\n }\n\n startX = orgX - pad;\n\n if (titleWidth > orgWidth) {\n startX = (orgWidth - width) / 2 + pad;\n }\n\n if (Math.abs(orgX - graphBox.x) < pad) {\n if (titleWidth > orgWidth) {\n startX = orgX - (titleWidth - orgWidth) / 2;\n }\n }\n\n var lineY = 1 - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight; // White color\n\n g.insert('rect', ':first-child').attr('x', startX).attr('y', lineY).attr('class', altBkg ? 'alt-composit' : 'composit').attr('width', width).attr('height', graphBox.height + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.titleShift + 1).attr('rx', '0');\n title.attr('x', startX + pad);\n if (titleWidth <= orgWidth) title.attr('x', orgX + (width - dblPad) / 2 - titleWidth / 2 + pad); // Title background\n\n g.insert('rect', ':first-child').attr('x', startX).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.titleShift - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('width', width) // Just needs to be higher then the descr line, will be clipped by the white color box\n .attr('height', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight * 3).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.radius); // Full background\n\n g.insert('rect', ':first-child').attr('x', startX).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.titleShift - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('width', width).attr('height', graphBox.height + 3 + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.textHeight).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.radius);\n return g;\n };\n\n var drawEndState = function drawEndState(g) {\n g.append('circle') // .style('stroke', 'black')\n // .style('fill', 'white')\n .attr('class', 'end-state-outer').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.miniPadding).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.miniPadding).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.miniPadding);\n return g.append('circle') // .style('stroke', 'black')\n // .style('fill', 'black')\n .attr('class', 'end-state-inner').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit + 2).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.sizeUnit + 2);\n };\n\n var drawForkJoinState = function drawForkJoinState(g, stateDef) {\n var width = Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.forkWidth;\n var height = Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.forkHeight;\n\n if (stateDef.parentId) {\n var tmp = width;\n width = height;\n height = tmp;\n }\n\n return g.append('rect').style('stroke', 'black').style('fill', 'black').attr('width', width).attr('height', height).attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding);\n };\n\n var drawText = function drawText(elem, textData) {\n // Remove and ignore br:s\n var nText = textData.text.replace(_common_common__WEBPACK_IMPORTED_MODULE_4__[\"default\"].lineBreakRegex, ' ');\n var textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.style('text-anchor', textData.anchor);\n textElem.attr('fill', textData.fill);\n\n if (typeof textData[\"class\"] !== 'undefined') {\n textElem.attr('class', textData[\"class\"]);\n }\n\n var span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.attr('fill', textData.fill);\n span.text(nText);\n return textElem;\n };\n\n var _drawLongText = function _drawLongText(_text, x, y, g) {\n var textHeight = 0;\n var textElem = g.append('text');\n textElem.style('text-anchor', 'start');\n textElem.attr('class', 'noteText');\n\n var text = _text.replace(/\\r\\n/g, '
');\n\n text = text.replace(/\\n/g, '
');\n var lines = text.split(_common_common__WEBPACK_IMPORTED_MODULE_4__[\"default\"].lineBreakRegex);\n var tHeight = 1.25 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.noteMargin;\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = lines[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var _line = _step.value;\n\n var txt = _line.trim();\n\n if (txt.length > 0) {\n var span = textElem.append('tspan');\n span.text(txt);\n\n if (tHeight === 0) {\n var textBounds = span.node().getBBox();\n tHeight += textBounds.height;\n }\n\n textHeight += tHeight;\n span.attr('x', x + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.noteMargin);\n span.attr('y', y + textHeight + 1.25 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.noteMargin);\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator[\"return\"] != null) {\n _iterator[\"return\"]();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return {\n textWidth: textElem.node().getBBox().width,\n textHeight: textHeight\n };\n };\n /**\n * Draws a note to the diagram\n * @param text - The text of the given note.\n * @param g - The element the note is attached to.\n */\n\n\n var drawNote = function drawNote(text, g) {\n g.attr('class', 'state-note');\n var note = g.append('rect').attr('x', 0).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding);\n var rectElem = g.append('g');\n\n var _drawLongText2 = _drawLongText(text, 0, 0, rectElem),\n textWidth = _drawLongText2.textWidth,\n textHeight = _drawLongText2.textHeight;\n\n note.attr('height', textHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.noteMargin);\n note.attr('width', textWidth + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.noteMargin * 2);\n return note;\n };\n /**\n * Starting point for drawing a state. The function finds out the specifics\n * about the state and renders with approprtiate function.\n * @param {*} elem\n * @param {*} stateDef\n */\n\n\n var drawState = function drawState(elem, stateDef) {\n var id = stateDef.id;\n var stateInfo = {\n id: id,\n label: stateDef.id,\n width: 0,\n height: 0\n };\n var g = elem.append('g').attr('id', id).attr('class', 'stateGroup');\n if (stateDef.type === 'start') drawStartState(g);\n if (stateDef.type === 'end') drawEndState(g);\n if (stateDef.type === 'fork' || stateDef.type === 'join') drawForkJoinState(g, stateDef);\n if (stateDef.type === 'note') drawNote(stateDef.note.text, g);\n if (stateDef.type === 'divider') drawDivider(g);\n if (stateDef.type === 'default' && stateDef.descriptions.length === 0) drawSimpleState(g, stateDef);\n if (stateDef.type === 'default' && stateDef.descriptions.length > 0) drawDescrState(g, stateDef);\n var stateBox = g.node().getBBox();\n stateInfo.width = stateBox.width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding;\n stateInfo.height = stateBox.height + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding;\n\n _id_cache_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].set(id, stateInfo); // stateCnt++;\n\n\n return stateInfo;\n };\n\n var edgeCount = 0;\n\n var drawEdge = function drawEdge(elem, path, relation) {\n var getRelationType = function getRelationType(type) {\n switch (type) {\n case _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].relationType.AGGREGATION:\n return 'aggregation';\n\n case _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].relationType.EXTENSION:\n return 'extension';\n\n case _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].relationType.COMPOSITION:\n return 'composition';\n\n case _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].relationType.DEPENDENCY:\n return 'dependency';\n }\n };\n\n path.points = path.points.filter(function (p) {\n return !Number.isNaN(p.y);\n }); // The data for our line\n\n var lineData = path.points; // This is the accessor function we talked about above\n\n var lineFunction = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"line\"])().x(function (d) {\n return d.x;\n }).y(function (d) {\n return d.y;\n }).curve(d3__WEBPACK_IMPORTED_MODULE_0__[\"curveBasis\"]);\n var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'transition');\n var url = '';\n\n if (Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.arrowMarkerAbsolute) {\n url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(_stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].relationType.DEPENDENCY) + 'End' + ')');\n\n if (typeof relation.title !== 'undefined') {\n var label = elem.append('g').attr('class', 'stateLabel');\n\n var _utils$calcLabelPosit = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].calcLabelPosition(path.points),\n x = _utils$calcLabelPosit.x,\n y = _utils$calcLabelPosit.y;\n\n var rows = _common_common__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getRows(relation.title);\n\n var titleHeight = 0;\n var titleRows = [];\n var maxWidth = 0;\n var minX = 0;\n\n for (var i = 0; i <= rows.length; i++) {\n var title = label.append('text').attr('text-anchor', 'middle').text(rows[i]).attr('x', x).attr('y', y + titleHeight);\n var boundstmp = title.node().getBBox();\n maxWidth = Math.max(maxWidth, boundstmp.width);\n minX = Math.min(minX, boundstmp.x);\n\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info(boundstmp.x, x, y + titleHeight);\n\n if (titleHeight === 0) {\n var titleBox = title.node().getBBox();\n titleHeight = titleBox.height;\n\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info('Title height', titleHeight, y);\n }\n\n titleRows.push(title);\n }\n\n var boxHeight = titleHeight * rows.length;\n\n if (rows.length > 1) {\n var heightAdj = (rows.length - 1) * titleHeight * 0.5;\n titleRows.forEach(function (title, i) {\n return title.attr('y', y + i * titleHeight - heightAdj);\n });\n boxHeight = titleHeight * rows.length;\n }\n\n var bounds = label.node().getBBox();\n label.insert('rect', ':first-child').attr('class', 'box').attr('x', x - maxWidth / 2 - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding / 2).attr('y', y - boxHeight / 2 - Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding / 2 - 3.5).attr('width', maxWidth + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding).attr('height', boxHeight + Object(_config__WEBPACK_IMPORTED_MODULE_5__[\"getConfig\"])().state.padding);\n\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info(bounds); //label.attr('transform', '0 -' + (bounds.y / 2));\n // Debug points\n // path.points.forEach(point => {\n // g.append('circle')\n // .style('stroke', 'red')\n // .style('fill', 'red')\n // .attr('r', 1)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n // g.append('circle')\n // .style('stroke', 'blue')\n // .style('fill', 'blue')\n // .attr('r', 1)\n // .attr('cx', x)\n // .attr('cy', y);\n\n }\n\n edgeCount++;\n };\n /***/\n\n },\n\n /***/\n \"./src/diagrams/state/stateDb.js\":\n /*!***************************************!*\\\n !*** ./src/diagrams/state/stateDb.js ***!\n \\***************************************/\n\n /*! exports provided: parseDirective, addState, clear, getState, getStates, logDocuments, getRelations, addRelation, cleanupLabel, lineType, relationType, default */\n\n /***/\n function srcDiagramsStateStateDbJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"parseDirective\", function () {\n return parseDirective;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addState\", function () {\n return addState;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"clear\", function () {\n return clear;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getState\", function () {\n return getState;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getStates\", function () {\n return getStates;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"logDocuments\", function () {\n return logDocuments;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getRelations\", function () {\n return getRelations;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addRelation\", function () {\n return addRelation;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"cleanupLabel\", function () {\n return cleanupLabel;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"lineType\", function () {\n return lineType;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"relationType\", function () {\n return relationType;\n });\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n /* harmony import */\n\n\n var _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ../../mermaidAPI */\n \"./src/mermaidAPI.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n var clone = function clone(o) {\n return JSON.parse(JSON.stringify(o));\n };\n\n var rootDoc = [];\n\n var parseDirective = function parseDirective(statement, context, type) {\n _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__[\"default\"].parseDirective(this, statement, context, type);\n };\n\n var setRootDoc = function setRootDoc(o) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Setting root doc', o); // rootDoc = { id: 'root', doc: o };\n\n\n rootDoc = o;\n };\n\n var getRootDoc = function getRootDoc() {\n return rootDoc;\n };\n\n var docTranslator = function docTranslator(parent, node, first) {\n if (node.stmt === 'relation') {\n docTranslator(parent, node.state1, true);\n docTranslator(parent, node.state2, false);\n } else {\n if (node.stmt === 'state') {\n if (node.id === '[*]') {\n node.id = first ? parent.id + '_start' : parent.id + '_end';\n node.start = first;\n }\n }\n\n if (node.doc) {\n var doc = []; // Check for concurrency\n\n var i = 0;\n var currentDoc = [];\n\n for (i = 0; i < node.doc.length; i++) {\n if (node.doc[i].type === 'divider') {\n // debugger;\n var newNode = clone(node.doc[i]);\n newNode.doc = clone(currentDoc);\n doc.push(newNode);\n currentDoc = [];\n } else {\n currentDoc.push(node.doc[i]);\n }\n } // If any divider was encountered\n\n\n if (doc.length > 0 && currentDoc.length > 0) {\n var _newNode = {\n stmt: 'state',\n id: Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"generateId\"])(),\n type: 'divider',\n doc: clone(currentDoc)\n };\n doc.push(clone(_newNode));\n node.doc = doc;\n }\n\n node.doc.forEach(function (docNode) {\n return docTranslator(node, docNode, true);\n });\n }\n }\n };\n\n var getRootDocV2 = function getRootDocV2() {\n docTranslator({\n id: 'root'\n }, {\n id: 'root',\n doc: rootDoc\n }, true);\n return {\n id: 'root',\n doc: rootDoc\n };\n };\n\n var extract = function extract(_doc) {\n // const res = { states: [], relations: [] };\n var doc;\n\n if (_doc.doc) {\n doc = _doc.doc;\n } else {\n doc = _doc;\n } // let doc = root.doc;\n // if (!doc) {\n // doc = root;\n // }\n\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info(doc);\n\n clear();\n\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Extract', doc);\n\n doc.forEach(function (item) {\n if (item.stmt === 'state') {\n addState(item.id, item.type, item.doc, item.description, item.note);\n }\n\n if (item.stmt === 'relation') {\n addRelation(item.state1.id, item.state2.id, item.description);\n }\n });\n };\n\n var newDoc = function newDoc() {\n return {\n relations: [],\n states: {},\n documents: {}\n };\n };\n\n var documents = {\n root: newDoc()\n };\n var currentDocument = documents.root;\n var startCnt = 0;\n var endCnt = 0; // eslint-disable-line\n // let stateCnt = 0;\n\n /**\n * Function called by parser when a node definition has been found.\n * @param id\n * @param text\n * @param type\n * @param style\n */\n\n var addState = function addState(id, type, doc, descr, note) {\n if (typeof currentDocument.states[id] === 'undefined') {\n currentDocument.states[id] = {\n id: id,\n descriptions: [],\n type: type,\n doc: doc,\n note: note\n };\n } else {\n if (!currentDocument.states[id].doc) {\n currentDocument.states[id].doc = doc;\n }\n\n if (!currentDocument.states[id].type) {\n currentDocument.states[id].type = type;\n }\n }\n\n if (descr) {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Adding state ', id, descr);\n\n if (typeof descr === 'string') addDescription(id, descr.trim());\n\n if (_typeof(descr) === 'object') {\n descr.forEach(function (des) {\n return addDescription(id, des.trim());\n });\n }\n }\n\n if (note) currentDocument.states[id].note = note;\n };\n\n var clear = function clear() {\n documents = {\n root: newDoc()\n };\n currentDocument = documents.root;\n currentDocument = documents.root;\n startCnt = 0;\n endCnt = 0; // eslint-disable-line\n\n classes = [];\n };\n\n var getState = function getState(id) {\n return currentDocument.states[id];\n };\n\n var getStates = function getStates() {\n return currentDocument.states;\n };\n\n var logDocuments = function logDocuments() {\n _logger__WEBPACK_IMPORTED_MODULE_0__[\"log\"].info('Documents = ', documents);\n };\n\n var getRelations = function getRelations() {\n return currentDocument.relations;\n };\n\n var addRelation = function addRelation(_id1, _id2, title) {\n var id1 = _id1;\n var id2 = _id2;\n var type1 = 'default';\n var type2 = 'default';\n\n if (_id1 === '[*]') {\n startCnt++;\n id1 = 'start' + startCnt;\n type1 = 'start';\n }\n\n if (_id2 === '[*]') {\n endCnt++;\n id2 = 'end' + startCnt;\n type2 = 'end';\n }\n\n addState(id1, type1);\n addState(id2, type2);\n currentDocument.relations.push({\n id1: id1,\n id2: id2,\n title: title\n });\n };\n\n var addDescription = function addDescription(id, _descr) {\n var theState = currentDocument.states[id];\n var descr = _descr;\n\n if (descr[0] === ':') {\n descr = descr.substr(1).trim();\n }\n\n theState.descriptions.push(descr);\n };\n\n var cleanupLabel = function cleanupLabel(label) {\n if (label.substring(0, 1) === ':') {\n return label.substr(2).trim();\n } else {\n return label.trim();\n }\n };\n\n var lineType = {\n LINE: 0,\n DOTTED_LINE: 1\n };\n var dividerCnt = 0;\n\n var getDividerId = function getDividerId() {\n dividerCnt++;\n return 'divider-id-' + dividerCnt;\n };\n\n var classes = [];\n\n var getClasses = function getClasses() {\n return classes;\n };\n\n var getDirection = function getDirection() {\n return 'TB';\n };\n\n var relationType = {\n AGGREGATION: 0,\n EXTENSION: 1,\n COMPOSITION: 2,\n DEPENDENCY: 3\n };\n\n var trimColon = function trimColon(str) {\n return str && str[0] === ':' ? str.substr(1).trim() : str.trim();\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n parseDirective: parseDirective,\n getConfig: function getConfig() {\n return _config__WEBPACK_IMPORTED_MODULE_3__[\"getConfig\"]().state;\n },\n addState: addState,\n clear: clear,\n getState: getState,\n getStates: getStates,\n getRelations: getRelations,\n getClasses: getClasses,\n getDirection: getDirection,\n addRelation: addRelation,\n getDividerId: getDividerId,\n // addDescription,\n cleanupLabel: cleanupLabel,\n lineType: lineType,\n relationType: relationType,\n logDocuments: logDocuments,\n getRootDoc: getRootDoc,\n setRootDoc: setRootDoc,\n getRootDocV2: getRootDocV2,\n extract: extract,\n trimColon: trimColon\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/state/stateRenderer-v2.js\":\n /*!************************************************!*\\\n !*** ./src/diagrams/state/stateRenderer-v2.js ***!\n \\************************************************/\n\n /*! exports provided: setConf, getClasses, draw, default */\n\n /***/\n function srcDiagramsStateStateRendererV2Js(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getClasses\", function () {\n return getClasses;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! graphlib */\n \"graphlib\");\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__);\n /* harmony import */\n\n\n var _stateDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./stateDb */\n \"./src/diagrams/state/stateDb.js\");\n /* harmony import */\n\n\n var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./parser/stateDiagram */\n \"./src/diagrams/state/parser/stateDiagram.jison\");\n /* harmony import */\n\n\n var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3__);\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ../../dagre-wrapper/index.js */\n \"./src/dagre-wrapper/index.js\");\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n\n var conf = {};\n\n var setConf = function setConf(cnf) {\n var keys = Object.keys(cnf);\n\n for (var i = 0; i < keys.length; i++) {\n conf[keys[i]] = cnf[keys[i]];\n }\n };\n\n var nodeDb = {};\n /**\n * Returns the all the styles from classDef statements in the graph definition.\n * @returns {object} classDef styles\n */\n\n var getClasses = function getClasses(text) {\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].trace('Extracting classes');\n\n _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n\n var parser = _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n parser.yy = _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; // Parse the graph definition\n\n parser.parse(text);\n return _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getClasses();\n };\n\n var setupNode = function setupNode(g, parent, node, altFlag) {\n // Add the node\n if (node.id !== 'root') {\n var shape = 'rect';\n\n if (node.start === true) {\n shape = 'start';\n }\n\n if (node.start === false) {\n shape = 'end';\n }\n\n if (node.type !== 'default') {\n shape = node.type;\n }\n\n if (!nodeDb[node.id]) {\n nodeDb[node.id] = {\n id: node.id,\n shape: shape,\n description: node.id,\n classes: 'statediagram-state'\n };\n } // Build of the array of description strings accordinging\n\n\n if (node.description) {\n if (Array.isArray(nodeDb[node.id].description)) {\n // There already is an array of strings,add to it\n nodeDb[node.id].shape = 'rectWithTitle';\n nodeDb[node.id].description.push(node.description);\n } else {\n if (nodeDb[node.id].description.length > 0) {\n // if there is a description already transformit to an array\n nodeDb[node.id].shape = 'rectWithTitle';\n\n if (nodeDb[node.id].description === node.id) {\n // If the previous description was the is, remove it\n nodeDb[node.id].description = [node.description];\n } else {\n nodeDb[node.id].description = [nodeDb[node.id].description, node.description];\n }\n } else {\n nodeDb[node.id].shape = 'rect';\n nodeDb[node.id].description = node.description;\n }\n }\n } // Save data for description and group so that for instance a statement without description overwrites\n // one with description\n // group\n\n\n if (!nodeDb[node.id].type && node.doc) {\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info('Setting cluser for ', node.id);\n\n nodeDb[node.id].type = 'group';\n nodeDb[node.id].shape = node.type === 'divider' ? 'divider' : 'roundedWithTitle';\n nodeDb[node.id].classes = nodeDb[node.id].classes + ' ' + (altFlag ? 'statediagram-cluster statediagram-cluster-alt' : 'statediagram-cluster');\n }\n\n var nodeData = {\n labelStyle: '',\n shape: nodeDb[node.id].shape,\n labelText: nodeDb[node.id].description,\n classes: nodeDb[node.id].classes,\n //classStr,\n style: '',\n //styles.style,\n id: node.id,\n domId: 'state-' + node.id + '-' + cnt,\n type: nodeDb[node.id].type,\n padding: 15 //getConfig().flowchart.padding\n\n };\n\n if (node.note) {\n // Todo: set random id\n var noteData = {\n labelStyle: '',\n shape: 'note',\n labelText: node.note.text,\n classes: 'statediagram-note',\n //classStr,\n style: '',\n //styles.style,\n id: node.id + '----note',\n domId: 'state-' + node.id + '----note-' + cnt,\n type: nodeDb[node.id].type,\n padding: 15 //getConfig().flowchart.padding\n\n };\n var groupData = {\n labelStyle: '',\n shape: 'noteGroup',\n labelText: node.note.text,\n classes: nodeDb[node.id].classes,\n //classStr,\n style: '',\n //styles.style,\n id: node.id + '----parent',\n domId: 'state-' + node.id + '----parent-' + cnt,\n type: 'group',\n padding: 0 //getConfig().flowchart.padding\n\n };\n cnt++;\n g.setNode(node.id + '----parent', groupData);\n g.setNode(noteData.id, noteData);\n g.setNode(node.id, nodeData);\n g.setParent(node.id, node.id + '----parent');\n g.setParent(noteData.id, node.id + '----parent');\n var from = node.id;\n var to = noteData.id;\n\n if (node.note.position === 'left of') {\n from = noteData.id;\n to = node.id;\n }\n\n g.setEdge(from, to, {\n arrowhead: 'none',\n arrowType: '',\n style: 'fill:none',\n labelStyle: '',\n classes: 'transition note-edge',\n arrowheadStyle: 'fill: #333',\n labelpos: 'c',\n labelType: 'text',\n thickness: 'normal'\n });\n } else {\n g.setNode(node.id, nodeData);\n }\n }\n\n if (parent) {\n if (parent.id !== 'root') {\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info('Setting node ', node.id, ' to be child of its parent ', parent.id);\n\n g.setParent(node.id, parent.id);\n }\n }\n\n if (node.doc) {\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info('Adding nodes children ');\n\n setupDoc(g, node, node.doc, !altFlag);\n }\n };\n\n var cnt = 0;\n\n var setupDoc = function setupDoc(g, parent, doc, altFlag) {\n cnt = 0;\n\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].trace('items', doc);\n\n doc.forEach(function (item) {\n if (item.stmt === 'state' || item.stmt === 'default') {\n setupNode(g, parent, item, altFlag);\n } else if (item.stmt === 'relation') {\n setupNode(g, parent, item.state1, altFlag);\n setupNode(g, parent, item.state2, altFlag);\n var edgeData = {\n id: 'edge' + cnt,\n arrowhead: 'normal',\n arrowTypeEnd: 'arrow_barb',\n style: 'fill:none',\n labelStyle: '',\n label: item.description,\n arrowheadStyle: 'fill: #333',\n labelpos: 'c',\n labelType: 'text',\n thickness: 'normal',\n classes: 'transition'\n };\n var startId = item.state1.id;\n var endId = item.state2.id;\n g.setEdge(startId, endId, edgeData, cnt);\n cnt++;\n }\n });\n };\n /**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\n\n var draw = function draw(text, id) {\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info('Drawing state diagram (v2)', id);\n\n _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].clear();\n\n nodeDb = {};\n var parser = _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_3___default.a.parser;\n parser.yy = _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; // Parse the graph definition\n\n parser.parse(text); // Fetch the default direction, use TD if none was found\n\n var dir = _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getDirection();\n\n if (typeof dir === 'undefined') {\n dir = 'LR';\n }\n\n var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__[\"getConfig\"])().state;\n var nodeSpacing = conf.nodeSpacing || 50;\n var rankSpacing = conf.rankSpacing || 50; // Create the input mermaid.graph\n\n var g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: 'TB',\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function () {\n return {};\n });\n\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info(_stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getRootDocV2());\n\n _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].extract(_stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getRootDocV2());\n\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].info(_stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getRootDocV2());\n\n setupNode(g, undefined, _stateDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getRootDocV2(), true); // Set up an SVG group so that we can translate the final graph.\n\n var svg = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\")); // Run the renderer. This is what draws the final graph.\n\n var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#' + id + ' g');\n Object(_dagre_wrapper_index_js__WEBPACK_IMPORTED_MODULE_5__[\"render\"])(element, g, ['barb'], 'statediagram', id);\n var padding = 8;\n var bounds = svg.node().getBBox();\n var width = bounds.width + padding * 2;\n var height = bounds.height + padding * 2; // Zoom in a bit\n\n svg.attr('class', 'statediagram');\n var svgBounds = svg.node().getBBox();\n Object(_utils__WEBPACK_IMPORTED_MODULE_7__[\"configureSvgSize\"])(svg, height, width * 1.75, conf.useMaxWidth); // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n\n var vBox = \"\".concat(svgBounds.x - padding, \" \").concat(svgBounds.y - padding, \" \").concat(width, \" \").concat(height);\n\n _logger__WEBPACK_IMPORTED_MODULE_6__[\"log\"].debug(\"viewBox \".concat(vBox));\n\n svg.attr('viewBox', vBox); // Add label rects for non html labels\n\n if (!conf.htmlLabels) {\n var labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n\n for (var k = 0; k < labels.length; k++) {\n var label = labels[k]; // Get dimensions of label\n\n var dim = label.getBBox();\n var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height);\n label.insertBefore(rect, label.firstChild);\n }\n }\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setConf: setConf,\n getClasses: getClasses,\n draw: draw\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/state/stateRenderer.js\":\n /*!*********************************************!*\\\n !*** ./src/diagrams/state/stateRenderer.js ***!\n \\*********************************************/\n\n /*! exports provided: setConf, draw, default */\n\n /***/\n function srcDiagramsStateStateRendererJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! dagre */\n \"dagre\");\n /* harmony import */\n\n\n var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__);\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! graphlib */\n \"graphlib\");\n /* harmony import */\n\n\n var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ../../logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _stateDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ./stateDb */\n \"./src/diagrams/state/stateDb.js\");\n /* harmony import */\n\n\n var _common_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ../common/common */\n \"./src/diagrams/common/common.js\");\n /* harmony import */\n\n\n var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\n /*! ./parser/stateDiagram */\n \"./src/diagrams/state/parser/stateDiagram.jison\");\n /* harmony import */\n\n\n var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__);\n /* harmony import */\n\n\n var _shapes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\n /*! ./shapes */\n \"./src/diagrams/state/shapes.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\"); // import idCache from './id-cache';\n\n\n _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__[\"parser\"].yy = _stateDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; // TODO Move conf object to main conf in mermaidAPI\n\n var conf;\n var transformationLog = {};\n\n var setConf = function setConf() {}; // Todo optimize\n\n /**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\n\n\n var insertMarkers = function insertMarkers(elem) {\n elem.append('defs').append('marker').attr('id', 'dependencyEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n };\n /**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\n\n var draw = function draw(text, id) {\n conf = Object(_config__WEBPACK_IMPORTED_MODULE_8__[\"getConfig\"])().state;\n\n _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__[\"parser\"].yy.clear();\n\n _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_6__[\"parser\"].parse(text);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found\n\n\n var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])(\"[id='\".concat(id, \"']\"));\n insertMarkers(diagram); // Layout graph, Create a new directed graph\n\n var graph = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({\n multigraph: true,\n compound: true,\n // acyclicer: 'greedy',\n rankdir: 'RL' // ranksep: '20'\n\n }); // Default to assigning a new object as a label for each new edge.\n\n graph.setDefaultEdgeLabel(function () {\n return {};\n });\n\n var rootDoc = _stateDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getRootDoc();\n\n renderDoc(rootDoc, diagram, undefined, false);\n var padding = conf.padding;\n var bounds = diagram.node().getBBox();\n var width = bounds.width + padding * 2;\n var height = bounds.height + padding * 2; // zoom in a bit\n\n var svgWidth = width * 1.75;\n Object(_utils__WEBPACK_IMPORTED_MODULE_9__[\"configureSvgSize\"])(diagram, height, svgWidth, conf.useMaxWidth);\n diagram.attr('viewBox', \"\".concat(bounds.x - conf.padding, \" \").concat(bounds.y - conf.padding, \" \") + width + ' ' + height);\n };\n\n var getLabelWidth = function getLabelWidth(text) {\n return text ? text.length * conf.fontSizeFactor : 1;\n };\n\n var renderDoc = function renderDoc(doc, diagram, parentId, altBkg) {\n // // Layout graph, Create a new directed graph\n var graph = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({\n compound: true,\n multigraph: true\n });\n var i;\n var edgeFreeDoc = true;\n\n for (i = 0; i < doc.length; i++) {\n if (doc[i].stmt === 'relation') {\n edgeFreeDoc = false;\n break;\n }\n } // Set an object for the graph label\n\n\n if (parentId) graph.setGraph({\n rankdir: 'LR',\n multigraph: true,\n compound: true,\n // acyclicer: 'greedy',\n ranker: 'tight-tree',\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n isMultiGraph: true // ranksep: 5,\n // nodesep: 1\n\n });else {\n graph.setGraph({\n rankdir: 'TB',\n multigraph: true,\n compound: true,\n // isCompound: true,\n // acyclicer: 'greedy',\n // ranker: 'longest-path'\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n ranker: 'tight-tree',\n // ranker: 'network-simplex'\n isMultiGraph: true\n });\n } // Default to assigning a new object as a label for each new edge.\n\n graph.setDefaultEdgeLabel(function () {\n return {};\n });\n\n _stateDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].extract(doc);\n\n var states = _stateDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getStates();\n\n var relations = _stateDb__WEBPACK_IMPORTED_MODULE_4__[\"default\"].getRelations();\n\n var keys = Object.keys(states);\n var first = true;\n\n for (var _i = 0; _i < keys.length; _i++) {\n var stateDef = states[keys[_i]];\n\n if (parentId) {\n stateDef.parentId = parentId;\n }\n\n var node = void 0;\n\n if (stateDef.doc) {\n var sub = diagram.append('g').attr('id', stateDef.id).attr('class', 'stateGroup');\n node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg);\n\n if (first) {\n // first = false;\n sub = Object(_shapes__WEBPACK_IMPORTED_MODULE_7__[\"addTitleAndBox\"])(sub, stateDef, altBkg);\n var boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height + conf.padding / 2;\n transformationLog[stateDef.id] = {\n y: conf.compositTitleSize\n };\n } else {\n // sub = addIdAndBox(sub, stateDef);\n var _boxBounds = sub.node().getBBox();\n\n node.width = _boxBounds.width;\n node.height = _boxBounds.height; // transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n }\n } else {\n node = Object(_shapes__WEBPACK_IMPORTED_MODULE_7__[\"drawState\"])(diagram, stateDef, graph);\n }\n\n if (stateDef.note) {\n // Draw note note\n var noteDef = {\n descriptions: [],\n id: stateDef.id + '-note',\n note: stateDef.note,\n type: 'note'\n };\n var note = Object(_shapes__WEBPACK_IMPORTED_MODULE_7__[\"drawState\"])(diagram, noteDef, graph); // graph.setNode(node.id, node);\n\n if (stateDef.note.position === 'left of') {\n graph.setNode(node.id + '-note', note);\n graph.setNode(node.id, node);\n } else {\n graph.setNode(node.id, node);\n graph.setNode(node.id + '-note', note);\n } // graph.setNode(node.id);\n\n\n graph.setParent(node.id, node.id + '-group');\n graph.setParent(node.id + '-note', node.id + '-group');\n } else {\n // Add nodes to the graph. The first argument is the node id. The second is\n // metadata about the node. In this case we're going to add labels to each of\n // our nodes.\n graph.setNode(node.id, node);\n }\n }\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Count=', graph.nodeCount(), graph);\n\n var cnt = 0;\n relations.forEach(function (relation) {\n cnt++;\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Setting edge', relation);\n\n graph.setEdge(relation.id1, relation.id2, {\n relation: relation,\n width: getLabelWidth(relation.title),\n height: conf.labelHeight * _common_common__WEBPACK_IMPORTED_MODULE_5__[\"default\"].getRows(relation.title).length,\n labelpos: 'c'\n }, 'id' + cnt);\n });\n dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(graph);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Graph after layout', graph.nodes());\n\n var svgElem = diagram.node();\n graph.nodes().forEach(function (v) {\n if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].warn('Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n\n Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + svgElem.id + ' #' + v).attr('transform', 'translate(' + (graph.node(v).x - graph.node(v).width / 2) + ',' + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + ' )');\n Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + svgElem.id + ' #' + v).attr('data-x-shift', graph.node(v).x - graph.node(v).width / 2);\n var dividers = document.querySelectorAll('#' + svgElem.id + ' #' + v + ' .divider');\n dividers.forEach(function (divider) {\n var parent = divider.parentElement;\n var pWidth = 0;\n var pShift = 0;\n\n if (parent) {\n if (parent.parentElement) pWidth = parent.parentElement.getBBox().width;\n pShift = parseInt(parent.getAttribute('data-x-shift'), 10);\n\n if (Number.isNaN(pShift)) {\n pShift = 0;\n }\n }\n\n divider.setAttribute('x1', 0 - pShift + 8);\n divider.setAttribute('x2', pWidth - pShift - 8);\n });\n } else {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('No Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n }\n });\n var stateBox = svgElem.getBBox();\n graph.edges().forEach(function (e) {\n if (typeof e !== 'undefined' && typeof graph.edge(e) !== 'undefined') {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n\n Object(_shapes__WEBPACK_IMPORTED_MODULE_7__[\"drawEdge\"])(diagram, graph.edge(e), graph.edge(e).relation);\n }\n });\n stateBox = svgElem.getBBox();\n var stateInfo = {\n id: parentId ? parentId : 'root',\n label: parentId ? parentId : 'root',\n width: 0,\n height: 0\n };\n stateInfo.width = stateBox.width + 2 * conf.padding;\n stateInfo.height = stateBox.height + 2 * conf.padding;\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Doc rendered', stateInfo, graph);\n\n return stateInfo;\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setConf: setConf,\n draw: draw\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/state/styles.js\":\n /*!**************************************!*\\\n !*** ./src/diagrams/state/styles.js ***!\n \\**************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDiagramsStateStylesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n\n var getStyles = function getStyles(options) {\n return \"g.stateGroup text {\\n fill: \".concat(options.nodeBorder, \";\\n stroke: none;\\n font-size: 10px;\\n}\\ng.stateGroup text {\\n fill: \").concat(options.textColor, \";\\n stroke: none;\\n font-size: 10px;\\n\\n}\\ng.stateGroup .state-title {\\n font-weight: bolder;\\n fill: \").concat(options.labelColor, \";\\n}\\n\\ng.stateGroup rect {\\n fill: \").concat(options.mainBkg, \";\\n stroke: \").concat(options.nodeBorder, \";\\n}\\n\\ng.stateGroup line {\\n stroke: \").concat(options.lineColor, \";\\n stroke-width: 1;\\n}\\n\\n.transition {\\n stroke: \").concat(options.lineColor, \";\\n stroke-width: 1;\\n fill: none;\\n}\\n\\n.stateGroup .composit {\\n fill: \").concat(options.background, \";\\n border-bottom: 1px\\n}\\n\\n.stateGroup .alt-composit {\\n fill: #e0e0e0;\\n border-bottom: 1px\\n}\\n\\n.state-note {\\n stroke: \").concat(options.noteBorderColor, \";\\n fill: \").concat(options.noteBkgColor, \";\\n\\n text {\\n fill: black;\\n stroke: none;\\n font-size: 10px;\\n }\\n}\\n\\n.stateLabel .box {\\n stroke: none;\\n stroke-width: 0;\\n fill: \").concat(options.mainBkg, \";\\n opacity: 0.5;\\n}\\n\\n.edgeLabel .label rect {\\n fill: \").concat(options.tertiaryColor, \";\\n opacity: 0.5;\\n}\\n.edgeLabel .label text {\\n fill: \").concat(options.tertiaryTextColor, \";\\n}\\n.label div .edgeLabel {\\n color: \").concat(options.tertiaryTextColor, \";\\n}\\n\\n.stateLabel text {\\n fill: \").concat(options.labelColor, \";\\n font-size: 10px;\\n font-weight: bold;\\n}\\n\\n.node circle.state-start {\\n fill: \").concat(options.lineColor, \";\\n stroke: black;\\n}\\n.node circle.state-end {\\n fill: \").concat(options.primaryBorderColor, \";\\n stroke: \").concat(options.background, \";\\n stroke-width: 1.5\\n}\\n.end-state-inner {\\n fill: \").concat(options.background, \";\\n // stroke: \").concat(options.background, \";\\n stroke-width: 1.5\\n}\\n\\n.node rect {\\n fill: \").concat(options.mainBkg, \";\\n stroke: \").concat(options.nodeBorder, \";\\n stroke-width: 1px;\\n}\\n#statediagram-barbEnd {\\n fill: \").concat(options.lineColor, \";\\n}\\n\\n.statediagram-cluster rect {\\n fill: \").concat(options.mainBkg, \";\\n stroke: \").concat(options.nodeBorder, \";\\n stroke-width: 1px;\\n}\\n\\n.cluster-label, .nodeLabel {\\n color: \").concat(options.textColor, \";\\n}\\n\\n.statediagram-cluster rect.outer {\\n rx: 5px;\\n ry: 5px;\\n}\\n.statediagram-state .divider {\\n stroke: \").concat(options.nodeBorder, \";\\n}\\n\\n.statediagram-state .title-state {\\n rx: 5px;\\n ry: 5px;\\n}\\n.statediagram-cluster.statediagram-cluster .inner {\\n fill: \").concat(options.background, \";\\n}\\n.statediagram-cluster.statediagram-cluster-alt .inner {\\n fill: #e0e0e0;\\n}\\n\\n.statediagram-cluster .inner {\\n rx:0;\\n ry:0;\\n}\\n\\n.statediagram-state rect.basic {\\n rx: 5px;\\n ry: 5px;\\n}\\n.statediagram-state rect.divider {\\n stroke-dasharray: 10,10;\\n fill: \").concat(options.altBackground ? options.altBackground : '#efefef', \";\\n}\\n\\n.note-edge {\\n stroke-dasharray: 5;\\n}\\n\\n.statediagram-note rect {\\n fill: \").concat(options.noteBkgColor, \";\\n stroke: \").concat(options.noteBorderColor, \";\\n stroke-width: 1px;\\n rx: 0;\\n ry: 0;\\n}\\n.statediagram-note rect {\\n fill: \").concat(options.noteBkgColor, \";\\n stroke: \").concat(options.noteBorderColor, \";\\n stroke-width: 1px;\\n rx: 0;\\n ry: 0;\\n}\\n\\n.statediagram-note text {\\n fill: \").concat(options.noteTextColor, \";\\n}\\n\\n.statediagram-note .nodeLabel {\\n color: \").concat(options.noteTextColor, \";\\n}\\n\\n#dependencyStart, #dependencyEnd {\\n fill: \").concat(options.lineColor, \";\\n stroke: \").concat(options.lineColor, \";\\n stroke-width: 1;\\n}\\n\");\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = getStyles;\n /***/\n },\n\n /***/\n \"./src/diagrams/user-journey/journeyDb.js\":\n /*!************************************************!*\\\n !*** ./src/diagrams/user-journey/journeyDb.js ***!\n \\************************************************/\n\n /*! exports provided: parseDirective, clear, setTitle, getTitle, addSection, getSections, getTasks, addTask, addTaskOrg, default */\n\n /***/\n function srcDiagramsUserJourneyJourneyDbJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"parseDirective\", function () {\n return parseDirective;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"clear\", function () {\n return clear;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setTitle\", function () {\n return setTitle;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getTitle\", function () {\n return getTitle;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addSection\", function () {\n return addSection;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getSections\", function () {\n return getSections;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getTasks\", function () {\n return getTasks;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addTask\", function () {\n return addTask;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"addTaskOrg\", function () {\n return addTaskOrg;\n });\n /* harmony import */\n\n\n var _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ../../mermaidAPI */\n \"./src/mermaidAPI.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ../../config */\n \"./src/config.js\");\n\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n }\n\n function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }\n\n function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n }\n\n var title = '';\n var currentSection = '';\n var sections = [];\n var tasks = [];\n var rawTasks = [];\n\n var parseDirective = function parseDirective(statement, context, type) {\n _mermaidAPI__WEBPACK_IMPORTED_MODULE_0__[\"default\"].parseDirective(this, statement, context, type);\n };\n\n var clear = function clear() {\n sections.length = 0;\n tasks.length = 0;\n currentSection = '';\n title = '';\n rawTasks.length = 0;\n };\n\n var setTitle = function setTitle(txt) {\n title = txt;\n };\n\n var getTitle = function getTitle() {\n return title;\n };\n\n var addSection = function addSection(txt) {\n currentSection = txt;\n sections.push(txt);\n };\n\n var getSections = function getSections() {\n return sections;\n };\n\n var getTasks = function getTasks() {\n var allItemsProcessed = compileTasks();\n var maxDepth = 100;\n var iterationCount = 0;\n\n while (!allItemsProcessed && iterationCount < maxDepth) {\n allItemsProcessed = compileTasks();\n iterationCount++;\n }\n\n tasks.push.apply(tasks, rawTasks);\n return tasks;\n };\n\n var updateActors = function updateActors() {\n var tempActors = [];\n tasks.forEach(function (task) {\n if (task.people) {\n tempActors.push.apply(tempActors, _toConsumableArray(task.people));\n }\n });\n var unique = new Set(tempActors);\n return _toConsumableArray(unique).sort();\n };\n\n var addTask = function addTask(descr, taskData) {\n var pieces = taskData.substr(1).split(':');\n var score = 0;\n var peeps = [];\n\n if (pieces.length === 1) {\n score = Number(pieces[0]);\n peeps = [];\n } else {\n score = Number(pieces[0]);\n peeps = pieces[1].split(',');\n }\n\n var peopleList = peeps.map(function (s) {\n return s.trim();\n });\n var rawTask = {\n section: currentSection,\n type: currentSection,\n people: peopleList,\n task: descr,\n score: score\n };\n rawTasks.push(rawTask);\n };\n\n var addTaskOrg = function addTaskOrg(descr) {\n var newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: []\n };\n tasks.push(newTask);\n };\n\n var compileTasks = function compileTasks() {\n var compileTask = function compileTask(pos) {\n return rawTasks[pos].processed;\n };\n\n var allProcessed = true;\n\n for (var i = 0; i < rawTasks.length; i++) {\n compileTask(i);\n allProcessed = allProcessed && rawTasks[i].processed;\n }\n\n return allProcessed;\n };\n\n var getActors = function getActors() {\n return updateActors();\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n parseDirective: parseDirective,\n getConfig: function getConfig() {\n return _config__WEBPACK_IMPORTED_MODULE_1__[\"getConfig\"]().journey;\n },\n clear: clear,\n setTitle: setTitle,\n getTitle: getTitle,\n addSection: addSection,\n getSections: getSections,\n getTasks: getTasks,\n addTask: addTask,\n addTaskOrg: addTaskOrg,\n getActors: getActors\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/user-journey/journeyRenderer.js\":\n /*!******************************************************!*\\\n !*** ./src/diagrams/user-journey/journeyRenderer.js ***!\n \\******************************************************/\n\n /*! exports provided: setConf, draw, bounds, drawTasks, default */\n\n /***/\n function srcDiagramsUserJourneyJourneyRendererJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"bounds\", function () {\n return bounds;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawTasks\", function () {\n return drawTasks;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _parser_journey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./parser/journey */\n \"./src/diagrams/user-journey/parser/journey.jison\");\n /* harmony import */\n\n\n var _parser_journey__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_parser_journey__WEBPACK_IMPORTED_MODULE_1__);\n /* harmony import */\n\n\n var _journeyDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./journeyDb */\n \"./src/diagrams/user-journey/journeyDb.js\");\n /* harmony import */\n\n\n var _svgDraw__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./svgDraw */\n \"./src/diagrams/user-journey/svgDraw.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ../../utils */\n \"./src/utils.js\");\n\n _parser_journey__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy = _journeyDb__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n var conf = {\n leftMargin: 150,\n diagramMarginX: 50,\n diagramMarginY: 20,\n // Margin between tasks\n taskMargin: 50,\n // Width of task boxes\n width: 150,\n // Height of task boxes\n height: 50,\n taskFontSize: 14,\n taskFontFamily: '\"Open-Sans\", \"sans-serif\"',\n // Margin around loop boxes\n boxMargin: 10,\n boxTextMargin: 5,\n noteMargin: 10,\n // Space between messages\n messageMargin: 35,\n // Multiline message alignment\n messageAlign: 'center',\n // Depending on css styling this might need adjustment\n // Projects the edge of the diagram downwards\n bottomMarginAdj: 1,\n // width of activation box\n activationWidth: 10,\n // text placement as: tspan | fo | old only text as before\n textPlacement: 'fo',\n actorColours: ['#8FBC8F', '#7CFC00', '#00FFFF', '#20B2AA', '#B0E0E6', '#FFFFE0'],\n sectionFills: ['#191970', '#8B008B', '#4B0082', '#2F4F4F', '#800000', '#8B4513', '#00008B'],\n sectionColours: ['#fff']\n };\n\n var setConf = function setConf(cnf) {\n var keys = Object.keys(cnf);\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n };\n\n var actors = {};\n\n function drawActorLegend(diagram) {\n // Draw the actors\n var yPos = 60;\n Object.keys(actors).forEach(function (person) {\n var colour = actors[person];\n var circleData = {\n cx: 20,\n cy: yPos,\n r: 7,\n fill: colour,\n stroke: '#000'\n };\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_3__[\"default\"].drawCircle(diagram, circleData);\n\n var labelData = {\n x: 40,\n y: yPos + 7,\n fill: '#666',\n text: person,\n textMargin: conf.boxTextMargin | 5\n };\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_3__[\"default\"].drawText(diagram, labelData);\n\n yPos += 20;\n });\n }\n\n var LEFT_MARGIN = conf.leftMargin;\n\n var draw = function draw(text, id) {\n _parser_journey__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.clear();\n\n _parser_journey__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].parse(text + '\\n');\n\n bounds.init();\n var diagram = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + id);\n diagram.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_3__[\"default\"].initGraphics(diagram);\n\n var tasks = _parser_journey__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.getTasks();\n\n var title = _parser_journey__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.getTitle();\n\n var actorNames = _parser_journey__WEBPACK_IMPORTED_MODULE_1__[\"parser\"].yy.getActors();\n\n for (var member in actors) {\n delete actors[member];\n }\n\n var actorPos = 0;\n actorNames.forEach(function (actorName) {\n actors[actorName] = conf.actorColours[actorPos % conf.actorColours.length];\n actorPos++;\n });\n drawActorLegend(diagram);\n bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);\n drawTasks(diagram, tasks, 0);\n var box = bounds.getBounds();\n\n if (title) {\n diagram.append('text').text(title).attr('x', LEFT_MARGIN).attr('font-size', '4ex').attr('font-weight', 'bold').attr('y', 25);\n }\n\n var height = box.stopy - box.starty + 2 * conf.diagramMarginY;\n var width = LEFT_MARGIN + box.stopx + 2 * conf.diagramMarginX;\n Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"configureSvgSize\"])(diagram, height, width, conf.useMaxWidth); // Draw activity line\n\n diagram.append('line').attr('x1', LEFT_MARGIN).attr('y1', conf.height * 4) // One section head + one task + margins\n .attr('x2', width - LEFT_MARGIN - 4) // Subtract stroke width so arrow point is retained\n .attr('y2', conf.height * 4).attr('stroke-width', 4).attr('stroke', 'black').attr('marker-end', 'url(#arrowhead)');\n var extraVertForTitle = title ? 70 : 0;\n diagram.attr('viewBox', \"\".concat(box.startx, \" -25 \").concat(width, \" \").concat(height + extraVertForTitle));\n diagram.attr('preserveAspectRatio', 'xMinYMin meet');\n };\n\n var bounds = {\n data: {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined\n },\n verticalPos: 0,\n sequenceItems: [],\n init: function init() {\n this.sequenceItems = [];\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined\n };\n this.verticalPos = 0;\n },\n updateVal: function updateVal(obj, key, val, fun) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n },\n updateBounds: function updateBounds(startx, starty, stopx, stopy) {\n var _self = this;\n\n var cnt = 0;\n\n function updateFn(type) {\n return function updateItemBounds(item) {\n cnt++; // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems\n\n var n = _self.sequenceItems.length - cnt + 1;\n\n _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);\n\n _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);\n\n _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n if (!(type === 'activation')) {\n _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);\n\n _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);\n\n _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);\n }\n };\n }\n\n this.sequenceItems.forEach(updateFn());\n },\n insert: function insert(startx, starty, stopx, stopy) {\n var _startx = Math.min(startx, stopx);\n\n var _stopx = Math.max(startx, stopx);\n\n var _starty = Math.min(starty, stopy);\n\n var _stopy = Math.max(starty, stopy);\n\n this.updateVal(bounds.data, 'startx', _startx, Math.min);\n this.updateVal(bounds.data, 'starty', _starty, Math.min);\n this.updateVal(bounds.data, 'stopx', _stopx, Math.max);\n this.updateVal(bounds.data, 'stopy', _stopy, Math.max);\n this.updateBounds(_startx, _starty, _stopx, _stopy);\n },\n bumpVerticalPos: function bumpVerticalPos(bump) {\n this.verticalPos = this.verticalPos + bump;\n this.data.stopy = this.verticalPos;\n },\n getVerticalPos: function getVerticalPos() {\n return this.verticalPos;\n },\n getBounds: function getBounds() {\n return this.data;\n }\n };\n var fills = conf.sectionFills;\n var textColours = conf.sectionColours;\n\n var drawTasks = function drawTasks(diagram, tasks, verticalPos) {\n var lastSection = '';\n var sectionVHeight = conf.height * 2 + conf.diagramMarginY;\n var taskPos = verticalPos + sectionVHeight;\n var sectionNumber = 0;\n var fill = '#CCC';\n var colour = 'black';\n var num = 0; // Draw the tasks\n\n for (var i = 0; i < tasks.length; i++) {\n var task = tasks[i];\n\n if (lastSection !== task.section) {\n fill = fills[sectionNumber % fills.length];\n num = sectionNumber % fills.length;\n colour = textColours[sectionNumber % textColours.length];\n var section = {\n x: i * conf.taskMargin + i * conf.width + LEFT_MARGIN,\n y: 50,\n text: task.section,\n fill: fill,\n num: num,\n colour: colour\n };\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_3__[\"default\"].drawSection(diagram, section, conf);\n\n lastSection = task.section;\n sectionNumber++;\n } // Collect the actors involved in the task\n\n\n var taskActors = task.people.reduce(function (acc, actorName) {\n if (actors[actorName]) {\n acc[actorName] = actors[actorName];\n }\n\n return acc;\n }, {}); // Add some rendering data to the object\n\n task.x = i * conf.taskMargin + i * conf.width + LEFT_MARGIN;\n task.y = taskPos;\n task.width = conf.diagramMarginX;\n task.height = conf.diagramMarginY;\n task.colour = colour;\n task.fill = fill;\n task.num = num;\n task.actors = taskActors; // Draw the box with the attached line\n\n _svgDraw__WEBPACK_IMPORTED_MODULE_3__[\"default\"].drawTask(diagram, task, conf);\n\n bounds.insert(task.x, task.y, task.x + task.width + conf.taskMargin, 300 + 5 * 30); // stopy is the length of the descenders.\n }\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setConf: setConf,\n draw: draw\n };\n /***/\n },\n\n /***/\n \"./src/diagrams/user-journey/parser/journey.jison\":\n /*!********************************************************!*\\\n !*** ./src/diagrams/user-journey/parser/journey.jison ***!\n \\********************************************************/\n\n /*! no static exports found */\n\n /***/\n function srcDiagramsUserJourneyParserJourneyJison(module, exports, __webpack_require__) {\n /* WEBPACK VAR INJECTION */\n (function (process, module) {\n /* parser generated by jison 0.4.18 */\n\n /*\n Returns a Parser object of the following structure:\n \n Parser: {\n yy: {}\n }\n \n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n \n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n \n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n \n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n \n \n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n \n \n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n */\n var parser = function () {\n var o = function o(k, v, _o10, l) {\n for (_o10 = _o10 || {}, l = k.length; l--; _o10[k[l]] = v) {\n ;\n }\n\n return _o10;\n },\n $V0 = [1, 2],\n $V1 = [1, 5],\n $V2 = [6, 9, 11, 17, 18, 19, 21],\n $V3 = [1, 15],\n $V4 = [1, 16],\n $V5 = [1, 17],\n $V6 = [1, 21],\n $V7 = [4, 6, 9, 11, 17, 18, 19, 21];\n\n var parser = {\n trace: function trace() {},\n yy: {},\n symbols_: {\n \"error\": 2,\n \"start\": 3,\n \"journey\": 4,\n \"document\": 5,\n \"EOF\": 6,\n \"directive\": 7,\n \"line\": 8,\n \"SPACE\": 9,\n \"statement\": 10,\n \"NEWLINE\": 11,\n \"openDirective\": 12,\n \"typeDirective\": 13,\n \"closeDirective\": 14,\n \":\": 15,\n \"argDirective\": 16,\n \"title\": 17,\n \"section\": 18,\n \"taskName\": 19,\n \"taskData\": 20,\n \"open_directive\": 21,\n \"type_directive\": 22,\n \"arg_directive\": 23,\n \"close_directive\": 24,\n \"$accept\": 0,\n \"$end\": 1\n },\n terminals_: {\n 2: \"error\",\n 4: \"journey\",\n 6: \"EOF\",\n 9: \"SPACE\",\n 11: \"NEWLINE\",\n 15: \":\",\n 17: \"title\",\n 18: \"section\",\n 19: \"taskName\",\n 20: \"taskData\",\n 21: \"open_directive\",\n 22: \"type_directive\",\n 23: \"arg_directive\",\n 24: \"close_directive\"\n },\n productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 1], [10, 2], [10, 1], [12, 1], [13, 1], [16, 1], [14, 1]],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate\n /* action[1] */\n , $$\n /* vstack */\n , _$\n /* lstack */\n ) {\n /* this == yyval */\n var $0 = $$.length - 1;\n\n switch (yystate) {\n case 1:\n return $$[$0 - 1];\n break;\n\n case 3:\n this.$ = [];\n break;\n\n case 4:\n $$[$0 - 1].push($$[$0]);\n this.$ = $$[$0 - 1];\n break;\n\n case 5:\n case 6:\n this.$ = $$[$0];\n break;\n\n case 7:\n case 8:\n this.$ = [];\n break;\n\n case 11:\n yy.setTitle($$[$0].substr(6));\n this.$ = $$[$0].substr(6);\n break;\n\n case 12:\n yy.addSection($$[$0].substr(8));\n this.$ = $$[$0].substr(8);\n break;\n\n case 13:\n yy.addTask($$[$0 - 1], $$[$0]);\n this.$ = 'task';\n break;\n\n case 15:\n yy.parseDirective('%%{', 'open_directive');\n break;\n\n case 16:\n yy.parseDirective($$[$0], 'type_directive');\n break;\n\n case 17:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"');\n yy.parseDirective($$[$0], 'arg_directive');\n break;\n\n case 18:\n yy.parseDirective('}%%', 'close_directive', 'journey');\n break;\n }\n },\n table: [{\n 3: 1,\n 4: $V0,\n 7: 3,\n 12: 4,\n 21: $V1\n }, {\n 1: [3]\n }, o($V2, [2, 3], {\n 5: 6\n }), {\n 3: 7,\n 4: $V0,\n 7: 3,\n 12: 4,\n 21: $V1\n }, {\n 13: 8,\n 22: [1, 9]\n }, {\n 22: [2, 15]\n }, {\n 6: [1, 10],\n 7: 18,\n 8: 11,\n 9: [1, 12],\n 10: 13,\n 11: [1, 14],\n 12: 4,\n 17: $V3,\n 18: $V4,\n 19: $V5,\n 21: $V1\n }, {\n 1: [2, 2]\n }, {\n 14: 19,\n 15: [1, 20],\n 24: $V6\n }, o([15, 24], [2, 16]), o($V2, [2, 8], {\n 1: [2, 1]\n }), o($V2, [2, 4]), {\n 7: 18,\n 10: 22,\n 12: 4,\n 17: $V3,\n 18: $V4,\n 19: $V5,\n 21: $V1\n }, o($V2, [2, 6]), o($V2, [2, 7]), o($V2, [2, 11]), o($V2, [2, 12]), {\n 20: [1, 23]\n }, o($V2, [2, 14]), {\n 11: [1, 24]\n }, {\n 16: 25,\n 23: [1, 26]\n }, {\n 11: [2, 18]\n }, o($V2, [2, 5]), o($V2, [2, 13]), o($V7, [2, 9]), {\n 14: 27,\n 24: $V6\n }, {\n 24: [2, 17]\n }, {\n 11: [1, 28]\n }, o($V7, [2, 10])],\n defaultActions: {\n 5: [2, 15],\n 7: [2, 2],\n 21: [2, 18],\n 26: [2, 17]\n },\n parseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n },\n parse: function parse(input) {\n var self = this,\n stack = [0],\n tstack = [],\n vstack = [null],\n lstack = [],\n table = this.table,\n yytext = '',\n yylineno = 0,\n yyleng = 0,\n recovering = 0,\n TERROR = 2,\n EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = {\n yy: {}\n };\n\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n\n token = self.symbols_[token] || token;\n }\n\n return token;\n }\n\n var symbol,\n preErrorSymbol,\n state,\n action,\n a,\n r,\n yyval = {},\n p,\n len,\n newState,\n expected;\n\n while (true) {\n state = stack[stack.length - 1];\n\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n\n action = table[state] && table[state][symbol];\n }\n\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n\n break;\n\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n\n if (ranges) {\n yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n }\n\n r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));\n\n if (typeof r !== 'undefined') {\n return r;\n }\n\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n\n case 3:\n return true;\n }\n }\n\n return true;\n }\n };\n /* generated by jison-lex 0.3.4 */\n\n var lexer = function () {\n var lexer = {\n EOF: 1,\n parseError: function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n // resets the lexer, sets new input\n setInput: function setInput(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n\n this.offset = 0;\n return this;\n },\n // consumes and returns one char from the input\n input: function input() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n // unshifts one char (or a string) into the input\n unput: function unput(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;\n\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n\n this.yyleng = this.yytext.length;\n return this;\n },\n // When called from action, caches matched text and appends it on next action\n more: function more() {\n this._more = true;\n return this;\n },\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: function reject() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n\n return this;\n },\n // retain first n characters of the match\n less: function less(n) {\n this.unput(this.match.slice(n));\n },\n // displays already matched input, i.e. for error messages\n pastInput: function pastInput() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\\n/g, \"\");\n },\n // displays upcoming input, i.e. for error messages\n upcomingInput: function upcomingInput() {\n var next = this.match;\n\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n\n return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: function showPosition() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: function test_match(match, indexed_rule) {\n var token, lines, backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n\n if (lines) {\n this.yylineno += lines.length;\n }\n\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n\n if (this.done && this._input) {\n this.done = false;\n }\n\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n\n return false;\n },\n // return next match in input\n next: function next() {\n if (this.done) {\n return this.EOF;\n }\n\n if (!this._input) {\n this.done = true;\n }\n\n var token, match, tempMatch, index;\n\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n\n var rules = this._currentRules();\n\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n\n if (match) {\n token = this.test_match(match, rules[index]);\n\n if (token !== false) {\n return token;\n } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n\n\n return false;\n }\n\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n // return next match that has a token\n lex: function lex() {\n var r = this.next();\n\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: function begin(condition) {\n this.conditionStack.push(condition);\n },\n // pop the previously active lexer condition state off the condition stack\n popState: function popState() {\n var n = this.conditionStack.length - 1;\n\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n // alias for begin(condition)\n pushState: function pushState(condition) {\n this.begin(condition);\n },\n // return the number of states currently on the stack\n stateStackSize: function stateStackSize() {\n return this.conditionStack.length;\n },\n options: {\n \"case-insensitive\": true\n },\n performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n\n switch ($avoiding_name_collisions) {\n case 0:\n this.begin('open_directive');\n return 21;\n break;\n\n case 1:\n this.begin('type_directive');\n return 22;\n break;\n\n case 2:\n this.popState();\n this.begin('arg_directive');\n return 15;\n break;\n\n case 3:\n this.popState();\n this.popState();\n return 24;\n break;\n\n case 4:\n return 23;\n break;\n\n case 5:\n /* skip comments */\n break;\n\n case 6:\n /* skip comments */\n break;\n\n case 7:\n return 11;\n break;\n\n case 8:\n /* skip whitespace */\n break;\n\n case 9:\n /* skip comments */\n break;\n\n case 10:\n return 4;\n break;\n\n case 11:\n return 17;\n break;\n\n case 12:\n return 18;\n break;\n\n case 13:\n return 19;\n break;\n\n case 14:\n return 20;\n break;\n\n case 15:\n return 15;\n break;\n\n case 16:\n return 6;\n break;\n\n case 17:\n return 'INVALID';\n break;\n }\n },\n rules: [/^(?:%%\\{)/i, /^(?:((?:(?!\\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\\}%%)/i, /^(?:((?:(?!\\}%%).|\\n)*))/i, /^(?:%(?!\\{)[^\\n]*)/i, /^(?:[^\\}]%%[^\\n]*)/i, /^(?:[\\n]+)/i, /^(?:\\s+)/i, /^(?:#[^\\n]*)/i, /^(?:journey\\b)/i, /^(?:title\\s[^#\\n;]+)/i, /^(?:section\\s[^#:\\n;]+)/i, /^(?:[^#:\\n;]+)/i, /^(?::[^#\\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],\n conditions: {\n \"open_directive\": {\n \"rules\": [1],\n \"inclusive\": false\n },\n \"type_directive\": {\n \"rules\": [2, 3],\n \"inclusive\": false\n },\n \"arg_directive\": {\n \"rules\": [3, 4],\n \"inclusive\": false\n },\n \"INITIAL\": {\n \"rules\": [0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17],\n \"inclusive\": true\n }\n }\n };\n return lexer;\n }();\n\n parser.lexer = lexer;\n\n function Parser() {\n this.yy = {};\n }\n\n Parser.prototype = parser;\n parser.Parser = Parser;\n return new Parser();\n }();\n\n if (true) {\n exports.parser = parser;\n exports.Parser = parser.Parser;\n\n exports.parse = function () {\n return parser.parse.apply(parser, arguments);\n };\n\n exports.main = function commonjsMain(args) {\n if (!args[1]) {\n console.log('Usage: ' + args[0] + ' FILE');\n process.exit(1);\n }\n\n var source = __webpack_require__(\n /*! fs */\n \"./node_modules/node-libs-browser/mock/empty.js\").readFileSync(__webpack_require__(\n /*! path */\n \"./node_modules/path-browserify/index.js\").normalize(args[1]), \"utf8\");\n\n return exports.parser.parse(source);\n };\n\n if (true && __webpack_require__.c[__webpack_require__.s] === module) {\n exports.main(process.argv.slice(1));\n }\n }\n /* WEBPACK VAR INJECTION */\n\n }).call(this, __webpack_require__(\n /*! ./../../../../node_modules/process/browser.js */\n \"./node_modules/process/browser.js\"), __webpack_require__(\n /*! ./../../../../node_modules/webpack/buildin/module.js */\n \"./node_modules/webpack/buildin/module.js\")(module));\n /***/\n },\n\n /***/\n \"./src/diagrams/user-journey/styles.js\":\n /*!*********************************************!*\\\n !*** ./src/diagrams/user-journey/styles.js ***!\n \\*********************************************/\n\n /*! exports provided: default */\n\n /***/\n function srcDiagramsUserJourneyStylesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n\n var getStyles = function getStyles(options) {\n return \".label {\\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n font-family: var(--mermaid-font-family);\\n color: \".concat(options.textColor, \";\\n }\\n .mouth {\\n stroke: #666;\\n }\\n\\n line {\\n stroke: \").concat(options.textColor, \"\\n }\\n\\n .legend {\\n fill: \").concat(options.textColor, \";\\n }\\n\\n .label text {\\n fill: #333;\\n }\\n .label {\\n color: \").concat(options.textColor, \"\\n }\\n\\n .face {\\n fill: #FFF8DC;\\n stroke: #999;\\n }\\n\\n .node rect,\\n .node circle,\\n .node ellipse,\\n .node polygon,\\n .node path {\\n fill: \").concat(options.mainBkg, \";\\n stroke: \").concat(options.nodeBorder, \";\\n stroke-width: 1px;\\n }\\n\\n .node .label {\\n text-align: center;\\n }\\n .node.clickable {\\n cursor: pointer;\\n }\\n\\n .arrowheadPath {\\n fill: \").concat(options.arrowheadColor, \";\\n }\\n\\n .edgePath .path {\\n stroke: \").concat(options.lineColor, \";\\n stroke-width: 1.5px;\\n }\\n\\n .flowchart-link {\\n stroke: \").concat(options.lineColor, \";\\n fill: none;\\n }\\n\\n .edgeLabel {\\n background-color: \").concat(options.edgeLabelBackground, \";\\n rect {\\n opacity: 0.5;\\n }\\n text-align: center;\\n }\\n\\n .cluster rect {\\n }\\n\\n .cluster text {\\n fill: \").concat(options.titleColor, \";\\n }\\n\\n div.mermaidTooltip {\\n position: absolute;\\n text-align: center;\\n max-width: 200px;\\n padding: 2px;\\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\\n font-family: var(--mermaid-font-family);\\n font-size: 12px;\\n background: \").concat(options.tertiaryColor, \";\\n border: 1px solid \").concat(options.border2, \";\\n border-radius: 2px;\\n pointer-events: none;\\n z-index: 100;\\n }\\n\\n .task-type-0, .section-type-0 {\\n \").concat(options.fillType0 ? \"fill: \".concat(options.fillType0) : '', \";\\n }\\n .task-type-1, .section-type-1 {\\n \").concat(options.fillType0 ? \"fill: \".concat(options.fillType1) : '', \";\\n }\\n .task-type-2, .section-type-2 {\\n \").concat(options.fillType0 ? \"fill: \".concat(options.fillType2) : '', \";\\n }\\n .task-type-3, .section-type-3 {\\n \").concat(options.fillType0 ? \"fill: \".concat(options.fillType3) : '', \";\\n }\\n .task-type-4, .section-type-4 {\\n \").concat(options.fillType0 ? \"fill: \".concat(options.fillType4) : '', \";\\n }\\n .task-type-5, .section-type-5 {\\n \").concat(options.fillType0 ? \"fill: \".concat(options.fillType5) : '', \";\\n }\\n .task-type-6, .section-type-6 {\\n \").concat(options.fillType0 ? \"fill: \".concat(options.fillType6) : '', \";\\n }\\n .task-type-7, .section-type-7 {\\n \").concat(options.fillType0 ? \"fill: \".concat(options.fillType7) : '', \";\\n }\\n\");\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = getStyles;\n /***/\n },\n\n /***/\n \"./src/diagrams/user-journey/svgDraw.js\":\n /*!**********************************************!*\\\n !*** ./src/diagrams/user-journey/svgDraw.js ***!\n \\**********************************************/\n\n /*! exports provided: drawRect, drawFace, drawCircle, drawText, drawLabel, drawSection, drawTask, drawBackgroundRect, getTextObj, getNoteRect, default */\n\n /***/\n function srcDiagramsUserJourneySvgDrawJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawRect\", function () {\n return drawRect;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawFace\", function () {\n return drawFace;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawCircle\", function () {\n return drawCircle;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawText\", function () {\n return drawText;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawLabel\", function () {\n return drawLabel;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawSection\", function () {\n return drawSection;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawTask\", function () {\n return drawTask;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawBackgroundRect\", function () {\n return drawBackgroundRect;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getTextObj\", function () {\n return getTextObj;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getNoteRect\", function () {\n return getNoteRect;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n\n var drawRect = function drawRect(elem, rectData) {\n var rectElem = elem.append('rect');\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.y);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', rectData.width);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n\n if (typeof rectData[\"class\"] !== 'undefined') {\n rectElem.attr('class', rectData[\"class\"]);\n }\n\n return rectElem;\n };\n\n var drawFace = function drawFace(element, faceData) {\n var radius = 15;\n var circleElement = element.append('circle').attr('cx', faceData.cx).attr('cy', faceData.cy).attr('class', 'face').attr('r', radius).attr('stroke-width', 2).attr('overflow', 'visible');\n var face = element.append('g'); //left eye\n\n face.append('circle').attr('cx', faceData.cx - radius / 3).attr('cy', faceData.cy - radius / 3).attr('r', 1.5).attr('stroke-width', 2).attr('fill', '#666').attr('stroke', '#666'); //right eye\n\n face.append('circle').attr('cx', faceData.cx + radius / 3).attr('cy', faceData.cy - radius / 3).attr('r', 1.5).attr('stroke-width', 2).attr('fill', '#666').attr('stroke', '#666');\n\n function smile(face) {\n var arc = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"arc\"])().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); //mouth\n\n face.append('path').attr('class', 'mouth').attr('d', arc).attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 2) + ')');\n }\n\n function sad(face) {\n var arc = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"arc\"])().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); //mouth\n\n face.append('path').attr('class', 'mouth').attr('d', arc).attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 7) + ')');\n }\n\n function ambivalent(face) {\n face.append('line').attr('class', 'mouth').attr('stroke', 2).attr('x1', faceData.cx - 5).attr('y1', faceData.cy + 7).attr('x2', faceData.cx + 5).attr('y2', faceData.cy + 7).attr('class', 'mouth').attr('stroke-width', '1px').attr('stroke', '#666');\n }\n\n if (faceData.score > 3) {\n smile(face);\n } else if (faceData.score < 3) {\n sad(face);\n } else {\n ambivalent(face);\n }\n\n return circleElement;\n };\n\n var drawCircle = function drawCircle(element, circleData) {\n var circleElement = element.append('circle');\n circleElement.attr('cx', circleData.cx);\n circleElement.attr('cy', circleData.cy);\n circleElement.attr('fill', circleData.fill);\n circleElement.attr('stroke', circleData.stroke);\n circleElement.attr('r', circleData.r);\n\n if (typeof circleElement[\"class\"] !== 'undefined') {\n circleElement.attr('class', circleElement[\"class\"]);\n }\n\n if (typeof circleData.title !== 'undefined') {\n circleElement.append('title').text(circleData.title);\n }\n\n return circleElement;\n };\n\n var drawText = function drawText(elem, textData) {\n // Remove and ignore br:s\n var nText = textData.text.replace(/
/gi, ' ');\n var textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.attr('class', 'legend');\n textElem.style('text-anchor', textData.anchor);\n\n if (typeof textData[\"class\"] !== 'undefined') {\n textElem.attr('class', textData[\"class\"]);\n }\n\n var span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.text(nText);\n return textElem;\n };\n\n var drawLabel = function drawLabel(elem, txtObject) {\n function genPoints(x, y, width, height, cut) {\n return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height);\n }\n\n var polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));\n polygon.attr('class', 'labelBox');\n txtObject.y = txtObject.y + txtObject.labelMargin;\n txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;\n drawText(elem, txtObject);\n };\n\n var drawSection = function drawSection(elem, section, conf) {\n var g = elem.append('g');\n var rect = getNoteRect();\n rect.x = section.x;\n rect.y = section.y;\n rect.fill = section.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect[\"class\"] = 'journey-section section-type-' + section.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n _drawTextCandidateFunc(conf)(section.text, g, rect.x, rect.y, rect.width, rect.height, {\n \"class\": 'journey-section section-type-' + section.num\n }, conf, section.colour);\n };\n\n var taskCount = -1;\n /**\n * Draws an actor in the diagram with the attaced line\n * @param elem The HTML element\n * @param task The task to render\n * @param conf The global configuration\n */\n\n var drawTask = function drawTask(elem, task, conf) {\n var center = task.x + conf.width / 2;\n var g = elem.append('g');\n taskCount++;\n var maxHeight = 300 + 5 * 30;\n g.append('line').attr('id', 'task' + taskCount).attr('x1', center).attr('y1', task.y).attr('x2', center).attr('y2', maxHeight).attr('class', 'task-line').attr('stroke-width', '1px').attr('stroke-dasharray', '4 2').attr('stroke', '#666');\n drawFace(g, {\n cx: center,\n cy: 300 + (5 - task.score) * 30,\n score: task.score\n });\n var rect = getNoteRect();\n rect.x = task.x;\n rect.y = task.y;\n rect.fill = task.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect[\"class\"] = 'task task-type-' + task.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n var xPos = task.x + 14;\n task.people.forEach(function (person) {\n var colour = task.actors[person];\n var circle = {\n cx: xPos,\n cy: task.y,\n r: 7,\n fill: colour,\n stroke: '#000',\n title: person\n };\n drawCircle(g, circle);\n xPos += 10;\n });\n\n _drawTextCandidateFunc(conf)(task.task, g, rect.x, rect.y, rect.width, rect.height, {\n \"class\": 'task'\n }, conf, task.colour);\n };\n /**\n * Draws a background rectangle\n * @param elem The html element\n * @param bounds The bounds of the drawing\n */\n\n\n var drawBackgroundRect = function drawBackgroundRect(elem, bounds) {\n var rectElem = drawRect(elem, {\n x: bounds.startx,\n y: bounds.starty,\n width: bounds.stopx - bounds.startx,\n height: bounds.stopy - bounds.starty,\n fill: bounds.fill,\n \"class\": 'rect'\n });\n rectElem.lower();\n };\n\n var getTextObj = function getTextObj() {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n 'text-anchor': 'start',\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0\n };\n };\n\n var getNoteRect = function getNoteRect() {\n return {\n x: 0,\n y: 0,\n width: 100,\n anchor: 'start',\n height: 100,\n rx: 0,\n ry: 0\n };\n };\n\n var _drawTextCandidateFunc = function () {\n function byText(content, g, x, y, width, height, textAttrs, colour) {\n var text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('font-color', colour).style('text-anchor', 'middle').text(content);\n\n _setTextAttrs(text, textAttrs);\n }\n\n function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) {\n var taskFontSize = conf.taskFontSize,\n taskFontFamily = conf.taskFontFamily;\n var lines = content.split(/
/gi);\n\n for (var i = 0; i < lines.length; i++) {\n var dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;\n var text = g.append('text').attr('x', x + width / 2).attr('y', y).attr('fill', colour).style('text-anchor', 'middle').style('font-size', taskFontSize).style('font-family', taskFontFamily);\n text.append('tspan').attr('x', x + width / 2).attr('dy', dy).text(lines[i]);\n text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n var body = g.append('switch');\n var f = body.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height).attr('position', 'fixed');\n var text = f.append('div').style('display', 'table').style('height', '100%').style('width', '100%');\n text.append('div').attr('class', 'label').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle') // .style('color', colour)\n .text(content);\n byTspan(content, body, x, y, width, height, textAttrs, conf);\n\n _setTextAttrs(text, textAttrs);\n }\n\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (var key in fromTextAttrsDict) {\n if (key in fromTextAttrsDict) {\n // eslint-disable-line\n // noinspection JSUnfilteredForInLoop\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n }();\n\n var initGraphics = function initGraphics(graphics) {\n graphics.append('defs').append('marker').attr('id', 'arrowhead').attr('refX', 5).attr('refY', 2).attr('markerWidth', 6).attr('markerHeight', 4).attr('orient', 'auto').append('path').attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n drawRect: drawRect,\n drawCircle: drawCircle,\n drawSection: drawSection,\n drawText: drawText,\n drawLabel: drawLabel,\n drawTask: drawTask,\n drawBackgroundRect: drawBackgroundRect,\n getTextObj: getTextObj,\n getNoteRect: getNoteRect,\n initGraphics: initGraphics\n };\n /***/\n },\n\n /***/\n \"./src/errorRenderer.js\":\n /*!******************************!*\\\n !*** ./src/errorRenderer.js ***!\n \\******************************/\n\n /*! exports provided: setConf, draw, default */\n\n /***/\n function srcErrorRendererJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setConf\", function () {\n return setConf;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"draw\", function () {\n return draw;\n });\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./logger */\n \"./src/logger.js\");\n /**\n * Created by knut on 14-12-11.\n */\n\n\n var conf = {};\n\n var setConf = function setConf(cnf) {\n var keys = Object.keys(cnf);\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n };\n /**\n * Draws a an info picture in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\n\n\n var draw = function draw(id, ver) {\n try {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].debug('Renering svg for syntax error\\n');\n\n var svg = Object(d3__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('#' + id);\n var g = svg.append('g');\n g.append('path').attr('class', 'error-icon').attr('d', 'm411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z');\n g.append('path').attr('class', 'error-icon').attr('d', 'm459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z');\n g.append('path').attr('class', 'error-icon').attr('d', 'm340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z');\n g.append('path').attr('class', 'error-icon').attr('d', 'm400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z');\n g.append('path').attr('class', 'error-icon').attr('d', 'm496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z');\n g.append('path').attr('class', 'error-icon').attr('d', 'm436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z');\n g.append('text') // text label for the x axis\n .attr('class', 'error-text').attr('x', 1240).attr('y', 250).attr('font-size', '150px').style('text-anchor', 'middle').text('Syntax error in graph');\n g.append('text') // text label for the x axis\n .attr('class', 'error-text').attr('x', 1050).attr('y', 400).attr('font-size', '100px').style('text-anchor', 'middle').text('mermaid version ' + ver);\n svg.attr('height', 100);\n svg.attr('width', 400);\n svg.attr('viewBox', '768 0 512 512');\n } catch (e) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].error('Error while rendering info diagram');\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].error(e.message);\n }\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n setConf: setConf,\n draw: draw\n };\n /***/\n },\n\n /***/\n \"./src/logger.js\":\n /*!***********************!*\\\n !*** ./src/logger.js ***!\n \\***********************/\n\n /*! exports provided: LEVELS, log, setLogLevel */\n\n /***/\n function srcLoggerJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"LEVELS\", function () {\n return LEVELS;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"log\", function () {\n return log;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"setLogLevel\", function () {\n return setLogLevel;\n });\n /* harmony import */\n\n\n var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! moment-mini */\n \"moment-mini\");\n /* harmony import */\n\n\n var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);\n\n var LEVELS = {\n debug: 1,\n info: 2,\n warn: 3,\n error: 4,\n fatal: 5\n };\n var log = {\n debug: function debug() {},\n info: function info() {},\n warn: function warn() {},\n error: function error() {},\n fatal: function fatal() {}\n };\n\n var setLogLevel = function setLogLevel() {\n var level = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'fatal';\n\n if (isNaN(level)) {\n level = level.toLowerCase();\n\n if (LEVELS[level] !== undefined) {\n level = LEVELS[level];\n }\n }\n\n log.trace = function () {};\n\n log.debug = function () {};\n\n log.info = function () {};\n\n log.warn = function () {};\n\n log.error = function () {};\n\n log.fatal = function () {};\n\n if (level <= LEVELS.fatal) {\n log.fatal = console.error ? console.error.bind(console, format('FATAL'), 'color: orange') : console.log.bind(console, '\\x1b[35m', format('FATAL'));\n }\n\n if (level <= LEVELS.error) {\n log.error = console.error ? console.error.bind(console, format('ERROR'), 'color: orange') : console.log.bind(console, '\\x1b[31m', format('ERROR'));\n }\n\n if (level <= LEVELS.warn) {\n log.warn = console.warn ? console.warn.bind(console, format('WARN'), 'color: orange') : console.log.bind(console, \"\\x1B[33m\", format('WARN'));\n }\n\n if (level <= LEVELS.info) {\n log.info = console.info // ? console.info.bind(console, '\\x1b[34m', format('INFO'), 'color: blue')\n ? console.info.bind(console, format('INFO'), 'color: lightblue') : console.log.bind(console, '\\x1b[34m', format('INFO'));\n }\n\n if (level <= LEVELS.debug) {\n log.debug = console.debug ? console.debug.bind(console, format('DEBUG'), 'color: lightgreen') : console.log.bind(console, '\\x1b[32m', format('DEBUG'));\n }\n };\n\n var format = function format(level) {\n var time = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()().format('ss.SSS');\n return \"%c\".concat(time, \" : \").concat(level, \" : \");\n };\n /***/\n\n },\n\n /***/\n \"./src/mermaid.js\":\n /*!************************!*\\\n !*** ./src/mermaid.js ***!\n \\************************/\n\n /*! exports provided: default */\n\n /***/\n function srcMermaidJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony import */\n\n\n var entity_decode_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! entity-decode/browser */\n \"entity-decode/browser\");\n /* harmony import */\n\n\n var entity_decode_browser__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(entity_decode_browser__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./mermaidAPI */\n \"./src/mermaidAPI.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./utils */\n \"./src/utils.js\");\n /**\n * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid functionality and to render\n * the diagrams to svg code.\n */\n // import { decode } from 'he';\n\n /**\n * ## init\n * Function that goes through the document to find the chart definitions in there and render them.\n *\n * The function tags the processed attributes with the attribute data-processed and ignores found elements with the\n * attribute already set. This way the init function can be triggered several times.\n *\n * Optionally, `init` can accept in the second argument one of the following:\n * - a DOM Node\n * - an array of DOM nodes (as would come from a jQuery selector)\n * - a W3C selector, a la `.mermaid`\n *\n * ```mermaid\n * graph LR;\n * a(Find elements)-->b{Processed}\n * b-->|Yes|c(Leave element)\n * b-->|No |d(Transform)\n * ```\n * Renders the mermaid diagrams\n * @param nodes a css selector or an array of nodes\n */\n\n\n var init = function init() {\n var _this = this;\n\n var conf = _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getConfig(); // console.log('Starting rendering diagrams (init) - mermaid.init', conf);\n\n\n var nodes;\n\n if (arguments.length >= 2) {\n /*! sequence config was passed as #1 */\n if (typeof arguments[0] !== 'undefined') {\n mermaid.sequenceConfig = arguments[0];\n }\n\n nodes = arguments[1];\n } else {\n nodes = arguments[0];\n } // if last argument is a function this is the callback function\n\n\n var callback;\n\n if (typeof arguments[arguments.length - 1] === 'function') {\n callback = arguments[arguments.length - 1];\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].debug('Callback function found');\n } else {\n if (typeof conf.mermaid !== 'undefined') {\n if (typeof conf.mermaid.callback === 'function') {\n callback = conf.mermaid.callback;\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].debug('Callback function found');\n } else {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].debug('No Callback function found');\n }\n }\n }\n\n nodes = nodes === undefined ? document.querySelectorAll('.mermaid') : typeof nodes === 'string' ? document.querySelectorAll(nodes) : nodes instanceof window.Node ? [nodes] : nodes; // Last case - sequence config was passed pick next\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].debug('Start On Load before: ' + mermaid.startOnLoad);\n\n if (typeof mermaid.startOnLoad !== 'undefined') {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].debug('Start On Load inner: ' + mermaid.startOnLoad);\n\n _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__[\"default\"].updateSiteConfig({\n startOnLoad: mermaid.startOnLoad\n });\n }\n\n if (typeof mermaid.ganttConfig !== 'undefined') {\n _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__[\"default\"].updateSiteConfig({\n gantt: mermaid.ganttConfig\n });\n }\n\n var nextId = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].initIdGeneratior(conf.deterministicIds, conf.deterministicIDSeed).next;\n\n var txt;\n\n var _loop = function _loop(i) {\n var element = nodes[i];\n /*! Check if previously processed */\n\n if (!element.getAttribute('data-processed')) {\n element.setAttribute('data-processed', true);\n } else {\n return \"continue\";\n }\n\n var id = \"mermaid-\".concat(nextId()); // Fetch the graph definition including tags\n\n txt = element.innerHTML; // transforms the html to pure text\n\n txt = entity_decode_browser__WEBPACK_IMPORTED_MODULE_0___default()(txt).trim().replace(/
/gi, '
');\n\n var init = _utils__WEBPACK_IMPORTED_MODULE_3__[\"default\"].detectInit(txt);\n\n if (init) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].debug('Detected early reinit: ', init);\n }\n\n try {\n _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__[\"default\"].render(id, txt, function (svgCode, bindFunctions) {\n element.innerHTML = svgCode;\n\n if (typeof callback !== 'undefined') {\n callback(id);\n }\n\n if (bindFunctions) bindFunctions(element);\n }, element);\n } catch (e) {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].warn('Syntax Error rendering');\n\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].warn(e);\n\n if (_this.parseError) {\n _this.parseError(e);\n }\n }\n };\n\n for (var i = 0; i < nodes.length; i++) {\n var _ret = _loop(i);\n\n if (_ret === \"continue\") continue;\n }\n };\n\n var initialize = function initialize(config) {\n // mermaidAPI.reset();\n if (typeof config.mermaid !== 'undefined') {\n if (typeof config.mermaid.startOnLoad !== 'undefined') {\n mermaid.startOnLoad = config.mermaid.startOnLoad;\n }\n\n if (typeof config.mermaid.htmlLabels !== 'undefined') {\n mermaid.htmlLabels = config.mermaid.htmlLabels;\n }\n }\n\n _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__[\"default\"].initialize(config); // mermaidAPI.reset();\n\n };\n /**\n * ##contentLoaded\n * Callback function that is called when page is loaded. This functions fetches configuration for mermaid rendering and\n * calls init for rendering the mermaid diagrams on the page.\n */\n\n\n var contentLoaded = function contentLoaded() {\n var config;\n\n if (mermaid.startOnLoad) {\n // No config found, do check API config\n config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getConfig();\n\n if (config.startOnLoad) {\n mermaid.init();\n }\n } else {\n if (typeof mermaid.startOnLoad === 'undefined') {\n _logger__WEBPACK_IMPORTED_MODULE_1__[\"log\"].debug('In start, no config');\n\n config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__[\"default\"].getConfig();\n\n if (config.startOnLoad) {\n mermaid.init();\n }\n }\n }\n };\n\n if (typeof document !== 'undefined') {\n /*!\n * Wait for document loaded before starting the execution\n */\n window.addEventListener('load', function () {\n contentLoaded();\n }, false);\n }\n\n var mermaid = {\n startOnLoad: true,\n htmlLabels: true,\n mermaidAPI: _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n parse: _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__[\"default\"].parse,\n render: _mermaidAPI__WEBPACK_IMPORTED_MODULE_2__[\"default\"].render,\n init: init,\n initialize: initialize,\n contentLoaded: contentLoaded\n };\n /* harmony default export */\n\n __webpack_exports__[\"default\"] = mermaid;\n /***/\n },\n\n /***/\n \"./src/mermaidAPI.js\":\n /*!***************************!*\\\n !*** ./src/mermaidAPI.js ***!\n \\***************************/\n\n /*! exports provided: encodeEntities, decodeEntities, default */\n\n /***/\n function srcMermaidAPIJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"encodeEntities\", function () {\n return encodeEntities;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"decodeEntities\", function () {\n return decodeEntities;\n });\n /* harmony import */\n\n\n var stylis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! stylis */\n \"stylis\");\n /* harmony import */\n\n\n var stylis__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(stylis__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__);\n /* harmony import */\n\n\n var _package_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ../package.json */\n \"./package.json\");\n\n var _package_json__WEBPACK_IMPORTED_MODULE_2___namespace = /*#__PURE__*/__webpack_require__.t(\n /*! ../package.json */\n \"./package.json\", 1);\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./logger */\n \"./src/logger.js\");\n /* harmony import */\n\n\n var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ./utils */\n \"./src/utils.js\");\n /* harmony import */\n\n\n var _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ./diagrams/flowchart/flowRenderer */\n \"./src/diagrams/flowchart/flowRenderer.js\");\n /* harmony import */\n\n\n var _diagrams_flowchart_flowRenderer_v2__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\n /*! ./diagrams/flowchart/flowRenderer-v2 */\n \"./src/diagrams/flowchart/flowRenderer-v2.js\");\n /* harmony import */\n\n\n var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\n /*! ./diagrams/flowchart/parser/flow */\n \"./src/diagrams/flowchart/parser/flow.jison\");\n /* harmony import */\n\n\n var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7__);\n /* harmony import */\n\n\n var _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(\n /*! ./diagrams/flowchart/flowDb */\n \"./src/diagrams/flowchart/flowDb.js\");\n /* harmony import */\n\n\n var _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(\n /*! ./diagrams/sequence/sequenceRenderer */\n \"./src/diagrams/sequence/sequenceRenderer.js\");\n /* harmony import */\n\n\n var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(\n /*! ./diagrams/sequence/parser/sequenceDiagram */\n \"./src/diagrams/sequence/parser/sequenceDiagram.jison\");\n /* harmony import */\n\n\n var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10__);\n /* harmony import */\n\n\n var _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(\n /*! ./diagrams/sequence/sequenceDb */\n \"./src/diagrams/sequence/sequenceDb.js\");\n /* harmony import */\n\n\n var _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(\n /*! ./diagrams/gantt/ganttRenderer */\n \"./src/diagrams/gantt/ganttRenderer.js\");\n /* harmony import */\n\n\n var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(\n /*! ./diagrams/gantt/parser/gantt */\n \"./src/diagrams/gantt/parser/gantt.jison\");\n /* harmony import */\n\n\n var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13__);\n /* harmony import */\n\n\n var _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(\n /*! ./diagrams/gantt/ganttDb */\n \"./src/diagrams/gantt/ganttDb.js\");\n /* harmony import */\n\n\n var _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(\n /*! ./diagrams/class/classRenderer */\n \"./src/diagrams/class/classRenderer.js\");\n /* harmony import */\n\n\n var _diagrams_class_classRenderer_v2__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(\n /*! ./diagrams/class/classRenderer-v2 */\n \"./src/diagrams/class/classRenderer-v2.js\");\n /* harmony import */\n\n\n var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(\n /*! ./diagrams/class/parser/classDiagram */\n \"./src/diagrams/class/parser/classDiagram.jison\");\n /* harmony import */\n\n\n var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17__);\n /* harmony import */\n\n\n var _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(\n /*! ./diagrams/class/classDb */\n \"./src/diagrams/class/classDb.js\");\n /* harmony import */\n\n\n var _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(\n /*! ./diagrams/state/stateRenderer */\n \"./src/diagrams/state/stateRenderer.js\");\n /* harmony import */\n\n\n var _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(\n /*! ./diagrams/state/stateRenderer-v2 */\n \"./src/diagrams/state/stateRenderer-v2.js\");\n /* harmony import */\n\n\n var _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(\n /*! ./diagrams/state/parser/stateDiagram */\n \"./src/diagrams/state/parser/stateDiagram.jison\");\n /* harmony import */\n\n\n var _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21__);\n /* harmony import */\n\n\n var _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(\n /*! ./diagrams/state/stateDb */\n \"./src/diagrams/state/stateDb.js\");\n /* harmony import */\n\n\n var _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(\n /*! ./diagrams/git/gitGraphRenderer */\n \"./src/diagrams/git/gitGraphRenderer.js\");\n /* harmony import */\n\n\n var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(\n /*! ./diagrams/git/parser/gitGraph */\n \"./src/diagrams/git/parser/gitGraph.jison\");\n /* harmony import */\n\n\n var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_24__);\n /* harmony import */\n\n\n var _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(\n /*! ./diagrams/git/gitGraphAst */\n \"./src/diagrams/git/gitGraphAst.js\");\n /* harmony import */\n\n\n var _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(\n /*! ./diagrams/info/infoRenderer */\n \"./src/diagrams/info/infoRenderer.js\");\n /* harmony import */\n\n\n var _errorRenderer__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(\n /*! ./errorRenderer */\n \"./src/errorRenderer.js\");\n /* harmony import */\n\n\n var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(\n /*! ./diagrams/info/parser/info */\n \"./src/diagrams/info/parser/info.jison\");\n /* harmony import */\n\n\n var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_28__);\n /* harmony import */\n\n\n var _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(\n /*! ./diagrams/info/infoDb */\n \"./src/diagrams/info/infoDb.js\");\n /* harmony import */\n\n\n var _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(\n /*! ./diagrams/pie/pieRenderer */\n \"./src/diagrams/pie/pieRenderer.js\");\n /* harmony import */\n\n\n var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(\n /*! ./diagrams/pie/parser/pie */\n \"./src/diagrams/pie/parser/pie.jison\");\n /* harmony import */\n\n\n var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(_diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_31__);\n /* harmony import */\n\n\n var _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(\n /*! ./diagrams/pie/pieDb */\n \"./src/diagrams/pie/pieDb.js\");\n /* harmony import */\n\n\n var _diagrams_er_erDb__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(\n /*! ./diagrams/er/erDb */\n \"./src/diagrams/er/erDb.js\");\n /* harmony import */\n\n\n var _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(\n /*! ./diagrams/er/parser/erDiagram */\n \"./src/diagrams/er/parser/erDiagram.jison\");\n /* harmony import */\n\n\n var _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(_diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_34__);\n /* harmony import */\n\n\n var _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(\n /*! ./diagrams/er/erRenderer */\n \"./src/diagrams/er/erRenderer.js\");\n /* harmony import */\n\n\n var _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(\n /*! ./diagrams/user-journey/parser/journey */\n \"./src/diagrams/user-journey/parser/journey.jison\");\n /* harmony import */\n\n\n var _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(_diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_36__);\n /* harmony import */\n\n\n var _diagrams_user_journey_journeyDb__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(\n /*! ./diagrams/user-journey/journeyDb */\n \"./src/diagrams/user-journey/journeyDb.js\");\n /* harmony import */\n\n\n var _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(\n /*! ./diagrams/user-journey/journeyRenderer */\n \"./src/diagrams/user-journey/journeyRenderer.js\");\n /* harmony import */\n\n\n var _config__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(\n /*! ./config */\n \"./src/config.js\");\n /* harmony import */\n\n\n var _styles__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(\n /*! ./styles */\n \"./src/styles.js\");\n /* harmony import */\n\n\n var _themes__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(\n /*! ./themes */\n \"./src/themes/index.js\");\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n /**\n *Edit this Page[![N|Solid](img/GitHub-Mark-32px.png)](https://github.com/mermaid-js/mermaid/blob/develop/src/mermaidAPI.js)\n *\n *This is the API to be used when optionally handling the integration with the web page, instead of using the default integration provided by mermaid.js.\n *\n *\n * The core of this api is the [**render**](Setup.md?id=render) function which, given a graph\n * definition as text, renders the graph/diagram and returns an svg element for the graph.\n *\n * It is is then up to the user of the API to make use of the svg, either insert it somewhere in the page or do something completely different.\n *\n * In addition to the render function, a number of behavioral configuration options are available.\n *\n * @name mermaidAPI\n */\n // import * as configApi from './config';\n // // , {\n // // setConfig,\n // // configApi.getConfig,\n // // configApi.updateSiteConfig,\n // // configApi.setSiteConfig,\n // // configApi.getSiteConfig,\n // // configApi.defaultConfig\n // // }\n\n\n function parse(text) {\n var graphInit = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].detectInit(text);\n\n if (graphInit) {\n reinitialize(graphInit);\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('reinit ', graphInit);\n }\n\n var graphType = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].detectType(text);\n\n var parser;\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Type ' + graphType);\n\n switch (graphType) {\n case 'git':\n parser = _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_24___default.a;\n parser.parser.yy = _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_25__[\"default\"];\n break;\n\n case 'flowchart':\n _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__[\"default\"].clear();\n\n parser = _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default.a;\n parser.parser.yy = _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\n break;\n\n case 'flowchart-v2':\n _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__[\"default\"].clear();\n\n parser = _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default.a;\n parser.parser.yy = _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\n break;\n\n case 'sequence':\n parser = _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10___default.a;\n parser.parser.yy = _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_11__[\"default\"];\n break;\n\n case 'gantt':\n parser = _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13___default.a;\n parser.parser.yy = _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__[\"default\"];\n break;\n\n case 'class':\n parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17___default.a;\n parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_18__[\"default\"];\n break;\n\n case 'classDiagram':\n parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_17___default.a;\n parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_18__[\"default\"];\n break;\n\n case 'state':\n parser = _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21___default.a;\n parser.parser.yy = _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_22__[\"default\"];\n break;\n\n case 'stateDiagram':\n parser = _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_21___default.a;\n parser.parser.yy = _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_22__[\"default\"];\n break;\n\n case 'info':\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('info info info');\n\n parser = _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_28___default.a;\n parser.parser.yy = _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_29__[\"default\"];\n break;\n\n case 'pie':\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('pie');\n\n parser = _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_31___default.a;\n parser.parser.yy = _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_32__[\"default\"];\n break;\n\n case 'er':\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('er');\n\n parser = _diagrams_er_parser_erDiagram__WEBPACK_IMPORTED_MODULE_34___default.a;\n parser.parser.yy = _diagrams_er_erDb__WEBPACK_IMPORTED_MODULE_33__[\"default\"];\n break;\n\n case 'journey':\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Journey');\n\n parser = _diagrams_user_journey_parser_journey__WEBPACK_IMPORTED_MODULE_36___default.a;\n parser.parser.yy = _diagrams_user_journey_journeyDb__WEBPACK_IMPORTED_MODULE_37__[\"default\"];\n break;\n }\n\n parser.parser.yy.graphType = graphType;\n\n parser.parser.yy.parseError = function (str, hash) {\n var error = {\n str: str,\n hash: hash\n };\n throw error;\n };\n\n parser.parse(text);\n return parser;\n }\n\n var encodeEntities = function encodeEntities(text) {\n var txt = text;\n txt = txt.replace(/style.*:\\S*#.*;/g, function (s) {\n var innerTxt = s.substring(0, s.length - 1);\n return innerTxt;\n });\n txt = txt.replace(/classDef.*:\\S*#.*;/g, function (s) {\n var innerTxt = s.substring(0, s.length - 1);\n return innerTxt;\n });\n txt = txt.replace(/#\\w+;/g, function (s) {\n var innerTxt = s.substring(1, s.length - 1);\n var isInt = /^\\+?\\d+$/.test(innerTxt);\n\n if (isInt) {\n return 'fl°°' + innerTxt + '¶ß';\n } else {\n return 'fl°' + innerTxt + '¶ß';\n }\n });\n return txt;\n };\n\n var decodeEntities = function decodeEntities(text) {\n var txt = text;\n txt = txt.replace(/fl°°/g, function () {\n return '';\n });\n txt = txt.replace(/fl°/g, function () {\n return '&';\n });\n txt = txt.replace(/¶ß/g, function () {\n return ';';\n });\n return txt;\n };\n /**\n * Function that renders an svg with a graph from a chart definition. Usage example below.\n *\n * ```js\n * mermaidAPI.initialize({\n * startOnLoad:true\n * });\n * $(function(){\n * const graphDefinition = 'graph TB\\na-->b';\n * const cb = function(svgGraph){\n * console.log(svgGraph);\n * };\n * mermaidAPI.render('id1',graphDefinition,cb);\n * });\n *```\n * @param id the id of the element to be rendered\n * @param _txt the graph definition\n * @param cb callback which is called after rendering is finished with the svg code as inparam.\n * @param container selector to element in which a div with the graph temporarily will be inserted. In one is\n * provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is\n * completed.\n */\n\n\n var render = function render(id, _txt, cb, container) {\n _config__WEBPACK_IMPORTED_MODULE_39__[\"reset\"]();\n\n var txt = _txt;\n\n var graphInit = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].detectInit(txt);\n\n if (graphInit) {\n _config__WEBPACK_IMPORTED_MODULE_39__[\"addDirective\"](graphInit);\n } // else {\n // configApi.reset();\n // const siteConfig = configApi.getSiteConfig();\n // configApi.addDirective(siteConfig);\n // }\n // console.warn('Render fetching config');\n\n\n var cnf = _config__WEBPACK_IMPORTED_MODULE_39__[\"getConfig\"](); // Check the maximum allowed text size\n\n\n if (_txt.length > cnf.maxTextSize) {\n txt = 'graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa';\n }\n\n if (typeof container !== 'undefined') {\n container.innerHTML = '';\n Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(container).append('div').attr('id', 'd' + id).attr('style', 'font-family: ' + cnf.fontFamily).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');\n } else {\n var existingSvg = document.getElementById(id);\n\n if (existingSvg) {\n existingSvg.remove();\n }\n\n var _element = document.querySelector('#' + 'd' + id);\n\n if (_element) {\n _element.remove();\n }\n\n Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('body').append('div').attr('id', 'd' + id).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');\n }\n\n window.txt = txt;\n txt = encodeEntities(txt);\n var element = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#d' + id).node();\n\n var graphType = _utils__WEBPACK_IMPORTED_MODULE_4__[\"default\"].detectType(txt); // insert inline style into svg\n\n\n var svg = element.firstChild;\n var firstChild = svg.firstChild;\n var userStyles = ''; // user provided theme CSS\n\n if (cnf.themeCSS !== undefined) {\n userStyles += \"\\n\".concat(cnf.themeCSS);\n } // user provided theme CSS\n\n\n if (cnf.fontFamily !== undefined) {\n userStyles += \"\\n:root { --mermaid-font-family: \".concat(cnf.fontFamily, \"}\");\n } // user provided theme CSS\n\n\n if (cnf.altFontFamily !== undefined) {\n userStyles += \"\\n:root { --mermaid-alt-font-family: \".concat(cnf.altFontFamily, \"}\");\n } // classDef\n\n\n if (graphType === 'flowchart' || graphType === 'flowchart-v2' || graphType === 'graph') {\n var classes = _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__[\"default\"].getClasses(txt);\n\n for (var className in classes) {\n userStyles += \"\\n.\".concat(className, \" > * { \").concat(classes[className].styles.join(' !important; '), \" !important; }\");\n\n if (classes[className].textStyles) {\n userStyles += \"\\n.\".concat(className, \" tspan { \").concat(classes[className].textStyles.join(' !important; '), \" !important; }\");\n }\n }\n } // log.warn(cnf.themeVariables);\n\n\n var stylis = new stylis__WEBPACK_IMPORTED_MODULE_0___default.a();\n var rules = stylis(\"#\".concat(id), Object(_styles__WEBPACK_IMPORTED_MODULE_40__[\"default\"])(graphType, userStyles, cnf.themeVariables));\n var style1 = document.createElement('style');\n style1.innerHTML = rules;\n svg.insertBefore(style1, firstChild); // Verify that the generated svgs are ok before removing this\n // const style2 = document.createElement('style');\n // const cs = window.getComputedStyle(svg);\n // style2.innerHTML = `#d${id} * {\n // color: ${cs.color};\n // // font: ${cs.font};\n // // font-family: Arial;\n // // font-size: 24px;\n // }`;\n // svg.insertBefore(style2, firstChild);\n\n try {\n switch (graphType) {\n case 'git':\n cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n\n _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_23__[\"default\"].setConf(cnf.git);\n\n _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_23__[\"default\"].draw(txt, id, false);\n\n break;\n\n case 'flowchart':\n cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n\n _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__[\"default\"].setConf(cnf.flowchart);\n\n _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__[\"default\"].draw(txt, id, false);\n\n break;\n\n case 'flowchart-v2':\n cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n\n _diagrams_flowchart_flowRenderer_v2__WEBPACK_IMPORTED_MODULE_6__[\"default\"].setConf(cnf.flowchart);\n\n _diagrams_flowchart_flowRenderer_v2__WEBPACK_IMPORTED_MODULE_6__[\"default\"].draw(txt, id, false);\n\n break;\n\n case 'sequence':\n cnf.sequence.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n\n if (cnf.sequenceDiagram) {\n // backwards compatibility\n _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__[\"default\"].setConf(Object.assign(cnf.sequence, cnf.sequenceDiagram));\n\n console.error('`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.');\n } else {\n _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__[\"default\"].setConf(cnf.sequence);\n }\n\n _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__[\"default\"].draw(txt, id);\n\n break;\n\n case 'gantt':\n cnf.gantt.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n\n _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__[\"default\"].setConf(cnf.gantt);\n\n _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__[\"default\"].draw(txt, id);\n\n break;\n\n case 'class':\n cnf[\"class\"].arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n\n _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__[\"default\"].setConf(cnf[\"class\"]);\n\n _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__[\"default\"].draw(txt, id);\n\n break;\n\n case 'classDiagram':\n cnf[\"class\"].arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n\n _diagrams_class_classRenderer_v2__WEBPACK_IMPORTED_MODULE_16__[\"default\"].setConf(cnf[\"class\"]);\n\n _diagrams_class_classRenderer_v2__WEBPACK_IMPORTED_MODULE_16__[\"default\"].draw(txt, id);\n\n break;\n\n case 'state':\n cnf[\"class\"].arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n\n _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_19__[\"default\"].setConf(cnf.state);\n\n _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_19__[\"default\"].draw(txt, id);\n\n break;\n\n case 'stateDiagram':\n cnf[\"class\"].arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n\n _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_20__[\"default\"].setConf(cnf.state);\n\n _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_20__[\"default\"].draw(txt, id);\n\n break;\n\n case 'info':\n cnf[\"class\"].arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n\n _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_26__[\"default\"].setConf(cnf[\"class\"]);\n\n _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_26__[\"default\"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);\n\n break;\n\n case 'pie':\n cnf[\"class\"].arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n\n _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_30__[\"default\"].setConf(cnf.pie);\n\n _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_30__[\"default\"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);\n\n break;\n\n case 'er':\n _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_35__[\"default\"].setConf(cnf.er);\n\n _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_35__[\"default\"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);\n\n break;\n\n case 'journey':\n _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__[\"default\"].setConf(cnf.journey);\n\n _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__[\"default\"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);\n\n break;\n }\n } catch (e) {\n // errorRenderer.setConf(cnf.class);\n _errorRenderer__WEBPACK_IMPORTED_MODULE_27__[\"default\"].draw(id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);\n\n throw e;\n }\n\n Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])(\"[id=\\\"\".concat(id, \"\\\"]\")).selectAll('foreignobject > *').attr('xmlns', 'http://www.w3.org/1999/xhtml'); // if (cnf.arrowMarkerAbsolute) {\n // url =\n // window.location.protocol +\n // '//' +\n // window.location.host +\n // window.location.pathname +\n // window.location.search;\n // url = url.replace(/\\(/g, '\\\\(');\n // url = url.replace(/\\)/g, '\\\\)');\n // }\n // Fix for when the base tag is used\n\n var svgCode = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#d' + id).node().innerHTML;\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('cnf.arrowMarkerAbsolute', cnf.arrowMarkerAbsolute);\n\n if (!cnf.arrowMarkerAbsolute || cnf.arrowMarkerAbsolute === 'false') {\n svgCode = svgCode.replace(/marker-end=\"url\\(.*?#/g, 'marker-end=\"url(#', 'g');\n }\n\n svgCode = decodeEntities(svgCode); // Fix for when the br tag is used\n\n svgCode = svgCode.replace(/
/g, '
');\n\n if (typeof cb !== 'undefined') {\n switch (graphType) {\n case 'flowchart':\n case 'flowchart-v2':\n cb(svgCode, _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__[\"default\"].bindFunctions);\n break;\n\n case 'gantt':\n cb(svgCode, _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__[\"default\"].bindFunctions);\n break;\n\n case 'class':\n case 'classDiagram':\n cb(svgCode, _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_18__[\"default\"].bindFunctions);\n break;\n\n default:\n cb(svgCode);\n }\n } else {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('CB = undefined!');\n }\n\n var node = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#d' + id).node();\n\n if (node !== null && typeof node.remove === 'function') {\n Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('#d' + id).node().remove();\n }\n\n return svgCode;\n };\n\n var currentDirective = {};\n\n var parseDirective = function parseDirective(p, statement, context, type) {\n try {\n if (statement !== undefined) {\n statement = statement.trim();\n\n switch (context) {\n case 'open_directive':\n currentDirective = {};\n break;\n\n case 'type_directive':\n currentDirective.type = statement.toLowerCase();\n break;\n\n case 'arg_directive':\n currentDirective.args = JSON.parse(statement);\n break;\n\n case 'close_directive':\n handleDirective(p, currentDirective, type);\n currentDirective = null;\n break;\n }\n }\n } catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error(\"Error while rendering sequenceDiagram directive: \".concat(statement, \" jison context: \").concat(context));\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error(error.message);\n }\n };\n\n var handleDirective = function handleDirective(p, directive, type) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug(\"Directive type=\".concat(directive.type, \" with args:\"), directive.args);\n\n switch (directive.type) {\n case 'init':\n case 'initialize':\n {\n ['config'].forEach(function (prop) {\n if (typeof directive.args[prop] !== 'undefined') {\n if (type === 'flowchart-v2') {\n type = 'flowchart';\n }\n\n directive.args[type] = directive.args[prop];\n delete directive.args[prop];\n }\n });\n reinitialize(directive.args);\n\n _config__WEBPACK_IMPORTED_MODULE_39__[\"addDirective\"](directive.args);\n\n break;\n }\n\n case 'wrap':\n case 'nowrap':\n if (p && p['setWrap']) {\n p.setWrap(directive.type === 'wrap');\n }\n\n break;\n\n default:\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].warn(\"Unhandled directive: source: '%%{\".concat(directive.type, \": \").concat(JSON.stringify(directive.args ? directive.args : {}), \"}%%\"), directive);\n\n break;\n }\n };\n\n function updateRendererConfigs(conf) {\n _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_23__[\"default\"].setConf(conf.git);\n\n _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__[\"default\"].setConf(conf.flowchart);\n\n _diagrams_flowchart_flowRenderer_v2__WEBPACK_IMPORTED_MODULE_6__[\"default\"].setConf(conf.flowchart);\n\n if (typeof conf['sequenceDiagram'] !== 'undefined') {\n _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__[\"default\"].setConf(Object(_utils__WEBPACK_IMPORTED_MODULE_4__[\"assignWithDepth\"])(conf.sequence, conf['sequenceDiagram']));\n }\n\n _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__[\"default\"].setConf(conf.sequence);\n\n _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__[\"default\"].setConf(conf.gantt);\n\n _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__[\"default\"].setConf(conf[\"class\"]);\n\n _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_19__[\"default\"].setConf(conf.state);\n\n _diagrams_state_stateRenderer_v2__WEBPACK_IMPORTED_MODULE_20__[\"default\"].setConf(conf.state);\n\n _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_26__[\"default\"].setConf(conf[\"class\"]);\n\n _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_30__[\"default\"].setConf(conf[\"class\"]);\n\n _diagrams_er_erRenderer__WEBPACK_IMPORTED_MODULE_35__[\"default\"].setConf(conf.er);\n\n _diagrams_user_journey_journeyRenderer__WEBPACK_IMPORTED_MODULE_38__[\"default\"].setConf(conf.journey);\n\n _errorRenderer__WEBPACK_IMPORTED_MODULE_27__[\"default\"].setConf(conf[\"class\"]);\n }\n\n function reinitialize() {// `mermaidAPI.reinitialize: v${pkg.version}`,\n // JSON.stringify(options),\n // options.themeVariables.primaryColor;\n // // if (options.theme && theme[options.theme]) {\n // // options.themeVariables = theme[options.theme].getThemeVariables(options.themeVariables);\n // // }\n // // Set default options\n // const config =\n // typeof options === 'object' ? configApi.setConfig(options) : configApi.getSiteConfig();\n // updateRendererConfigs(config);\n // setLogLevel(config.logLevel);\n // log.debug('mermaidAPI.reinitialize: ', config);\n }\n\n function initialize(options) {\n // console.warn(`mermaidAPI.initialize: v${pkg.version} `, options);\n // Handle legacy location of font-family configuration\n if (options && options.fontFamily) {\n if (!options.themeVariables) {\n options.themeVariables = {\n fontFamily: options.fontFamily\n };\n } else {\n if (!options.themeVariables.fontFamily) {\n options.themeVariables = {\n fontFamily: options.fontFamily\n };\n }\n }\n } // Set default options\n\n\n _config__WEBPACK_IMPORTED_MODULE_39__[\"saveConfigFromInitilize\"](options);\n\n if (options && options.theme && _themes__WEBPACK_IMPORTED_MODULE_41__[\"default\"][options.theme]) {\n // Todo merge with user options\n options.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_41__[\"default\"][options.theme].getThemeVariables(options.themeVariables);\n } else {\n if (options) options.themeVariables = _themes__WEBPACK_IMPORTED_MODULE_41__[\"default\"][\"default\"].getThemeVariables(options.themeVariables);\n }\n\n var config = _typeof(options) === 'object' ? _config__WEBPACK_IMPORTED_MODULE_39__[\"setSiteConfig\"](options) : _config__WEBPACK_IMPORTED_MODULE_39__[\"getSiteConfig\"]();\n updateRendererConfigs(config);\n Object(_logger__WEBPACK_IMPORTED_MODULE_3__[\"setLogLevel\"])(config.logLevel); // log.debug('mermaidAPI.initialize: ', config);\n }\n\n var mermaidAPI = Object.freeze({\n render: render,\n parse: parse,\n parseDirective: parseDirective,\n initialize: initialize,\n reinitialize: reinitialize,\n getConfig: _config__WEBPACK_IMPORTED_MODULE_39__[\"getConfig\"],\n setConfig: _config__WEBPACK_IMPORTED_MODULE_39__[\"setConfig\"],\n getSiteConfig: _config__WEBPACK_IMPORTED_MODULE_39__[\"getSiteConfig\"],\n updateSiteConfig: _config__WEBPACK_IMPORTED_MODULE_39__[\"updateSiteConfig\"],\n reset: function reset() {\n // console.warn('reset');\n _config__WEBPACK_IMPORTED_MODULE_39__[\"reset\"](); // const siteConfig = configApi.getSiteConfig();\n // updateRendererConfigs(siteConfig);\n\n },\n globalReset: function globalReset() {\n _config__WEBPACK_IMPORTED_MODULE_39__[\"reset\"](_config__WEBPACK_IMPORTED_MODULE_39__[\"defaultConfig\"]);\n\n updateRendererConfigs(_config__WEBPACK_IMPORTED_MODULE_39__[\"getConfig\"]());\n },\n defaultConfig: _config__WEBPACK_IMPORTED_MODULE_39__[\"defaultConfig\"]\n });\n Object(_logger__WEBPACK_IMPORTED_MODULE_3__[\"setLogLevel\"])(_config__WEBPACK_IMPORTED_MODULE_39__[\"getConfig\"]().logLevel);\n\n _config__WEBPACK_IMPORTED_MODULE_39__[\"reset\"](_config__WEBPACK_IMPORTED_MODULE_39__[\"getConfig\"]());\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = mermaidAPI;\n /**\n * ## mermaidAPI configuration defaults\n *\n * ```html\n * \n * ```\n */\n\n /***/\n },\n\n /***/\n \"./src/styles.js\":\n /*!***********************!*\\\n !*** ./src/styles.js ***!\n \\***********************/\n\n /*! exports provided: calcThemeVariables, default */\n\n /***/\n function srcStylesJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"calcThemeVariables\", function () {\n return calcThemeVariables;\n });\n /* harmony import */\n\n\n var _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ./diagrams/class/styles */\n \"./src/diagrams/class/styles.js\");\n /* harmony import */\n\n\n var _diagrams_er_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./diagrams/er/styles */\n \"./src/diagrams/er/styles.js\");\n /* harmony import */\n\n\n var _diagrams_flowchart_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./diagrams/flowchart/styles */\n \"./src/diagrams/flowchart/styles.js\");\n /* harmony import */\n\n\n var _diagrams_gantt_styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./diagrams/gantt/styles */\n \"./src/diagrams/gantt/styles.js\");\n /* harmony import */\n\n\n var _diagrams_git_styles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ./diagrams/git/styles */\n \"./src/diagrams/git/styles.js\");\n /* harmony import */\n\n\n var _diagrams_info_styles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\n /*! ./diagrams/info/styles */\n \"./src/diagrams/info/styles.js\");\n /* harmony import */\n\n\n var _diagrams_pie_styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\n /*! ./diagrams/pie/styles */\n \"./src/diagrams/pie/styles.js\");\n /* harmony import */\n\n\n var _diagrams_sequence_styles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\n /*! ./diagrams/sequence/styles */\n \"./src/diagrams/sequence/styles.js\");\n /* harmony import */\n\n\n var _diagrams_state_styles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(\n /*! ./diagrams/state/styles */\n \"./src/diagrams/state/styles.js\");\n /* harmony import */\n\n\n var _diagrams_user_journey_styles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(\n /*! ./diagrams/user-journey/styles */\n \"./src/diagrams/user-journey/styles.js\");\n\n var themes = {\n flowchart: _diagrams_flowchart_styles__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n 'flowchart-v2': _diagrams_flowchart_styles__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n sequence: _diagrams_sequence_styles__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n gantt: _diagrams_gantt_styles__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n classDiagram: _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n 'classDiagram-v2': _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n \"class\": _diagrams_class_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n stateDiagram: _diagrams_state_styles__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n state: _diagrams_state_styles__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n git: _diagrams_git_styles__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n info: _diagrams_info_styles__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n pie: _diagrams_pie_styles__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n er: _diagrams_er_styles__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n journey: _diagrams_user_journey_styles__WEBPACK_IMPORTED_MODULE_9__[\"default\"]\n };\n\n var calcThemeVariables = function calcThemeVariables(theme, userOverRides) {\n return theme.calcColors(userOverRides);\n };\n\n var getStyles = function getStyles(type, userStyles, options) {\n //console.warn('options in styles: ', options);\n return \" {\\n font-family: \".concat(options.fontFamily, \";\\n font-size: \").concat(options.fontSize, \";\\n fill: \").concat(options.textColor, \"\\n }\\n\\n /* Classes common for multiple diagrams */\\n\\n .error-icon {\\n fill: \").concat(options.errorBkgColor, \";\\n }\\n .error-text {\\n fill: \").concat(options.errorTextColor, \";\\n stroke: \").concat(options.errorTextColor, \";\\n }\\n\\n .edge-thickness-normal {\\n stroke-width: 2px;\\n }\\n .edge-thickness-thick {\\n stroke-width: 3.5px\\n }\\n .edge-pattern-solid {\\n stroke-dasharray: 0;\\n }\\n\\n .edge-pattern-dashed{\\n stroke-dasharray: 3;\\n }\\n .edge-pattern-dotted {\\n stroke-dasharray: 2;\\n }\\n\\n .marker {\\n fill: \").concat(options.lineColor, \";\\n stroke: \").concat(options.lineColor, \";\\n }\\n .marker.cross {\\n stroke: \").concat(options.lineColor, \";\\n }\\n\\n svg {\\n font-family: \").concat(options.fontFamily, \";\\n font-size: \").concat(options.fontSize, \";\\n }\\n\\n \").concat(themes[type](options), \"\\n\\n \").concat(userStyles, \"\\n\\n \").concat(type, \" { fill: apa;}\\n\");\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = getStyles;\n /***/\n },\n\n /***/\n \"./src/themes/index.js\":\n /*!*****************************!*\\\n !*** ./src/themes/index.js ***!\n \\*****************************/\n\n /*! exports provided: default */\n\n /***/\n function srcThemesIndexJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony import */\n\n\n var _theme_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! ./theme-base */\n \"./src/themes/theme-base.js\");\n /* harmony import */\n\n\n var _theme_dark__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./theme-dark */\n \"./src/themes/theme-dark.js\");\n /* harmony import */\n\n\n var _theme_default__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./theme-default */\n \"./src/themes/theme-default.js\");\n /* harmony import */\n\n\n var _theme_forest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./theme-forest */\n \"./src/themes/theme-forest.js\");\n /* harmony import */\n\n\n var _theme_neutral__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\n /*! ./theme-neutral */\n \"./src/themes/theme-neutral.js\");\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n base: {\n getThemeVariables: _theme_base__WEBPACK_IMPORTED_MODULE_0__[\"getThemeVariables\"]\n },\n dark: {\n getThemeVariables: _theme_dark__WEBPACK_IMPORTED_MODULE_1__[\"getThemeVariables\"]\n },\n \"default\": {\n getThemeVariables: _theme_default__WEBPACK_IMPORTED_MODULE_2__[\"getThemeVariables\"]\n },\n forest: {\n getThemeVariables: _theme_forest__WEBPACK_IMPORTED_MODULE_3__[\"getThemeVariables\"]\n },\n neutral: {\n getThemeVariables: _theme_neutral__WEBPACK_IMPORTED_MODULE_4__[\"getThemeVariables\"]\n }\n };\n /***/\n },\n\n /***/\n \"./src/themes/theme-base.js\":\n /*!**********************************!*\\\n !*** ./src/themes/theme-base.js ***!\n \\**********************************/\n\n /*! exports provided: getThemeVariables */\n\n /***/\n function srcThemesThemeBaseJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getThemeVariables\", function () {\n return getThemeVariables;\n });\n /* harmony import */\n\n\n var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! khroma */\n \"khroma\");\n /* harmony import */\n\n\n var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./theme-helpers */\n \"./src/themes/theme-helpers.js\");\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _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 Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n var Theme = /*#__PURE__*/function () {\n function Theme() {\n _classCallCheck(this, Theme);\n /** # Base variables */\n\n /** * background - used to know what the background color is of the diagram. This is used for deducing colors for istance line color. Defaulr value is #f4f4f4. */\n\n\n this.background = '#f4f4f4';\n this.darkMode = false; // this.background = '#0c0c0c';\n // this.darkMode = true;\n\n this.primaryColor = '#fff4dd'; // this.background = '#0c0c0c';\n // this.primaryColor = '#1f1f00';\n\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = '#333'; // dark\n // this.primaryColor = '#034694';\n // this.primaryColor = '#f2ee7e';\n // this.primaryColor = '#9f33be';\n // this.primaryColor = '#f0fff0';\n // this.primaryColor = '#fa255e';\n // this.primaryColor = '#ECECFF';\n // this.secondaryColor = '#c39ea0';\n // this.tertiaryColor = '#f8e5e5';\n // this.secondaryColor = '#dfdfde';\n // this.tertiaryColor = '#CCCCFF';\n\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px'; // this.updateColors();\n }\n\n _createClass(Theme, [{\n key: \"updateColors\",\n value: function updateColors() {\n // The || is to make sure that if the variable has been defiend by a user override that value is to be used\n\n /* Main */\n this.primaryTextColor = this.primaryTextColor || (this.darkMode ? '#ddd' : '#333'); // invert(this.primaryColor);\n\n this.secondaryColor = this.secondaryColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: -120\n });\n this.tertiaryColor = this.tertiaryColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: 180,\n l: 5\n });\n this.primaryBorderColor = this.primaryBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = this.secondaryBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = this.tertiaryBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.tertiaryColor, this.darkMode);\n this.noteBorderColor = this.noteBorderColor || Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.noteBkgColor, this.darkMode);\n this.secondaryTextColor = this.secondaryTextColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.secondaryColor);\n this.tertiaryTextColor = this.tertiaryTextColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.tertiaryColor);\n this.lineColor = this.lineColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n this.textColor = this.textColor || this.primaryTextColor;\n /* Flowchart variables */\n\n this.nodeBkg = this.nodeBkg || this.primaryColor;\n this.mainBkg = this.mainBkg || this.primaryColor;\n this.nodeBorder = this.nodeBorder || this.primaryBorderColor;\n this.clusterBkg = this.clusterBkg || this.tertiaryColor;\n this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor;\n this.defaultLinkColor = this.defaultLinkColor || this.lineColor;\n this.titleColor = this.titleColor || this.tertiaryTextColor;\n this.edgeLabelBackground = this.edgeLabelBackground || (this.darkMode ? Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])(this.secondaryColor, 30) : this.secondaryColor);\n this.nodeTextColor = this.nodeTextColor || this.primaryTextColor;\n /* Sequence Diagram variables */\n // this.actorBorder = lighten(this.border1, 0.5);\n\n this.actorBorder = this.actorBorder || this.primaryBorderColor;\n this.actorBkg = this.actorBkg || this.mainBkg;\n this.actorTextColor = this.actorTextColor || this.primaryTextColor;\n this.actorLineColor = this.actorLineColor || 'grey';\n this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg;\n this.signalColor = this.signalColor || this.textColor;\n this.signalTextColor = this.signalTextColor || this.textColor;\n this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder;\n this.labelTextColor = this.labelTextColor || this.actorTextColor;\n this.loopTextColor = this.loopTextColor || this.actorTextColor;\n this.activationBorderColor = this.activationBorderColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])(this.secondaryColor, 10);\n this.activationBkgColor = this.activationBkgColor || this.secondaryColor;\n this.sequenceNumberColor = this.sequenceNumberColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.lineColor);\n /* Gantt chart variables */\n\n this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor;\n this.altSectionBkgColor = this.altSectionBkgColor || 'white';\n this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor;\n this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor;\n this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor;\n this.taskBkgColor = this.taskBkgColor || this.primaryColor;\n this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor;\n this.activeTaskBkgColor = this.activeTaskBkgColor || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.primaryColor, 23);\n this.gridColor = this.gridColor || 'lightgrey';\n this.doneTaskBkgColor = this.doneTaskBkgColor || 'lightgrey';\n this.doneTaskBorderColor = this.doneTaskBorderColor || 'grey';\n this.critBorderColor = this.critBorderColor || '#ff8888';\n this.critBkgColor = this.critBkgColor || 'red';\n this.todayLineColor = this.todayLineColor || 'red';\n this.taskTextColor = this.taskTextColor || this.textColor;\n this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor;\n this.taskTextLightColor = this.taskTextLightColor || this.textColor;\n this.taskTextColor = this.taskTextColor || this.primaryTextColor;\n this.taskTextDarkColor = this.taskTextDarkColor || this.textColor;\n this.taskTextClickableColor = this.taskTextClickableColor || '#003163';\n /* state colors */\n\n this.labelColor = this.labelColor || this.primaryTextColor;\n this.altBackground = this.altBackground || this.tertiaryColor;\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n /* class */\n\n this.classText = this.classText || this.textColor;\n /* user-journey */\n\n this.fillType0 = this.fillType0 || this.primaryColor;\n this.fillType1 = this.fillType1 || this.secondaryColor;\n this.fillType2 = this.fillType2 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: 64\n });\n this.fillType3 = this.fillType3 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: 64\n });\n this.fillType4 = this.fillType4 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: -64\n });\n this.fillType5 = this.fillType5 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: -64\n });\n this.fillType6 = this.fillType6 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: 128\n });\n this.fillType7 = this.fillType7 || Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: 128\n });\n }\n }, {\n key: \"calculate\",\n value: function calculate(overrides) {\n var _this = this;\n\n if (_typeof(overrides) !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors\n\n keys.forEach(function (k) {\n _this[k] = overrides[k];\n }); // Calculate colors form base colors\n\n this.updateColors(); // Copy values from overrides again in case of an override of derived value\n\n keys.forEach(function (k) {\n _this[k] = overrides[k];\n });\n }\n }]);\n\n return Theme;\n }();\n\n var getThemeVariables = function getThemeVariables(userOverrides) {\n var theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n };\n /***/\n\n },\n\n /***/\n \"./src/themes/theme-dark.js\":\n /*!**********************************!*\\\n !*** ./src/themes/theme-dark.js ***!\n \\**********************************/\n\n /*! exports provided: getThemeVariables */\n\n /***/\n function srcThemesThemeDarkJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getThemeVariables\", function () {\n return getThemeVariables;\n });\n /* harmony import */\n\n\n var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! khroma */\n \"khroma\");\n /* harmony import */\n\n\n var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./theme-helpers */\n \"./src/themes/theme-helpers.js\");\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _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 Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n var Theme = /*#__PURE__*/function () {\n function Theme() {\n _classCallCheck(this, Theme);\n\n this.background = '#333';\n this.primaryColor = '#1f2020';\n this.secondaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.primaryColor, 16);\n this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: -160\n });\n this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.tertiaryColor, this.darkMode);\n this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.primaryColor);\n this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.secondaryColor);\n this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.tertiaryColor);\n this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n this.mainBkg = '#1f2020';\n this.secondBkg = 'calculated';\n this.mainContrastColor = 'lightgrey';\n this.darkTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])('#323D47'), 10);\n this.lineColor = 'calculated';\n this.border1 = '#81B1DB';\n this.border2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"rgba\"])(255, 255, 255, 0.25);\n this.arrowheadColor = 'calculated';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n this.labelBackground = '#181818';\n this.textColor = '#ccc';\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = '#F9FFFE';\n this.edgeLabelBackground = 'calculated';\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'calculated';\n this.actorLineColor = 'calculated';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = 'calculated';\n this.activationBkgColor = 'calculated';\n this.sequenceNumberColor = 'black';\n /* Gantt chart variables */\n\n this.sectionBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])('#EAE8D9', 30);\n this.altSectionBkgColor = 'calculated';\n this.sectionBkgColor2 = '#EAE8D9';\n this.taskBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"rgba\"])(255, 255, 255, 70);\n this.taskBkgColor = 'calculated';\n this.taskTextColor = 'calculated';\n this.taskTextLightColor = 'calculated';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"rgba\"])(255, 255, 255, 50);\n this.activeTaskBkgColor = '#81B1DB';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#E83737';\n this.critBkgColor = '#E83737';\n this.taskTextDarkColor = 'calculated';\n this.todayLineColor = '#DB5757';\n /* state colors */\n\n this.labelColor = 'calculated';\n this.errorBkgColor = '#a44141';\n this.errorTextColor = '#ddd';\n }\n\n _createClass(Theme, [{\n key: \"updateColors\",\n value: function updateColors() {\n this.secondBkg = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.mainBkg, 16);\n this.lineColor = this.mainContrastColor;\n this.arrowheadColor = this.mainContrastColor;\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.edgeLabelBackground = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.labelBackground, 25);\n /* Sequence Diagram variables */\n\n this.actorBorder = this.border1;\n this.actorBkg = this.mainBkg;\n this.actorTextColor = this.mainContrastColor;\n this.actorLineColor = this.mainContrastColor;\n this.signalColor = this.mainContrastColor;\n this.signalTextColor = this.mainContrastColor;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.mainContrastColor;\n this.loopTextColor = this.mainContrastColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.mainBkg;\n this.activationBorderColor = this.border1;\n this.activationBkgColor = this.secondBkg;\n /* Gantt chart variables */\n\n this.altSectionBkgColor = this.background;\n this.taskBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.mainBkg, 23);\n this.taskTextColor = this.darkTextColor;\n this.taskTextLightColor = this.mainContrastColor;\n this.taskTextOutsideColor = this.taskTextLightColor;\n this.gridColor = this.mainContrastColor;\n this.doneTaskBkgColor = this.mainContrastColor;\n this.taskTextDarkColor = this.darkTextColor;\n /* state colors */\n\n this.labelColor = this.textColor;\n this.altBackground = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.background, 20);\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: 64\n });\n this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: 64\n });\n this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: -64\n });\n this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: -64\n });\n this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: 128\n });\n this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: 128\n });\n /* class */\n\n this.classText = this.primaryTextColor;\n }\n }, {\n key: \"calculate\",\n value: function calculate(overrides) {\n var _this = this;\n\n if (_typeof(overrides) !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors\n\n keys.forEach(function (k) {\n _this[k] = overrides[k];\n }); // Calculate colors form base colors\n\n this.updateColors(); // Copy values from overrides again in case of an override of derived value\n\n keys.forEach(function (k) {\n _this[k] = overrides[k];\n });\n }\n }]);\n\n return Theme;\n }();\n\n var getThemeVariables = function getThemeVariables(userOverrides) {\n var theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n };\n /***/\n\n },\n\n /***/\n \"./src/themes/theme-default.js\":\n /*!*************************************!*\\\n !*** ./src/themes/theme-default.js ***!\n \\*************************************/\n\n /*! exports provided: getThemeVariables */\n\n /***/\n function srcThemesThemeDefaultJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getThemeVariables\", function () {\n return getThemeVariables;\n });\n /* harmony import */\n\n\n var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! khroma */\n \"khroma\");\n /* harmony import */\n\n\n var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./theme-helpers */\n \"./src/themes/theme-helpers.js\");\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _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 Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n var Theme = /*#__PURE__*/function () {\n function Theme() {\n _classCallCheck(this, Theme);\n /* Base variables */\n\n\n this.background = '#f4f4f4';\n this.primaryColor = '#ECECFF';\n this.secondaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: 120\n });\n this.secondaryColor = '#ffffde';\n this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: -160\n });\n this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.tertiaryColor, this.darkMode); // this.noteBorderColor = mkBorder(this.noteBkgColor, this.darkMode);\n\n this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.primaryColor);\n this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.secondaryColor);\n this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.tertiaryColor);\n this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n this.background = 'white';\n this.mainBkg = '#ECECFF';\n this.secondBkg = '#ffffde';\n this.lineColor = '#333333';\n this.border1 = '#9370DB';\n this.border2 = '#aaaa33';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n this.labelBackground = '#e8e8e8';\n this.textColor = '#333';\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = 'calculated';\n this.edgeLabelBackground = 'calculated';\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'black';\n this.actorLineColor = 'grey';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n /* Gantt chart variables */\n\n this.sectionBkgColor = 'calculated';\n this.altSectionBkgColor = 'calculated';\n this.sectionBkgColor2 = 'calculated';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = 'calculated';\n this.taskTextLightColor = 'calculated';\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextDarkColor = 'calculated';\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.taskTextClickableColor = 'calculated';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'calculated';\n this.critBorderColor = 'calculated';\n this.critBkgColor = 'calculated';\n this.todayLineColor = 'calculated';\n this.sectionBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"rgba\"])(102, 102, 255, 0.49);\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = '#fff400';\n this.taskBorderColor = '#534fbc';\n this.taskBkgColor = '#8a90dd';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = '#534fbc';\n this.activeTaskBkgColor = '#bfc7ff';\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n /* state colors */\n\n this.labelColor = 'black';\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n this.updateColors();\n }\n\n _createClass(Theme, [{\n key: \"updateColors\",\n value: function updateColors() {\n /* Flowchart variables */\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1; // border 1\n\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.textColor;\n this.edgeLabelBackground = this.labelBackground;\n /* Sequence Diagram variables */\n // this.actorBorder = lighten(this.border1, 0.5);\n\n this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.labelBoxBkgColor = this.actorBkg;\n this.signalColor = this.textColor;\n this.signalTextColor = this.textColor;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n /* Gantt chart variables */\n\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n /* state colors */\n\n /* class */\n\n this.classText = this.primaryTextColor;\n /* journey */\n\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: 64\n });\n this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: 64\n });\n this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: -64\n });\n this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: -64\n });\n this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: 128\n });\n this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: 128\n });\n }\n }, {\n key: \"calculate\",\n value: function calculate(overrides) {\n var _this = this;\n\n if (_typeof(overrides) !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors\n\n keys.forEach(function (k) {\n _this[k] = overrides[k];\n }); // Calculate colors form base colors\n\n this.updateColors(); // Copy values from overrides again in case of an override of derived value\n\n keys.forEach(function (k) {\n _this[k] = overrides[k];\n });\n }\n }]);\n\n return Theme;\n }();\n\n var getThemeVariables = function getThemeVariables(userOverrides) {\n var theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n };\n /***/\n\n },\n\n /***/\n \"./src/themes/theme-forest.js\":\n /*!************************************!*\\\n !*** ./src/themes/theme-forest.js ***!\n \\************************************/\n\n /*! exports provided: getThemeVariables */\n\n /***/\n function srcThemesThemeForestJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getThemeVariables\", function () {\n return getThemeVariables;\n });\n /* harmony import */\n\n\n var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! khroma */\n \"khroma\");\n /* harmony import */\n\n\n var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./theme-helpers */\n \"./src/themes/theme-helpers.js\");\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _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 Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n var Theme = /*#__PURE__*/function () {\n function Theme() {\n _classCallCheck(this, Theme);\n /* Base vales */\n\n\n this.background = '#f4f4f4';\n this.primaryColor = '#cde498';\n this.secondaryColor = '#cdffb2';\n this.background = 'white';\n this.mainBkg = '#cde498';\n this.secondBkg = '#cdffb2';\n this.lineColor = 'green';\n this.border1 = '#13540c';\n this.border2 = '#6eaa49';\n this.arrowheadColor = 'green';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])('#cde498', 10);\n this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.tertiaryColor, this.darkMode);\n this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.primaryColor);\n this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.secondaryColor);\n this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.primaryColor);\n this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = '#333';\n this.edgeLabelBackground = '#e8e8e8';\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'black';\n this.actorLineColor = 'grey';\n this.signalColor = '#333';\n this.signalTextColor = '#333';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = '#326932';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n /* Gantt chart variables */\n\n this.sectionBkgColor = '#6eaa49';\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = '#6eaa49';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = '#487e3a';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n /* state colors */\n\n this.labelColor = 'black';\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n }\n\n _createClass(Theme, [{\n key: \"updateColors\",\n value: function updateColors() {\n /* Flowchart variables */\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n /* Sequence Diagram variables */\n\n this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])(this.mainBkg, 20);\n this.actorBkg = this.mainBkg;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n /* Gantt chart variables */\n\n this.taskBorderColor = this.border1;\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.activeTaskBorderColor = this.taskBorderColor;\n this.activeTaskBkgColor = this.mainBkg;\n /* state colors */\n\n /* class */\n\n this.classText = this.primaryTextColor;\n /* journey */\n\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: 64\n });\n this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: 64\n });\n this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: -64\n });\n this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: -64\n });\n this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: 128\n });\n this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: 128\n });\n }\n }, {\n key: \"calculate\",\n value: function calculate(overrides) {\n var _this = this;\n\n if (_typeof(overrides) !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors\n\n keys.forEach(function (k) {\n _this[k] = overrides[k];\n }); // Calculate colors form base colors\n\n this.updateColors(); // Copy values from overrides again in case of an override of derived value\n\n keys.forEach(function (k) {\n _this[k] = overrides[k];\n });\n }\n }]);\n\n return Theme;\n }();\n\n var getThemeVariables = function getThemeVariables(userOverrides) {\n var theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n };\n /***/\n\n },\n\n /***/\n \"./src/themes/theme-helpers.js\":\n /*!*************************************!*\\\n !*** ./src/themes/theme-helpers.js ***!\n \\*************************************/\n\n /*! exports provided: mkBorder */\n\n /***/\n function srcThemesThemeHelpersJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"mkBorder\", function () {\n return mkBorder;\n });\n /* harmony import */\n\n\n var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! khroma */\n \"khroma\");\n /* harmony import */\n\n\n var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);\n\n var mkBorder = function mkBorder(col, darkMode) {\n return darkMode ? Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(col, {\n s: -40,\n l: 10\n }) : Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(col, {\n s: -40,\n l: -10\n });\n };\n /***/\n\n },\n\n /***/\n \"./src/themes/theme-neutral.js\":\n /*!*************************************!*\\\n !*** ./src/themes/theme-neutral.js ***!\n \\*************************************/\n\n /*! exports provided: getThemeVariables */\n\n /***/\n function srcThemesThemeNeutralJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getThemeVariables\", function () {\n return getThemeVariables;\n });\n /* harmony import */\n\n\n var khroma__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! khroma */\n \"khroma\");\n /* harmony import */\n\n\n var khroma__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(khroma__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var _theme_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! ./theme-helpers */\n \"./src/themes/theme-helpers.js\");\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _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 Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n } // const Color = require ( 'khroma/dist/color' ).default\n // Color.format.hex.stringify(Color.parse('hsl(210, 66.6666666667%, 95%)')); // => \"#EAF2FB\"\n\n\n var Theme = /*#__PURE__*/function () {\n function Theme() {\n _classCallCheck(this, Theme);\n\n this.primaryColor = '#eee';\n this.contrast = '#26a';\n this.secondaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.contrast, 55);\n this.background = '#ffffff'; // this.secondaryColor = adjust(this.primaryColor, { h: 120 });\n\n this.tertiaryColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: -160\n });\n this.primaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = Object(_theme_helpers__WEBPACK_IMPORTED_MODULE_1__[\"mkBorder\"])(this.tertiaryColor, this.darkMode); // this.noteBorderColor = mkBorder(this.noteBkgColor, this.darkMode);\n\n this.primaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.primaryColor);\n this.secondaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.secondaryColor);\n this.tertiaryTextColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.tertiaryColor);\n this.lineColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n this.textColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"invert\"])(this.background);\n this.altBackground = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.contrast, 55);\n this.mainBkg = '#eee';\n this.secondBkg = 'calculated';\n this.lineColor = '#666';\n this.border1 = '#999';\n this.border2 = 'calculated';\n this.note = '#ffa';\n this.text = '#333';\n this.critical = '#d42';\n this.done = '#bbb';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = 'calculated';\n this.edgeLabelBackground = 'white';\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'calculated';\n this.actorLineColor = 'calculated';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = 'calculated';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n /* Gantt chart variables */\n\n this.sectionBkgColor = 'calculated';\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = 'calculated';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = 'calculated';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'calculated';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'calculated';\n this.critBkgColor = 'calculated';\n this.critBorderColor = 'calculated';\n this.todayLineColor = 'calculated';\n /* state colors */\n\n this.labelColor = 'black';\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n }\n\n _createClass(Theme, [{\n key: \"updateColors\",\n value: function updateColors() {\n this.secondBkg = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.contrast, 55);\n this.border2 = this.contrast;\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.text;\n /* Sequence Diagram variables */\n\n this.actorBorder = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.actorTextColor = this.text;\n this.actorLineColor = this.lineColor;\n this.signalColor = this.text;\n this.signalTextColor = this.text;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.text;\n this.loopTextColor = this.text;\n this.noteBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])(this.note, 60);\n this.noteBkgColor = this.note;\n this.noteTextColor = this.actorTextColor;\n /* Gantt chart variables */\n\n this.sectionBkgColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.contrast, 30);\n this.sectionBkgColor2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.contrast, 30);\n this.taskBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])(this.contrast, 10);\n this.taskBkgColor = this.contrast;\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextDarkColor = this.text;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.activeTaskBorderColor = this.taskBorderColor;\n this.activeTaskBkgColor = this.mainBkg;\n this.gridColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"])(this.border1, 30);\n this.doneTaskBkgColor = this.done;\n this.doneTaskBorderColor = this.lineColor;\n this.critBkgColor = this.critical;\n this.critBorderColor = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"darken\"])(this.critBkgColor, 10);\n this.todayLineColor = this.critBkgColor;\n /* state colors */\n\n /* class */\n\n this.classText = this.primaryTextColor;\n /* journey */\n\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: 64\n });\n this.fillType3 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: 64\n });\n this.fillType4 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: -64\n });\n this.fillType5 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: -64\n });\n this.fillType6 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.primaryColor, {\n h: 128\n });\n this.fillType7 = Object(khroma__WEBPACK_IMPORTED_MODULE_0__[\"adjust\"])(this.secondaryColor, {\n h: 128\n });\n }\n }, {\n key: \"calculate\",\n value: function calculate(overrides) {\n var _this = this;\n\n if (_typeof(overrides) !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n var keys = Object.keys(overrides); // Copy values from overrides, this is mainly for base colors\n\n keys.forEach(function (k) {\n _this[k] = overrides[k];\n }); // Calculate colors form base colors\n\n this.updateColors(); // Copy values from overrides again in case of an override of derived value\n\n keys.forEach(function (k) {\n _this[k] = overrides[k];\n });\n }\n }]);\n\n return Theme;\n }();\n\n var getThemeVariables = function getThemeVariables(userOverrides) {\n var theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n };\n /***/\n\n },\n\n /***/\n \"./src/utils.js\":\n /*!**********************!*\\\n !*** ./src/utils.js ***!\n \\**********************/\n\n /*! exports provided: detectInit, detectDirective, detectType, isSubstringInArray, interpolateToCurve, formatUrl, runFunc, getStylesFromArray, generateId, random, assignWithDepth, getTextObj, drawSimpleText, wrapLabel, calculateTextHeight, calculateTextWidth, calculateTextDimensions, calculateSvgSizeAttrs, configureSvgSize, initIdGeneratior, default */\n\n /***/\n function srcUtilsJs(module, __webpack_exports__, __webpack_require__) {\n \"use strict\";\n\n __webpack_require__.r(__webpack_exports__);\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"detectInit\", function () {\n return detectInit;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"detectDirective\", function () {\n return detectDirective;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"detectType\", function () {\n return detectType;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"isSubstringInArray\", function () {\n return isSubstringInArray;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"interpolateToCurve\", function () {\n return interpolateToCurve;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"formatUrl\", function () {\n return formatUrl;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"runFunc\", function () {\n return runFunc;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getStylesFromArray\", function () {\n return getStylesFromArray;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"generateId\", function () {\n return generateId;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"random\", function () {\n return random;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"assignWithDepth\", function () {\n return assignWithDepth;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"getTextObj\", function () {\n return getTextObj;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"drawSimpleText\", function () {\n return drawSimpleText;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"wrapLabel\", function () {\n return wrapLabel;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"calculateTextHeight\", function () {\n return calculateTextHeight;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"calculateTextWidth\", function () {\n return calculateTextWidth;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"calculateTextDimensions\", function () {\n return calculateTextDimensions;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"calculateSvgSizeAttrs\", function () {\n return calculateSvgSizeAttrs;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"configureSvgSize\", function () {\n return configureSvgSize;\n });\n /* harmony export (binding) */\n\n\n __webpack_require__.d(__webpack_exports__, \"initIdGeneratior\", function () {\n return initIdGeneratior;\n });\n /* harmony import */\n\n\n var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\n /*! @braintree/sanitize-url */\n \"@braintree/sanitize-url\");\n /* harmony import */\n\n\n var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__);\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\n /*! d3 */\n \"d3\");\n /* harmony import */\n\n\n var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__);\n /* harmony import */\n\n\n var _diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\n /*! ./diagrams/common/common */\n \"./src/diagrams/common/common.js\");\n /* harmony import */\n\n\n var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\n /*! ./logger */\n \"./src/logger.js\");\n\n var _this = undefined;\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _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 Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n }\n\n function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }\n\n function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n } // import cryptoRandomString from 'crypto-random-string';\n // Effectively an enum of the supported curve types, accessible by name\n\n\n var d3CurveTypes = {\n curveBasis: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveBasis\"],\n curveBasisClosed: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveBasisClosed\"],\n curveBasisOpen: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveBasisOpen\"],\n curveLinear: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinear\"],\n curveLinearClosed: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveLinearClosed\"],\n curveMonotoneX: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveMonotoneX\"],\n curveMonotoneY: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveMonotoneY\"],\n curveNatural: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveNatural\"],\n curveStep: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveStep\"],\n curveStepAfter: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveStepAfter\"],\n curveStepBefore: d3__WEBPACK_IMPORTED_MODULE_1__[\"curveStepBefore\"]\n };\n var directive = /[%]{2}[{]\\s*(?:(?:(\\w+)\\s*:|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi;\n var directiveWithoutOpen = /\\s*(?:(?:(\\w+)(?=:):|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi;\n var anyComment = /\\s*%%.*\\n/gm;\n /**\n * @function detectInit\n * Detects the init config object from the text\n * ```mermaid\n * %%{init: {\"theme\": \"debug\", \"logLevel\": 1 }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n * or\n * ```mermaid\n * %%{initialize: {\"theme\": \"dark\", logLevel: \"debug\" }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @returns {object} the json object representing the init passed to mermaid.initialize()\n */\n\n var detectInit = function detectInit(text) {\n var inits = detectDirective(text, /(?:init\\b)|(?:initialize\\b)/);\n var results = {};\n\n if (Array.isArray(inits)) {\n var args = inits.map(function (init) {\n return init.args;\n });\n results = assignWithDepth(results, _toConsumableArray(args));\n } else {\n results = inits.args;\n }\n\n if (results) {\n var type = detectType(text);\n ['config'].forEach(function (prop) {\n if (typeof results[prop] !== 'undefined') {\n if (type === 'flowchart-v2') {\n type = 'flowchart';\n }\n\n results[type] = results[prop];\n delete results[prop];\n }\n });\n }\n\n return results;\n };\n /**\n * @function detectDirective\n * Detects the directive from the text. Text can be single line or multiline. If type is null or omitted\n * the first directive encountered in text will be returned\n * ```mermaid\n * graph LR\n * %%{somedirective}%%\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @param {string|RegExp} type The directive to return (default: null)\n * @returns {object | Array} An object or Array representing the directive(s): { type: string, args: object|null } matched by the input type\n * if a single directive was found, that directive object will be returned.\n */\n\n\n var detectDirective = function detectDirective(text) {\n var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n try {\n var commentWithoutDirectives = new RegExp(\"[%]{2}(?![{]\".concat(directiveWithoutOpen.source, \")(?=[}][%]{2}).*\\n\"), 'ig');\n text = text.trim().replace(commentWithoutDirectives, '').replace(/'/gm, '\"');\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug(\"Detecting diagram directive\".concat(type !== null ? ' type:' + type : '', \" based on the text:\").concat(text));\n\n var match,\n result = [];\n\n while ((match = directive.exec(text)) !== null) {\n // This is necessary to avoid infinite loops with zero-width matches\n if (match.index === directive.lastIndex) {\n directive.lastIndex++;\n }\n\n if (match && !type || type && match[1] && match[1].match(type) || type && match[2] && match[2].match(type)) {\n var _type = match[1] ? match[1] : match[2];\n\n var args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null;\n result.push({\n type: _type,\n args: args\n });\n }\n }\n\n if (result.length === 0) {\n result.push({\n type: text,\n args: null\n });\n }\n\n return result.length === 1 ? result[0] : result;\n } catch (error) {\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].error(\"ERROR: \".concat(error.message, \" - Unable to parse directive\").concat(type !== null ? ' type:' + type : '', \" based on the text:\").concat(text));\n\n return {\n type: null,\n args: null\n };\n }\n };\n /**\n * @function detectType\n * Detects the type of the graph text. Takes into consideration the possible existence of an %%init\n * directive\n * ```mermaid\n * %%{initialize: {\"startOnLoad\": true, logLevel: \"fatal\" }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * @param {string} text The text defining the graph\n * @returns {string} A graph definition key\n */\n\n\n var detectType = function detectType(text) {\n text = text.replace(directive, '').replace(anyComment, '\\n');\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].debug('Detecting diagram type based on the text ' + text);\n\n if (text.match(/^\\s*sequenceDiagram/)) {\n return 'sequence';\n }\n\n if (text.match(/^\\s*gantt/)) {\n return 'gantt';\n }\n\n if (text.match(/^\\s*classDiagram-v2/)) {\n return 'classDiagram';\n }\n\n if (text.match(/^\\s*classDiagram/)) {\n return 'class';\n }\n\n if (text.match(/^\\s*stateDiagram-v2/)) {\n return 'stateDiagram';\n }\n\n if (text.match(/^\\s*stateDiagram/)) {\n return 'state';\n }\n\n if (text.match(/^\\s*gitGraph/)) {\n return 'git';\n }\n\n if (text.match(/^\\s*flowchart/)) {\n return 'flowchart-v2';\n }\n\n if (text.match(/^\\s*info/)) {\n return 'info';\n }\n\n if (text.match(/^\\s*pie/)) {\n return 'pie';\n }\n\n if (text.match(/^\\s*erDiagram/)) {\n return 'er';\n }\n\n if (text.match(/^\\s*journey/)) {\n return 'journey';\n }\n\n return 'flowchart';\n };\n\n var memoize = function memoize(fn, resolver) {\n var cache = {};\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var n = resolver ? resolver.apply(_this, args) : args[0];\n\n if (n in cache) {\n return cache[n];\n } else {\n var result = fn.apply(void 0, args);\n cache[n] = result;\n return result;\n }\n };\n };\n /**\n * @function isSubstringInArray\n * Detects whether a substring in present in a given array\n * @param {string} str The substring to detect\n * @param {array} arr The array to search\n * @returns {number} the array index containing the substring or -1 if not present\n **/\n\n\n var isSubstringInArray = function isSubstringInArray(str, arr) {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i].match(str)) return i;\n }\n\n return -1;\n };\n\n var interpolateToCurve = function interpolateToCurve(interpolate, defaultCurve) {\n if (!interpolate) {\n return defaultCurve;\n }\n\n var curveName = \"curve\".concat(interpolate.charAt(0).toUpperCase() + interpolate.slice(1));\n return d3CurveTypes[curveName] || defaultCurve;\n };\n\n var formatUrl = function formatUrl(linkStr, config) {\n var url = linkStr.trim();\n\n if (url) {\n if (config.securityLevel !== 'loose') {\n return Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__[\"sanitizeUrl\"])(url);\n }\n\n return url;\n }\n };\n\n var runFunc = function runFunc(functionName) {\n var _obj;\n\n var arrPaths = functionName.split('.');\n var len = arrPaths.length - 1;\n var fnName = arrPaths[len];\n var obj = window;\n\n for (var i = 0; i < len; i++) {\n obj = obj[arrPaths[i]];\n if (!obj) return;\n }\n\n for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n params[_key2 - 1] = arguments[_key2];\n }\n\n (_obj = obj)[fnName].apply(_obj, params);\n };\n\n var distance = function distance(p1, p2) {\n return p1 && p2 ? Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)) : 0;\n };\n\n var traverseEdge = function traverseEdge(points) {\n var prevPoint;\n var totalDistance = 0;\n points.forEach(function (point) {\n totalDistance += distance(point, prevPoint);\n prevPoint = point;\n }); // Traverse half of total distance along points\n\n var remainingDistance = totalDistance / 2;\n var center = undefined;\n prevPoint = undefined;\n points.forEach(function (point) {\n if (prevPoint && !center) {\n var vectorDistance = distance(point, prevPoint);\n\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n var distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) center = prevPoint;\n if (distanceRatio >= 1) center = {\n x: point.x,\n y: point.y\n };\n\n if (distanceRatio > 0 && distanceRatio < 1) {\n center = {\n x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y\n };\n }\n }\n }\n\n prevPoint = point;\n });\n return center;\n };\n\n var calcLabelPosition = function calcLabelPosition(points) {\n return traverseEdge(points);\n };\n\n var calcCardinalityPosition = function calcCardinalityPosition(isRelationTypePresent, points, initialPosition) {\n var prevPoint;\n var totalDistance = 0; // eslint-disable-line\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('our points', points);\n\n if (points[0] !== initialPosition) {\n points = points.reverse();\n }\n\n points.forEach(function (point) {\n totalDistance += distance(point, prevPoint);\n prevPoint = point;\n }); // Traverse only 25 total distance along points to find cardinality point\n\n var distanceToCardinalityPoint = 25;\n var remainingDistance = distanceToCardinalityPoint;\n var center;\n prevPoint = undefined;\n points.forEach(function (point) {\n if (prevPoint && !center) {\n var vectorDistance = distance(point, prevPoint);\n\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n var distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) center = prevPoint;\n if (distanceRatio >= 1) center = {\n x: point.x,\n y: point.y\n };\n\n if (distanceRatio > 0 && distanceRatio < 1) {\n center = {\n x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y\n };\n }\n }\n }\n\n prevPoint = point;\n }); // if relation is present (Arrows will be added), change cardinality point off-set distance (d)\n\n var d = isRelationTypePresent ? 10 : 5; //Calculate Angle for x and y axis\n\n var angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);\n var cardinalityPosition = {\n x: 0,\n y: 0\n }; //Calculation cardinality position using angle, center point on the line/curve but pendicular and with offset-distance\n\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;\n return cardinalityPosition;\n };\n /**\n * position ['start_left', 'start_right', 'end_left', 'end_right']\n */\n\n\n var calcTerminalLabelPosition = function calcTerminalLabelPosition(terminalMarkerSize, position, _points) {\n // Todo looking to faster cloning method\n var points = JSON.parse(JSON.stringify(_points));\n var prevPoint;\n var totalDistance = 0; // eslint-disable-line\n\n _logger__WEBPACK_IMPORTED_MODULE_3__[\"log\"].info('our points', points);\n\n if (position !== 'start_left' && position !== 'start_right') {\n points = points.reverse();\n }\n\n points.forEach(function (point) {\n totalDistance += distance(point, prevPoint);\n prevPoint = point;\n }); // Traverse only 25 total distance along points to find cardinality point\n\n var distanceToCardinalityPoint = 25;\n var remainingDistance = distanceToCardinalityPoint;\n var center;\n prevPoint = undefined;\n points.forEach(function (point) {\n if (prevPoint && !center) {\n var vectorDistance = distance(point, prevPoint);\n\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n var distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) center = prevPoint;\n if (distanceRatio >= 1) center = {\n x: point.x,\n y: point.y\n };\n\n if (distanceRatio > 0 && distanceRatio < 1) {\n center = {\n x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y\n };\n }\n }\n }\n\n prevPoint = point;\n }); // if relation is present (Arrows will be added), change cardinality point off-set distance (d)\n\n var d = 10; //Calculate Angle for x and y axis\n\n var angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);\n var cardinalityPosition = {\n x: 0,\n y: 0\n }; //Calculation cardinality position using angle, center point on the line/curve but pendicular and with offset-distance\n\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;\n\n if (position === 'start_left') {\n cardinalityPosition.x = Math.sin(angle + Math.PI) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle + Math.PI) * d + (points[0].y + center.y) / 2;\n }\n\n if (position === 'end_right') {\n cardinalityPosition.x = Math.sin(angle - Math.PI) * d + (points[0].x + center.x) / 2 - 5;\n cardinalityPosition.y = -Math.cos(angle - Math.PI) * d + (points[0].y + center.y) / 2 - 5;\n }\n\n if (position === 'end_left') {\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2 - 5;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2 - 5;\n }\n\n return cardinalityPosition;\n };\n\n var getStylesFromArray = function getStylesFromArray(arr) {\n var style = '';\n var labelStyle = '';\n\n for (var i = 0; i < arr.length; i++) {\n if (typeof arr[i] !== 'undefined') {\n // add text properties to label style definition\n if (arr[i].startsWith('color:') || arr[i].startsWith('text-align:')) {\n labelStyle = labelStyle + arr[i] + ';';\n } else {\n style = style + arr[i] + ';';\n }\n }\n }\n\n return {\n style: style,\n labelStyle: labelStyle\n };\n };\n\n var cnt = 0;\n\n var generateId = function generateId() {\n cnt++;\n return 'id-' + Math.random().toString(36).substr(2, 12) + '-' + cnt;\n };\n\n function makeid(length) {\n var result = '';\n var characters = '0123456789abcdef';\n var charactersLength = characters.length;\n\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n\n return result;\n }\n\n var random = function random(options) {\n return makeid(options.length);\n };\n /**\n * @function assignWithDepth\n * Extends the functionality of {@link ObjectConstructor.assign} with the ability to merge arbitrary-depth objects\n * For each key in src with path `k` (recursively) performs an Object.assign(dst[`k`], src[`k`]) with\n * a slight change from the typical handling of undefined for dst[`k`]: instead of raising an error,\n * dst[`k`] is auto-initialized to {} and effectively merged with src[`k`]\n * \n * Additionally, dissimilar types will not clobber unless the config.clobber parameter === true. Example:\n * ```\n * let config_0 = { foo: { bar: 'bar' }, bar: 'foo' };\n * let config_1 = { foo: 'foo', bar: 'bar' };\n * let result = assignWithDepth(config_0, config_1);\n * console.log(result);\n * //-> result: { foo: { bar: 'bar' }, bar: 'bar' }\n * ```\n *
\n * Traditional Object.assign would have clobbered foo in config_0 with foo in config_1.\n *
\n * If src is a destructured array of objects and dst is not an array, assignWithDepth will apply each element of src to dst\n * in order.\n * @param dst:any - the destination of the merge\n * @param src:any - the source object(s) to merge into destination\n * @param config:{ depth: number, clobber: boolean } - depth: depth to traverse within src and dst for merging -\n * clobber: should dissimilar types clobber (default: { depth: 2, clobber: false })\n * @returns {*}\n */\n\n\n var assignWithDepth = function assignWithDepth(dst, src, config) {\n var _Object$assign = Object.assign({\n depth: 2,\n clobber: false\n }, config),\n depth = _Object$assign.depth,\n clobber = _Object$assign.clobber;\n\n if (Array.isArray(src) && !Array.isArray(dst)) {\n src.forEach(function (s) {\n return assignWithDepth(dst, s, config);\n });\n return dst;\n } else if (Array.isArray(src) && Array.isArray(dst)) {\n src.forEach(function (s) {\n if (dst.indexOf(s) === -1) {\n dst.push(s);\n }\n });\n return dst;\n }\n\n if (typeof dst === 'undefined' || depth <= 0) {\n if (dst !== undefined && dst !== null && _typeof(dst) === 'object' && _typeof(src) === 'object') {\n return Object.assign(dst, src);\n } else {\n return src;\n }\n }\n\n if (typeof src !== 'undefined' && _typeof(dst) === 'object' && _typeof(src) === 'object') {\n Object.keys(src).forEach(function (key) {\n if (_typeof(src[key]) === 'object' && (dst[key] === undefined || _typeof(dst[key]) === 'object')) {\n if (dst[key] === undefined) {\n dst[key] = Array.isArray(src[key]) ? [] : {};\n }\n\n dst[key] = assignWithDepth(dst[key], src[key], {\n depth: depth - 1,\n clobber: clobber\n });\n } else if (clobber || _typeof(dst[key]) !== 'object' && _typeof(src[key]) !== 'object') {\n dst[key] = src[key];\n }\n });\n }\n\n return dst;\n };\n\n var getTextObj = function getTextObj() {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n anchor: 'start',\n style: '#666',\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0,\n valign: undefined\n };\n };\n\n var drawSimpleText = function drawSimpleText(elem, textData) {\n // Remove and ignore br:s\n var nText = textData.text.replace(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lineBreakRegex, ' ');\n var textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.style('text-anchor', textData.anchor);\n textElem.style('font-family', textData.fontFamily);\n textElem.style('font-size', textData.fontSize);\n textElem.style('font-weight', textData.fontWeight);\n textElem.attr('fill', textData.fill);\n\n if (typeof textData[\"class\"] !== 'undefined') {\n textElem.attr('class', textData[\"class\"]);\n }\n\n var span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.attr('fill', textData.fill);\n span.text(nText);\n return textElem;\n };\n\n var wrapLabel = memoize(function (label, maxWidth, config) {\n if (!label) {\n return label;\n }\n\n config = Object.assign({\n fontSize: 12,\n fontWeight: 400,\n fontFamily: 'Arial',\n joinWith: '
'\n }, config);\n\n if (_diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lineBreakRegex.test(label)) {\n return label;\n }\n\n var words = label.split(' ');\n var completedLines = [];\n var nextLine = '';\n words.forEach(function (word, index) {\n var wordLength = calculateTextWidth(\"\".concat(word, \" \"), config);\n var nextLineLength = calculateTextWidth(nextLine, config);\n\n if (wordLength > maxWidth) {\n var _breakString = breakString(word, maxWidth, '-', config),\n hyphenatedStrings = _breakString.hyphenatedStrings,\n remainingWord = _breakString.remainingWord;\n\n completedLines.push.apply(completedLines, [nextLine].concat(_toConsumableArray(hyphenatedStrings)));\n nextLine = remainingWord;\n } else if (nextLineLength + wordLength >= maxWidth) {\n completedLines.push(nextLine);\n nextLine = word;\n } else {\n nextLine = [nextLine, word].filter(Boolean).join(' ');\n }\n\n var currentWord = index + 1;\n var isLastWord = currentWord === words.length;\n\n if (isLastWord) {\n completedLines.push(nextLine);\n }\n });\n return completedLines.filter(function (line) {\n return line !== '';\n }).join(config.joinWith);\n }, function (label, maxWidth, config) {\n return \"\".concat(label, \"-\").concat(maxWidth, \"-\").concat(config.fontSize, \"-\").concat(config.fontWeight, \"-\").concat(config.fontFamily, \"-\").concat(config.joinWith);\n });\n var breakString = memoize(function (word, maxWidth) {\n var hyphenCharacter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '-';\n var config = arguments.length > 3 ? arguments[3] : undefined;\n config = Object.assign({\n fontSize: 12,\n fontWeight: 400,\n fontFamily: 'Arial',\n margin: 0\n }, config);\n var characters = word.split('');\n var lines = [];\n var currentLine = '';\n characters.forEach(function (character, index) {\n var nextLine = \"\".concat(currentLine).concat(character);\n var lineWidth = calculateTextWidth(nextLine, config);\n\n if (lineWidth >= maxWidth) {\n var currentCharacter = index + 1;\n var isLastLine = characters.length === currentCharacter;\n var hyphenatedNextLine = \"\".concat(nextLine).concat(hyphenCharacter);\n lines.push(isLastLine ? nextLine : hyphenatedNextLine);\n currentLine = '';\n } else {\n currentLine = nextLine;\n }\n });\n return {\n hyphenatedStrings: lines,\n remainingWord: currentLine\n };\n }, function (word, maxWidth) {\n var hyphenCharacter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '-';\n var config = arguments.length > 3 ? arguments[3] : undefined;\n return \"\".concat(word, \"-\").concat(maxWidth, \"-\").concat(hyphenCharacter, \"-\").concat(config.fontSize, \"-\").concat(config.fontWeight, \"-\").concat(config.fontFamily);\n });\n /**\n * This calculates the text's height, taking into account the wrap breaks and\n * both the statically configured height, width, and the length of the text (in pixels).\n *\n * If the wrapped text text has greater height, we extend the height, so it's\n * value won't overflow.\n *\n * @return - The height for the given text\n * @param text the text to measure\n * @param config - the config for fontSize, fontFamily, and fontWeight all impacting the resulting size\n */\n\n var calculateTextHeight = function calculateTextHeight(text, config) {\n config = Object.assign({\n fontSize: 12,\n fontWeight: 400,\n fontFamily: 'Arial',\n margin: 15\n }, config);\n return calculateTextDimensions(text, config).height;\n };\n /**\n * This calculates the width of the given text, font size and family.\n *\n * @return - The width for the given text\n * @param text - The text to calculate the width of\n * @param config - the config for fontSize, fontFamily, and fontWeight all impacting the resulting size\n */\n\n\n var calculateTextWidth = function calculateTextWidth(text, config) {\n config = Object.assign({\n fontSize: 12,\n fontWeight: 400,\n fontFamily: 'Arial'\n }, config);\n return calculateTextDimensions(text, config).width;\n };\n /**\n * This calculates the dimensions of the given text, font size, font family, font weight, and margins.\n *\n * @return - The width for the given text\n * @param text - The text to calculate the width of\n * @param config - the config for fontSize, fontFamily, fontWeight, and margin all impacting the resulting size\n */\n\n\n var calculateTextDimensions = memoize(function (text, config) {\n config = Object.assign({\n fontSize: 12,\n fontWeight: 400,\n fontFamily: 'Arial'\n }, config);\n var _config = config,\n fontSize = _config.fontSize,\n fontFamily = _config.fontFamily,\n fontWeight = _config.fontWeight;\n\n if (!text) {\n return {\n width: 0,\n height: 0\n };\n } // We can't really know if the user supplied font family will render on the user agent;\n // thus, we'll take the max width between the user supplied font family, and a default\n // of sans-serif.\n\n\n var fontFamilies = ['sans-serif', fontFamily];\n var lines = text.split(_diagrams_common_common__WEBPACK_IMPORTED_MODULE_2__[\"default\"].lineBreakRegex);\n var dims = [];\n var body = Object(d3__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('body'); // We don't want to leak DOM elements - if a removal operation isn't available\n // for any reason, do not continue.\n\n if (!body.remove) {\n return {\n width: 0,\n height: 0,\n lineHeight: 0\n };\n }\n\n var g = body.append('svg');\n\n for (var _i = 0, _fontFamilies = fontFamilies; _i < _fontFamilies.length; _i++) {\n var _fontFamily = _fontFamilies[_i];\n var cheight = 0;\n var dim = {\n width: 0,\n height: 0,\n lineHeight: 0\n };\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = lines[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var line = _step.value;\n var textObj = getTextObj();\n textObj.text = line;\n var textElem = drawSimpleText(g, textObj).style('font-size', fontSize).style('font-weight', fontWeight).style('font-family', _fontFamily);\n var bBox = (textElem._groups || textElem)[0][0].getBBox();\n dim.width = Math.round(Math.max(dim.width, bBox.width));\n cheight = Math.round(bBox.height);\n dim.height += cheight;\n dim.lineHeight = Math.round(Math.max(dim.lineHeight, cheight));\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator[\"return\"] != null) {\n _iterator[\"return\"]();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n dims.push(dim);\n }\n\n g.remove();\n var index = isNaN(dims[1].height) || isNaN(dims[1].width) || isNaN(dims[1].lineHeight) || dims[0].height > dims[1].height && dims[0].width > dims[1].width && dims[0].lineHeight > dims[1].lineHeight ? 0 : 1;\n return dims[index];\n }, function (text, config) {\n return \"\".concat(text, \"-\").concat(config.fontSize, \"-\").concat(config.fontWeight, \"-\").concat(config.fontFamily);\n });\n\n var d3Attrs = function d3Attrs(d3Elem, attrs) {\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = attrs[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var attr = _step2.value;\n d3Elem.attr(attr[0], attr[1]);\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2[\"return\"] != null) {\n _iterator2[\"return\"]();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n };\n\n var calculateSvgSizeAttrs = function calculateSvgSizeAttrs(height, width, useMaxWidth) {\n var attrs = new Map();\n attrs.set('height', height);\n\n if (useMaxWidth) {\n attrs.set('width', '100%');\n attrs.set('style', \"max-width: \".concat(width, \"px;\"));\n } else {\n attrs.set('width', width);\n }\n\n return attrs;\n };\n\n var configureSvgSize = function configureSvgSize(svgElem, height, width, useMaxWidth) {\n var attrs = calculateSvgSizeAttrs(height, width, useMaxWidth);\n d3Attrs(svgElem, attrs);\n };\n\n var initIdGeneratior = function initIdGeneratior(deterministic, seed) {\n if (!deterministic) return {\n next: function next() {\n return Date.now();\n }\n };\n\n var iterator = /*#__PURE__*/function () {\n function iterator() {\n _classCallCheck(this, iterator);\n\n return this.count = seed ? seed.length : 0;\n }\n\n _createClass(iterator, [{\n key: \"next\",\n value: function next() {\n return this.count++;\n }\n }]);\n\n return iterator;\n }();\n\n return new iterator();\n };\n /* harmony default export */\n\n\n __webpack_exports__[\"default\"] = {\n assignWithDepth: assignWithDepth,\n wrapLabel: wrapLabel,\n calculateTextHeight: calculateTextHeight,\n calculateTextWidth: calculateTextWidth,\n calculateTextDimensions: calculateTextDimensions,\n calculateSvgSizeAttrs: calculateSvgSizeAttrs,\n configureSvgSize: configureSvgSize,\n detectInit: detectInit,\n detectDirective: detectDirective,\n detectType: detectType,\n isSubstringInArray: isSubstringInArray,\n interpolateToCurve: interpolateToCurve,\n calcLabelPosition: calcLabelPosition,\n calcCardinalityPosition: calcCardinalityPosition,\n calcTerminalLabelPosition: calcTerminalLabelPosition,\n formatUrl: formatUrl,\n getStylesFromArray: getStylesFromArray,\n generateId: generateId,\n random: random,\n memoize: memoize,\n runFunc: runFunc,\n initIdGeneratior: initIdGeneratior\n };\n /***/\n },\n\n /***/\n \"@braintree/sanitize-url\":\n /*!******************************************!*\\\n !*** external \"@braintree/sanitize-url\" ***!\n \\******************************************/\n\n /*! no static exports found */\n\n /***/\n function braintreeSanitizeUrl(module, exports) {\n module.exports = require(\"@braintree/sanitize-url\");\n /***/\n },\n\n /***/\n \"d3\":\n /*!*********************!*\\\n !*** external \"d3\" ***!\n \\*********************/\n\n /*! no static exports found */\n\n /***/\n function d3(module, exports) {\n module.exports = require(\"d3\");\n /***/\n },\n\n /***/\n \"dagre\":\n /*!************************!*\\\n !*** external \"dagre\" ***!\n \\************************/\n\n /*! no static exports found */\n\n /***/\n function dagre(module, exports) {\n module.exports = require(\"dagre\");\n /***/\n },\n\n /***/\n \"dagre-d3\":\n /*!***************************!*\\\n !*** external \"dagre-d3\" ***!\n \\***************************/\n\n /*! no static exports found */\n\n /***/\n function dagreD3(module, exports) {\n module.exports = require(\"dagre-d3\");\n /***/\n },\n\n /***/\n \"dagre-d3/lib/label/add-html-label.js\":\n /*!*******************************************************!*\\\n !*** external \"dagre-d3/lib/label/add-html-label.js\" ***!\n \\*******************************************************/\n\n /*! no static exports found */\n\n /***/\n function dagreD3LibLabelAddHtmlLabelJs(module, exports) {\n module.exports = require(\"dagre-d3/lib/label/add-html-label.js\");\n /***/\n },\n\n /***/\n \"entity-decode/browser\":\n /*!****************************************!*\\\n !*** external \"entity-decode/browser\" ***!\n \\****************************************/\n\n /*! no static exports found */\n\n /***/\n function entityDecodeBrowser(module, exports) {\n module.exports = require(\"entity-decode/browser\");\n /***/\n },\n\n /***/\n \"graphlib\":\n /*!***************************!*\\\n !*** external \"graphlib\" ***!\n \\***************************/\n\n /*! no static exports found */\n\n /***/\n function graphlib(module, exports) {\n module.exports = require(\"graphlib\");\n /***/\n },\n\n /***/\n \"khroma\":\n /*!*************************!*\\\n !*** external \"khroma\" ***!\n \\*************************/\n\n /*! no static exports found */\n\n /***/\n function khroma(module, exports) {\n module.exports = require(\"khroma\");\n /***/\n },\n\n /***/\n \"moment-mini\":\n /*!******************************!*\\\n !*** external \"moment-mini\" ***!\n \\******************************/\n\n /*! no static exports found */\n\n /***/\n function momentMini(module, exports) {\n module.exports = require(\"moment-mini\");\n /***/\n },\n\n /***/\n \"stylis\":\n /*!*************************!*\\\n !*** external \"stylis\" ***!\n \\*************************/\n\n /*! no static exports found */\n\n /***/\n function stylis(module, exports) {\n module.exports = require(\"stylis\");\n /***/\n }\n /******/\n\n })[\"default\"]\n );\n});","/* PrismJS 1.22.0\nhttps://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+c+csharp+css-extras+git+go+groovy+java+json+json5+jsonp+kotlin+markup-templating+objectivec+php+python+ruby+swift+typescript+xml-doc&plugins=line-highlight+line-numbers+keep-markup+command-line+toolbar+copy-to-clipboard */\nvar _self = \"undefined\" != typeof window ? window : \"undefined\" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope ? self : {},\n Prism = function (u) {\n var c = /\\blang(?:uage)?-([\\w-]+)\\b/i,\n n = 0,\n M = {\n manual: u.Prism && u.Prism.manual,\n disableWorkerMessageHandler: u.Prism && u.Prism.disableWorkerMessageHandler,\n util: {\n encode: function e(n) {\n return n instanceof W ? new W(n.type, e(n.content), n.alias) : Array.isArray(n) ? n.map(e) : n.replace(/&/g, \"&\").replace(/= l.reach); k += y.value.length, y = y.next) {\n var b = y.value;\n if (t.length > n.length) return;\n\n if (!(b instanceof W)) {\n var x = 1;\n\n if (h && y != t.tail.prev) {\n m.lastIndex = k;\n var w = m.exec(n);\n if (!w) break;\n var A = w.index + (f && w[1] ? w[1].length : 0),\n P = w.index + w[0].length,\n S = k;\n\n for (S += y.value.length; S <= A;) {\n y = y.next, S += y.value.length;\n }\n\n if (S -= y.value.length, k = S, y.value instanceof W) continue;\n\n for (var E = y; E !== t.tail && (S < P || \"string\" == typeof E.value); E = E.next) {\n x++, S += E.value.length;\n }\n\n x--, b = n.slice(k, S), w.index -= k;\n } else {\n m.lastIndex = 0;\n var w = m.exec(b);\n }\n\n if (w) {\n f && (d = w[1] ? w[1].length : 0);\n var A = w.index + d,\n O = w[0].slice(d),\n P = A + O.length,\n L = b.slice(0, A),\n N = b.slice(P),\n j = k + b.length;\n l && j > l.reach && (l.reach = j);\n var C = y.prev;\n L && (C = I(t, C, L), k += L.length), z(t, C, x);\n\n var _ = new W(o, g ? M.tokenize(O, g) : O, v, O);\n\n y = I(t, C, _), N && I(t, y, N), 1 < x && e(n, t, r, y.prev, k, {\n cause: o + \",\" + u,\n reach: j\n });\n }\n }\n }\n }\n }\n }\n }(e, a, n, a.head, 0), function (e) {\n var n = [],\n t = e.head.next;\n\n for (; t !== e.tail;) {\n n.push(t.value), t = t.next;\n }\n\n return n;\n }(a);\n },\n hooks: {\n all: {},\n add: function add(e, n) {\n var t = M.hooks.all;\n t[e] = t[e] || [], t[e].push(n);\n },\n run: function run(e, n) {\n var t = M.hooks.all[e];\n if (t && t.length) for (var r, a = 0; r = t[a++];) {\n r(n);\n }\n }\n },\n Token: W\n };\n\n function W(e, n, t, r) {\n this.type = e, this.content = n, this.alias = t, this.length = 0 | (r || \"\").length;\n }\n\n function i() {\n var e = {\n value: null,\n prev: null,\n next: null\n },\n n = {\n value: null,\n prev: e,\n next: null\n };\n e.next = n, this.head = e, this.tail = n, this.length = 0;\n }\n\n function I(e, n, t) {\n var r = n.next,\n a = {\n value: t,\n prev: n,\n next: r\n };\n return n.next = a, r.prev = a, e.length++, a;\n }\n\n function z(e, n, t) {\n for (var r = n.next, a = 0; a < t && r !== e.tail; a++) {\n r = r.next;\n }\n\n (n.next = r).prev = n, e.length -= a;\n }\n\n if (u.Prism = M, W.stringify = function n(e, t) {\n if (\"string\" == typeof e) return e;\n\n if (Array.isArray(e)) {\n var r = \"\";\n return e.forEach(function (e) {\n r += n(e, t);\n }), r;\n }\n\n var a = {\n type: e.type,\n content: n(e.content, t),\n tag: \"span\",\n classes: [\"token\", e.type],\n attributes: {},\n language: t\n },\n i = e.alias;\n i && (Array.isArray(i) ? Array.prototype.push.apply(a.classes, i) : a.classes.push(i)), M.hooks.run(\"wrap\", a);\n var l = \"\";\n\n for (var o in a.attributes) {\n l += \" \" + o + '=\"' + (a.attributes[o] || \"\").replace(/\"/g, \""\") + '\"';\n }\n\n return \"<\" + a.tag + ' class=\"' + a.classes.join(\" \") + '\"' + l + \">\" + a.content + \"\" + a.tag + \">\";\n }, !u.document) return u.addEventListener && (M.disableWorkerMessageHandler || u.addEventListener(\"message\", function (e) {\n var n = JSON.parse(e.data),\n t = n.language,\n r = n.code,\n a = n.immediateClose;\n u.postMessage(M.highlight(r, M.languages[t], t)), a && u.close();\n }, !1)), M;\n var e = M.util.currentScript();\n\n function t() {\n M.manual || M.highlightAll();\n }\n\n if (e && (M.filename = e.src, e.hasAttribute(\"data-manual\") && (M.manual = !0)), !M.manual) {\n var r = document.readyState;\n \"loading\" === r || \"interactive\" === r && e && e.defer ? document.addEventListener(\"DOMContentLoaded\", t) : window.requestAnimationFrame ? window.requestAnimationFrame(t) : window.setTimeout(t, 16);\n }\n\n return M;\n}(_self);\n\n\"undefined\" != typeof module && module.exports && (module.exports = Prism), \"undefined\" != typeof global && (global.Prism = Prism);\nPrism.languages.markup = {\n comment: //,\n prolog: /<\\?[\\s\\S]+?\\?>/,\n doctype: {\n pattern: /\"'[\\]]|\"[^\"]*\"|'[^']*')+(?:\\[(?:[^<\"'\\]]|\"[^\"]*\"|'[^']*'|<(?!!--)|)*\\]\\s*)?>/i,\n greedy: !0,\n inside: {\n \"internal-subset\": {\n pattern: /(\\[)[\\s\\S]+(?=\\]>$)/,\n lookbehind: !0,\n greedy: !0,\n inside: null\n },\n string: {\n pattern: /\"[^\"]*\"|'[^']*'/,\n greedy: !0\n },\n punctuation: /^$|[[\\]]/,\n \"doctype-tag\": /^DOCTYPE/,\n name: /[^\\s<>'\"]+/\n }\n },\n cdata: //i,\n tag: {\n pattern: /<\\/?(?!\\d)[^\\s>\\/=$<%]+(?:\\s(?:\\s*[^\\s>\\/=]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))|(?=[\\s/>])))+)?\\s*\\/?>/,\n greedy: !0,\n inside: {\n tag: {\n pattern: /^<\\/?[^\\s>\\/]+/,\n inside: {\n punctuation: /^<\\/?/,\n namespace: /^[^\\s>\\/:]+:/\n }\n },\n \"attr-value\": {\n pattern: /=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+)/,\n inside: {\n punctuation: [{\n pattern: /^=/,\n alias: \"attr-equals\"\n }, /\"|'/]\n }\n },\n punctuation: /\\/?>/,\n \"attr-name\": {\n pattern: /[^\\s>\\/]+/,\n inside: {\n namespace: /^[^\\s>\\/:]+:/\n }\n }\n }\n },\n entity: [{\n pattern: /&[\\da-z]{1,8};/i,\n alias: \"named-entity\"\n }, /?[\\da-f]{1,8};/i]\n}, Prism.languages.markup.tag.inside[\"attr-value\"].inside.entity = Prism.languages.markup.entity, Prism.languages.markup.doctype.inside[\"internal-subset\"].inside = Prism.languages.markup, Prism.hooks.add(\"wrap\", function (a) {\n \"entity\" === a.type && (a.attributes.title = a.content.replace(/&/, \"&\"));\n}), Object.defineProperty(Prism.languages.markup.tag, \"addInlined\", {\n value: function value(a, e) {\n var s = {};\n s[\"language-\" + e] = {\n pattern: /(^$)/i,\n lookbehind: !0,\n inside: Prism.languages[e]\n }, s.cdata = /^$/i;\n var n = {\n \"included-cdata\": {\n pattern: //i,\n inside: s\n }\n };\n n[\"language-\" + e] = {\n pattern: /[\\s\\S]+/,\n inside: Prism.languages[e]\n };\n var t = {};\n t[a] = {\n pattern: RegExp(\"(<__[^]*?>)(?:))*\\\\]\\\\]>|(?!)\".replace(/__/g, function () {\n return a;\n }), \"i\"),\n lookbehind: !0,\n greedy: !0,\n inside: n\n }, Prism.languages.insertBefore(\"markup\", \"cdata\", t);\n }\n}), Prism.languages.html = Prism.languages.markup, Prism.languages.mathml = Prism.languages.markup, Prism.languages.svg = Prism.languages.markup, Prism.languages.xml = Prism.languages.extend(\"markup\", {}), Prism.languages.ssml = Prism.languages.xml, Prism.languages.atom = Prism.languages.xml, Prism.languages.rss = Prism.languages.xml;\n!function (e) {\n var t = /(\"|')(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1/;\n e.languages.css = {\n comment: /\\/\\*[\\s\\S]*?\\*\\//,\n atrule: {\n pattern: /@[\\w-]+[\\s\\S]*?(?:;|(?=\\s*\\{))/,\n inside: {\n rule: /^@[\\w-]+/,\n \"selector-function-argument\": {\n pattern: /(\\bselector\\s*\\((?!\\s*\\))\\s*)(?:[^()]|\\((?:[^()]|\\([^()]*\\))*\\))+?(?=\\s*\\))/,\n lookbehind: !0,\n alias: \"selector\"\n },\n keyword: {\n pattern: /(^|[^\\w-])(?:and|not|only|or)(?![\\w-])/,\n lookbehind: !0\n }\n }\n },\n url: {\n pattern: RegExp(\"\\\\burl\\\\((?:\" + t.source + \"|(?:[^\\\\\\\\\\r\\n()\\\"']|\\\\\\\\[^])*)\\\\)\", \"i\"),\n greedy: !0,\n inside: {\n \"function\": /^url/i,\n punctuation: /^\\(|\\)$/,\n string: {\n pattern: RegExp(\"^\" + t.source + \"$\"),\n alias: \"url\"\n }\n }\n },\n selector: RegExp(\"[^{}\\\\s](?:[^{};\\\"']|\" + t.source + \")*?(?=\\\\s*\\\\{)\"),\n string: {\n pattern: t,\n greedy: !0\n },\n property: /[-_a-z\\xA0-\\uFFFF][-\\w\\xA0-\\uFFFF]*(?=\\s*:)/i,\n important: /!important\\b/i,\n \"function\": /[-a-z0-9]+(?=\\()/i,\n punctuation: /[(){};:,]/\n }, e.languages.css.atrule.inside.rest = e.languages.css;\n var s = e.languages.markup;\n s && (s.tag.addInlined(\"style\", \"css\"), e.languages.insertBefore(\"inside\", \"attr-value\", {\n \"style-attr\": {\n pattern: /(^|[\"'\\s])style\\s*=\\s*(?:\"[^\"]*\"|'[^']*')/i,\n lookbehind: !0,\n inside: {\n \"attr-value\": {\n pattern: /=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+)/,\n inside: {\n style: {\n pattern: /([\"'])[\\s\\S]+(?=[\"']$)/,\n lookbehind: !0,\n alias: \"language-css\",\n inside: e.languages.css\n },\n punctuation: [{\n pattern: /^=/,\n alias: \"attr-equals\"\n }, /\"|'/]\n }\n },\n \"attr-name\": /^style/i\n }\n }\n }, s.tag));\n}(Prism);\nPrism.languages.clike = {\n comment: [{\n pattern: /(^|[^\\\\])\\/\\*[\\s\\S]*?(?:\\*\\/|$)/,\n lookbehind: !0\n }, {\n pattern: /(^|[^\\\\:])\\/\\/.*/,\n lookbehind: !0,\n greedy: !0\n }],\n string: {\n pattern: /([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1/,\n greedy: !0\n },\n \"class-name\": {\n pattern: /(\\b(?:class|interface|extends|implements|trait|instanceof|new)\\s+|\\bcatch\\s+\\()[\\w.\\\\]+/i,\n lookbehind: !0,\n inside: {\n punctuation: /[.\\\\]/\n }\n },\n keyword: /\\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\\b/,\n \"boolean\": /\\b(?:true|false)\\b/,\n \"function\": /\\w+(?=\\()/,\n number: /\\b0x[\\da-f]+\\b|(?:\\b\\d+\\.?\\d*|\\B\\.\\d+)(?:e[+-]?\\d+)?/i,\n operator: /[<>]=?|[!=]=?=?|--?|\\+\\+?|&&?|\\|\\|?|[?*/~^%]/,\n punctuation: /[{}[\\];(),.:]/\n};\nPrism.languages.javascript = Prism.languages.extend(\"clike\", {\n \"class-name\": [Prism.languages.clike[\"class-name\"], {\n pattern: /(^|[^$\\w\\xA0-\\uFFFF])[_$A-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*(?=\\.(?:prototype|constructor))/,\n lookbehind: !0\n }],\n keyword: [{\n pattern: /((?:^|})\\s*)(?:catch|finally)\\b/,\n lookbehind: !0\n }, {\n pattern: /(^|[^.]|\\.\\.\\.\\s*)\\b(?:as|async(?=\\s*(?:function\\b|\\(|[$\\w\\xA0-\\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\\s*[\\[$\\w\\xA0-\\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\\b/,\n lookbehind: !0\n }],\n number: /\\b(?:(?:0[xX](?:[\\dA-Fa-f](?:_[\\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\\d(?:_\\d)?)+n|NaN|Infinity)\\b|(?:\\b(?:\\d(?:_\\d)?)+\\.?(?:\\d(?:_\\d)?)*|\\B\\.(?:\\d(?:_\\d)?)+)(?:[Ee][+-]?(?:\\d(?:_\\d)?)+)?/,\n \"function\": /#?[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*(?=\\s*(?:\\.\\s*(?:apply|bind|call)\\s*)?\\()/,\n operator: /--|\\+\\+|\\*\\*=?|=>|&&=?|\\|\\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\\.{3}|\\?\\?=?|\\?\\.?|[~:]/\n}), Prism.languages.javascript[\"class-name\"][0].pattern = /(\\b(?:class|interface|extends|implements|instanceof|new)\\s+)[\\w.\\\\]+/, Prism.languages.insertBefore(\"javascript\", \"keyword\", {\n regex: {\n pattern: /((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[gimyus]{0,6}(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))/,\n lookbehind: !0,\n greedy: !0,\n inside: {\n \"regex-source\": {\n pattern: /^(\\/)[\\s\\S]+(?=\\/[a-z]*$)/,\n lookbehind: !0,\n alias: \"language-regex\",\n inside: Prism.languages.regex\n },\n \"regex-flags\": /[a-z]+$/,\n \"regex-delimiter\": /^\\/|\\/$/\n }\n },\n \"function-variable\": {\n pattern: /#?[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*(?=\\s*[=:]\\s*(?:async\\s*)?(?:\\bfunction\\b|(?:\\((?:[^()]|\\([^()]*\\))*\\)|[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*)\\s*=>))/,\n alias: \"function\"\n },\n parameter: [{\n pattern: /(function(?:\\s+[_$A-Za-z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*)?\\s*\\(\\s*)(?!\\s)(?:[^()]|\\([^()]*\\))+?(?=\\s*\\))/,\n lookbehind: !0,\n inside: Prism.languages.javascript\n }, {\n pattern: /[_$a-z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*(?=\\s*=>)/i,\n inside: Prism.languages.javascript\n }, {\n pattern: /(\\(\\s*)(?!\\s)(?:[^()]|\\([^()]*\\))+?(?=\\s*\\)\\s*=>)/,\n lookbehind: !0,\n inside: Prism.languages.javascript\n }, {\n pattern: /((?:\\b|\\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\\w\\xA0-\\uFFFF]))(?:[_$A-Za-z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*\\s*)\\(\\s*|\\]\\s*\\(\\s*)(?!\\s)(?:[^()]|\\([^()]*\\))+?(?=\\s*\\)\\s*\\{)/,\n lookbehind: !0,\n inside: Prism.languages.javascript\n }],\n constant: /\\b[A-Z](?:[A-Z_]|\\dx?)*\\b/\n}), Prism.languages.insertBefore(\"javascript\", \"string\", {\n \"template-string\": {\n pattern: /`(?:\\\\[\\s\\S]|\\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\\${)[^\\\\`])*`/,\n greedy: !0,\n inside: {\n \"template-punctuation\": {\n pattern: /^`|`$/,\n alias: \"string\"\n },\n interpolation: {\n pattern: /((?:^|[^\\\\])(?:\\\\{2})*)\\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,\n lookbehind: !0,\n inside: {\n \"interpolation-punctuation\": {\n pattern: /^\\${|}$/,\n alias: \"punctuation\"\n },\n rest: Prism.languages.javascript\n }\n },\n string: /[\\s\\S]+/\n }\n }\n}), Prism.languages.markup && Prism.languages.markup.tag.addInlined(\"script\", \"javascript\"), Prism.languages.js = Prism.languages.javascript;\n!function (e) {\n var t = \"\\\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\\\b\",\n n = {\n pattern: /(^([\"']?)\\w+\\2)[ \\t]+\\S.*/,\n lookbehind: !0,\n alias: \"punctuation\",\n inside: null\n },\n a = {\n bash: n,\n environment: {\n pattern: RegExp(\"\\\\$\" + t),\n alias: \"constant\"\n },\n variable: [{\n pattern: /\\$?\\(\\([\\s\\S]+?\\)\\)/,\n greedy: !0,\n inside: {\n variable: [{\n pattern: /(^\\$\\(\\([\\s\\S]+)\\)\\)/,\n lookbehind: !0\n }, /^\\$\\(\\(/],\n number: /\\b0x[\\dA-Fa-f]+\\b|(?:\\b\\d+\\.?\\d*|\\B\\.\\d+)(?:[Ee]-?\\d+)?/,\n operator: /--?|-=|\\+\\+?|\\+=|!=?|~|\\*\\*?|\\*=|\\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\\^=?|\\|\\|?|\\|=|\\?|:/,\n punctuation: /\\(\\(?|\\)\\)?|,|;/\n }\n }, {\n pattern: /\\$\\((?:\\([^)]+\\)|[^()])+\\)|`[^`]+`/,\n greedy: !0,\n inside: {\n variable: /^\\$\\(|^`|\\)$|`$/\n }\n }, {\n pattern: /\\$\\{[^}]+\\}/,\n greedy: !0,\n inside: {\n operator: /:[-=?+]?|[!\\/]|##?|%%?|\\^\\^?|,,?/,\n punctuation: /[\\[\\]]/,\n environment: {\n pattern: RegExp(\"(\\\\{)\" + t),\n lookbehind: !0,\n alias: \"constant\"\n }\n }\n }, /\\$(?:\\w+|[#?*!@$])/],\n entity: /\\\\(?:[abceEfnrtv\\\\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/\n };\n e.languages.bash = {\n shebang: {\n pattern: /^#!\\s*\\/.*/,\n alias: \"important\"\n },\n comment: {\n pattern: /(^|[^\"{\\\\$])#.*/,\n lookbehind: !0\n },\n \"function-name\": [{\n pattern: /(\\bfunction\\s+)\\w+(?=(?:\\s*\\(?:\\s*\\))?\\s*\\{)/,\n lookbehind: !0,\n alias: \"function\"\n }, {\n pattern: /\\b\\w+(?=\\s*\\(\\s*\\)\\s*\\{)/,\n alias: \"function\"\n }],\n \"for-or-select\": {\n pattern: /(\\b(?:for|select)\\s+)\\w+(?=\\s+in\\s)/,\n alias: \"variable\",\n lookbehind: !0\n },\n \"assign-left\": {\n pattern: /(^|[\\s;|&]|[<>]\\()\\w+(?=\\+?=)/,\n inside: {\n environment: {\n pattern: RegExp(\"(^|[\\\\s;|&]|[<>]\\\\()\" + t),\n lookbehind: !0,\n alias: \"constant\"\n }\n },\n alias: \"variable\",\n lookbehind: !0\n },\n string: [{\n pattern: /((?:^|[^<])<<-?\\s*)(\\w+?)\\s[\\s\\S]*?(?:\\r?\\n|\\r)\\2/,\n lookbehind: !0,\n greedy: !0,\n inside: a\n }, {\n pattern: /((?:^|[^<])<<-?\\s*)([\"'])(\\w+)\\2\\s[\\s\\S]*?(?:\\r?\\n|\\r)\\3/,\n lookbehind: !0,\n greedy: !0,\n inside: {\n bash: n\n }\n }, {\n pattern: /(^|[^\\\\](?:\\\\\\\\)*)([\"'])(?:\\\\[\\s\\S]|\\$\\([^)]+\\)|\\$(?!\\()|`[^`]+`|(?!\\2)[^\\\\`$])*\\2/,\n lookbehind: !0,\n greedy: !0,\n inside: a\n }],\n environment: {\n pattern: RegExp(\"\\\\$?\" + t),\n alias: \"constant\"\n },\n variable: a.variable,\n \"function\": {\n pattern: /(^|[\\s;|&]|[<>]\\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\\s;|&])/,\n lookbehind: !0\n },\n keyword: {\n pattern: /(^|[\\s;|&]|[<>]\\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\\s;|&])/,\n lookbehind: !0\n },\n builtin: {\n pattern: /(^|[\\s;|&]|[<>]\\()(?:\\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\\s;|&])/,\n lookbehind: !0,\n alias: \"class-name\"\n },\n \"boolean\": {\n pattern: /(^|[\\s;|&]|[<>]\\()(?:true|false)(?=$|[)\\s;|&])/,\n lookbehind: !0\n },\n \"file-descriptor\": {\n pattern: /\\B&\\d\\b/,\n alias: \"important\"\n },\n operator: {\n pattern: /\\d?<>|>\\||\\+=|==?|!=?|=~|<<[<-]?|[&\\d]?>>|\\d?[<>]&?|&[>&]?|\\|[&|]?|<=?|>=?/,\n inside: {\n \"file-descriptor\": {\n pattern: /^\\d/,\n alias: \"important\"\n }\n }\n },\n punctuation: /\\$?\\(\\(?|\\)\\)?|\\.\\.|[{}[\\];\\\\]/,\n number: {\n pattern: /(^|\\s)(?:[1-9]\\d*|0)(?:[.,]\\d+)?\\b/,\n lookbehind: !0\n }\n }, n.inside = e.languages.bash;\n\n for (var s = [\"comment\", \"function-name\", \"for-or-select\", \"assign-left\", \"string\", \"environment\", \"function\", \"keyword\", \"builtin\", \"boolean\", \"file-descriptor\", \"operator\", \"punctuation\", \"number\"], i = a.variable[1].inside, o = 0; o < s.length; o++) {\n i[s[o]] = e.languages.bash[s[o]];\n }\n\n e.languages.shell = e.languages.bash;\n}(Prism);\nPrism.languages.c = Prism.languages.extend(\"clike\", {\n comment: {\n pattern: /\\/\\/(?:[^\\r\\n\\\\]|\\\\(?:\\r\\n?|\\n|(?![\\r\\n])))*|\\/\\*[\\s\\S]*?(?:\\*\\/|$)/,\n greedy: !0\n },\n \"class-name\": {\n pattern: /(\\b(?:enum|struct)\\s+(?:__attribute__\\s*\\(\\([\\s\\S]*?\\)\\)\\s*)?)\\w+/,\n lookbehind: !0\n },\n keyword: /\\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\\b/,\n \"function\": /[a-z_]\\w*(?=\\s*\\()/i,\n operator: />>=?|<<=?|->|([-+&|:])\\1|[?:~]|[-+*/%&|^!=<>]=?/,\n number: /(?:\\b0x(?:[\\da-f]+\\.?[\\da-f]*|\\.[\\da-f]+)(?:p[+-]?\\d+)?|(?:\\b\\d+\\.?\\d*|\\B\\.\\d+)(?:e[+-]?\\d+)?)[ful]*/i\n}), Prism.languages.insertBefore(\"c\", \"string\", {\n macro: {\n pattern: /(^\\s*)#\\s*[a-z]+(?:[^\\r\\n\\\\/]|\\/(?!\\*)|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|\\\\(?:\\r\\n|[\\s\\S]))*/im,\n lookbehind: !0,\n greedy: !0,\n alias: \"property\",\n inside: {\n string: [{\n pattern: /^(#\\s*include\\s*)<[^>]+>/,\n lookbehind: !0\n }, Prism.languages.c.string],\n comment: Prism.languages.c.comment,\n directive: {\n pattern: /^(#\\s*)[a-z]+/,\n lookbehind: !0,\n alias: \"keyword\"\n },\n \"directive-hash\": /^#/,\n punctuation: /##|\\\\(?=[\\r\\n])/,\n expression: {\n pattern: /\\S[\\s\\S]*/,\n inside: Prism.languages.c\n }\n }\n },\n constant: /\\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\\b/\n}), delete Prism.languages.c[\"boolean\"];\n!function (s) {\n function a(e, s) {\n return e.replace(/<<(\\d+)>>/g, function (e, n) {\n return \"(?:\" + s[+n] + \")\";\n });\n }\n\n function t(e, n, s) {\n return RegExp(a(e, n), s || \"\");\n }\n\n function e(e, n) {\n for (var s = 0; s < n; s++) {\n e = e.replace(/<>/g, function () {\n return \"(?:\" + e + \")\";\n });\n }\n\n return e.replace(/<>/g, \"[^\\\\s\\\\S]\");\n }\n\n var n = \"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void\",\n i = \"class enum interface struct\",\n r = \"add alias and ascending async await by descending from get global group into join let nameof not notnull on or orderby partial remove select set unmanaged value when where\",\n o = \"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield\";\n\n function l(e) {\n return \"\\\\b(?:\" + e.trim().replace(/ /g, \"|\") + \")\\\\b\";\n }\n\n var d = l(i),\n p = RegExp(l(n + \" \" + i + \" \" + r + \" \" + o)),\n c = l(i + \" \" + r + \" \" + o),\n u = l(n + \" \" + i + \" \" + o),\n g = e(\"<(?:[^<>;=+\\\\-*/%&|^]|<>)*>\", 2),\n b = e(\"\\\\((?:[^()]|<>)*\\\\)\", 2),\n h = \"@?\\\\b[A-Za-z_]\\\\w*\\\\b\",\n f = a(\"<<0>>(?:\\\\s*<<1>>)?\", [h, g]),\n m = a(\"(?!<<0>>)<<1>>(?:\\\\s*\\\\.\\\\s*<<1>>)*\", [c, f]),\n k = \"\\\\[\\\\s*(?:,\\\\s*)*\\\\]\",\n y = a(\"<<0>>(?:\\\\s*(?:\\\\?\\\\s*)?<<1>>)*(?:\\\\s*\\\\?)?\", [m, k]),\n w = a(\"(?:<<0>>|<<1>>)(?:\\\\s*(?:\\\\?\\\\s*)?<<2>>)*(?:\\\\s*\\\\?)?\", [a(\"\\\\(<<0>>+(?:,<<0>>+)+\\\\)\", [a(\"[^,()<>[\\\\];=+\\\\-*/%&|^]|<<0>>|<<1>>|<<2>>\", [g, b, k])]), m, k]),\n v = {\n keyword: p,\n punctuation: /[<>()?,.:[\\]]/\n },\n x = \"'(?:[^\\r\\n'\\\\\\\\]|\\\\\\\\.|\\\\\\\\[Uux][\\\\da-fA-F]{1,8})'\",\n $ = '\"(?:\\\\\\\\.|[^\\\\\\\\\"\\r\\n])*\"';\n s.languages.csharp = s.languages.extend(\"clike\", {\n string: [{\n pattern: t(\"(^|[^$\\\\\\\\])<<0>>\", ['@\"(?:\"\"|\\\\\\\\[^]|[^\\\\\\\\\"])*\"(?!\")']),\n lookbehind: !0,\n greedy: !0\n }, {\n pattern: t(\"(^|[^@$\\\\\\\\])<<0>>\", [$]),\n lookbehind: !0,\n greedy: !0\n }, {\n pattern: RegExp(x),\n greedy: !0,\n alias: \"character\"\n }],\n \"class-name\": [{\n pattern: t(\"(\\\\busing\\\\s+static\\\\s+)<<0>>(?=\\\\s*;)\", [m]),\n lookbehind: !0,\n inside: v\n }, {\n pattern: t(\"(\\\\busing\\\\s+<<0>>\\\\s*=\\\\s*)<<1>>(?=\\\\s*;)\", [h, w]),\n lookbehind: !0,\n inside: v\n }, {\n pattern: t(\"(\\\\busing\\\\s+)<<0>>(?=\\\\s*=)\", [h]),\n lookbehind: !0\n }, {\n pattern: t(\"(\\\\b<<0>>\\\\s+)<<1>>\", [d, f]),\n lookbehind: !0,\n inside: v\n }, {\n pattern: t(\"(\\\\bcatch\\\\s*\\\\(\\\\s*)<<0>>\", [m]),\n lookbehind: !0,\n inside: v\n }, {\n pattern: t(\"(\\\\bwhere\\\\s+)<<0>>\", [h]),\n lookbehind: !0\n }, {\n pattern: t(\"(\\\\b(?:is(?:\\\\s+not)?|as)\\\\s+)<<0>>\", [y]),\n lookbehind: !0,\n inside: v\n }, {\n pattern: t(\"\\\\b<<0>>(?=\\\\s+(?!<<1>>)<<2>>(?:\\\\s*[=,;:{)\\\\]]|\\\\s+(?:in|when)\\\\b))\", [w, u, h]),\n inside: v\n }],\n keyword: p,\n number: /(?:\\b0(?:x[\\da-f_]*[\\da-f]|b[01_]*[01])|(?:\\B\\.\\d+(?:_+\\d+)*|\\b\\d+(?:_+\\d+)*(?:\\.\\d+(?:_+\\d+)*)?)(?:e[-+]?\\d+(?:_+\\d+)*)?)(?:ul|lu|[dflmu])?\\b/i,\n operator: />>=?|<<=?|[-=]>|([-+&|])\\1|~|\\?\\?=?|[-+*/%&|^!=<>]=?/,\n punctuation: /\\?\\.?|::|[{}[\\];(),.:]/\n }), s.languages.insertBefore(\"csharp\", \"number\", {\n range: {\n pattern: /\\.\\./,\n alias: \"operator\"\n }\n }), s.languages.insertBefore(\"csharp\", \"punctuation\", {\n \"named-parameter\": {\n pattern: t(\"([(,]\\\\s*)<<0>>(?=\\\\s*:)\", [h]),\n lookbehind: !0,\n alias: \"punctuation\"\n }\n }), s.languages.insertBefore(\"csharp\", \"class-name\", {\n namespace: {\n pattern: t(\"(\\\\b(?:namespace|using)\\\\s+)<<0>>(?:\\\\s*\\\\.\\\\s*<<0>>)*(?=\\\\s*[;{])\", [h]),\n lookbehind: !0,\n inside: {\n punctuation: /\\./\n }\n },\n \"type-expression\": {\n pattern: t(\"(\\\\b(?:default|typeof|sizeof)\\\\s*\\\\(\\\\s*)(?:[^()\\\\s]|\\\\s(?!\\\\s*\\\\))|<<0>>)*(?=\\\\s*\\\\))\", [b]),\n lookbehind: !0,\n alias: \"class-name\",\n inside: v\n },\n \"return-type\": {\n pattern: t(\"<<0>>(?=\\\\s+(?:<<1>>\\\\s*(?:=>|[({]|\\\\.\\\\s*this\\\\s*\\\\[)|this\\\\s*\\\\[))\", [w, m]),\n inside: v,\n alias: \"class-name\"\n },\n \"constructor-invocation\": {\n pattern: t(\"(\\\\bnew\\\\s+)<<0>>(?=\\\\s*[[({])\", [w]),\n lookbehind: !0,\n inside: v,\n alias: \"class-name\"\n },\n \"generic-method\": {\n pattern: t(\"<<0>>\\\\s*<<1>>(?=\\\\s*\\\\()\", [h, g]),\n inside: {\n \"function\": t(\"^<<0>>\", [h]),\n generic: {\n pattern: RegExp(g),\n alias: \"class-name\",\n inside: v\n }\n }\n },\n \"type-list\": {\n pattern: t(\"\\\\b((?:<<0>>\\\\s+<<1>>|where\\\\s+<<2>>)\\\\s*:\\\\s*)(?:<<3>>|<<4>>)(?:\\\\s*,\\\\s*(?:<<3>>|<<4>>))*(?=\\\\s*(?:where|[{;]|=>|$))\", [d, f, h, w, p.source]),\n lookbehind: !0,\n inside: {\n keyword: p,\n \"class-name\": {\n pattern: RegExp(w),\n greedy: !0,\n inside: v\n },\n punctuation: /,/\n }\n },\n preprocessor: {\n pattern: /(^\\s*)#.*/m,\n lookbehind: !0,\n alias: \"property\",\n inside: {\n directive: {\n pattern: /(\\s*#)\\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\\b/,\n lookbehind: !0,\n alias: \"keyword\"\n }\n }\n }\n });\n\n var _ = $ + \"|\" + x,\n B = a(\"/(?![*/])|//[^\\r\\n]*[\\r\\n]|/\\\\*(?:[^*]|\\\\*(?!/))*\\\\*/|<<0>>\", [_]),\n E = e(a(\"[^\\\"'/()]|<<0>>|\\\\(<>*\\\\)\", [B]), 2),\n R = \"\\\\b(?:assembly|event|field|method|module|param|property|return|type)\\\\b\",\n P = a(\"<<0>>(?:\\\\s*\\\\(<<1>>*\\\\))?\", [m, E]);\n\n s.languages.insertBefore(\"csharp\", \"class-name\", {\n attribute: {\n pattern: t(\"((?:^|[^\\\\s\\\\w>)?])\\\\s*\\\\[\\\\s*)(?:<<0>>\\\\s*:\\\\s*)?<<1>>(?:\\\\s*,\\\\s*<<1>>)*(?=\\\\s*\\\\])\", [R, P]),\n lookbehind: !0,\n greedy: !0,\n inside: {\n target: {\n pattern: t(\"^<<0>>(?=\\\\s*:)\", [R]),\n alias: \"keyword\"\n },\n \"attribute-arguments\": {\n pattern: t(\"\\\\(<<0>>*\\\\)\", [E]),\n inside: s.languages.csharp\n },\n \"class-name\": {\n pattern: RegExp(m),\n inside: {\n punctuation: /\\./\n }\n },\n punctuation: /[:,]/\n }\n }\n });\n var z = \":[^}\\r\\n]+\",\n S = e(a(\"[^\\\"'/()]|<<0>>|\\\\(<>*\\\\)\", [B]), 2),\n j = a(\"\\\\{(?!\\\\{)(?:(?![}:])<<0>>)*<<1>>?\\\\}\", [S, z]),\n A = e(a(\"[^\\\"'/()]|/(?!\\\\*)|/\\\\*(?:[^*]|\\\\*(?!/))*\\\\*/|<<0>>|\\\\(<>*\\\\)\", [_]), 2),\n F = a(\"\\\\{(?!\\\\{)(?:(?![}:])<<0>>)*<<1>>?\\\\}\", [A, z]);\n\n function U(e, n) {\n return {\n interpolation: {\n pattern: t(\"((?:^|[^{])(?:\\\\{\\\\{)*)<<0>>\", [e]),\n lookbehind: !0,\n inside: {\n \"format-string\": {\n pattern: t(\"(^\\\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\\\}$)\", [n, z]),\n lookbehind: !0,\n inside: {\n punctuation: /^:/\n }\n },\n punctuation: /^\\{|\\}$/,\n expression: {\n pattern: /[\\s\\S]+/,\n alias: \"language-csharp\",\n inside: s.languages.csharp\n }\n }\n },\n string: /[\\s\\S]+/\n };\n }\n\n s.languages.insertBefore(\"csharp\", \"string\", {\n \"interpolation-string\": [{\n pattern: t('(^|[^\\\\\\\\])(?:\\\\$@|@\\\\$)\"(?:\"\"|\\\\\\\\[^]|\\\\{\\\\{|<<0>>|[^\\\\\\\\{\"])*\"', [j]),\n lookbehind: !0,\n greedy: !0,\n inside: U(j, S)\n }, {\n pattern: t('(^|[^@\\\\\\\\])\\\\$\"(?:\\\\\\\\.|\\\\{\\\\{|<<0>>|[^\\\\\\\\\"{])*\"', [F]),\n lookbehind: !0,\n greedy: !0,\n inside: U(F, A)\n }]\n });\n}(Prism), Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;\n!function (e) {\n var a,\n n = /(\"|')(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1/;\n e.languages.css.selector = {\n pattern: e.languages.css.selector,\n inside: a = {\n \"pseudo-element\": /:(?:after|before|first-letter|first-line|selection)|::[-\\w]+/,\n \"pseudo-class\": /:[-\\w]+/,\n \"class\": /\\.[-\\w]+/,\n id: /#[-\\w]+/,\n attribute: {\n pattern: RegExp(\"\\\\[(?:[^[\\\\]\\\"']|\" + n.source + \")*\\\\]\"),\n greedy: !0,\n inside: {\n punctuation: /^\\[|\\]$/,\n \"case-sensitivity\": {\n pattern: /(\\s)[si]$/i,\n lookbehind: !0,\n alias: \"keyword\"\n },\n namespace: {\n pattern: /^(\\s*)[-*\\w\\xA0-\\uFFFF]*\\|(?!=)/,\n lookbehind: !0,\n inside: {\n punctuation: /\\|$/\n }\n },\n \"attr-name\": {\n pattern: /^(\\s*)[-\\w\\xA0-\\uFFFF]+/,\n lookbehind: !0\n },\n \"attr-value\": [n, {\n pattern: /(=\\s*)[-\\w\\xA0-\\uFFFF]+(?=\\s*$)/,\n lookbehind: !0\n }],\n operator: /[|~*^$]?=/\n }\n },\n \"n-th\": [{\n pattern: /(\\(\\s*)[+-]?\\d*[\\dn](?:\\s*[+-]\\s*\\d+)?(?=\\s*\\))/,\n lookbehind: !0,\n inside: {\n number: /[\\dn]+/,\n operator: /[+-]/\n }\n }, {\n pattern: /(\\(\\s*)(?:even|odd)(?=\\s*\\))/i,\n lookbehind: !0\n }],\n combinator: />|\\+|~|\\|\\|/,\n punctuation: /[(),]/\n }\n }, e.languages.css.atrule.inside[\"selector-function-argument\"].inside = a, e.languages.insertBefore(\"css\", \"property\", {\n variable: {\n pattern: /(^|[^-\\w\\xA0-\\uFFFF])--[-_a-z\\xA0-\\uFFFF][-\\w\\xA0-\\uFFFF]*/i,\n lookbehind: !0\n }\n });\n var r = {\n pattern: /(\\b\\d+)(?:%|[a-z]+\\b)/,\n lookbehind: !0\n },\n i = {\n pattern: /(^|[^\\w.-])-?\\d*\\.?\\d+/,\n lookbehind: !0\n };\n e.languages.insertBefore(\"css\", \"function\", {\n operator: {\n pattern: /(\\s)[+\\-*\\/](?=\\s)/,\n lookbehind: !0\n },\n hexcode: {\n pattern: /\\B#(?:[\\da-f]{1,2}){3,4}\\b/i,\n alias: \"color\"\n },\n color: [/\\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\\b/i, {\n pattern: /\\b(?:rgb|hsl)\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}%?\\s*,\\s*\\d{1,3}%?\\s*\\)\\B|\\b(?:rgb|hsl)a\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}%?\\s*,\\s*\\d{1,3}%?\\s*,\\s*(?:0|0?\\.\\d+|1)\\s*\\)\\B/i,\n inside: {\n unit: r,\n number: i,\n \"function\": /[\\w-]+(?=\\()/,\n punctuation: /[(),]/\n }\n }],\n entity: /\\\\[\\da-f]{1,8}/i,\n unit: r,\n number: i\n });\n}(Prism);\nPrism.languages.git = {\n comment: /^#.*/m,\n deleted: /^[-–].*/m,\n inserted: /^\\+.*/m,\n string: /(\"|')(?:\\\\.|(?!\\1)[^\\\\\\r\\n])*\\1/m,\n command: {\n pattern: /^.*\\$ git .*$/m,\n inside: {\n parameter: /\\s--?\\w+/m\n }\n },\n coord: /^@@.*@@$/m,\n commit_sha1: /^commit \\w{40}$/m\n};\nPrism.languages.go = Prism.languages.extend(\"clike\", {\n keyword: /\\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\\b/,\n builtin: /\\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\\b/,\n \"boolean\": /\\b(?:_|iota|nil|true|false)\\b/,\n operator: /[*\\/%^!=]=?|\\+[=+]?|-[=-]?|\\|[=|]?|&(?:=|&|\\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\\.\\.\\./,\n number: /(?:\\b0x[a-f\\d]+|(?:\\b\\d+\\.?\\d*|\\B\\.\\d+)(?:e[-+]?\\d+)?)i?/i,\n string: {\n pattern: /([\"'`])(?:\\\\[\\s\\S]|(?!\\1)[^\\\\])*\\1/,\n greedy: !0\n }\n}), delete Prism.languages.go[\"class-name\"];\nPrism.languages.groovy = Prism.languages.extend(\"clike\", {\n string: [{\n pattern: /(\"\"\"|''')(?:[^\\\\]|\\\\[\\s\\S])*?\\1|\\$\\/(?:[^/$]|\\$(?:[/$]|(?![/$]))|\\/(?!\\$))*\\/\\$/,\n greedy: !0\n }, {\n pattern: /([\"'/])(?:\\\\.|(?!\\1)[^\\\\\\r\\n])*\\1/,\n greedy: !0\n }],\n keyword: /\\b(?:as|def|in|abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\\b/,\n number: /\\b(?:0b[01_]+|0x[\\da-f_]+(?:\\.[\\da-f_p\\-]+)?|[\\d_]+(?:\\.[\\d_]+)?(?:e[+-]?[\\d]+)?)[glidf]?\\b/i,\n operator: {\n pattern: /(^|[^.])(?:~|==?~?|\\?[.:]?|\\*(?:[.=]|\\*=?)?|\\.[@&]|\\.\\.<|\\.\\.(?!\\.)|-[-=>]?|\\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\\|[|=]?|\\/=?|\\^=?|%=?)/,\n lookbehind: !0\n },\n punctuation: /\\.+|[{}[\\];(),:$]/\n}), Prism.languages.insertBefore(\"groovy\", \"string\", {\n shebang: {\n pattern: /#!.+/,\n alias: \"comment\"\n }\n}), Prism.languages.insertBefore(\"groovy\", \"punctuation\", {\n \"spock-block\": /\\b(?:setup|given|when|then|and|cleanup|expect|where):/\n}), Prism.languages.insertBefore(\"groovy\", \"function\", {\n annotation: {\n pattern: /(^|[^.])@\\w+/,\n lookbehind: !0,\n alias: \"punctuation\"\n }\n}), Prism.hooks.add(\"wrap\", function (e) {\n if (\"groovy\" === e.language && \"string\" === e.type) {\n var t = e.content[0];\n\n if (\"'\" != t) {\n var n = /([^\\\\])(?:\\$(?:\\{.*?\\}|[\\w.]+))/;\n \"$\" === t && (n = /([^\\$])(?:\\$(?:\\{.*?\\}|[\\w.]+))/), e.content = e.content.replace(/</g, \"<\").replace(/&/g, \"&\"), e.content = Prism.highlight(e.content, {\n expression: {\n pattern: n,\n lookbehind: !0,\n inside: Prism.languages.groovy\n }\n }), e.classes.push(\"/\" === t ? \"regex\" : \"gstring\");\n }\n }\n});\n!function (e) {\n var t = /\\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\\b/,\n a = /\\b[A-Z](?:\\w*[a-z]\\w*)?\\b/;\n e.languages.java = e.languages.extend(\"clike\", {\n \"class-name\": [a, /\\b[A-Z]\\w*(?=\\s+\\w+\\s*[;,=())])/],\n keyword: t,\n \"function\": [e.languages.clike[\"function\"], {\n pattern: /(\\:\\:)[a-z_]\\w*/,\n lookbehind: !0\n }],\n number: /\\b0b[01][01_]*L?\\b|\\b0x[\\da-f_]*\\.?[\\da-f_p+-]+\\b|(?:\\b\\d[\\d_]*\\.?[\\d_]*|\\B\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[dfl]?/i,\n operator: {\n pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\\+\\+|&&|\\|\\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,\n lookbehind: !0\n }\n }), e.languages.insertBefore(\"java\", \"string\", {\n \"triple-quoted-string\": {\n pattern: /\"\"\"[ \\t]*[\\r\\n](?:(?:\"|\"\")?(?:\\\\.|[^\"\\\\]))*\"\"\"/,\n greedy: !0,\n alias: \"string\"\n }\n }), e.languages.insertBefore(\"java\", \"class-name\", {\n annotation: {\n alias: \"punctuation\",\n pattern: /(^|[^.])@\\w+/,\n lookbehind: !0\n },\n namespace: {\n pattern: RegExp(\"(\\\\b(?:exports|import(?:\\\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\\\s+)(?!)[a-z]\\\\w*(?:\\\\.[a-z]\\\\w*)*\\\\.?\".replace(//g, function () {\n return t.source;\n })),\n lookbehind: !0,\n inside: {\n punctuation: /\\./\n }\n },\n generics: {\n pattern: /<(?:[\\w\\s,.&?]|<(?:[\\w\\s,.&?]|<(?:[\\w\\s,.&?]|<[\\w\\s,.&?]*>)*>)*>)*>/,\n inside: {\n \"class-name\": a,\n keyword: t,\n punctuation: /[<>(),.:]/,\n operator: /[?&|]/\n }\n }\n });\n}(Prism);\nPrism.languages.json = {\n property: {\n pattern: /\"(?:\\\\.|[^\\\\\"\\r\\n])*\"(?=\\s*:)/,\n greedy: !0\n },\n string: {\n pattern: /\"(?:\\\\.|[^\\\\\"\\r\\n])*\"(?!\\s*:)/,\n greedy: !0\n },\n comment: {\n pattern: /\\/\\/.*|\\/\\*[\\s\\S]*?(?:\\*\\/|$)/,\n greedy: !0\n },\n number: /-?\\b\\d+(?:\\.\\d+)?(?:e[+-]?\\d+)?\\b/i,\n punctuation: /[{}[\\],]/,\n operator: /:/,\n \"boolean\": /\\b(?:true|false)\\b/,\n \"null\": {\n pattern: /\\bnull\\b/,\n alias: \"keyword\"\n }\n}, Prism.languages.webmanifest = Prism.languages.json;\n!function (n) {\n var e = /(\"|')(?:\\\\(?:\\r\\n?|\\n|.)|(?!\\1)[^\\\\\\r\\n])*\\1/;\n n.languages.json5 = n.languages.extend(\"json\", {\n property: [{\n pattern: RegExp(e.source + \"(?=\\\\s*:)\"),\n greedy: !0\n }, {\n pattern: /[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*(?=\\s*:)/,\n alias: \"unquoted\"\n }],\n string: {\n pattern: e,\n greedy: !0\n },\n number: /[+-]?\\b(?:NaN|Infinity|0x[a-fA-F\\d]+)\\b|[+-]?(?:\\b\\d+\\.?\\d*|\\B\\.\\d+)(?:[eE][+-]?\\d+\\b)?/\n });\n}(Prism);\nPrism.languages.jsonp = Prism.languages.extend(\"json\", {\n punctuation: /[{}[\\]();,.]/\n}), Prism.languages.insertBefore(\"jsonp\", \"punctuation\", {\n \"function\": /[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*(?=\\s*\\()/\n});\n!function (n) {\n n.languages.kotlin = n.languages.extend(\"clike\", {\n keyword: {\n pattern: /(^|[^.])\\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\\b/,\n lookbehind: !0\n },\n \"function\": [/\\w+(?=\\s*\\()/, {\n pattern: /(\\.)\\w+(?=\\s*\\{)/,\n lookbehind: !0\n }],\n number: /\\b(?:0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\\d+(?:_\\d+)*(?:\\.\\d+(?:_\\d+)*)?(?:[eE][+-]?\\d+(?:_\\d+)*)?[fFL]?)\\b/,\n operator: /\\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\\/*%<>]=?|[?:]:?|\\.\\.|&&|\\|\\||\\b(?:and|inv|or|shl|shr|ushr|xor)\\b/\n }), delete n.languages.kotlin[\"class-name\"], n.languages.insertBefore(\"kotlin\", \"string\", {\n \"raw-string\": {\n pattern: /(\"\"\"|''')[\\s\\S]*?\\1/,\n alias: \"string\"\n }\n }), n.languages.insertBefore(\"kotlin\", \"keyword\", {\n annotation: {\n pattern: /\\B@(?:\\w+:)?(?:[A-Z]\\w*|\\[[^\\]]+\\])/,\n alias: \"builtin\"\n }\n }), n.languages.insertBefore(\"kotlin\", \"function\", {\n label: {\n pattern: /\\w+@|@\\w+/,\n alias: \"symbol\"\n }\n });\n var e = [{\n pattern: /\\$\\{[^}]+\\}/,\n inside: {\n delimiter: {\n pattern: /^\\$\\{|\\}$/,\n alias: \"variable\"\n },\n rest: n.languages.kotlin\n }\n }, {\n pattern: /\\$\\w+/,\n alias: \"variable\"\n }];\n n.languages.kotlin.string.inside = n.languages.kotlin[\"raw-string\"].inside = {\n interpolation: e\n }, n.languages.kt = n.languages.kotlin, n.languages.kts = n.languages.kotlin;\n}(Prism);\n!function (h) {\n function v(e, n) {\n return \"___\" + e.toUpperCase() + n + \"___\";\n }\n\n Object.defineProperties(h.languages[\"markup-templating\"] = {}, {\n buildPlaceholders: {\n value: function value(a, r, e, o) {\n if (a.language === r) {\n var c = a.tokenStack = [];\n a.code = a.code.replace(e, function (e) {\n if (\"function\" == typeof o && !o(e)) return e;\n\n for (var n, t = c.length; -1 !== a.code.indexOf(n = v(r, t));) {\n ++t;\n }\n\n return c[t] = e, n;\n }), a.grammar = h.languages.markup;\n }\n }\n },\n tokenizePlaceholders: {\n value: function value(p, k) {\n if (p.language === k && p.tokenStack) {\n p.grammar = h.languages[k];\n var m = 0,\n d = Object.keys(p.tokenStack);\n !function e(n) {\n for (var t = 0; t < n.length && !(m >= d.length); t++) {\n var a = n[t];\n\n if (\"string\" == typeof a || a.content && \"string\" == typeof a.content) {\n var r = d[m],\n o = p.tokenStack[r],\n c = \"string\" == typeof a ? a : a.content,\n i = v(k, r),\n u = c.indexOf(i);\n\n if (-1 < u) {\n ++m;\n var g = c.substring(0, u),\n l = new h.Token(k, h.tokenize(o, p.grammar), \"language-\" + k, o),\n s = c.substring(u + i.length),\n f = [];\n g && f.push.apply(f, e([g])), f.push(l), s && f.push.apply(f, e([s])), \"string\" == typeof a ? n.splice.apply(n, [t, 1].concat(f)) : a.content = f;\n }\n } else a.content && e(a.content);\n }\n\n return n;\n }(p.tokens);\n }\n }\n }\n });\n}(Prism);\nPrism.languages.objectivec = Prism.languages.extend(\"c\", {\n keyword: /\\b(?:asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\\b/,\n string: /(\"|')(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1|@\"(?:\\\\(?:\\r\\n|[\\s\\S])|[^\"\\\\\\r\\n])*\"/,\n operator: /-[->]?|\\+\\+?|!=?|<=?|>>?=?|==?|&&?|\\|\\|?|[~^%?*\\/@]/\n}), delete Prism.languages.objectivec[\"class-name\"], Prism.languages.objc = Prism.languages.objectivec;\n!function (a) {\n var e = /\\/\\*[\\s\\S]*?\\*\\/|\\/\\/.*|#(?!\\[).*/,\n t = [{\n pattern: /\\b(?:false|true)\\b/i,\n alias: \"boolean\"\n }, /\\b[A-Z_][A-Z0-9_]*\\b(?!\\s*\\()/, /\\b(?:null)\\b/i],\n i = /\\b0b[01]+\\b|\\b0x[\\da-f]+\\b|(?:\\b\\d+(?:_\\d+)*\\.?(?:\\d+(?:_\\d+)*)?|\\B\\.\\d+)(?:e[+-]?\\d+)?/i,\n n = /=>|\\?\\?=?|\\.{3}|\\??->|[!=]=?=?|::|\\*\\*=?|--|\\+\\+|&&|\\|\\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,\n s = /[{}\\[\\](),:;]/;\n a.languages.php = {\n delimiter: {\n pattern: /\\?>$|^<\\?(?:php(?=\\s)|=)?/i,\n alias: \"important\"\n },\n comment: e,\n variable: /\\$+(?:\\w+\\b|(?={))/i,\n \"package\": {\n pattern: /(namespace\\s+|use\\s+(?:function\\s+)?)(?:\\\\?\\b[a-z_]\\w*)+\\b(?!\\\\)/i,\n lookbehind: !0,\n inside: {\n punctuation: /\\\\/\n }\n },\n keyword: [{\n pattern: /(\\(\\s*)\\b(?:bool|boolean|int|integer|float|string|object|array)\\b(?=\\s*\\))/i,\n alias: \"type-casting\",\n greedy: !0,\n lookbehind: !0\n }, {\n pattern: /([(,?]\\s*)\\b(?:bool|int|float|string|object|array(?!\\s*\\()|mixed|self|static|callable|iterable|(?:null|false)(?=\\s*\\|))\\b(?=\\s*\\$)/i,\n alias: \"type-hint\",\n greedy: !0,\n lookbehind: !0\n }, {\n pattern: /([(,?]\\s*[a-z0-9_|]\\|\\s*)(?:null|false)\\b(?=\\s*\\$)/i,\n alias: \"type-hint\",\n greedy: !0,\n lookbehind: !0\n }, {\n pattern: /(\\)\\s*:\\s*\\??\\s*)\\b(?:bool|int|float|string|object|void|array(?!\\s*\\()|mixed|self|static|callable|iterable|(?:null|false)(?=\\s*\\|))\\b/i,\n alias: \"return-type\",\n greedy: !0,\n lookbehind: !0\n }, {\n pattern: /(\\)\\s*:\\s*\\??\\s*[a-z0-9_|]\\|\\s*)(?:null|false)\\b/i,\n alias: \"return-type\",\n greedy: !0,\n lookbehind: !0\n }, {\n pattern: /\\b(?:bool|int|float|string|object|void|array(?!\\s*\\()|mixed|iterable|(?:null|false)(?=\\s*\\|))\\b/i,\n alias: \"type-declaration\",\n greedy: !0\n }, {\n pattern: /(\\|\\s*)(?:null|false)\\b/i,\n alias: \"type-declaration\",\n greedy: !0,\n lookbehind: !0\n }, {\n pattern: /\\b(?:parent|self|static)(?=\\s*::)/i,\n alias: \"static-context\",\n greedy: !0\n }, /\\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\\b/i],\n \"argument-name\": /\\b[a-z_]\\w*(?=\\s*:(?!:))/i,\n \"class-name\": [{\n pattern: /(\\b(?:class|interface|extends|implements|trait|instanceof|new(?!\\s+self|\\s+static))\\s+|\\bcatch\\s*\\()\\b[a-z_]\\w*(?!\\\\)\\b/i,\n greedy: !0,\n lookbehind: !0\n }, {\n pattern: /(\\|\\s*)\\b[a-z_]\\w*(?!\\\\)\\b/i,\n greedy: !0,\n lookbehind: !0\n }, {\n pattern: /\\b[a-z_]\\w*(?!\\\\)\\b(?=\\s*\\|)/i,\n greedy: !0\n }, {\n pattern: /(\\|\\s*)(?:\\\\?\\b[a-z_]\\w*)+\\b/i,\n alias: \"class-name-fully-qualified\",\n greedy: !0,\n lookbehind: !0,\n inside: {\n punctuation: /\\\\/\n }\n }, {\n pattern: /(?:\\\\?\\b[a-z_]\\w*)+\\b(?=\\s*\\|)/i,\n alias: \"class-name-fully-qualified\",\n greedy: !0,\n inside: {\n punctuation: /\\\\/\n }\n }, {\n pattern: /(\\b(?:extends|implements|instanceof|new(?!\\s+self\\b|\\s+static\\b))\\s+|\\bcatch\\s*\\()(?:\\\\?\\b[a-z_]\\w*)+\\b(?!\\\\)/i,\n alias: \"class-name-fully-qualified\",\n greedy: !0,\n lookbehind: !0,\n inside: {\n punctuation: /\\\\/\n }\n }, {\n pattern: /\\b[a-z_]\\w*(?=\\s*\\$)/i,\n alias: \"type-declaration\",\n greedy: !0\n }, {\n pattern: /(?:\\\\?\\b[a-z_]\\w*)+(?=\\s*\\$)/i,\n alias: [\"class-name-fully-qualified\", \"type-declaration\"],\n greedy: !0,\n inside: {\n punctuation: /\\\\/\n }\n }, {\n pattern: /\\b[a-z_]\\w*(?=\\s*::)/i,\n alias: \"static-context\",\n greedy: !0\n }, {\n pattern: /(?:\\\\?\\b[a-z_]\\w*)+(?=\\s*::)/i,\n alias: [\"class-name-fully-qualified\", \"static-context\"],\n greedy: !0,\n inside: {\n punctuation: /\\\\/\n }\n }, {\n pattern: /([(,?]\\s*)[a-z_]\\w*(?=\\s*\\$)/i,\n alias: \"type-hint\",\n greedy: !0,\n lookbehind: !0\n }, {\n pattern: /([(,?]\\s*)(?:\\\\?\\b[a-z_]\\w*)+(?=\\s*\\$)/i,\n alias: [\"class-name-fully-qualified\", \"type-hint\"],\n greedy: !0,\n lookbehind: !0,\n inside: {\n punctuation: /\\\\/\n }\n }, {\n pattern: /(\\)\\s*:\\s*\\??\\s*)\\b[a-z_]\\w*(?!\\\\)\\b/i,\n alias: \"return-type\",\n greedy: !0,\n lookbehind: !0\n }, {\n pattern: /(\\)\\s*:\\s*\\??\\s*)(?:\\\\?\\b[a-z_]\\w*)+\\b(?!\\\\)/i,\n alias: [\"class-name-fully-qualified\", \"return-type\"],\n greedy: !0,\n lookbehind: !0,\n inside: {\n punctuation: /\\\\/\n }\n }],\n constant: t,\n \"function\": /\\w+\\s*(?=\\()/,\n property: {\n pattern: /(->)[\\w]+/,\n lookbehind: !0\n },\n number: i,\n operator: n,\n punctuation: s\n };\n var l = {\n pattern: /{\\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\\\{])\\$+(?:\\w+(?:\\[[^\\r\\n\\[\\]]+\\]|->\\w+)*)/,\n lookbehind: !0,\n inside: a.languages.php\n },\n r = [{\n pattern: /<<<'([^']+)'[\\r\\n](?:.*[\\r\\n])*?\\1;/,\n alias: \"nowdoc-string\",\n greedy: !0,\n inside: {\n delimiter: {\n pattern: /^<<<'[^']+'|[a-z_]\\w*;$/i,\n alias: \"symbol\",\n inside: {\n punctuation: /^<<<'?|[';]$/\n }\n }\n }\n }, {\n pattern: /<<<(?:\"([^\"]+)\"[\\r\\n](?:.*[\\r\\n])*?\\1;|([a-z_]\\w*)[\\r\\n](?:.*[\\r\\n])*?\\2;)/i,\n alias: \"heredoc-string\",\n greedy: !0,\n inside: {\n delimiter: {\n pattern: /^<<<(?:\"[^\"]+\"|[a-z_]\\w*)|[a-z_]\\w*;$/i,\n alias: \"symbol\",\n inside: {\n punctuation: /^<<<\"?|[\";]$/\n }\n },\n interpolation: l\n }\n }, {\n pattern: /`(?:\\\\[\\s\\S]|[^\\\\`])*`/,\n alias: \"backtick-quoted-string\",\n greedy: !0\n }, {\n pattern: /'(?:\\\\[\\s\\S]|[^\\\\'])*'/,\n alias: \"single-quoted-string\",\n greedy: !0\n }, {\n pattern: /\"(?:\\\\[\\s\\S]|[^\\\\\"])*\"/,\n alias: \"double-quoted-string\",\n greedy: !0,\n inside: {\n interpolation: l\n }\n }];\n a.languages.insertBefore(\"php\", \"variable\", {\n string: r\n }), a.languages.insertBefore(\"php\", \"variable\", {\n attribute: {\n pattern: /#\\[(?:[^\"'\\/#]|\\/(?![*/])|\\/\\/.*$|#(?!\\[).*$|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|\"(?:\\\\[\\s\\S]|[^\\\\\"])*\"|'(?:\\\\[\\s\\S]|[^\\\\'])*')+\\](?=\\s*[a-z$#])/im,\n greedy: !0,\n inside: {\n \"attribute-content\": {\n pattern: /^(#\\[)[\\s\\S]+(?=]$)/,\n lookbehind: !0,\n inside: {\n comment: e,\n string: r,\n \"attribute-class-name\": [{\n pattern: /([^:]|^)\\b[a-z_]\\w*(?!\\\\)\\b/i,\n alias: \"class-name\",\n greedy: !0,\n lookbehind: !0\n }, {\n pattern: /([^:]|^)(?:\\\\?\\b[a-z_]\\w*)+/i,\n alias: [\"class-name\", \"class-name-fully-qualified\"],\n greedy: !0,\n lookbehind: !0,\n inside: {\n punctuation: /\\\\/\n }\n }],\n constant: t,\n number: i,\n operator: n,\n punctuation: s\n }\n },\n delimiter: {\n pattern: /^#\\[|]$/,\n alias: \"punctuation\"\n }\n }\n }\n }), a.hooks.add(\"before-tokenize\", function (e) {\n if (/<\\?/.test(e.code)) {\n a.languages[\"markup-templating\"].buildPlaceholders(e, \"php\", /<\\?(?:[^\"'/#]|\\/(?![*/])|(\"|')(?:\\\\[\\s\\S]|(?!\\1)[^\\\\])*\\1|(?:\\/\\/|#(?!\\[))(?:[^?\\n\\r]|\\?(?!>))*(?=$|\\?>|[\\r\\n])|#\\[|\\/\\*[\\s\\S]*?(?:\\*\\/|$))*?(?:\\?>|$)/gi);\n }\n }), a.hooks.add(\"after-tokenize\", function (e) {\n a.languages[\"markup-templating\"].tokenizePlaceholders(e, \"php\");\n });\n}(Prism);\nPrism.languages.python = {\n comment: {\n pattern: /(^|[^\\\\])#.*/,\n lookbehind: !0\n },\n \"string-interpolation\": {\n pattern: /(?:f|rf|fr)(?:(\"\"\"|''')[\\s\\S]*?\\1|(\"|')(?:\\\\.|(?!\\2)[^\\\\\\r\\n])*\\2)/i,\n greedy: !0,\n inside: {\n interpolation: {\n pattern: /((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,\n lookbehind: !0,\n inside: {\n \"format-spec\": {\n pattern: /(:)[^:(){}]+(?=}$)/,\n lookbehind: !0\n },\n \"conversion-option\": {\n pattern: /![sra](?=[:}]$)/,\n alias: \"punctuation\"\n },\n rest: null\n }\n },\n string: /[\\s\\S]+/\n }\n },\n \"triple-quoted-string\": {\n pattern: /(?:[rub]|rb|br)?(\"\"\"|''')[\\s\\S]*?\\1/i,\n greedy: !0,\n alias: \"string\"\n },\n string: {\n pattern: /(?:[rub]|rb|br)?(\"|')(?:\\\\.|(?!\\1)[^\\\\\\r\\n])*\\1/i,\n greedy: !0\n },\n \"function\": {\n pattern: /((?:^|\\s)def[ \\t]+)[a-zA-Z_]\\w*(?=\\s*\\()/g,\n lookbehind: !0\n },\n \"class-name\": {\n pattern: /(\\bclass\\s+)\\w+/i,\n lookbehind: !0\n },\n decorator: {\n pattern: /(^\\s*)@\\w+(?:\\.\\w+)*/im,\n lookbehind: !0,\n alias: [\"annotation\", \"punctuation\"],\n inside: {\n punctuation: /\\./\n }\n },\n keyword: /\\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\\b/,\n builtin: /\\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\\b/,\n \"boolean\": /\\b(?:True|False|None)\\b/,\n number: /(?:\\b(?=\\d)|\\B(?=\\.))(?:0[bo])?(?:(?:\\d|0x[\\da-f])[\\da-f]*\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?j?\\b/i,\n operator: /[-+%=]=?|!=|\\*\\*?=?|\\/\\/?=?|<[<=>]?|>[=>]?|[&|^~]/,\n punctuation: /[{}[\\];(),.:]/\n}, Prism.languages.python[\"string-interpolation\"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python;\n!function (e) {\n e.languages.ruby = e.languages.extend(\"clike\", {\n comment: [/#.*/, {\n pattern: /^=begin\\s[\\s\\S]*?^=end/m,\n greedy: !0\n }],\n \"class-name\": {\n pattern: /(\\b(?:class)\\s+|\\bcatch\\s+\\()[\\w.\\\\]+/i,\n lookbehind: !0,\n inside: {\n punctuation: /[.\\\\]/\n }\n },\n keyword: /\\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\\b/\n });\n var n = {\n pattern: /#\\{[^}]+\\}/,\n inside: {\n delimiter: {\n pattern: /^#\\{|\\}$/,\n alias: \"tag\"\n },\n rest: e.languages.ruby\n }\n };\n delete e.languages.ruby[\"function\"], e.languages.insertBefore(\"ruby\", \"keyword\", {\n regex: [{\n pattern: RegExp(\"%r(?:\" + [\"([^a-zA-Z0-9\\\\s{(\\\\[<])(?:(?!\\\\1)[^\\\\\\\\]|\\\\\\\\[^])*\\\\1[gim]{0,3}\", \"\\\\((?:[^()\\\\\\\\]|\\\\\\\\[^])*\\\\)[gim]{0,3}\", \"\\\\{(?:[^#{}\\\\\\\\]|#(?:\\\\{[^}]+\\\\})?|\\\\\\\\[^])*\\\\}[gim]{0,3}\", \"\\\\[(?:[^\\\\[\\\\]\\\\\\\\]|\\\\\\\\[^])*\\\\][gim]{0,3}\", \"<(?:[^<>\\\\\\\\]|\\\\\\\\[^])*>[gim]{0,3}\"].join(\"|\") + \")\"),\n greedy: !0,\n inside: {\n interpolation: n\n }\n }, {\n pattern: /(^|[^/])\\/(?!\\/)(?:\\[[^\\r\\n\\]]+\\]|\\\\.|[^[/\\\\\\r\\n])+\\/[gim]{0,3}(?=\\s*(?:$|[\\r\\n,.;})]))/,\n lookbehind: !0,\n greedy: !0\n }],\n variable: /[@$]+[a-zA-Z_]\\w*(?:[?!]|\\b)/,\n symbol: {\n pattern: /(^|[^:]):[a-zA-Z_]\\w*(?:[?!]|\\b)/,\n lookbehind: !0\n },\n \"method-definition\": {\n pattern: /(\\bdef\\s+)[\\w.]+/,\n lookbehind: !0,\n inside: {\n \"function\": /\\w+$/,\n rest: e.languages.ruby\n }\n }\n }), e.languages.insertBefore(\"ruby\", \"number\", {\n builtin: /\\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\\b/,\n constant: /\\b[A-Z]\\w*(?:[?!]|\\b)/\n }), e.languages.ruby.string = [{\n pattern: RegExp(\"%[qQiIwWxs]?(?:\" + [\"([^a-zA-Z0-9\\\\s{(\\\\[<])(?:(?!\\\\1)[^\\\\\\\\]|\\\\\\\\[^])*\\\\1\", \"\\\\((?:[^()\\\\\\\\]|\\\\\\\\[^])*\\\\)\", \"\\\\{(?:[^#{}\\\\\\\\]|#(?:\\\\{[^}]+\\\\})?|\\\\\\\\[^])*\\\\}\", \"\\\\[(?:[^\\\\[\\\\]\\\\\\\\]|\\\\\\\\[^])*\\\\]\", \"<(?:[^<>\\\\\\\\]|\\\\\\\\[^])*>\"].join(\"|\") + \")\"),\n greedy: !0,\n inside: {\n interpolation: n\n }\n }, {\n pattern: /(\"|')(?:#\\{[^}]+\\}|#(?!\\{)|\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\#\\r\\n])*\\1/,\n greedy: !0,\n inside: {\n interpolation: n\n }\n }], e.languages.rb = e.languages.ruby;\n}(Prism);\nPrism.languages.swift = Prism.languages.extend(\"clike\", {\n string: {\n pattern: /(\"|')(?:\\\\(?:\\((?:[^()]|\\([^)]+\\))+\\)|\\r\\n|[^(])|(?!\\1)[^\\\\\\r\\n])*\\1/,\n greedy: !0,\n inside: {\n interpolation: {\n pattern: /\\\\\\((?:[^()]|\\([^)]+\\))+\\)/,\n inside: {\n delimiter: {\n pattern: /^\\\\\\(|\\)$/,\n alias: \"variable\"\n }\n }\n }\n }\n },\n keyword: /\\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\\b/,\n number: /\\b(?:[\\d_]+(?:\\.[\\de_]+)?|0x[a-f0-9_]+(?:\\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b/i,\n constant: /\\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\\b/,\n atrule: /@\\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\\b/,\n builtin: /\\b(?:[A-Z]\\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\\b/\n}), Prism.languages.swift.string.inside.interpolation.inside.rest = Prism.languages.swift;\n!function (e) {\n e.languages.typescript = e.languages.extend(\"javascript\", {\n \"class-name\": {\n pattern: /(\\b(?:class|extends|implements|instanceof|interface|new|type)\\s+)(?!keyof\\b)[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*(?:\\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,\n lookbehind: !0,\n greedy: !0,\n inside: null\n },\n keyword: /\\b(?:abstract|as|asserts|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|undefined|var|void|while|with|yield)\\b/,\n builtin: /\\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\\b/\n }), delete e.languages.typescript.parameter;\n var n = e.languages.extend(\"typescript\", {});\n delete n[\"class-name\"], e.languages.typescript[\"class-name\"].inside = n, e.languages.insertBefore(\"typescript\", \"function\", {\n \"generic-function\": {\n pattern: /#?[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*\\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\\s*\\()/,\n greedy: !0,\n inside: {\n \"function\": /^#?[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*/,\n generic: {\n pattern: /<[\\s\\S]+/,\n alias: \"class-name\",\n inside: n\n }\n }\n }\n }), e.languages.ts = e.languages.typescript;\n}(Prism);\n!function (n) {\n function a(a, e) {\n n.languages[a] && n.languages.insertBefore(a, \"comment\", {\n \"doc-comment\": e\n });\n }\n\n var e = n.languages.markup.tag,\n t = {\n pattern: /\\/\\/\\/.*/,\n greedy: !0,\n alias: \"comment\",\n inside: {\n tag: e\n }\n },\n g = {\n pattern: /'''.*/,\n greedy: !0,\n alias: \"comment\",\n inside: {\n tag: e\n }\n };\n a(\"csharp\", t), a(\"fsharp\", t), a(\"vbnet\", g);\n}(Prism);\n!function () {\n if (\"undefined\" != typeof self && self.Prism && self.document && document.querySelector) {\n var t,\n s = function s() {\n if (void 0 === t) {\n var e = document.createElement(\"div\");\n e.style.fontSize = \"13px\", e.style.lineHeight = \"1.5\", e.style.padding = \"0\", e.style.border = \"0\", e.innerHTML = \"
\", document.body.appendChild(e), t = 38 === e.offsetHeight, document.body.removeChild(e);\n }\n\n return t;\n },\n l = !0,\n a = 0;\n\n Prism.hooks.add(\"before-sanity-check\", function (e) {\n var t = e.element.parentNode,\n n = t && t.getAttribute(\"data-line\");\n\n if (t && n && /pre/i.test(t.nodeName)) {\n var i = 0;\n g(\".line-highlight\", t).forEach(function (e) {\n i += e.textContent.length, e.parentNode.removeChild(e);\n }), i && /^( \\n)+$/.test(e.code.slice(-i)) && (e.code = e.code.slice(0, -i));\n }\n }), Prism.hooks.add(\"complete\", function e(t) {\n var n = t.element.parentNode,\n i = n && n.getAttribute(\"data-line\");\n\n if (n && i && /pre/i.test(n.nodeName)) {\n clearTimeout(a);\n var r = Prism.plugins.lineNumbers,\n o = t.plugins && t.plugins.lineNumbers;\n if (b(n, \"line-numbers\") && r && !o) Prism.hooks.add(\"line-numbers\", e);else u(n, i)(), a = setTimeout(c, 1);\n }\n }), window.addEventListener(\"hashchange\", c), window.addEventListener(\"resize\", function () {\n g(\"pre[data-line]\").map(function (e) {\n return u(e);\n }).forEach(v);\n });\n }\n\n function g(e, t) {\n return Array.prototype.slice.call((t || document).querySelectorAll(e));\n }\n\n function b(e, t) {\n return t = \" \" + t + \" \", -1 < (\" \" + e.className + \" \").replace(/[\\n\\t]/g, \" \").indexOf(t);\n }\n\n function v(e) {\n e();\n }\n\n function u(u, e, c) {\n var t = (e = \"string\" == typeof e ? e : u.getAttribute(\"data-line\")).replace(/\\s+/g, \"\").split(\",\").filter(Boolean),\n d = +u.getAttribute(\"data-line-offset\") || 0,\n f = (s() ? parseInt : parseFloat)(getComputedStyle(u).lineHeight),\n m = b(u, \"line-numbers\"),\n p = m ? u : u.querySelector(\"code\") || u,\n h = [];\n t.forEach(function (e) {\n var t = e.split(\"-\"),\n n = +t[0],\n i = +t[1] || n,\n r = u.querySelector('.line-highlight[data-range=\"' + e + '\"]') || document.createElement(\"div\");\n\n if (h.push(function () {\n r.setAttribute(\"aria-hidden\", \"true\"), r.setAttribute(\"data-range\", e), r.className = (c || \"\") + \" line-highlight\";\n }), m && Prism.plugins.lineNumbers) {\n var o = Prism.plugins.lineNumbers.getLine(u, n),\n a = Prism.plugins.lineNumbers.getLine(u, i);\n\n if (o) {\n var s = o.offsetTop + \"px\";\n h.push(function () {\n r.style.top = s;\n });\n }\n\n if (a) {\n var l = a.offsetTop - o.offsetTop + a.offsetHeight + \"px\";\n h.push(function () {\n r.style.height = l;\n });\n }\n } else h.push(function () {\n r.setAttribute(\"data-start\", n), n < i && r.setAttribute(\"data-end\", i), r.style.top = (n - d - 1) * f + \"px\", r.textContent = new Array(i - n + 2).join(\" \\n\");\n });\n\n h.push(function () {\n p.appendChild(r);\n });\n });\n var i = u.id;\n\n if (m && i) {\n for (var n = \"linkable-line-numbers\", r = !1, o = u; o;) {\n if (b(o, n)) {\n r = !0;\n break;\n }\n\n o = o.parentElement;\n }\n\n if (r) {\n b(u, n) || h.push(function () {\n u.className = (u.className + \" \" + n).trim();\n });\n var a = parseInt(u.getAttribute(\"data-start\") || \"1\");\n g(\".line-numbers-rows > span\", u).forEach(function (e, t) {\n var n = t + a;\n\n e.onclick = function () {\n var e = i + \".\" + n;\n l = !1, location.hash = e, setTimeout(function () {\n l = !0;\n }, 1);\n };\n });\n }\n }\n\n return function () {\n h.forEach(v);\n };\n }\n\n function c() {\n var e = location.hash.slice(1);\n g(\".temporary.line-highlight\").forEach(function (e) {\n e.parentNode.removeChild(e);\n });\n var t = (e.match(/\\.([\\d,-]+)$/) || [, \"\"])[1];\n\n if (t && !document.getElementById(e)) {\n var n = e.slice(0, e.lastIndexOf(\".\")),\n i = document.getElementById(n);\n if (i) i.hasAttribute(\"data-line\") || i.setAttribute(\"data-line\", \"\"), u(i, t, \"temporary \")(), l && document.querySelector(\".temporary.line-highlight\").scrollIntoView();\n }\n }\n}();\n!function () {\n if (\"undefined\" != typeof self && self.Prism && self.document) {\n var o = \"line-numbers\",\n a = /\\n(?!$)/g,\n e = Prism.plugins.lineNumbers = {\n getLine: function getLine(e, n) {\n if (\"PRE\" === e.tagName && e.classList.contains(o)) {\n var t = e.querySelector(\".line-numbers-rows\");\n\n if (t) {\n var i = parseInt(e.getAttribute(\"data-start\"), 10) || 1,\n r = i + (t.children.length - 1);\n n < i && (n = i), r < n && (n = r);\n var s = n - i;\n return t.children[s];\n }\n }\n },\n resize: function resize(e) {\n u([e]);\n },\n assumeViewportIndependence: !0\n },\n t = function t(e) {\n return e ? window.getComputedStyle ? getComputedStyle(e) : e.currentStyle || null : null;\n },\n n = void 0;\n\n window.addEventListener(\"resize\", function () {\n e.assumeViewportIndependence && n === window.innerWidth || (n = window.innerWidth, u(Array.prototype.slice.call(document.querySelectorAll(\"pre.\" + o))));\n }), Prism.hooks.add(\"complete\", function (e) {\n if (e.code) {\n var n = e.element,\n t = n.parentNode;\n\n if (t && /pre/i.test(t.nodeName) && !n.querySelector(\".line-numbers-rows\") && Prism.util.isActive(n, o)) {\n n.classList.remove(o), t.classList.add(o);\n var i,\n r = e.code.match(a),\n s = r ? r.length + 1 : 1,\n l = new Array(s + 1).join(\"\");\n (i = document.createElement(\"span\")).setAttribute(\"aria-hidden\", \"true\"), i.className = \"line-numbers-rows\", i.innerHTML = l, t.hasAttribute(\"data-start\") && (t.style.counterReset = \"linenumber \" + (parseInt(t.getAttribute(\"data-start\"), 10) - 1)), e.element.appendChild(i), u([t]), Prism.hooks.run(\"line-numbers\", e);\n }\n }\n }), Prism.hooks.add(\"line-numbers\", function (e) {\n e.plugins = e.plugins || {}, e.plugins.lineNumbers = !0;\n });\n }\n\n function u(e) {\n if (0 != (e = e.filter(function (e) {\n var n = t(e)[\"white-space\"];\n return \"pre-wrap\" === n || \"pre-line\" === n;\n })).length) {\n var n = e.map(function (e) {\n var n = e.querySelector(\"code\"),\n t = e.querySelector(\".line-numbers-rows\");\n\n if (n && t) {\n var i = e.querySelector(\".line-numbers-sizer\"),\n r = n.textContent.split(a);\n i || ((i = document.createElement(\"span\")).className = \"line-numbers-sizer\", n.appendChild(i)), i.innerHTML = \"0\", i.style.display = \"block\";\n var s = i.getBoundingClientRect().height;\n return i.innerHTML = \"\", {\n element: e,\n lines: r,\n lineHeights: [],\n oneLinerHeight: s,\n sizer: i\n };\n }\n }).filter(Boolean);\n n.forEach(function (e) {\n var i = e.sizer,\n n = e.lines,\n r = e.lineHeights,\n s = e.oneLinerHeight;\n r[n.length - 1] = void 0, n.forEach(function (e, n) {\n if (e && 1 < e.length) {\n var t = i.appendChild(document.createElement(\"span\"));\n t.style.display = \"block\", t.textContent = e;\n } else r[n] = s;\n });\n }), n.forEach(function (e) {\n for (var n = e.sizer, t = e.lineHeights, i = 0, r = 0; r < t.length; r++) {\n void 0 === t[r] && (t[r] = n.children[i++].getBoundingClientRect().height);\n }\n }), n.forEach(function (e) {\n var n = e.sizer,\n t = e.element.querySelector(\".line-numbers-rows\");\n n.style.display = \"none\", n.innerHTML = \"\", e.lineHeights.forEach(function (e, n) {\n t.children[n].style.height = e + \"px\";\n });\n });\n }\n }\n}();\n\"undefined\" != typeof self && self.Prism && self.document && document.createRange && (Prism.plugins.KeepMarkup = !0, Prism.hooks.add(\"before-highlight\", function (e) {\n if (e.element.children.length && Prism.util.isActive(e.element, \"keep-markup\", !0)) {\n var a = 0,\n s = [],\n l = function l(e, n) {\n var o = {};\n n || (o.clone = e.cloneNode(!1), o.posOpen = a, s.push(o));\n\n for (var t = 0, d = e.childNodes.length; t < d; t++) {\n var r = e.childNodes[t];\n 1 === r.nodeType ? l(r) : 3 === r.nodeType && (a += r.data.length);\n }\n\n n || (o.posClose = a);\n };\n\n l(e.element, !0), s && s.length && (e.keepMarkup = s);\n }\n}), Prism.hooks.add(\"after-highlight\", function (n) {\n if (n.keepMarkup && n.keepMarkup.length) {\n var a = function a(e, n) {\n for (var o = 0, t = e.childNodes.length; o < t; o++) {\n var d = e.childNodes[o];\n\n if (1 === d.nodeType) {\n if (!a(d, n)) return !1;\n } else 3 === d.nodeType && (!n.nodeStart && n.pos + d.data.length > n.node.posOpen && (n.nodeStart = d, n.nodeStartPos = n.node.posOpen - n.pos), n.nodeStart && n.pos + d.data.length >= n.node.posClose && (n.nodeEnd = d, n.nodeEndPos = n.node.posClose - n.pos), n.pos += d.data.length);\n\n if (n.nodeStart && n.nodeEnd) {\n var r = document.createRange();\n return r.setStart(n.nodeStart, n.nodeStartPos), r.setEnd(n.nodeEnd, n.nodeEndPos), n.node.clone.appendChild(r.extractContents()), r.insertNode(n.node.clone), r.detach(), !1;\n }\n }\n\n return !0;\n };\n\n n.keepMarkup.forEach(function (e) {\n a(n.element, {\n node: e,\n pos: 0\n });\n }), n.highlightedCode = n.element.innerHTML;\n }\n}));\n!function () {\n if (\"undefined\" != typeof self && self.Prism && self.document) {\n var f = /(?:^|\\s)command-line(?:\\s|$)/,\n p = \"command-line-prompt\",\n m = \"\".startsWith ? function (e, t) {\n return e.startsWith(t);\n } : function (e, t) {\n return 0 === e.indexOf(t);\n };\n Prism.hooks.add(\"before-highlight\", function (e) {\n var t = h(e);\n\n if (!t.complete && e.code) {\n var n = e.element.parentElement;\n\n if (n && /pre/i.test(n.nodeName) && (f.test(n.className) || f.test(e.element.className))) {\n var a = e.element.querySelector(\".\" + p);\n a && a.remove();\n var s = e.code.split(\"\\n\");\n t.numberOfLines = s.length;\n var o = t.outputLines = [],\n r = n.getAttribute(\"data-output\"),\n i = n.getAttribute(\"data-filter-output\");\n if (null !== r) r.split(\",\").forEach(function (e) {\n var t = e.split(\"-\"),\n n = parseInt(t[0], 10),\n a = 2 === t.length ? parseInt(t[1], 10) : n;\n\n if (!isNaN(n) && !isNaN(a)) {\n n < 1 && (n = 1), a > s.length && (a = s.length), a--;\n\n for (var r = --n; r <= a; r++) {\n o[r] = s[r], s[r] = \"\";\n }\n }\n });else if (i) for (var l = 0; l < s.length; l++) {\n m(s[l], i) && (o[l] = s[l].slice(i.length), s[l] = \"\");\n }\n e.code = s.join(\"\\n\");\n } else t.complete = !0;\n } else t.complete = !0;\n }), Prism.hooks.add(\"before-insert\", function (e) {\n var t = h(e);\n\n if (!t.complete) {\n for (var n = e.highlightedCode.split(\"\\n\"), a = t.outputLines || [], r = 0, s = a.length; r < s; r++) {\n a.hasOwnProperty(r) && (n[r] = a[r]);\n }\n\n e.highlightedCode = n.join(\"\\n\");\n }\n }), Prism.hooks.add(\"complete\", function (e) {\n var t = h(e);\n\n if (!t.complete) {\n var n,\n a = e.element.parentElement;\n f.test(e.element.className) && (e.element.className = e.element.className.replace(f, \" \")), f.test(a.className) || (a.className += \" command-line\");\n var r = t.numberOfLines || 0,\n s = u(\"data-prompt\", \"\");\n if (\"\" !== s) n = d('', r);else n = d('', r);\n var o = document.createElement(\"span\");\n o.className = p, o.innerHTML = n;\n\n for (var i = t.outputLines || [], l = 0, m = i.length; l < m; l++) {\n if (i.hasOwnProperty(l)) {\n var c = o.children[l];\n c.removeAttribute(\"data-user\"), c.removeAttribute(\"data-host\"), c.removeAttribute(\"data-prompt\");\n }\n }\n\n e.element.insertBefore(o, e.element.firstChild), t.complete = !0;\n }\n\n function u(e, t) {\n return (a.getAttribute(e) || t).replace(/\"/g, \""\");\n }\n });\n }\n\n function d(e, t) {\n for (var n = \"\", a = 0; a < t; a++) {\n n += e;\n }\n\n return n;\n }\n\n function h(e) {\n var t = e.vars = e.vars || {};\n return t[\"command-line\"] = t[\"command-line\"] || {};\n }\n}();\n!function () {\n if (\"undefined\" != typeof self && self.Prism && self.document) {\n var i = [],\n l = {},\n c = function c() {};\n\n Prism.plugins.toolbar = {};\n\n var e = Prism.plugins.toolbar.registerButton = function (e, n) {\n var t;\n t = \"function\" == typeof n ? n : function (e) {\n var t;\n return \"function\" == typeof n.onClick ? ((t = document.createElement(\"button\")).type = \"button\", t.addEventListener(\"click\", function () {\n n.onClick.call(this, e);\n })) : \"string\" == typeof n.url ? (t = document.createElement(\"a\")).href = n.url : t = document.createElement(\"span\"), n.className && t.classList.add(n.className), t.textContent = n.text, t;\n }, e in l ? console.warn('There is a button with the key \"' + e + '\" registered already.') : i.push(l[e] = t);\n },\n t = Prism.plugins.toolbar.hook = function (a) {\n var e = a.element.parentNode;\n\n if (e && /pre/i.test(e.nodeName) && !e.parentNode.classList.contains(\"code-toolbar\")) {\n var t = document.createElement(\"div\");\n t.classList.add(\"code-toolbar\"), e.parentNode.insertBefore(t, e), t.appendChild(e);\n var r = document.createElement(\"div\");\n r.classList.add(\"toolbar\");\n\n var n = i,\n o = function (e) {\n for (; e;) {\n var t = e.getAttribute(\"data-toolbar-order\");\n if (null != t) return (t = t.trim()).length ? t.split(/\\s*,\\s*/g) : [];\n e = e.parentElement;\n }\n }(a.element);\n\n o && (n = o.map(function (e) {\n return l[e] || c;\n })), n.forEach(function (e) {\n var t = e(a);\n\n if (t) {\n var n = document.createElement(\"div\");\n n.classList.add(\"toolbar-item\"), n.appendChild(t), r.appendChild(n);\n }\n }), t.appendChild(r);\n }\n };\n\n e(\"label\", function (e) {\n var t = e.element.parentNode;\n\n if (t && /pre/i.test(t.nodeName) && t.hasAttribute(\"data-label\")) {\n var n,\n a,\n r = t.getAttribute(\"data-label\");\n\n try {\n a = document.querySelector(\"template#\" + r);\n } catch (e) {}\n\n return a ? n = a.content : (t.hasAttribute(\"data-url\") ? (n = document.createElement(\"a\")).href = t.getAttribute(\"data-url\") : n = document.createElement(\"span\"), n.textContent = r), n;\n }\n }), Prism.hooks.add(\"complete\", t);\n }\n}();\n!function () {\n if (\"undefined\" != typeof self && self.Prism && self.document) if (Prism.plugins.toolbar) {\n var i = window.ClipboardJS || void 0;\n i || \"function\" != typeof require || (i = require(\"clipboard\"));\n var u = [];\n\n if (!i) {\n var t = document.createElement(\"script\"),\n e = document.querySelector(\"head\");\n t.onload = function () {\n if (i = window.ClipboardJS) for (; u.length;) {\n u.pop()();\n }\n }, t.src = \"https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js\", e.appendChild(t);\n }\n\n Prism.plugins.toolbar.registerButton(\"copy-to-clipboard\", function (t) {\n var e = document.createElement(\"button\");\n e.textContent = \"Copy\", e.setAttribute(\"type\", \"button\");\n var o = t.element;\n return i ? n() : u.push(n), e;\n\n function n() {\n var t = new i(e, {\n text: function text() {\n return o.textContent;\n }\n });\n t.on(\"success\", function () {\n e.textContent = \"Copied!\", r();\n }), t.on(\"error\", function () {\n e.textContent = \"Press Ctrl+C to copy\", r();\n });\n }\n\n function r() {\n setTimeout(function () {\n e.textContent = \"Copy\";\n }, 5e3);\n }\n });\n } else console.warn(\"Copy to Clipboard plugin loaded before Toolbar plugin.\");\n}();","module.exports = __webpack_public_path__ + \"media/logos/favicon-ac1a15a7.ico\";","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*\n * Chartkick.js\n * Create beautiful charts with one line of JavaScript\n * https://github.com/ankane/chartkick.js\n * v3.2.1\n * MIT License\n */\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = global || self, global.Chartkick = factory());\n})(this, function () {\n 'use strict';\n\n function isArray(variable) {\n return Object.prototype.toString.call(variable) === \"[object Array]\";\n }\n\n function isFunction(variable) {\n return variable instanceof Function;\n }\n\n function isPlainObject(variable) {\n // protect against prototype pollution, defense 2\n return Object.prototype.toString.call(variable) === \"[object Object]\" && !isFunction(variable) && variable instanceof Object;\n } // https://github.com/madrobby/zepto/blob/master/src/zepto.js\n\n\n function extend(target, source) {\n var key;\n\n for (key in source) {\n // protect against prototype pollution, defense 1\n if (key === \"__proto__\") {\n continue;\n }\n\n if (isPlainObject(source[key]) || isArray(source[key])) {\n if (isPlainObject(source[key]) && !isPlainObject(target[key])) {\n target[key] = {};\n }\n\n if (isArray(source[key]) && !isArray(target[key])) {\n target[key] = [];\n }\n\n extend(target[key], source[key]);\n } else if (source[key] !== undefined) {\n target[key] = source[key];\n }\n }\n }\n\n function merge(obj1, obj2) {\n var target = {};\n extend(target, obj1);\n extend(target, obj2);\n return target;\n }\n\n var DATE_PATTERN = /^(\\d\\d\\d\\d)(-)?(\\d\\d)(-)?(\\d\\d)$/i; // https://github.com/Do/iso8601.js\n\n var ISO8601_PATTERN = /(\\d\\d\\d\\d)(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)?(:)?(\\d\\d)?([.,]\\d+)?($|Z|([+-])(\\d\\d)(:)?(\\d\\d)?)/i;\n var DECIMAL_SEPARATOR = String(1.5).charAt(1);\n\n function parseISO8601(input) {\n var day, hour, matches, milliseconds, minutes, month, offset, result, seconds, type, year;\n type = Object.prototype.toString.call(input);\n\n if (type === \"[object Date]\") {\n return input;\n }\n\n if (type !== \"[object String]\") {\n return;\n }\n\n matches = input.match(ISO8601_PATTERN);\n\n if (matches) {\n year = parseInt(matches[1], 10);\n month = parseInt(matches[3], 10) - 1;\n day = parseInt(matches[5], 10);\n hour = parseInt(matches[7], 10);\n minutes = matches[9] ? parseInt(matches[9], 10) : 0;\n seconds = matches[11] ? parseInt(matches[11], 10) : 0;\n milliseconds = matches[12] ? parseFloat(DECIMAL_SEPARATOR + matches[12].slice(1)) * 1000 : 0;\n result = Date.UTC(year, month, day, hour, minutes, seconds, milliseconds);\n\n if (matches[13] && matches[14]) {\n offset = matches[15] * 60;\n\n if (matches[17]) {\n offset += parseInt(matches[17], 10);\n }\n\n offset *= matches[14] === \"-\" ? -1 : 1;\n result -= offset * 60 * 1000;\n }\n\n return new Date(result);\n }\n } // end iso8601.js\n\n\n function negativeValues(series) {\n var i, j, data;\n\n for (i = 0; i < series.length; i++) {\n data = series[i].data;\n\n for (j = 0; j < data.length; j++) {\n if (data[j][1] < 0) {\n return true;\n }\n }\n }\n\n return false;\n }\n\n function toStr(n) {\n return \"\" + n;\n }\n\n function toFloat(n) {\n return parseFloat(n);\n }\n\n function toDate(n) {\n var matches, year, month, day;\n\n if (_typeof(n) !== \"object\") {\n if (typeof n === \"number\") {\n n = new Date(n * 1000); // ms\n } else {\n n = toStr(n);\n\n if (matches = n.match(DATE_PATTERN)) {\n year = parseInt(matches[1], 10);\n month = parseInt(matches[3], 10) - 1;\n day = parseInt(matches[5], 10);\n return new Date(year, month, day);\n } else {\n // str\n // try our best to get the str into iso8601\n // TODO be smarter about this\n var str = n.replace(/ /, \"T\").replace(\" \", \"\").replace(\"UTC\", \"Z\");\n n = parseISO8601(str) || new Date(n);\n }\n }\n }\n\n return n;\n }\n\n function toArr(n) {\n if (!isArray(n)) {\n var arr = [],\n i;\n\n for (i in n) {\n if (n.hasOwnProperty(i)) {\n arr.push([i, n[i]]);\n }\n }\n\n n = arr;\n }\n\n return n;\n }\n\n function jsOptionsFunc(defaultOptions, hideLegend, setTitle, setMin, setMax, setStacked, setXtitle, setYtitle) {\n return function (chart, opts, chartOptions) {\n var series = chart.data;\n var options = merge({}, defaultOptions);\n options = merge(options, chartOptions || {});\n\n if (chart.hideLegend || \"legend\" in opts) {\n hideLegend(options, opts.legend, chart.hideLegend);\n }\n\n if (opts.title) {\n setTitle(options, opts.title);\n } // min\n\n\n if (\"min\" in opts) {\n setMin(options, opts.min);\n } else if (!negativeValues(series)) {\n setMin(options, 0);\n } // max\n\n\n if (opts.max) {\n setMax(options, opts.max);\n }\n\n if (\"stacked\" in opts) {\n setStacked(options, opts.stacked);\n }\n\n if (opts.colors) {\n options.colors = opts.colors;\n }\n\n if (opts.xtitle) {\n setXtitle(options, opts.xtitle);\n }\n\n if (opts.ytitle) {\n setYtitle(options, opts.ytitle);\n } // merge library last\n\n\n options = merge(options, opts.library || {});\n return options;\n };\n }\n\n function sortByTime(a, b) {\n return a[0].getTime() - b[0].getTime();\n }\n\n function sortByNumberSeries(a, b) {\n return a[0] - b[0];\n }\n\n function sortByNumber(a, b) {\n return a - b;\n }\n\n function isMinute(d) {\n return d.getMilliseconds() === 0 && d.getSeconds() === 0;\n }\n\n function isHour(d) {\n return isMinute(d) && d.getMinutes() === 0;\n }\n\n function isDay(d) {\n return isHour(d) && d.getHours() === 0;\n }\n\n function isWeek(d, dayOfWeek) {\n return isDay(d) && d.getDay() === dayOfWeek;\n }\n\n function isMonth(d) {\n return isDay(d) && d.getDate() === 1;\n }\n\n function isYear(d) {\n return isMonth(d) && d.getMonth() === 0;\n }\n\n function isDate(obj) {\n return !isNaN(toDate(obj)) && toStr(obj).length >= 6;\n }\n\n function isNumber(obj) {\n return typeof obj === \"number\";\n }\n\n var byteSuffixes = [\"bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\"];\n\n function formatValue(pre, value, options, axis) {\n pre = pre || \"\";\n\n if (options.prefix) {\n if (value < 0) {\n value = value * -1;\n pre += \"-\";\n }\n\n pre += options.prefix;\n }\n\n var suffix = options.suffix || \"\";\n var precision = options.precision;\n var round = options.round;\n\n if (options.byteScale) {\n var suffixIdx;\n var baseValue = axis ? options.byteScale : value;\n\n if (baseValue >= 1152921504606846976) {\n value /= 1152921504606846976;\n suffixIdx = 6;\n } else if (baseValue >= 1125899906842624) {\n value /= 1125899906842624;\n suffixIdx = 5;\n } else if (baseValue >= 1099511627776) {\n value /= 1099511627776;\n suffixIdx = 4;\n } else if (baseValue >= 1073741824) {\n value /= 1073741824;\n suffixIdx = 3;\n } else if (baseValue >= 1048576) {\n value /= 1048576;\n suffixIdx = 2;\n } else if (baseValue >= 1024) {\n value /= 1024;\n suffixIdx = 1;\n } else {\n suffixIdx = 0;\n } // TODO handle manual precision case\n\n\n if (precision === undefined && round === undefined) {\n if (value >= 1023.5) {\n if (suffixIdx < byteSuffixes.length - 1) {\n value = 1.0;\n suffixIdx += 1;\n }\n }\n\n precision = value >= 1000 ? 4 : 3;\n }\n\n suffix = \" \" + byteSuffixes[suffixIdx];\n }\n\n if (precision !== undefined && round !== undefined) {\n throw Error(\"Use either round or precision, not both\");\n }\n\n if (!axis) {\n if (precision !== undefined) {\n value = value.toPrecision(precision);\n\n if (!options.zeros) {\n value = parseFloat(value);\n }\n }\n\n if (round !== undefined) {\n if (round < 0) {\n var num = Math.pow(10, -1 * round);\n value = parseInt((1.0 * value / num).toFixed(0)) * num;\n } else {\n value = value.toFixed(round);\n\n if (!options.zeros) {\n value = parseFloat(value);\n }\n }\n }\n }\n\n if (options.thousands || options.decimal) {\n value = toStr(value);\n var parts = value.split(\".\");\n value = parts[0];\n\n if (options.thousands) {\n value = value.replace(/\\B(?=(\\d{3})+(?!\\d))/g, options.thousands);\n }\n\n if (parts.length > 1) {\n value += (options.decimal || \".\") + parts[1];\n }\n }\n\n return pre + value + suffix;\n }\n\n function seriesOption(chart, series, option) {\n if (option in series) {\n return series[option];\n } else if (option in chart.options) {\n return chart.options[option];\n }\n\n return null;\n }\n\n function allZeros(data) {\n var i, j, d;\n\n for (i = 0; i < data.length; i++) {\n d = data[i].data;\n\n for (j = 0; j < d.length; j++) {\n if (d[j][1] != 0) {\n return false;\n }\n }\n }\n\n return true;\n }\n\n var baseOptions = {\n maintainAspectRatio: false,\n animation: false,\n tooltips: {\n displayColors: false,\n callbacks: {}\n },\n legend: {},\n title: {\n fontSize: 20,\n fontColor: \"#333\"\n }\n };\n var defaultOptions = {\n scales: {\n yAxes: [{\n ticks: {\n maxTicksLimit: 4\n },\n scaleLabel: {\n fontSize: 16,\n // fontStyle: \"bold\",\n fontColor: \"#333\"\n }\n }],\n xAxes: [{\n gridLines: {\n drawOnChartArea: false\n },\n scaleLabel: {\n fontSize: 16,\n // fontStyle: \"bold\",\n fontColor: \"#333\"\n },\n time: {},\n ticks: {}\n }]\n }\n }; // http://there4.io/2012/05/02/google-chart-color-list/\n\n var defaultColors = [\"#3366CC\", \"#DC3912\", \"#FF9900\", \"#109618\", \"#990099\", \"#3B3EAC\", \"#0099C6\", \"#DD4477\", \"#66AA00\", \"#B82E2E\", \"#316395\", \"#994499\", \"#22AA99\", \"#AAAA11\", \"#6633CC\", \"#E67300\", \"#8B0707\", \"#329262\", \"#5574A6\", \"#651067\"];\n\n var hideLegend = function hideLegend(options, legend, _hideLegend) {\n if (legend !== undefined) {\n options.legend.display = !!legend;\n\n if (legend && legend !== true) {\n options.legend.position = legend;\n }\n } else if (_hideLegend) {\n options.legend.display = false;\n }\n };\n\n var setTitle = function setTitle(options, title) {\n options.title.display = true;\n options.title.text = title;\n };\n\n var setMin = function setMin(options, min) {\n if (min !== null) {\n options.scales.yAxes[0].ticks.min = toFloat(min);\n }\n };\n\n var setMax = function setMax(options, max) {\n options.scales.yAxes[0].ticks.max = toFloat(max);\n };\n\n var setBarMin = function setBarMin(options, min) {\n if (min !== null) {\n options.scales.xAxes[0].ticks.min = toFloat(min);\n }\n };\n\n var setBarMax = function setBarMax(options, max) {\n options.scales.xAxes[0].ticks.max = toFloat(max);\n };\n\n var setStacked = function setStacked(options, stacked) {\n options.scales.xAxes[0].stacked = !!stacked;\n options.scales.yAxes[0].stacked = !!stacked;\n };\n\n var setXtitle = function setXtitle(options, title) {\n options.scales.xAxes[0].scaleLabel.display = true;\n options.scales.xAxes[0].scaleLabel.labelString = title;\n };\n\n var setYtitle = function setYtitle(options, title) {\n options.scales.yAxes[0].scaleLabel.display = true;\n options.scales.yAxes[0].scaleLabel.labelString = title;\n }; // https://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb\n\n\n var addOpacity = function addOpacity(hex, opacity) {\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result ? \"rgba(\" + parseInt(result[1], 16) + \", \" + parseInt(result[2], 16) + \", \" + parseInt(result[3], 16) + \", \" + opacity + \")\" : hex;\n }; // check if not null or undefined\n // https://stackoverflow.com/a/27757708/1177228\n\n\n var notnull = function notnull(x) {\n return x != null;\n };\n\n var setLabelSize = function setLabelSize(chart, data, options) {\n var maxLabelSize = Math.ceil(chart.element.offsetWidth / 4.0 / data.labels.length);\n\n if (maxLabelSize > 25) {\n maxLabelSize = 25;\n } else if (maxLabelSize < 10) {\n maxLabelSize = 10;\n }\n\n if (!options.scales.xAxes[0].ticks.callback) {\n options.scales.xAxes[0].ticks.callback = function (value) {\n value = toStr(value);\n\n if (value.length > maxLabelSize) {\n return value.substring(0, maxLabelSize - 2) + \"...\";\n } else {\n return value;\n }\n };\n }\n };\n\n var setFormatOptions = function setFormatOptions(chart, options, chartType) {\n var formatOptions = {\n prefix: chart.options.prefix,\n suffix: chart.options.suffix,\n thousands: chart.options.thousands,\n decimal: chart.options.decimal,\n precision: chart.options.precision,\n round: chart.options.round,\n zeros: chart.options.zeros\n };\n\n if (chart.options.bytes) {\n var series = chart.data;\n\n if (chartType === \"pie\") {\n series = [{\n data: series\n }];\n } // calculate max\n\n\n var max = 0;\n\n for (var i = 0; i < series.length; i++) {\n var s = series[i];\n\n for (var j = 0; j < s.data.length; j++) {\n if (s.data[j][1] > max) {\n max = s.data[j][1];\n }\n }\n } // calculate scale\n\n\n var scale = 1;\n\n while (max >= 1024) {\n scale *= 1024;\n max /= 1024;\n } // set step size\n\n\n formatOptions.byteScale = scale;\n }\n\n if (chartType !== \"pie\") {\n var myAxes = options.scales.yAxes;\n\n if (chartType === \"bar\") {\n myAxes = options.scales.xAxes;\n }\n\n if (formatOptions.byteScale) {\n if (!myAxes[0].ticks.stepSize) {\n myAxes[0].ticks.stepSize = formatOptions.byteScale / 2;\n }\n\n if (!myAxes[0].ticks.maxTicksLimit) {\n myAxes[0].ticks.maxTicksLimit = 4;\n }\n }\n\n if (!myAxes[0].ticks.callback) {\n myAxes[0].ticks.callback = function (value) {\n return formatValue(\"\", value, formatOptions, true);\n };\n }\n }\n\n if (!options.tooltips.callbacks.label) {\n if (chartType === \"scatter\") {\n options.tooltips.callbacks.label = function (item, data) {\n var label = data.datasets[item.datasetIndex].label || '';\n\n if (label) {\n label += ': ';\n }\n\n return label + '(' + item.xLabel + ', ' + item.yLabel + ')';\n };\n } else if (chartType === \"bubble\") {\n options.tooltips.callbacks.label = function (item, data) {\n var label = data.datasets[item.datasetIndex].label || '';\n\n if (label) {\n label += ': ';\n }\n\n var dataPoint = data.datasets[item.datasetIndex].data[item.index];\n return label + '(' + item.xLabel + ', ' + item.yLabel + ', ' + dataPoint.v + ')';\n };\n } else if (chartType === \"pie\") {\n // need to use separate label for pie charts\n options.tooltips.callbacks.label = function (tooltipItem, data) {\n var dataLabel = data.labels[tooltipItem.index];\n var value = ': ';\n\n if (isArray(dataLabel)) {\n // show value on first line of multiline label\n // need to clone because we are changing the value\n dataLabel = dataLabel.slice();\n dataLabel[0] += value;\n } else {\n dataLabel += value;\n }\n\n return formatValue(dataLabel, data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index], formatOptions);\n };\n } else {\n var valueLabel = chartType === \"bar\" ? \"xLabel\" : \"yLabel\";\n\n options.tooltips.callbacks.label = function (tooltipItem, data) {\n var label = data.datasets[tooltipItem.datasetIndex].label || '';\n\n if (label) {\n label += ': ';\n }\n\n return formatValue(label, tooltipItem[valueLabel], formatOptions);\n };\n }\n }\n };\n\n var jsOptions = jsOptionsFunc(merge(baseOptions, defaultOptions), hideLegend, setTitle, setMin, setMax, setStacked, setXtitle, setYtitle);\n\n var createDataTable = function createDataTable(chart, options, chartType, library) {\n var datasets = [];\n var labels = [];\n var colors = chart.options.colors || defaultColors;\n var day = true;\n var week = true;\n var dayOfWeek;\n var month = true;\n var year = true;\n var hour = true;\n var minute = true;\n var series = chart.data;\n var max = 0;\n\n if (chartType === \"bubble\") {\n for (var i$1 = 0; i$1 < series.length; i$1++) {\n var s$1 = series[i$1];\n\n for (var j$1 = 0; j$1 < s$1.data.length; j$1++) {\n if (s$1.data[j$1][2] > max) {\n max = s$1.data[j$1][2];\n }\n }\n }\n }\n\n var i,\n j,\n s,\n d,\n key,\n rows = [],\n rows2 = [];\n\n if (chartType === \"bar\" || chartType === \"column\" || chart.xtype !== \"number\" && chart.xtype !== \"bubble\") {\n var sortedLabels = [];\n\n for (i = 0; i < series.length; i++) {\n s = series[i];\n\n for (j = 0; j < s.data.length; j++) {\n d = s.data[j];\n key = chart.xtype == \"datetime\" ? d[0].getTime() : d[0];\n\n if (!rows[key]) {\n rows[key] = new Array(series.length);\n }\n\n rows[key][i] = toFloat(d[1]);\n\n if (sortedLabels.indexOf(key) === -1) {\n sortedLabels.push(key);\n }\n }\n }\n\n if (chart.xtype === \"datetime\" || chart.xtype === \"number\") {\n sortedLabels.sort(sortByNumber);\n }\n\n for (j = 0; j < series.length; j++) {\n rows2.push([]);\n }\n\n var value;\n var k;\n\n for (k = 0; k < sortedLabels.length; k++) {\n i = sortedLabels[k];\n\n if (chart.xtype === \"datetime\") {\n value = new Date(toFloat(i)); // TODO make this efficient\n\n day = day && isDay(value);\n\n if (!dayOfWeek) {\n dayOfWeek = value.getDay();\n }\n\n week = week && isWeek(value, dayOfWeek);\n month = month && isMonth(value);\n year = year && isYear(value);\n hour = hour && isHour(value);\n minute = minute && isMinute(value);\n } else {\n value = i;\n }\n\n labels.push(value);\n\n for (j = 0; j < series.length; j++) {\n // Chart.js doesn't like undefined\n rows2[j].push(rows[i][j] === undefined ? null : rows[i][j]);\n }\n }\n } else {\n for (var i$2 = 0; i$2 < series.length; i$2++) {\n var s$2 = series[i$2];\n var d$1 = [];\n\n for (var j$2 = 0; j$2 < s$2.data.length; j$2++) {\n var point = {\n x: toFloat(s$2.data[j$2][0]),\n y: toFloat(s$2.data[j$2][1])\n };\n\n if (chartType === \"bubble\") {\n point.r = toFloat(s$2.data[j$2][2]) * 20 / max; // custom attribute, for tooltip\n\n point.v = s$2.data[j$2][2];\n }\n\n d$1.push(point);\n }\n\n rows2.push(d$1);\n }\n }\n\n for (i = 0; i < series.length; i++) {\n s = series[i];\n var color = s.color || colors[i];\n var backgroundColor = chartType !== \"line\" ? addOpacity(color, 0.5) : color;\n var dataset = {\n label: s.name || \"\",\n data: rows2[i],\n fill: chartType === \"area\",\n borderColor: color,\n backgroundColor: backgroundColor,\n pointBackgroundColor: color,\n borderWidth: 2,\n pointHoverBackgroundColor: color\n };\n\n if (s.stack) {\n dataset.stack = s.stack;\n }\n\n var curve = seriesOption(chart, s, \"curve\");\n\n if (curve === false) {\n dataset.lineTension = 0;\n }\n\n var points = seriesOption(chart, s, \"points\");\n\n if (points === false) {\n dataset.pointRadius = 0;\n dataset.pointHitRadius = 5;\n }\n\n dataset = merge(dataset, chart.options.dataset || {});\n dataset = merge(dataset, s.library || {});\n dataset = merge(dataset, s.dataset || {});\n datasets.push(dataset);\n }\n\n var xmin = chart.options.xmin;\n var xmax = chart.options.xmax;\n\n if (chart.xtype === \"datetime\") {\n // hacky check for Chart.js >= 2.9.0\n // https://github.com/chartjs/Chart.js/compare/v2.8.0...v2.9.0\n var gte29 = (\"math\" in library.helpers);\n var ticksKey = gte29 ? \"ticks\" : \"time\";\n\n if (notnull(xmin)) {\n options.scales.xAxes[0][ticksKey].min = toDate(xmin).getTime();\n }\n\n if (notnull(xmax)) {\n options.scales.xAxes[0][ticksKey].max = toDate(xmax).getTime();\n }\n } else if (chart.xtype === \"number\") {\n if (notnull(xmin)) {\n options.scales.xAxes[0].ticks.min = xmin;\n }\n\n if (notnull(xmax)) {\n options.scales.xAxes[0].ticks.max = xmax;\n }\n } // for empty datetime chart\n\n\n if (chart.xtype === \"datetime\" && labels.length === 0) {\n if (notnull(xmin)) {\n labels.push(toDate(xmin));\n }\n\n if (notnull(xmax)) {\n labels.push(toDate(xmax));\n }\n\n day = false;\n week = false;\n month = false;\n year = false;\n hour = false;\n minute = false;\n }\n\n if (chart.xtype === \"datetime\" && labels.length > 0) {\n var minTime = (notnull(xmin) ? toDate(xmin) : labels[0]).getTime();\n var maxTime = (notnull(xmax) ? toDate(xmax) : labels[0]).getTime();\n\n for (i = 1; i < labels.length; i++) {\n var value$1 = labels[i].getTime();\n\n if (value$1 < minTime) {\n minTime = value$1;\n }\n\n if (value$1 > maxTime) {\n maxTime = value$1;\n }\n }\n\n var timeDiff = (maxTime - minTime) / (86400 * 1000.0);\n\n if (!options.scales.xAxes[0].time.unit) {\n var step;\n\n if (year || timeDiff > 365 * 10) {\n options.scales.xAxes[0].time.unit = \"year\";\n step = 365;\n } else if (month || timeDiff > 30 * 10) {\n options.scales.xAxes[0].time.unit = \"month\";\n step = 30;\n } else if (day || timeDiff > 10) {\n options.scales.xAxes[0].time.unit = \"day\";\n step = 1;\n } else if (hour || timeDiff > 0.5) {\n options.scales.xAxes[0].time.displayFormats = {\n hour: \"MMM D, h a\"\n };\n options.scales.xAxes[0].time.unit = \"hour\";\n step = 1 / 24.0;\n } else if (minute) {\n options.scales.xAxes[0].time.displayFormats = {\n minute: \"h:mm a\"\n };\n options.scales.xAxes[0].time.unit = \"minute\";\n step = 1 / 24.0 / 60.0;\n }\n\n if (step && timeDiff > 0) {\n var unitStepSize = Math.ceil(timeDiff / step / (chart.element.offsetWidth / 100.0));\n\n if (week && step === 1) {\n unitStepSize = Math.ceil(unitStepSize / 7.0) * 7;\n }\n\n options.scales.xAxes[0].time.unitStepSize = unitStepSize;\n }\n }\n\n if (!options.scales.xAxes[0].time.tooltipFormat) {\n if (day) {\n options.scales.xAxes[0].time.tooltipFormat = \"ll\";\n } else if (hour) {\n options.scales.xAxes[0].time.tooltipFormat = \"MMM D, h a\";\n } else if (minute) {\n options.scales.xAxes[0].time.tooltipFormat = \"h:mm a\";\n }\n }\n }\n\n var data = {\n labels: labels,\n datasets: datasets\n };\n return data;\n };\n\n var defaultExport = function defaultExport(library) {\n this.name = \"chartjs\";\n this.library = library;\n };\n\n defaultExport.prototype.renderLineChart = function renderLineChart(chart, chartType) {\n var chartOptions = {}; // fix for https://github.com/chartjs/Chart.js/issues/2441\n\n if (!chart.options.max && allZeros(chart.data)) {\n chartOptions.max = 1;\n }\n\n var options = jsOptions(chart, merge(chartOptions, chart.options));\n setFormatOptions(chart, options, chartType);\n var data = createDataTable(chart, options, chartType || \"line\", this.library);\n\n if (chart.xtype === \"number\") {\n options.scales.xAxes[0].type = \"linear\";\n options.scales.xAxes[0].position = \"bottom\";\n } else {\n options.scales.xAxes[0].type = chart.xtype === \"string\" ? \"category\" : \"time\";\n }\n\n this.drawChart(chart, \"line\", data, options);\n };\n\n defaultExport.prototype.renderPieChart = function renderPieChart(chart) {\n var options = merge({}, baseOptions);\n\n if (chart.options.donut) {\n options.cutoutPercentage = 50;\n }\n\n if (\"legend\" in chart.options) {\n hideLegend(options, chart.options.legend);\n }\n\n if (chart.options.title) {\n setTitle(options, chart.options.title);\n }\n\n options = merge(options, chart.options.library || {});\n setFormatOptions(chart, options, \"pie\");\n var labels = [];\n var values = [];\n\n for (var i = 0; i < chart.data.length; i++) {\n var point = chart.data[i];\n labels.push(point[0]);\n values.push(point[1]);\n }\n\n var dataset = {\n data: values,\n backgroundColor: chart.options.colors || defaultColors\n };\n dataset = merge(dataset, chart.options.dataset || {});\n var data = {\n labels: labels,\n datasets: [dataset]\n };\n this.drawChart(chart, \"pie\", data, options);\n };\n\n defaultExport.prototype.renderColumnChart = function renderColumnChart(chart, chartType) {\n var options;\n\n if (chartType === \"bar\") {\n var barOptions = merge(baseOptions, defaultOptions);\n delete barOptions.scales.yAxes[0].ticks.maxTicksLimit;\n options = jsOptionsFunc(barOptions, hideLegend, setTitle, setBarMin, setBarMax, setStacked, setXtitle, setYtitle)(chart, chart.options);\n } else {\n options = jsOptions(chart, chart.options);\n }\n\n setFormatOptions(chart, options, chartType);\n var data = createDataTable(chart, options, \"column\", this.library);\n\n if (chartType !== \"bar\") {\n setLabelSize(chart, data, options);\n }\n\n this.drawChart(chart, chartType === \"bar\" ? \"horizontalBar\" : \"bar\", data, options);\n };\n\n defaultExport.prototype.renderAreaChart = function renderAreaChart(chart) {\n this.renderLineChart(chart, \"area\");\n };\n\n defaultExport.prototype.renderBarChart = function renderBarChart(chart) {\n this.renderColumnChart(chart, \"bar\");\n };\n\n defaultExport.prototype.renderScatterChart = function renderScatterChart(chart, chartType) {\n chartType = chartType || \"scatter\";\n var options = jsOptions(chart, chart.options);\n setFormatOptions(chart, options, chartType);\n\n if (!(\"showLines\" in options)) {\n options.showLines = false;\n }\n\n var data = createDataTable(chart, options, chartType, this.library);\n options.scales.xAxes[0].type = \"linear\";\n options.scales.xAxes[0].position = \"bottom\";\n this.drawChart(chart, chartType, data, options);\n };\n\n defaultExport.prototype.renderBubbleChart = function renderBubbleChart(chart) {\n this.renderScatterChart(chart, \"bubble\");\n };\n\n defaultExport.prototype.destroy = function destroy(chart) {\n if (chart.chart) {\n chart.chart.destroy();\n }\n };\n\n defaultExport.prototype.drawChart = function drawChart(chart, type, data, options) {\n this.destroy(chart);\n var chartOptions = {\n type: type,\n data: data,\n options: options\n };\n\n if (chart.options.code) {\n window.console.log(\"new Chart(ctx, \" + JSON.stringify(chartOptions) + \");\");\n }\n\n chart.element.innerHTML = \"\";\n var ctx = chart.element.getElementsByTagName(\"CANVAS\")[0];\n chart.chart = new this.library(ctx, chartOptions);\n };\n\n var defaultOptions$1 = {\n chart: {},\n xAxis: {\n title: {\n text: null\n },\n labels: {\n style: {\n fontSize: \"12px\"\n }\n }\n },\n yAxis: {\n title: {\n text: null\n },\n labels: {\n style: {\n fontSize: \"12px\"\n }\n }\n },\n title: {\n text: null\n },\n credits: {\n enabled: false\n },\n legend: {\n borderWidth: 0\n },\n tooltip: {\n style: {\n fontSize: \"12px\"\n }\n },\n plotOptions: {\n areaspline: {},\n area: {},\n series: {\n marker: {}\n }\n }\n };\n\n var hideLegend$1 = function hideLegend$1(options, legend, hideLegend) {\n if (legend !== undefined) {\n options.legend.enabled = !!legend;\n\n if (legend && legend !== true) {\n if (legend === \"top\" || legend === \"bottom\") {\n options.legend.verticalAlign = legend;\n } else {\n options.legend.layout = \"vertical\";\n options.legend.verticalAlign = \"middle\";\n options.legend.align = legend;\n }\n }\n } else if (hideLegend) {\n options.legend.enabled = false;\n }\n };\n\n var setTitle$1 = function setTitle$1(options, title) {\n options.title.text = title;\n };\n\n var setMin$1 = function setMin$1(options, min) {\n options.yAxis.min = min;\n };\n\n var setMax$1 = function setMax$1(options, max) {\n options.yAxis.max = max;\n };\n\n var setStacked$1 = function setStacked$1(options, stacked) {\n var stackedValue = stacked ? stacked === true ? \"normal\" : stacked : null;\n options.plotOptions.series.stacking = stackedValue;\n options.plotOptions.area.stacking = stackedValue;\n options.plotOptions.areaspline.stacking = stackedValue;\n };\n\n var setXtitle$1 = function setXtitle$1(options, title) {\n options.xAxis.title.text = title;\n };\n\n var setYtitle$1 = function setYtitle$1(options, title) {\n options.yAxis.title.text = title;\n };\n\n var jsOptions$1 = jsOptionsFunc(defaultOptions$1, hideLegend$1, setTitle$1, setMin$1, setMax$1, setStacked$1, setXtitle$1, setYtitle$1);\n\n var setFormatOptions$1 = function setFormatOptions$1(chart, options, chartType) {\n var formatOptions = {\n prefix: chart.options.prefix,\n suffix: chart.options.suffix,\n thousands: chart.options.thousands,\n decimal: chart.options.decimal,\n precision: chart.options.precision,\n round: chart.options.round,\n zeros: chart.options.zeros\n };\n\n if (chartType !== \"pie\" && !options.yAxis.labels.formatter) {\n options.yAxis.labels.formatter = function () {\n return formatValue(\"\", this.value, formatOptions);\n };\n }\n\n if (!options.tooltip.pointFormatter) {\n options.tooltip.pointFormatter = function () {\n return '\\u25CF \" + formatValue(this.series.name + ': ', this.y, formatOptions) + '
';\n };\n }\n };\n\n var defaultExport$1 = function defaultExport(library) {\n this.name = \"highcharts\";\n this.library = library;\n };\n\n defaultExport$1.prototype.renderLineChart = function renderLineChart(chart, chartType) {\n chartType = chartType || \"spline\";\n var chartOptions = {};\n\n if (chartType === \"areaspline\") {\n chartOptions = {\n plotOptions: {\n areaspline: {\n stacking: \"normal\"\n },\n area: {\n stacking: \"normal\"\n },\n series: {\n marker: {\n enabled: false\n }\n }\n }\n };\n }\n\n if (chart.options.curve === false) {\n if (chartType === \"areaspline\") {\n chartType = \"area\";\n } else if (chartType === \"spline\") {\n chartType = \"line\";\n }\n }\n\n var options = jsOptions$1(chart, chart.options, chartOptions),\n data,\n i,\n j;\n options.xAxis.type = chart.xtype === \"string\" ? \"category\" : chart.xtype === \"number\" ? \"linear\" : \"datetime\";\n\n if (!options.chart.type) {\n options.chart.type = chartType;\n }\n\n setFormatOptions$1(chart, options, chartType);\n var series = chart.data;\n\n for (i = 0; i < series.length; i++) {\n series[i].name = series[i].name || \"Value\";\n data = series[i].data;\n\n if (chart.xtype === \"datetime\") {\n for (j = 0; j < data.length; j++) {\n data[j][0] = data[j][0].getTime();\n }\n }\n\n series[i].marker = {\n symbol: \"circle\"\n };\n\n if (chart.options.points === false) {\n series[i].marker.enabled = false;\n }\n }\n\n this.drawChart(chart, series, options);\n };\n\n defaultExport$1.prototype.renderScatterChart = function renderScatterChart(chart) {\n var options = jsOptions$1(chart, chart.options, {});\n options.chart.type = \"scatter\";\n this.drawChart(chart, chart.data, options);\n };\n\n defaultExport$1.prototype.renderPieChart = function renderPieChart(chart) {\n var chartOptions = merge(defaultOptions$1, {});\n\n if (chart.options.colors) {\n chartOptions.colors = chart.options.colors;\n }\n\n if (chart.options.donut) {\n chartOptions.plotOptions = {\n pie: {\n innerSize: \"50%\"\n }\n };\n }\n\n if (\"legend\" in chart.options) {\n hideLegend$1(chartOptions, chart.options.legend);\n }\n\n if (chart.options.title) {\n setTitle$1(chartOptions, chart.options.title);\n }\n\n var options = merge(chartOptions, chart.options.library || {});\n setFormatOptions$1(chart, options, \"pie\");\n var series = [{\n type: \"pie\",\n name: chart.options.label || \"Value\",\n data: chart.data\n }];\n this.drawChart(chart, series, options);\n };\n\n defaultExport$1.prototype.renderColumnChart = function renderColumnChart(chart, chartType) {\n chartType = chartType || \"column\";\n var series = chart.data;\n var options = jsOptions$1(chart, chart.options),\n i,\n j,\n s,\n d,\n rows = [],\n categories = [];\n options.chart.type = chartType;\n setFormatOptions$1(chart, options, chartType);\n\n for (i = 0; i < series.length; i++) {\n s = series[i];\n\n for (j = 0; j < s.data.length; j++) {\n d = s.data[j];\n\n if (!rows[d[0]]) {\n rows[d[0]] = new Array(series.length);\n categories.push(d[0]);\n }\n\n rows[d[0]][i] = d[1];\n }\n }\n\n if (chart.xtype === \"number\") {\n categories.sort(sortByNumber);\n }\n\n options.xAxis.categories = categories;\n var newSeries = [],\n d2;\n\n for (i = 0; i < series.length; i++) {\n d = [];\n\n for (j = 0; j < categories.length; j++) {\n d.push(rows[categories[j]][i] || 0);\n }\n\n d2 = {\n name: series[i].name || \"Value\",\n data: d\n };\n\n if (series[i].stack) {\n d2.stack = series[i].stack;\n }\n\n newSeries.push(d2);\n }\n\n this.drawChart(chart, newSeries, options);\n };\n\n defaultExport$1.prototype.renderBarChart = function renderBarChart(chart) {\n this.renderColumnChart(chart, \"bar\");\n };\n\n defaultExport$1.prototype.renderAreaChart = function renderAreaChart(chart) {\n this.renderLineChart(chart, \"areaspline\");\n };\n\n defaultExport$1.prototype.destroy = function destroy(chart) {\n if (chart.chart) {\n chart.chart.destroy();\n }\n };\n\n defaultExport$1.prototype.drawChart = function drawChart(chart, data, options) {\n this.destroy(chart);\n options.chart.renderTo = chart.element.id;\n options.series = data;\n\n if (chart.options.code) {\n window.console.log(\"new Highcharts.Chart(\" + JSON.stringify(options) + \");\");\n }\n\n chart.chart = new this.library.Chart(options);\n };\n\n var loaded = {};\n var callbacks = []; // Set chart options\n\n var defaultOptions$2 = {\n chartArea: {},\n fontName: \"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif\",\n pointSize: 6,\n legend: {\n textStyle: {\n fontSize: 12,\n color: \"#444\"\n },\n alignment: \"center\",\n position: \"right\"\n },\n curveType: \"function\",\n hAxis: {\n textStyle: {\n color: \"#666\",\n fontSize: 12\n },\n titleTextStyle: {},\n gridlines: {\n color: \"transparent\"\n },\n baselineColor: \"#ccc\",\n viewWindow: {}\n },\n vAxis: {\n textStyle: {\n color: \"#666\",\n fontSize: 12\n },\n titleTextStyle: {},\n baselineColor: \"#ccc\",\n viewWindow: {}\n },\n tooltip: {\n textStyle: {\n color: \"#666\",\n fontSize: 12\n }\n }\n };\n\n var hideLegend$2 = function hideLegend$2(options, legend, hideLegend) {\n if (legend !== undefined) {\n var position;\n\n if (!legend) {\n position = \"none\";\n } else if (legend === true) {\n position = \"right\";\n } else {\n position = legend;\n }\n\n options.legend.position = position;\n } else if (hideLegend) {\n options.legend.position = \"none\";\n }\n };\n\n var setTitle$2 = function setTitle$2(options, title) {\n options.title = title;\n options.titleTextStyle = {\n color: \"#333\",\n fontSize: \"20px\"\n };\n };\n\n var setMin$2 = function setMin$2(options, min) {\n options.vAxis.viewWindow.min = min;\n };\n\n var setMax$2 = function setMax$2(options, max) {\n options.vAxis.viewWindow.max = max;\n };\n\n var setBarMin$1 = function setBarMin$1(options, min) {\n options.hAxis.viewWindow.min = min;\n };\n\n var setBarMax$1 = function setBarMax$1(options, max) {\n options.hAxis.viewWindow.max = max;\n };\n\n var setStacked$2 = function setStacked$2(options, stacked) {\n options.isStacked = stacked ? stacked : false;\n };\n\n var setXtitle$2 = function setXtitle$2(options, title) {\n options.hAxis.title = title;\n options.hAxis.titleTextStyle.italic = false;\n };\n\n var setYtitle$2 = function setYtitle$2(options, title) {\n options.vAxis.title = title;\n options.vAxis.titleTextStyle.italic = false;\n };\n\n var jsOptions$2 = jsOptionsFunc(defaultOptions$2, hideLegend$2, setTitle$2, setMin$2, setMax$2, setStacked$2, setXtitle$2, setYtitle$2);\n\n var resize = function resize(callback) {\n if (window.attachEvent) {\n window.attachEvent(\"onresize\", callback);\n } else if (window.addEventListener) {\n window.addEventListener(\"resize\", callback, true);\n }\n\n callback();\n };\n\n var defaultExport$2 = function defaultExport(library) {\n this.name = \"google\";\n this.library = library;\n };\n\n defaultExport$2.prototype.renderLineChart = function renderLineChart(chart) {\n var this$1 = this;\n this.waitForLoaded(chart, function () {\n var chartOptions = {};\n\n if (chart.options.curve === false) {\n chartOptions.curveType = \"none\";\n }\n\n if (chart.options.points === false) {\n chartOptions.pointSize = 0;\n }\n\n var options = jsOptions$2(chart, chart.options, chartOptions);\n var data = this$1.createDataTable(chart.data, chart.xtype);\n this$1.drawChart(chart, \"LineChart\", data, options);\n });\n };\n\n defaultExport$2.prototype.renderPieChart = function renderPieChart(chart) {\n var this$1 = this;\n this.waitForLoaded(chart, function () {\n var chartOptions = {\n chartArea: {\n top: \"10%\",\n height: \"80%\"\n },\n legend: {}\n };\n\n if (chart.options.colors) {\n chartOptions.colors = chart.options.colors;\n }\n\n if (chart.options.donut) {\n chartOptions.pieHole = 0.5;\n }\n\n if (\"legend\" in chart.options) {\n hideLegend$2(chartOptions, chart.options.legend);\n }\n\n if (chart.options.title) {\n setTitle$2(chartOptions, chart.options.title);\n }\n\n var options = merge(merge(defaultOptions$2, chartOptions), chart.options.library || {});\n var data = new this$1.library.visualization.DataTable();\n data.addColumn(\"string\", \"\");\n data.addColumn(\"number\", \"Value\");\n data.addRows(chart.data);\n this$1.drawChart(chart, \"PieChart\", data, options);\n });\n };\n\n defaultExport$2.prototype.renderColumnChart = function renderColumnChart(chart) {\n var this$1 = this;\n this.waitForLoaded(chart, function () {\n var options = jsOptions$2(chart, chart.options);\n var data = this$1.createDataTable(chart.data, chart.xtype);\n this$1.drawChart(chart, \"ColumnChart\", data, options);\n });\n };\n\n defaultExport$2.prototype.renderBarChart = function renderBarChart(chart) {\n var this$1 = this;\n this.waitForLoaded(chart, function () {\n var chartOptions = {\n hAxis: {\n gridlines: {\n color: \"#ccc\"\n }\n }\n };\n var options = jsOptionsFunc(defaultOptions$2, hideLegend$2, setTitle$2, setBarMin$1, setBarMax$1, setStacked$2, setXtitle$2, setYtitle$2)(chart, chart.options, chartOptions);\n var data = this$1.createDataTable(chart.data, chart.xtype);\n this$1.drawChart(chart, \"BarChart\", data, options);\n });\n };\n\n defaultExport$2.prototype.renderAreaChart = function renderAreaChart(chart) {\n var this$1 = this;\n this.waitForLoaded(chart, function () {\n var chartOptions = {\n isStacked: true,\n pointSize: 0,\n areaOpacity: 0.5\n };\n var options = jsOptions$2(chart, chart.options, chartOptions);\n var data = this$1.createDataTable(chart.data, chart.xtype);\n this$1.drawChart(chart, \"AreaChart\", data, options);\n });\n };\n\n defaultExport$2.prototype.renderGeoChart = function renderGeoChart(chart) {\n var this$1 = this;\n this.waitForLoaded(chart, \"geochart\", function () {\n var chartOptions = {\n legend: \"none\",\n colorAxis: {\n colors: chart.options.colors || [\"#f6c7b6\", \"#ce502d\"]\n }\n };\n var options = merge(merge(defaultOptions$2, chartOptions), chart.options.library || {});\n var data = new this$1.library.visualization.DataTable();\n data.addColumn(\"string\", \"\");\n data.addColumn(\"number\", chart.options.label || \"Value\");\n data.addRows(chart.data);\n this$1.drawChart(chart, \"GeoChart\", data, options);\n });\n };\n\n defaultExport$2.prototype.renderScatterChart = function renderScatterChart(chart) {\n var this$1 = this;\n this.waitForLoaded(chart, function () {\n var chartOptions = {};\n var options = jsOptions$2(chart, chart.options, chartOptions);\n var series = chart.data,\n rows2 = [],\n i,\n j,\n data,\n d;\n\n for (i = 0; i < series.length; i++) {\n series[i].name = series[i].name || \"Value\";\n d = series[i].data;\n\n for (j = 0; j < d.length; j++) {\n var row = new Array(series.length + 1);\n row[0] = d[j][0];\n row[i + 1] = d[j][1];\n rows2.push(row);\n }\n }\n\n data = new this$1.library.visualization.DataTable();\n data.addColumn(\"number\", \"\");\n\n for (i = 0; i < series.length; i++) {\n data.addColumn(\"number\", series[i].name);\n }\n\n data.addRows(rows2);\n this$1.drawChart(chart, \"ScatterChart\", data, options);\n });\n };\n\n defaultExport$2.prototype.renderTimeline = function renderTimeline(chart) {\n var this$1 = this;\n this.waitForLoaded(chart, \"timeline\", function () {\n var chartOptions = {\n legend: \"none\"\n };\n\n if (chart.options.colors) {\n chartOptions.colors = chart.options.colors;\n }\n\n var options = merge(merge(defaultOptions$2, chartOptions), chart.options.library || {});\n var data = new this$1.library.visualization.DataTable();\n data.addColumn({\n type: \"string\",\n id: \"Name\"\n });\n data.addColumn({\n type: \"date\",\n id: \"Start\"\n });\n data.addColumn({\n type: \"date\",\n id: \"End\"\n });\n data.addRows(chart.data);\n chart.element.style.lineHeight = \"normal\";\n this$1.drawChart(chart, \"Timeline\", data, options);\n });\n };\n\n defaultExport$2.prototype.destroy = function destroy(chart) {\n if (chart.chart) {\n chart.chart.clearChart();\n }\n };\n\n defaultExport$2.prototype.drawChart = function drawChart(chart, type, data, options) {\n this.destroy(chart);\n\n if (chart.options.code) {\n window.console.log(\"var data = new google.visualization.DataTable(\" + data.toJSON() + \");\\nvar chart = new google.visualization.\" + type + \"(element);\\nchart.draw(data, \" + JSON.stringify(options) + \");\");\n }\n\n chart.chart = new this.library.visualization[type](chart.element);\n resize(function () {\n chart.chart.draw(data, options);\n });\n };\n\n defaultExport$2.prototype.waitForLoaded = function waitForLoaded(chart, pack, callback) {\n var this$1 = this;\n\n if (!callback) {\n callback = pack;\n pack = \"corechart\";\n }\n\n callbacks.push({\n pack: pack,\n callback: callback\n });\n\n if (loaded[pack]) {\n this.runCallbacks();\n } else {\n loaded[pack] = true; // https://groups.google.com/forum/#!topic/google-visualization-api/fMKJcyA2yyI\n\n var loadOptions = {\n packages: [pack],\n callback: function callback() {\n this$1.runCallbacks();\n }\n };\n\n var config = chart.__config();\n\n if (config.language) {\n loadOptions.language = config.language;\n }\n\n if (pack === \"geochart\" && config.mapsApiKey) {\n loadOptions.mapsApiKey = config.mapsApiKey;\n }\n\n this.library.charts.load(\"current\", loadOptions);\n }\n };\n\n defaultExport$2.prototype.runCallbacks = function runCallbacks() {\n var cb, call;\n\n for (var i = 0; i < callbacks.length; i++) {\n cb = callbacks[i];\n call = this.library.visualization && (cb.pack === \"corechart\" && this.library.visualization.LineChart || cb.pack === \"timeline\" && this.library.visualization.Timeline || cb.pack === \"geochart\" && this.library.visualization.GeoChart);\n\n if (call) {\n cb.callback();\n callbacks.splice(i, 1);\n i--;\n }\n }\n }; // cant use object as key\n\n\n defaultExport$2.prototype.createDataTable = function createDataTable(series, columnType) {\n var i,\n j,\n s,\n d,\n key,\n rows = [],\n sortedLabels = [];\n\n for (i = 0; i < series.length; i++) {\n s = series[i];\n series[i].name = series[i].name || \"Value\";\n\n for (j = 0; j < s.data.length; j++) {\n d = s.data[j];\n key = columnType === \"datetime\" ? d[0].getTime() : d[0];\n\n if (!rows[key]) {\n rows[key] = new Array(series.length);\n sortedLabels.push(key);\n }\n\n rows[key][i] = toFloat(d[1]);\n }\n }\n\n var rows2 = [];\n var day = true;\n var value;\n\n for (j = 0; j < sortedLabels.length; j++) {\n i = sortedLabels[j];\n\n if (columnType === \"datetime\") {\n value = new Date(toFloat(i));\n day = day && isDay(value);\n } else if (columnType === \"number\") {\n value = toFloat(i);\n } else {\n value = i;\n }\n\n rows2.push([value].concat(rows[i]));\n }\n\n if (columnType === \"datetime\") {\n rows2.sort(sortByTime);\n } else if (columnType === \"number\") {\n rows2.sort(sortByNumberSeries);\n\n for (i = 0; i < rows2.length; i++) {\n rows2[i][0] = toStr(rows2[i][0]);\n }\n\n columnType = \"string\";\n } // create datatable\n\n\n var data = new this.library.visualization.DataTable();\n columnType = columnType === \"datetime\" && day ? \"date\" : columnType;\n data.addColumn(columnType, \"\");\n\n for (i = 0; i < series.length; i++) {\n data.addColumn(\"number\", series[i].name);\n }\n\n data.addRows(rows2);\n return data;\n };\n\n var pendingRequests = [],\n runningRequests = 0,\n maxRequests = 4;\n\n function pushRequest(url, success, error) {\n pendingRequests.push([url, success, error]);\n runNext();\n }\n\n function runNext() {\n if (runningRequests < maxRequests) {\n var request = pendingRequests.shift();\n\n if (request) {\n runningRequests++;\n getJSON(request[0], request[1], request[2]);\n runNext();\n }\n }\n }\n\n function requestComplete() {\n runningRequests--;\n runNext();\n }\n\n function getJSON(url, success, error) {\n ajaxCall(url, success, function (jqXHR, textStatus, errorThrown) {\n var message = typeof errorThrown === \"string\" ? errorThrown : errorThrown.message;\n error(message);\n });\n }\n\n function ajaxCall(url, success, error) {\n var $ = window.jQuery || window.Zepto || window.$;\n\n if ($ && $.ajax) {\n $.ajax({\n dataType: \"json\",\n url: url,\n success: success,\n error: error,\n complete: requestComplete\n });\n } else {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, true);\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n\n xhr.onload = function () {\n requestComplete();\n\n if (xhr.status === 200) {\n success(JSON.parse(xhr.responseText), xhr.statusText, xhr);\n } else {\n error(xhr, \"error\", xhr.statusText);\n }\n };\n\n xhr.send();\n }\n }\n\n var config = {};\n var adapters = []; // helpers\n\n function setText(element, text) {\n if (document.body.innerText) {\n element.innerText = text;\n } else {\n element.textContent = text;\n }\n } // TODO remove prefix for all messages\n\n\n function chartError(element, message, noPrefix) {\n if (!noPrefix) {\n message = \"Error Loading Chart: \" + message;\n }\n\n setText(element, message);\n element.style.color = \"#ff0000\";\n }\n\n function errorCatcher(chart) {\n try {\n chart.__render();\n } catch (err) {\n chartError(chart.element, err.message);\n throw err;\n }\n }\n\n function fetchDataSource(chart, dataSource) {\n if (typeof dataSource === \"string\") {\n pushRequest(dataSource, function (data) {\n chart.rawData = data;\n errorCatcher(chart);\n }, function (message) {\n chartError(chart.element, message);\n });\n } else if (typeof dataSource === \"function\") {\n try {\n dataSource(function (data) {\n chart.rawData = data;\n errorCatcher(chart);\n }, function (message) {\n chartError(chart.element, message, true);\n });\n } catch (err) {\n chartError(chart.element, err, true);\n }\n } else {\n chart.rawData = dataSource;\n errorCatcher(chart);\n }\n }\n\n function addDownloadButton(chart) {\n var element = chart.element;\n var link = document.createElement(\"a\");\n var download = chart.options.download;\n\n if (download === true) {\n download = {};\n } else if (typeof download === \"string\") {\n download = {\n filename: download\n };\n }\n\n link.download = download.filename || \"chart.png\"; // https://caniuse.com/download\n\n link.style.position = \"absolute\";\n link.style.top = \"20px\";\n link.style.right = \"20px\";\n link.style.zIndex = 1000;\n link.style.lineHeight = \"20px\";\n link.target = \"_blank\"; // for safari\n\n var image = document.createElement(\"img\");\n image.alt = \"Download\";\n image.style.border = \"none\"; // icon from font-awesome\n // http://fa2png.io/\n\n image.src = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABCFBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMywEsqxAAAAV3RSTlMAAQIDBggJCgsMDQ4PERQaHB0eISIjJCouLzE0OTo/QUJHSUpLTU5PUllhYmltcHh5foWLjI+SlaCio6atr7S1t7m6vsHHyM7R2tze5Obo7fHz9ff5+/1hlxK2AAAA30lEQVQYGUXBhVYCQQBA0TdYWAt2d3d3YWAHyur7/z9xgD16Lw0DW+XKx+1GgX+FRzM3HWQWrHl5N/oapW5RPe0PkBu+UYeICvozTWZVK23Ao04B79oJrOsJDOoxkZoQPWgX29pHpCZEk7rEvQYiNSFq1UMqvlCjJkRBS1R8hb00Vb/TajtBL7nTHE1X1vyMQF732dQhyF2o6SAwrzP06iUQzvwsArlnzcOdrgBhJyHa1QOgO9U1GsKuvjUTjavliZYQ8nNPapG6sap/3nrIdJ6bOWzmX/fy0XVpfzZP3S8OJT3g9EEiJwAAAABJRU5ErkJggg==\";\n link.appendChild(image);\n element.style.position = \"relative\";\n chart.__downloadAttached = true; // mouseenter\n\n chart.__enterEvent = addEvent(element, \"mouseover\", function (e) {\n var related = e.relatedTarget; // check download option again to ensure it wasn't changed\n\n if ((!related || related !== this && !childOf(this, related)) && chart.options.download) {\n link.href = chart.toImage(download);\n element.appendChild(link);\n }\n }); // mouseleave\n\n chart.__leaveEvent = addEvent(element, \"mouseout\", function (e) {\n var related = e.relatedTarget;\n\n if (!related || related !== this && !childOf(this, related)) {\n if (link.parentNode) {\n link.parentNode.removeChild(link);\n }\n }\n });\n } // https://stackoverflow.com/questions/10149963/adding-event-listener-cross-browser\n\n\n function addEvent(elem, event, fn) {\n if (elem.addEventListener) {\n elem.addEventListener(event, fn, false);\n return fn;\n } else {\n var fn2 = function fn2() {\n // set the this pointer same as addEventListener when fn is called\n return fn.call(elem, window.event);\n };\n\n elem.attachEvent(\"on\" + event, fn2);\n return fn2;\n }\n }\n\n function removeEvent(elem, event, fn) {\n if (elem.removeEventListener) {\n elem.removeEventListener(event, fn, false);\n } else {\n elem.detachEvent(\"on\" + event, fn);\n }\n } // https://gist.github.com/shawnbot/4166283\n\n\n function childOf(p, c) {\n if (p === c) {\n return false;\n }\n\n while (c && c !== p) {\n c = c.parentNode;\n }\n\n return c === p;\n }\n\n function getAdapterType(library) {\n if (library) {\n if (library.product === \"Highcharts\") {\n return defaultExport$1;\n } else if (library.charts) {\n return defaultExport$2;\n } else if (isFunction(library)) {\n return defaultExport;\n }\n }\n\n throw new Error(\"Unknown adapter\");\n }\n\n function addAdapter(library) {\n var adapterType = getAdapterType(library);\n var adapter = new adapterType(library);\n\n if (adapters.indexOf(adapter) === -1) {\n adapters.push(adapter);\n }\n }\n\n function loadAdapters() {\n if (\"Chart\" in window) {\n addAdapter(window.Chart);\n }\n\n if (\"Highcharts\" in window) {\n addAdapter(window.Highcharts);\n }\n\n if (window.google && window.google.charts) {\n addAdapter(window.google);\n }\n }\n\n function dataEmpty(data, chartType) {\n if (chartType === \"PieChart\" || chartType === \"GeoChart\" || chartType === \"Timeline\") {\n return data.length === 0;\n } else {\n for (var i = 0; i < data.length; i++) {\n if (data[i].data.length > 0) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n function renderChart(chartType, chart) {\n if (chart.options.messages && chart.options.messages.empty && dataEmpty(chart.data, chartType)) {\n setText(chart.element, chart.options.messages.empty);\n } else {\n callAdapter(chartType, chart);\n\n if (chart.options.download && !chart.__downloadAttached && chart.adapter === \"chartjs\") {\n addDownloadButton(chart);\n }\n }\n } // TODO remove chartType if cross-browser way\n // to get the name of the chart class\n\n\n function callAdapter(chartType, chart) {\n var i, adapter, fnName, adapterName;\n fnName = \"render\" + chartType;\n adapterName = chart.options.adapter;\n loadAdapters();\n\n for (i = 0; i < adapters.length; i++) {\n adapter = adapters[i];\n\n if ((!adapterName || adapterName === adapter.name) && isFunction(adapter[fnName])) {\n chart.adapter = adapter.name;\n chart.__adapterObject = adapter;\n return adapter[fnName](chart);\n }\n }\n\n if (adapters.length > 0) {\n throw new Error(\"No charting library found for \" + chartType);\n } else {\n throw new Error(\"No charting libraries found - be sure to include one before your charts\");\n }\n } // process data\n\n\n var toFormattedKey = function toFormattedKey(key, keyType) {\n if (keyType === \"number\") {\n key = toFloat(key);\n } else if (keyType === \"datetime\") {\n key = toDate(key);\n } else {\n key = toStr(key);\n }\n\n return key;\n };\n\n var formatSeriesData = function formatSeriesData(data, keyType) {\n var r = [],\n key,\n j;\n\n for (j = 0; j < data.length; j++) {\n if (keyType === \"bubble\") {\n r.push([toFloat(data[j][0]), toFloat(data[j][1]), toFloat(data[j][2])]);\n } else {\n key = toFormattedKey(data[j][0], keyType);\n r.push([key, toFloat(data[j][1])]);\n }\n }\n\n if (keyType === \"datetime\") {\n r.sort(sortByTime);\n } else if (keyType === \"number\") {\n r.sort(sortByNumberSeries);\n }\n\n return r;\n };\n\n function detectXType(series, noDatetime, options) {\n if (dataEmpty(series)) {\n if ((options.xmin || options.xmax) && (!options.xmin || isDate(options.xmin)) && (!options.xmax || isDate(options.xmax))) {\n return \"datetime\";\n } else {\n return \"number\";\n }\n } else if (detectXTypeWithFunction(series, isNumber)) {\n return \"number\";\n } else if (!noDatetime && detectXTypeWithFunction(series, isDate)) {\n return \"datetime\";\n } else {\n return \"string\";\n }\n }\n\n function detectXTypeWithFunction(series, func) {\n var i, j, data;\n\n for (i = 0; i < series.length; i++) {\n data = toArr(series[i].data);\n\n for (j = 0; j < data.length; j++) {\n if (!func(data[j][0])) {\n return false;\n }\n }\n }\n\n return true;\n } // creates a shallow copy of each element of the array\n // elements are expected to be objects\n\n\n function copySeries(series) {\n var newSeries = [],\n i,\n j;\n\n for (i = 0; i < series.length; i++) {\n var copy = {};\n\n for (j in series[i]) {\n if (series[i].hasOwnProperty(j)) {\n copy[j] = series[i][j];\n }\n }\n\n newSeries.push(copy);\n }\n\n return newSeries;\n }\n\n function processSeries(chart, keyType, noDatetime) {\n var i;\n var opts = chart.options;\n var series = chart.rawData; // see if one series or multiple\n\n if (!isArray(series) || _typeof(series[0]) !== \"object\" || isArray(series[0])) {\n series = [{\n name: opts.label,\n data: series\n }];\n chart.hideLegend = true;\n } else {\n chart.hideLegend = false;\n } // convert to array\n // must come before dataEmpty check\n\n\n series = copySeries(series);\n\n for (i = 0; i < series.length; i++) {\n series[i].data = toArr(series[i].data);\n }\n\n chart.xtype = keyType ? keyType : opts.discrete ? \"string\" : detectXType(series, noDatetime, opts); // right format\n\n for (i = 0; i < series.length; i++) {\n series[i].data = formatSeriesData(series[i].data, chart.xtype);\n }\n\n return series;\n }\n\n function processSimple(chart) {\n var perfectData = toArr(chart.rawData),\n i;\n\n for (i = 0; i < perfectData.length; i++) {\n perfectData[i] = [toStr(perfectData[i][0]), toFloat(perfectData[i][1])];\n }\n\n return perfectData;\n } // define classes\n\n\n var Chart = function Chart(element, dataSource, options) {\n var elementId;\n\n if (typeof element === \"string\") {\n elementId = element;\n element = document.getElementById(element);\n\n if (!element) {\n throw new Error(\"No element with id \" + elementId);\n }\n }\n\n this.element = element;\n this.options = merge(Chartkick.options, options || {});\n this.dataSource = dataSource;\n Chartkick.charts[element.id] = this;\n fetchDataSource(this, dataSource);\n\n if (this.options.refresh) {\n this.startRefresh();\n }\n };\n\n Chart.prototype.getElement = function getElement() {\n return this.element;\n };\n\n Chart.prototype.getDataSource = function getDataSource() {\n return this.dataSource;\n };\n\n Chart.prototype.getData = function getData() {\n return this.data;\n };\n\n Chart.prototype.getOptions = function getOptions() {\n return this.options;\n };\n\n Chart.prototype.getChartObject = function getChartObject() {\n return this.chart;\n };\n\n Chart.prototype.getAdapter = function getAdapter() {\n return this.adapter;\n };\n\n Chart.prototype.updateData = function updateData(dataSource, options) {\n this.dataSource = dataSource;\n\n if (options) {\n this.__updateOptions(options);\n }\n\n fetchDataSource(this, dataSource);\n };\n\n Chart.prototype.setOptions = function setOptions(options) {\n this.__updateOptions(options);\n\n this.redraw();\n };\n\n Chart.prototype.redraw = function redraw() {\n fetchDataSource(this, this.rawData);\n };\n\n Chart.prototype.refreshData = function refreshData() {\n if (typeof this.dataSource === \"string\") {\n // prevent browser from caching\n var sep = this.dataSource.indexOf(\"?\") === -1 ? \"?\" : \"&\";\n var url = this.dataSource + sep + \"_=\" + new Date().getTime();\n fetchDataSource(this, url);\n } else if (typeof this.dataSource === \"function\") {\n fetchDataSource(this, this.dataSource);\n }\n };\n\n Chart.prototype.startRefresh = function startRefresh() {\n var this$1 = this;\n var refresh = this.options.refresh;\n\n if (refresh && typeof this.dataSource !== \"string\" && typeof this.dataSource !== \"function\") {\n throw new Error(\"Data source must be a URL or callback for refresh\");\n }\n\n if (!this.intervalId) {\n if (refresh) {\n this.intervalId = setInterval(function () {\n this$1.refreshData();\n }, refresh * 1000);\n } else {\n throw new Error(\"No refresh interval\");\n }\n }\n };\n\n Chart.prototype.stopRefresh = function stopRefresh() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n this.intervalId = null;\n }\n };\n\n Chart.prototype.toImage = function toImage(download) {\n if (this.adapter === \"chartjs\") {\n if (download && download.background && download.background !== \"transparent\") {\n // https://stackoverflow.com/questions/30464750/chartjs-line-chart-set-background-color\n var canvas = this.chart.chart.canvas;\n var ctx = this.chart.chart.ctx;\n var tmpCanvas = document.createElement(\"canvas\");\n var tmpCtx = tmpCanvas.getContext(\"2d\");\n tmpCanvas.width = ctx.canvas.width;\n tmpCanvas.height = ctx.canvas.height;\n tmpCtx.fillStyle = download.background;\n tmpCtx.fillRect(0, 0, tmpCanvas.width, tmpCanvas.height);\n tmpCtx.drawImage(canvas, 0, 0);\n return tmpCanvas.toDataURL(\"image/png\");\n } else {\n return this.chart.toBase64Image();\n }\n } else {\n // TODO throw error in next major version\n // throw new Error(\"Feature only available for Chart.js\");\n return null;\n }\n };\n\n Chart.prototype.destroy = function destroy() {\n if (this.__adapterObject) {\n this.__adapterObject.destroy(this);\n }\n\n if (this.__enterEvent) {\n removeEvent(this.element, \"mouseover\", this.__enterEvent);\n }\n\n if (this.__leaveEvent) {\n removeEvent(this.element, \"mouseout\", this.__leaveEvent);\n }\n };\n\n Chart.prototype.__updateOptions = function __updateOptions(options) {\n var updateRefresh = options.refresh && options.refresh !== this.options.refresh;\n this.options = merge(Chartkick.options, options);\n\n if (updateRefresh) {\n this.stopRefresh();\n this.startRefresh();\n }\n };\n\n Chart.prototype.__render = function __render() {\n this.data = this.__processData();\n renderChart(this.__chartName(), this);\n };\n\n Chart.prototype.__config = function __config() {\n return config;\n };\n\n var LineChart = /*@__PURE__*/function (Chart) {\n function LineChart() {\n Chart.apply(this, arguments);\n }\n\n if (Chart) LineChart.__proto__ = Chart;\n LineChart.prototype = Object.create(Chart && Chart.prototype);\n LineChart.prototype.constructor = LineChart;\n\n LineChart.prototype.__processData = function __processData() {\n return processSeries(this);\n };\n\n LineChart.prototype.__chartName = function __chartName() {\n return \"LineChart\";\n };\n\n return LineChart;\n }(Chart);\n\n var PieChart = /*@__PURE__*/function (Chart) {\n function PieChart() {\n Chart.apply(this, arguments);\n }\n\n if (Chart) PieChart.__proto__ = Chart;\n PieChart.prototype = Object.create(Chart && Chart.prototype);\n PieChart.prototype.constructor = PieChart;\n\n PieChart.prototype.__processData = function __processData() {\n return processSimple(this);\n };\n\n PieChart.prototype.__chartName = function __chartName() {\n return \"PieChart\";\n };\n\n return PieChart;\n }(Chart);\n\n var ColumnChart = /*@__PURE__*/function (Chart) {\n function ColumnChart() {\n Chart.apply(this, arguments);\n }\n\n if (Chart) ColumnChart.__proto__ = Chart;\n ColumnChart.prototype = Object.create(Chart && Chart.prototype);\n ColumnChart.prototype.constructor = ColumnChart;\n\n ColumnChart.prototype.__processData = function __processData() {\n return processSeries(this, null, true);\n };\n\n ColumnChart.prototype.__chartName = function __chartName() {\n return \"ColumnChart\";\n };\n\n return ColumnChart;\n }(Chart);\n\n var BarChart = /*@__PURE__*/function (Chart) {\n function BarChart() {\n Chart.apply(this, arguments);\n }\n\n if (Chart) BarChart.__proto__ = Chart;\n BarChart.prototype = Object.create(Chart && Chart.prototype);\n BarChart.prototype.constructor = BarChart;\n\n BarChart.prototype.__processData = function __processData() {\n return processSeries(this, null, true);\n };\n\n BarChart.prototype.__chartName = function __chartName() {\n return \"BarChart\";\n };\n\n return BarChart;\n }(Chart);\n\n var AreaChart = /*@__PURE__*/function (Chart) {\n function AreaChart() {\n Chart.apply(this, arguments);\n }\n\n if (Chart) AreaChart.__proto__ = Chart;\n AreaChart.prototype = Object.create(Chart && Chart.prototype);\n AreaChart.prototype.constructor = AreaChart;\n\n AreaChart.prototype.__processData = function __processData() {\n return processSeries(this);\n };\n\n AreaChart.prototype.__chartName = function __chartName() {\n return \"AreaChart\";\n };\n\n return AreaChart;\n }(Chart);\n\n var GeoChart = /*@__PURE__*/function (Chart) {\n function GeoChart() {\n Chart.apply(this, arguments);\n }\n\n if (Chart) GeoChart.__proto__ = Chart;\n GeoChart.prototype = Object.create(Chart && Chart.prototype);\n GeoChart.prototype.constructor = GeoChart;\n\n GeoChart.prototype.__processData = function __processData() {\n return processSimple(this);\n };\n\n GeoChart.prototype.__chartName = function __chartName() {\n return \"GeoChart\";\n };\n\n return GeoChart;\n }(Chart);\n\n var ScatterChart = /*@__PURE__*/function (Chart) {\n function ScatterChart() {\n Chart.apply(this, arguments);\n }\n\n if (Chart) ScatterChart.__proto__ = Chart;\n ScatterChart.prototype = Object.create(Chart && Chart.prototype);\n ScatterChart.prototype.constructor = ScatterChart;\n\n ScatterChart.prototype.__processData = function __processData() {\n return processSeries(this, \"number\");\n };\n\n ScatterChart.prototype.__chartName = function __chartName() {\n return \"ScatterChart\";\n };\n\n return ScatterChart;\n }(Chart);\n\n var BubbleChart = /*@__PURE__*/function (Chart) {\n function BubbleChart() {\n Chart.apply(this, arguments);\n }\n\n if (Chart) BubbleChart.__proto__ = Chart;\n BubbleChart.prototype = Object.create(Chart && Chart.prototype);\n BubbleChart.prototype.constructor = BubbleChart;\n\n BubbleChart.prototype.__processData = function __processData() {\n return processSeries(this, \"bubble\");\n };\n\n BubbleChart.prototype.__chartName = function __chartName() {\n return \"BubbleChart\";\n };\n\n return BubbleChart;\n }(Chart);\n\n var Timeline = /*@__PURE__*/function (Chart) {\n function Timeline() {\n Chart.apply(this, arguments);\n }\n\n if (Chart) Timeline.__proto__ = Chart;\n Timeline.prototype = Object.create(Chart && Chart.prototype);\n Timeline.prototype.constructor = Timeline;\n\n Timeline.prototype.__processData = function __processData() {\n var i,\n data = this.rawData;\n\n for (i = 0; i < data.length; i++) {\n data[i][1] = toDate(data[i][1]);\n data[i][2] = toDate(data[i][2]);\n }\n\n return data;\n };\n\n Timeline.prototype.__chartName = function __chartName() {\n return \"Timeline\";\n };\n\n return Timeline;\n }(Chart);\n\n var Chartkick = {\n LineChart: LineChart,\n PieChart: PieChart,\n ColumnChart: ColumnChart,\n BarChart: BarChart,\n AreaChart: AreaChart,\n GeoChart: GeoChart,\n ScatterChart: ScatterChart,\n BubbleChart: BubbleChart,\n Timeline: Timeline,\n charts: {},\n configure: function configure(options) {\n for (var key in options) {\n if (options.hasOwnProperty(key)) {\n config[key] = options[key];\n }\n }\n },\n setDefaultOptions: function setDefaultOptions(opts) {\n Chartkick.options = opts;\n },\n eachChart: function eachChart(callback) {\n for (var chartId in Chartkick.charts) {\n if (Chartkick.charts.hasOwnProperty(chartId)) {\n callback(Chartkick.charts[chartId]);\n }\n }\n },\n config: config,\n options: {},\n adapters: adapters,\n addAdapter: addAdapter,\n use: function use(adapter) {\n addAdapter(adapter);\n return Chartkick;\n }\n }; // not ideal, but allows for simpler integration\n\n if (typeof window !== \"undefined\" && !window.Chartkick) {\n window.Chartkick = Chartkick;\n } // backwards compatibility for esm require\n\n\n Chartkick[\"default\"] = Chartkick;\n return Chartkick;\n});","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*!\n * Chart.js v2.9.4\n * https://www.chartjs.org\n * (c) 2020 Chart.js Contributors\n * Released under the MIT License\n */\n(function (global, factory) {\n (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory(function () {\n try {\n return require('moment');\n } catch (e) {}\n }()) : typeof define === 'function' && define.amd ? define(['require'], function (require) {\n return factory(function () {\n try {\n return require('moment');\n } catch (e) {}\n }());\n }) : (global = global || self, global.Chart = factory(global.moment));\n})(this, function (moment) {\n 'use strict';\n\n moment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;\n\n function createCommonjsModule(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n }\n\n function getCjsExportFromNamespace(n) {\n return n && n['default'] || n;\n }\n\n var colorName = {\n \"aliceblue\": [240, 248, 255],\n \"antiquewhite\": [250, 235, 215],\n \"aqua\": [0, 255, 255],\n \"aquamarine\": [127, 255, 212],\n \"azure\": [240, 255, 255],\n \"beige\": [245, 245, 220],\n \"bisque\": [255, 228, 196],\n \"black\": [0, 0, 0],\n \"blanchedalmond\": [255, 235, 205],\n \"blue\": [0, 0, 255],\n \"blueviolet\": [138, 43, 226],\n \"brown\": [165, 42, 42],\n \"burlywood\": [222, 184, 135],\n \"cadetblue\": [95, 158, 160],\n \"chartreuse\": [127, 255, 0],\n \"chocolate\": [210, 105, 30],\n \"coral\": [255, 127, 80],\n \"cornflowerblue\": [100, 149, 237],\n \"cornsilk\": [255, 248, 220],\n \"crimson\": [220, 20, 60],\n \"cyan\": [0, 255, 255],\n \"darkblue\": [0, 0, 139],\n \"darkcyan\": [0, 139, 139],\n \"darkgoldenrod\": [184, 134, 11],\n \"darkgray\": [169, 169, 169],\n \"darkgreen\": [0, 100, 0],\n \"darkgrey\": [169, 169, 169],\n \"darkkhaki\": [189, 183, 107],\n \"darkmagenta\": [139, 0, 139],\n \"darkolivegreen\": [85, 107, 47],\n \"darkorange\": [255, 140, 0],\n \"darkorchid\": [153, 50, 204],\n \"darkred\": [139, 0, 0],\n \"darksalmon\": [233, 150, 122],\n \"darkseagreen\": [143, 188, 143],\n \"darkslateblue\": [72, 61, 139],\n \"darkslategray\": [47, 79, 79],\n \"darkslategrey\": [47, 79, 79],\n \"darkturquoise\": [0, 206, 209],\n \"darkviolet\": [148, 0, 211],\n \"deeppink\": [255, 20, 147],\n \"deepskyblue\": [0, 191, 255],\n \"dimgray\": [105, 105, 105],\n \"dimgrey\": [105, 105, 105],\n \"dodgerblue\": [30, 144, 255],\n \"firebrick\": [178, 34, 34],\n \"floralwhite\": [255, 250, 240],\n \"forestgreen\": [34, 139, 34],\n \"fuchsia\": [255, 0, 255],\n \"gainsboro\": [220, 220, 220],\n \"ghostwhite\": [248, 248, 255],\n \"gold\": [255, 215, 0],\n \"goldenrod\": [218, 165, 32],\n \"gray\": [128, 128, 128],\n \"green\": [0, 128, 0],\n \"greenyellow\": [173, 255, 47],\n \"grey\": [128, 128, 128],\n \"honeydew\": [240, 255, 240],\n \"hotpink\": [255, 105, 180],\n \"indianred\": [205, 92, 92],\n \"indigo\": [75, 0, 130],\n \"ivory\": [255, 255, 240],\n \"khaki\": [240, 230, 140],\n \"lavender\": [230, 230, 250],\n \"lavenderblush\": [255, 240, 245],\n \"lawngreen\": [124, 252, 0],\n \"lemonchiffon\": [255, 250, 205],\n \"lightblue\": [173, 216, 230],\n \"lightcoral\": [240, 128, 128],\n \"lightcyan\": [224, 255, 255],\n \"lightgoldenrodyellow\": [250, 250, 210],\n \"lightgray\": [211, 211, 211],\n \"lightgreen\": [144, 238, 144],\n \"lightgrey\": [211, 211, 211],\n \"lightpink\": [255, 182, 193],\n \"lightsalmon\": [255, 160, 122],\n \"lightseagreen\": [32, 178, 170],\n \"lightskyblue\": [135, 206, 250],\n \"lightslategray\": [119, 136, 153],\n \"lightslategrey\": [119, 136, 153],\n \"lightsteelblue\": [176, 196, 222],\n \"lightyellow\": [255, 255, 224],\n \"lime\": [0, 255, 0],\n \"limegreen\": [50, 205, 50],\n \"linen\": [250, 240, 230],\n \"magenta\": [255, 0, 255],\n \"maroon\": [128, 0, 0],\n \"mediumaquamarine\": [102, 205, 170],\n \"mediumblue\": [0, 0, 205],\n \"mediumorchid\": [186, 85, 211],\n \"mediumpurple\": [147, 112, 219],\n \"mediumseagreen\": [60, 179, 113],\n \"mediumslateblue\": [123, 104, 238],\n \"mediumspringgreen\": [0, 250, 154],\n \"mediumturquoise\": [72, 209, 204],\n \"mediumvioletred\": [199, 21, 133],\n \"midnightblue\": [25, 25, 112],\n \"mintcream\": [245, 255, 250],\n \"mistyrose\": [255, 228, 225],\n \"moccasin\": [255, 228, 181],\n \"navajowhite\": [255, 222, 173],\n \"navy\": [0, 0, 128],\n \"oldlace\": [253, 245, 230],\n \"olive\": [128, 128, 0],\n \"olivedrab\": [107, 142, 35],\n \"orange\": [255, 165, 0],\n \"orangered\": [255, 69, 0],\n \"orchid\": [218, 112, 214],\n \"palegoldenrod\": [238, 232, 170],\n \"palegreen\": [152, 251, 152],\n \"paleturquoise\": [175, 238, 238],\n \"palevioletred\": [219, 112, 147],\n \"papayawhip\": [255, 239, 213],\n \"peachpuff\": [255, 218, 185],\n \"peru\": [205, 133, 63],\n \"pink\": [255, 192, 203],\n \"plum\": [221, 160, 221],\n \"powderblue\": [176, 224, 230],\n \"purple\": [128, 0, 128],\n \"rebeccapurple\": [102, 51, 153],\n \"red\": [255, 0, 0],\n \"rosybrown\": [188, 143, 143],\n \"royalblue\": [65, 105, 225],\n \"saddlebrown\": [139, 69, 19],\n \"salmon\": [250, 128, 114],\n \"sandybrown\": [244, 164, 96],\n \"seagreen\": [46, 139, 87],\n \"seashell\": [255, 245, 238],\n \"sienna\": [160, 82, 45],\n \"silver\": [192, 192, 192],\n \"skyblue\": [135, 206, 235],\n \"slateblue\": [106, 90, 205],\n \"slategray\": [112, 128, 144],\n \"slategrey\": [112, 128, 144],\n \"snow\": [255, 250, 250],\n \"springgreen\": [0, 255, 127],\n \"steelblue\": [70, 130, 180],\n \"tan\": [210, 180, 140],\n \"teal\": [0, 128, 128],\n \"thistle\": [216, 191, 216],\n \"tomato\": [255, 99, 71],\n \"turquoise\": [64, 224, 208],\n \"violet\": [238, 130, 238],\n \"wheat\": [245, 222, 179],\n \"white\": [255, 255, 255],\n \"whitesmoke\": [245, 245, 245],\n \"yellow\": [255, 255, 0],\n \"yellowgreen\": [154, 205, 50]\n };\n var conversions = createCommonjsModule(function (module) {\n /* MIT license */\n // NOTE: conversions should only return primitive values (i.e. arrays, or\n // values that give correct `typeof` results).\n // do not use box values types (i.e. Number(), String(), etc.)\n var reverseKeywords = {};\n\n for (var key in colorName) {\n if (colorName.hasOwnProperty(key)) {\n reverseKeywords[colorName[key]] = key;\n }\n }\n\n var convert = module.exports = {\n rgb: {\n channels: 3,\n labels: 'rgb'\n },\n hsl: {\n channels: 3,\n labels: 'hsl'\n },\n hsv: {\n channels: 3,\n labels: 'hsv'\n },\n hwb: {\n channels: 3,\n labels: 'hwb'\n },\n cmyk: {\n channels: 4,\n labels: 'cmyk'\n },\n xyz: {\n channels: 3,\n labels: 'xyz'\n },\n lab: {\n channels: 3,\n labels: 'lab'\n },\n lch: {\n channels: 3,\n labels: 'lch'\n },\n hex: {\n channels: 1,\n labels: ['hex']\n },\n keyword: {\n channels: 1,\n labels: ['keyword']\n },\n ansi16: {\n channels: 1,\n labels: ['ansi16']\n },\n ansi256: {\n channels: 1,\n labels: ['ansi256']\n },\n hcg: {\n channels: 3,\n labels: ['h', 'c', 'g']\n },\n apple: {\n channels: 3,\n labels: ['r16', 'g16', 'b16']\n },\n gray: {\n channels: 1,\n labels: ['gray']\n }\n }; // hide .channels and .labels properties\n\n for (var model in convert) {\n if (convert.hasOwnProperty(model)) {\n if (!('channels' in convert[model])) {\n throw new Error('missing channels property: ' + model);\n }\n\n if (!('labels' in convert[model])) {\n throw new Error('missing channel labels property: ' + model);\n }\n\n if (convert[model].labels.length !== convert[model].channels) {\n throw new Error('channel and label counts mismatch: ' + model);\n }\n\n var channels = convert[model].channels;\n var labels = convert[model].labels;\n delete convert[model].channels;\n delete convert[model].labels;\n Object.defineProperty(convert[model], 'channels', {\n value: channels\n });\n Object.defineProperty(convert[model], 'labels', {\n value: labels\n });\n }\n }\n\n convert.rgb.hsl = function (rgb) {\n var r = rgb[0] / 255;\n var g = rgb[1] / 255;\n var b = rgb[2] / 255;\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n var delta = max - min;\n var h;\n var s;\n var l;\n\n if (max === min) {\n h = 0;\n } else if (r === max) {\n h = (g - b) / delta;\n } else if (g === max) {\n h = 2 + (b - r) / delta;\n } else if (b === max) {\n h = 4 + (r - g) / delta;\n }\n\n h = Math.min(h * 60, 360);\n\n if (h < 0) {\n h += 360;\n }\n\n l = (min + max) / 2;\n\n if (max === min) {\n s = 0;\n } else if (l <= 0.5) {\n s = delta / (max + min);\n } else {\n s = delta / (2 - max - min);\n }\n\n return [h, s * 100, l * 100];\n };\n\n convert.rgb.hsv = function (rgb) {\n var rdif;\n var gdif;\n var bdif;\n var h;\n var s;\n var r = rgb[0] / 255;\n var g = rgb[1] / 255;\n var b = rgb[2] / 255;\n var v = Math.max(r, g, b);\n var diff = v - Math.min(r, g, b);\n\n var diffc = function diffc(c) {\n return (v - c) / 6 / diff + 1 / 2;\n };\n\n if (diff === 0) {\n h = s = 0;\n } else {\n s = diff / v;\n rdif = diffc(r);\n gdif = diffc(g);\n bdif = diffc(b);\n\n if (r === v) {\n h = bdif - gdif;\n } else if (g === v) {\n h = 1 / 3 + rdif - bdif;\n } else if (b === v) {\n h = 2 / 3 + gdif - rdif;\n }\n\n if (h < 0) {\n h += 1;\n } else if (h > 1) {\n h -= 1;\n }\n }\n\n return [h * 360, s * 100, v * 100];\n };\n\n convert.rgb.hwb = function (rgb) {\n var r = rgb[0];\n var g = rgb[1];\n var b = rgb[2];\n var h = convert.rgb.hsl(rgb)[0];\n var w = 1 / 255 * Math.min(r, Math.min(g, b));\n b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n return [h, w * 100, b * 100];\n };\n\n convert.rgb.cmyk = function (rgb) {\n var r = rgb[0] / 255;\n var g = rgb[1] / 255;\n var b = rgb[2] / 255;\n var c;\n var m;\n var y;\n var k;\n k = Math.min(1 - r, 1 - g, 1 - b);\n c = (1 - r - k) / (1 - k) || 0;\n m = (1 - g - k) / (1 - k) || 0;\n y = (1 - b - k) / (1 - k) || 0;\n return [c * 100, m * 100, y * 100, k * 100];\n };\n /**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\n\n\n function comparativeDistance(x, y) {\n return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);\n }\n\n convert.rgb.keyword = function (rgb) {\n var reversed = reverseKeywords[rgb];\n\n if (reversed) {\n return reversed;\n }\n\n var currentClosestDistance = Infinity;\n var currentClosestKeyword;\n\n for (var keyword in colorName) {\n if (colorName.hasOwnProperty(keyword)) {\n var value = colorName[keyword]; // Compute comparative distance\n\n var distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest\n\n if (distance < currentClosestDistance) {\n currentClosestDistance = distance;\n currentClosestKeyword = keyword;\n }\n }\n }\n\n return currentClosestKeyword;\n };\n\n convert.keyword.rgb = function (keyword) {\n return colorName[keyword];\n };\n\n convert.rgb.xyz = function (rgb) {\n var r = rgb[0] / 255;\n var g = rgb[1] / 255;\n var b = rgb[2] / 255; // assume sRGB\n\n r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;\n g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;\n b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;\n var x = r * 0.4124 + g * 0.3576 + b * 0.1805;\n var y = r * 0.2126 + g * 0.7152 + b * 0.0722;\n var z = r * 0.0193 + g * 0.1192 + b * 0.9505;\n return [x * 100, y * 100, z * 100];\n };\n\n convert.rgb.lab = function (rgb) {\n var xyz = convert.rgb.xyz(rgb);\n var x = xyz[0];\n var y = xyz[1];\n var z = xyz[2];\n var l;\n var a;\n var b;\n x /= 95.047;\n y /= 100;\n z /= 108.883;\n x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;\n y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;\n z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;\n l = 116 * y - 16;\n a = 500 * (x - y);\n b = 200 * (y - z);\n return [l, a, b];\n };\n\n convert.hsl.rgb = function (hsl) {\n var h = hsl[0] / 360;\n var s = hsl[1] / 100;\n var l = hsl[2] / 100;\n var t1;\n var t2;\n var t3;\n var rgb;\n var val;\n\n if (s === 0) {\n val = l * 255;\n return [val, val, val];\n }\n\n if (l < 0.5) {\n t2 = l * (1 + s);\n } else {\n t2 = l + s - l * s;\n }\n\n t1 = 2 * l - t2;\n rgb = [0, 0, 0];\n\n for (var i = 0; i < 3; i++) {\n t3 = h + 1 / 3 * -(i - 1);\n\n if (t3 < 0) {\n t3++;\n }\n\n if (t3 > 1) {\n t3--;\n }\n\n if (6 * t3 < 1) {\n val = t1 + (t2 - t1) * 6 * t3;\n } else if (2 * t3 < 1) {\n val = t2;\n } else if (3 * t3 < 2) {\n val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n } else {\n val = t1;\n }\n\n rgb[i] = val * 255;\n }\n\n return rgb;\n };\n\n convert.hsl.hsv = function (hsl) {\n var h = hsl[0];\n var s = hsl[1] / 100;\n var l = hsl[2] / 100;\n var smin = s;\n var lmin = Math.max(l, 0.01);\n var sv;\n var v;\n l *= 2;\n s *= l <= 1 ? l : 2 - l;\n smin *= lmin <= 1 ? lmin : 2 - lmin;\n v = (l + s) / 2;\n sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);\n return [h, sv * 100, v * 100];\n };\n\n convert.hsv.rgb = function (hsv) {\n var h = hsv[0] / 60;\n var s = hsv[1] / 100;\n var v = hsv[2] / 100;\n var hi = Math.floor(h) % 6;\n var f = h - Math.floor(h);\n var p = 255 * v * (1 - s);\n var q = 255 * v * (1 - s * f);\n var t = 255 * v * (1 - s * (1 - f));\n v *= 255;\n\n switch (hi) {\n case 0:\n return [v, t, p];\n\n case 1:\n return [q, v, p];\n\n case 2:\n return [p, v, t];\n\n case 3:\n return [p, q, v];\n\n case 4:\n return [t, p, v];\n\n case 5:\n return [v, p, q];\n }\n };\n\n convert.hsv.hsl = function (hsv) {\n var h = hsv[0];\n var s = hsv[1] / 100;\n var v = hsv[2] / 100;\n var vmin = Math.max(v, 0.01);\n var lmin;\n var sl;\n var l;\n l = (2 - s) * v;\n lmin = (2 - s) * vmin;\n sl = s * vmin;\n sl /= lmin <= 1 ? lmin : 2 - lmin;\n sl = sl || 0;\n l /= 2;\n return [h, sl * 100, l * 100];\n }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb\n\n\n convert.hwb.rgb = function (hwb) {\n var h = hwb[0] / 360;\n var wh = hwb[1] / 100;\n var bl = hwb[2] / 100;\n var ratio = wh + bl;\n var i;\n var v;\n var f;\n var n; // wh + bl cant be > 1\n\n if (ratio > 1) {\n wh /= ratio;\n bl /= ratio;\n }\n\n i = Math.floor(6 * h);\n v = 1 - bl;\n f = 6 * h - i;\n\n if ((i & 0x01) !== 0) {\n f = 1 - f;\n }\n\n n = wh + f * (v - wh); // linear interpolation\n\n var r;\n var g;\n var b;\n\n switch (i) {\n default:\n case 6:\n case 0:\n r = v;\n g = n;\n b = wh;\n break;\n\n case 1:\n r = n;\n g = v;\n b = wh;\n break;\n\n case 2:\n r = wh;\n g = v;\n b = n;\n break;\n\n case 3:\n r = wh;\n g = n;\n b = v;\n break;\n\n case 4:\n r = n;\n g = wh;\n b = v;\n break;\n\n case 5:\n r = v;\n g = wh;\n b = n;\n break;\n }\n\n return [r * 255, g * 255, b * 255];\n };\n\n convert.cmyk.rgb = function (cmyk) {\n var c = cmyk[0] / 100;\n var m = cmyk[1] / 100;\n var y = cmyk[2] / 100;\n var k = cmyk[3] / 100;\n var r;\n var g;\n var b;\n r = 1 - Math.min(1, c * (1 - k) + k);\n g = 1 - Math.min(1, m * (1 - k) + k);\n b = 1 - Math.min(1, y * (1 - k) + k);\n return [r * 255, g * 255, b * 255];\n };\n\n convert.xyz.rgb = function (xyz) {\n var x = xyz[0] / 100;\n var y = xyz[1] / 100;\n var z = xyz[2] / 100;\n var r;\n var g;\n var b;\n r = x * 3.2406 + y * -1.5372 + z * -0.4986;\n g = x * -0.9689 + y * 1.8758 + z * 0.0415;\n b = x * 0.0557 + y * -0.2040 + z * 1.0570; // assume sRGB\n\n r = r > 0.0031308 ? 1.055 * Math.pow(r, 1.0 / 2.4) - 0.055 : r * 12.92;\n g = g > 0.0031308 ? 1.055 * Math.pow(g, 1.0 / 2.4) - 0.055 : g * 12.92;\n b = b > 0.0031308 ? 1.055 * Math.pow(b, 1.0 / 2.4) - 0.055 : b * 12.92;\n r = Math.min(Math.max(0, r), 1);\n g = Math.min(Math.max(0, g), 1);\n b = Math.min(Math.max(0, b), 1);\n return [r * 255, g * 255, b * 255];\n };\n\n convert.xyz.lab = function (xyz) {\n var x = xyz[0];\n var y = xyz[1];\n var z = xyz[2];\n var l;\n var a;\n var b;\n x /= 95.047;\n y /= 100;\n z /= 108.883;\n x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;\n y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;\n z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;\n l = 116 * y - 16;\n a = 500 * (x - y);\n b = 200 * (y - z);\n return [l, a, b];\n };\n\n convert.lab.xyz = function (lab) {\n var l = lab[0];\n var a = lab[1];\n var b = lab[2];\n var x;\n var y;\n var z;\n y = (l + 16) / 116;\n x = a / 500 + y;\n z = y - b / 200;\n var y2 = Math.pow(y, 3);\n var x2 = Math.pow(x, 3);\n var z2 = Math.pow(z, 3);\n y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n x *= 95.047;\n y *= 100;\n z *= 108.883;\n return [x, y, z];\n };\n\n convert.lab.lch = function (lab) {\n var l = lab[0];\n var a = lab[1];\n var b = lab[2];\n var hr;\n var h;\n var c;\n hr = Math.atan2(b, a);\n h = hr * 360 / 2 / Math.PI;\n\n if (h < 0) {\n h += 360;\n }\n\n c = Math.sqrt(a * a + b * b);\n return [l, c, h];\n };\n\n convert.lch.lab = function (lch) {\n var l = lch[0];\n var c = lch[1];\n var h = lch[2];\n var a;\n var b;\n var hr;\n hr = h / 360 * 2 * Math.PI;\n a = c * Math.cos(hr);\n b = c * Math.sin(hr);\n return [l, a, b];\n };\n\n convert.rgb.ansi16 = function (args) {\n var r = args[0];\n var g = args[1];\n var b = args[2];\n var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n value = Math.round(value / 50);\n\n if (value === 0) {\n return 30;\n }\n\n var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));\n\n if (value === 2) {\n ansi += 60;\n }\n\n return ansi;\n };\n\n convert.hsv.ansi16 = function (args) {\n // optimization here; we already know the value and don't need to get\n // it converted for us.\n return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n };\n\n convert.rgb.ansi256 = function (args) {\n var r = args[0];\n var g = args[1];\n var b = args[2]; // we use the extended greyscale palette here, with the exception of\n // black and white. normal palette only has 4 greyscale shades.\n\n if (r === g && g === b) {\n if (r < 8) {\n return 16;\n }\n\n if (r > 248) {\n return 231;\n }\n\n return Math.round((r - 8) / 247 * 24) + 232;\n }\n\n var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);\n return ansi;\n };\n\n convert.ansi16.rgb = function (args) {\n var color = args % 10; // handle greyscale\n\n if (color === 0 || color === 7) {\n if (args > 50) {\n color += 3.5;\n }\n\n color = color / 10.5 * 255;\n return [color, color, color];\n }\n\n var mult = (~~(args > 50) + 1) * 0.5;\n var r = (color & 1) * mult * 255;\n var g = (color >> 1 & 1) * mult * 255;\n var b = (color >> 2 & 1) * mult * 255;\n return [r, g, b];\n };\n\n convert.ansi256.rgb = function (args) {\n // handle greyscale\n if (args >= 232) {\n var c = (args - 232) * 10 + 8;\n return [c, c, c];\n }\n\n args -= 16;\n var rem;\n var r = Math.floor(args / 36) / 5 * 255;\n var g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n var b = rem % 6 / 5 * 255;\n return [r, g, b];\n };\n\n convert.rgb.hex = function (args) {\n var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF);\n var string = integer.toString(16).toUpperCase();\n return '000000'.substring(string.length) + string;\n };\n\n convert.hex.rgb = function (args) {\n var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\n if (!match) {\n return [0, 0, 0];\n }\n\n var colorString = match[0];\n\n if (match[0].length === 3) {\n colorString = colorString.split('').map(function (_char) {\n return _char + _char;\n }).join('');\n }\n\n var integer = parseInt(colorString, 16);\n var r = integer >> 16 & 0xFF;\n var g = integer >> 8 & 0xFF;\n var b = integer & 0xFF;\n return [r, g, b];\n };\n\n convert.rgb.hcg = function (rgb) {\n var r = rgb[0] / 255;\n var g = rgb[1] / 255;\n var b = rgb[2] / 255;\n var max = Math.max(Math.max(r, g), b);\n var min = Math.min(Math.min(r, g), b);\n var chroma = max - min;\n var grayscale;\n var hue;\n\n if (chroma < 1) {\n grayscale = min / (1 - chroma);\n } else {\n grayscale = 0;\n }\n\n if (chroma <= 0) {\n hue = 0;\n } else if (max === r) {\n hue = (g - b) / chroma % 6;\n } else if (max === g) {\n hue = 2 + (b - r) / chroma;\n } else {\n hue = 4 + (r - g) / chroma + 4;\n }\n\n hue /= 6;\n hue %= 1;\n return [hue * 360, chroma * 100, grayscale * 100];\n };\n\n convert.hsl.hcg = function (hsl) {\n var s = hsl[1] / 100;\n var l = hsl[2] / 100;\n var c = 1;\n var f = 0;\n\n if (l < 0.5) {\n c = 2.0 * s * l;\n } else {\n c = 2.0 * s * (1.0 - l);\n }\n\n if (c < 1.0) {\n f = (l - 0.5 * c) / (1.0 - c);\n }\n\n return [hsl[0], c * 100, f * 100];\n };\n\n convert.hsv.hcg = function (hsv) {\n var s = hsv[1] / 100;\n var v = hsv[2] / 100;\n var c = s * v;\n var f = 0;\n\n if (c < 1.0) {\n f = (v - c) / (1 - c);\n }\n\n return [hsv[0], c * 100, f * 100];\n };\n\n convert.hcg.rgb = function (hcg) {\n var h = hcg[0] / 360;\n var c = hcg[1] / 100;\n var g = hcg[2] / 100;\n\n if (c === 0.0) {\n return [g * 255, g * 255, g * 255];\n }\n\n var pure = [0, 0, 0];\n var hi = h % 1 * 6;\n var v = hi % 1;\n var w = 1 - v;\n var mg = 0;\n\n switch (Math.floor(hi)) {\n case 0:\n pure[0] = 1;\n pure[1] = v;\n pure[2] = 0;\n break;\n\n case 1:\n pure[0] = w;\n pure[1] = 1;\n pure[2] = 0;\n break;\n\n case 2:\n pure[0] = 0;\n pure[1] = 1;\n pure[2] = v;\n break;\n\n case 3:\n pure[0] = 0;\n pure[1] = w;\n pure[2] = 1;\n break;\n\n case 4:\n pure[0] = v;\n pure[1] = 0;\n pure[2] = 1;\n break;\n\n default:\n pure[0] = 1;\n pure[1] = 0;\n pure[2] = w;\n }\n\n mg = (1.0 - c) * g;\n return [(c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255];\n };\n\n convert.hcg.hsv = function (hcg) {\n var c = hcg[1] / 100;\n var g = hcg[2] / 100;\n var v = c + g * (1.0 - c);\n var f = 0;\n\n if (v > 0.0) {\n f = c / v;\n }\n\n return [hcg[0], f * 100, v * 100];\n };\n\n convert.hcg.hsl = function (hcg) {\n var c = hcg[1] / 100;\n var g = hcg[2] / 100;\n var l = g * (1.0 - c) + 0.5 * c;\n var s = 0;\n\n if (l > 0.0 && l < 0.5) {\n s = c / (2 * l);\n } else if (l >= 0.5 && l < 1.0) {\n s = c / (2 * (1 - l));\n }\n\n return [hcg[0], s * 100, l * 100];\n };\n\n convert.hcg.hwb = function (hcg) {\n var c = hcg[1] / 100;\n var g = hcg[2] / 100;\n var v = c + g * (1.0 - c);\n return [hcg[0], (v - c) * 100, (1 - v) * 100];\n };\n\n convert.hwb.hcg = function (hwb) {\n var w = hwb[1] / 100;\n var b = hwb[2] / 100;\n var v = 1 - b;\n var c = v - w;\n var g = 0;\n\n if (c < 1) {\n g = (v - c) / (1 - c);\n }\n\n return [hwb[0], c * 100, g * 100];\n };\n\n convert.apple.rgb = function (apple) {\n return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];\n };\n\n convert.rgb.apple = function (rgb) {\n return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];\n };\n\n convert.gray.rgb = function (args) {\n return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n };\n\n convert.gray.hsl = convert.gray.hsv = function (args) {\n return [0, 0, args[0]];\n };\n\n convert.gray.hwb = function (gray) {\n return [0, 100, gray[0]];\n };\n\n convert.gray.cmyk = function (gray) {\n return [0, 0, 0, gray[0]];\n };\n\n convert.gray.lab = function (gray) {\n return [gray[0], 0, 0];\n };\n\n convert.gray.hex = function (gray) {\n var val = Math.round(gray[0] / 100 * 255) & 0xFF;\n var integer = (val << 16) + (val << 8) + val;\n var string = integer.toString(16).toUpperCase();\n return '000000'.substring(string.length) + string;\n };\n\n convert.rgb.gray = function (rgb) {\n var val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n return [val / 255 * 100];\n };\n });\n var conversions_1 = conversions.rgb;\n var conversions_2 = conversions.hsl;\n var conversions_3 = conversions.hsv;\n var conversions_4 = conversions.hwb;\n var conversions_5 = conversions.cmyk;\n var conversions_6 = conversions.xyz;\n var conversions_7 = conversions.lab;\n var conversions_8 = conversions.lch;\n var conversions_9 = conversions.hex;\n var conversions_10 = conversions.keyword;\n var conversions_11 = conversions.ansi16;\n var conversions_12 = conversions.ansi256;\n var conversions_13 = conversions.hcg;\n var conversions_14 = conversions.apple;\n var conversions_15 = conversions.gray;\n /*\n \tthis function routes a model to all other models.\n \n \tall functions that are routed have a property `.conversion` attached\n \tto the returned synthetic function. This property is an array\n \tof strings, each with the steps in between the 'from' and 'to'\n \tcolor models (inclusive).\n \n \tconversions that are not possible simply are not included.\n */\n\n function buildGraph() {\n var graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\n var models = Object.keys(conversions);\n\n for (var len = models.length, i = 0; i < len; i++) {\n graph[models[i]] = {\n // http://jsperf.com/1-vs-infinity\n // micro-opt, but this is simple.\n distance: -1,\n parent: null\n };\n }\n\n return graph;\n } // https://en.wikipedia.org/wiki/Breadth-first_search\n\n\n function deriveBFS(fromModel) {\n var graph = buildGraph();\n var queue = [fromModel]; // unshift -> queue -> pop\n\n graph[fromModel].distance = 0;\n\n while (queue.length) {\n var current = queue.pop();\n var adjacents = Object.keys(conversions[current]);\n\n for (var len = adjacents.length, i = 0; i < len; i++) {\n var adjacent = adjacents[i];\n var node = graph[adjacent];\n\n if (node.distance === -1) {\n node.distance = graph[current].distance + 1;\n node.parent = current;\n queue.unshift(adjacent);\n }\n }\n }\n\n return graph;\n }\n\n function link(from, to) {\n return function (args) {\n return to(from(args));\n };\n }\n\n function wrapConversion(toModel, graph) {\n var path = [graph[toModel].parent, toModel];\n var fn = conversions[graph[toModel].parent][toModel];\n var cur = graph[toModel].parent;\n\n while (graph[cur].parent) {\n path.unshift(graph[cur].parent);\n fn = link(conversions[graph[cur].parent][cur], fn);\n cur = graph[cur].parent;\n }\n\n fn.conversion = path;\n return fn;\n }\n\n var route = function route(fromModel) {\n var graph = deriveBFS(fromModel);\n var conversion = {};\n var models = Object.keys(graph);\n\n for (var len = models.length, i = 0; i < len; i++) {\n var toModel = models[i];\n var node = graph[toModel];\n\n if (node.parent === null) {\n // no possible conversion, or this node is the source model.\n continue;\n }\n\n conversion[toModel] = wrapConversion(toModel, graph);\n }\n\n return conversion;\n };\n\n var convert = {};\n var models = Object.keys(conversions);\n\n function wrapRaw(fn) {\n var wrappedFn = function wrappedFn(args) {\n if (args === undefined || args === null) {\n return args;\n }\n\n if (arguments.length > 1) {\n args = Array.prototype.slice.call(arguments);\n }\n\n return fn(args);\n }; // preserve .conversion property if there is one\n\n\n if ('conversion' in fn) {\n wrappedFn.conversion = fn.conversion;\n }\n\n return wrappedFn;\n }\n\n function wrapRounded(fn) {\n var wrappedFn = function wrappedFn(args) {\n if (args === undefined || args === null) {\n return args;\n }\n\n if (arguments.length > 1) {\n args = Array.prototype.slice.call(arguments);\n }\n\n var result = fn(args); // we're assuming the result is an array here.\n // see notice in conversions.js; don't use box types\n // in conversion functions.\n\n if (_typeof(result) === 'object') {\n for (var len = result.length, i = 0; i < len; i++) {\n result[i] = Math.round(result[i]);\n }\n }\n\n return result;\n }; // preserve .conversion property if there is one\n\n\n if ('conversion' in fn) {\n wrappedFn.conversion = fn.conversion;\n }\n\n return wrappedFn;\n }\n\n models.forEach(function (fromModel) {\n convert[fromModel] = {};\n Object.defineProperty(convert[fromModel], 'channels', {\n value: conversions[fromModel].channels\n });\n Object.defineProperty(convert[fromModel], 'labels', {\n value: conversions[fromModel].labels\n });\n var routes = route(fromModel);\n var routeModels = Object.keys(routes);\n routeModels.forEach(function (toModel) {\n var fn = routes[toModel];\n convert[fromModel][toModel] = wrapRounded(fn);\n convert[fromModel][toModel].raw = wrapRaw(fn);\n });\n });\n var colorConvert = convert;\n var colorName$1 = {\n \"aliceblue\": [240, 248, 255],\n \"antiquewhite\": [250, 235, 215],\n \"aqua\": [0, 255, 255],\n \"aquamarine\": [127, 255, 212],\n \"azure\": [240, 255, 255],\n \"beige\": [245, 245, 220],\n \"bisque\": [255, 228, 196],\n \"black\": [0, 0, 0],\n \"blanchedalmond\": [255, 235, 205],\n \"blue\": [0, 0, 255],\n \"blueviolet\": [138, 43, 226],\n \"brown\": [165, 42, 42],\n \"burlywood\": [222, 184, 135],\n \"cadetblue\": [95, 158, 160],\n \"chartreuse\": [127, 255, 0],\n \"chocolate\": [210, 105, 30],\n \"coral\": [255, 127, 80],\n \"cornflowerblue\": [100, 149, 237],\n \"cornsilk\": [255, 248, 220],\n \"crimson\": [220, 20, 60],\n \"cyan\": [0, 255, 255],\n \"darkblue\": [0, 0, 139],\n \"darkcyan\": [0, 139, 139],\n \"darkgoldenrod\": [184, 134, 11],\n \"darkgray\": [169, 169, 169],\n \"darkgreen\": [0, 100, 0],\n \"darkgrey\": [169, 169, 169],\n \"darkkhaki\": [189, 183, 107],\n \"darkmagenta\": [139, 0, 139],\n \"darkolivegreen\": [85, 107, 47],\n \"darkorange\": [255, 140, 0],\n \"darkorchid\": [153, 50, 204],\n \"darkred\": [139, 0, 0],\n \"darksalmon\": [233, 150, 122],\n \"darkseagreen\": [143, 188, 143],\n \"darkslateblue\": [72, 61, 139],\n \"darkslategray\": [47, 79, 79],\n \"darkslategrey\": [47, 79, 79],\n \"darkturquoise\": [0, 206, 209],\n \"darkviolet\": [148, 0, 211],\n \"deeppink\": [255, 20, 147],\n \"deepskyblue\": [0, 191, 255],\n \"dimgray\": [105, 105, 105],\n \"dimgrey\": [105, 105, 105],\n \"dodgerblue\": [30, 144, 255],\n \"firebrick\": [178, 34, 34],\n \"floralwhite\": [255, 250, 240],\n \"forestgreen\": [34, 139, 34],\n \"fuchsia\": [255, 0, 255],\n \"gainsboro\": [220, 220, 220],\n \"ghostwhite\": [248, 248, 255],\n \"gold\": [255, 215, 0],\n \"goldenrod\": [218, 165, 32],\n \"gray\": [128, 128, 128],\n \"green\": [0, 128, 0],\n \"greenyellow\": [173, 255, 47],\n \"grey\": [128, 128, 128],\n \"honeydew\": [240, 255, 240],\n \"hotpink\": [255, 105, 180],\n \"indianred\": [205, 92, 92],\n \"indigo\": [75, 0, 130],\n \"ivory\": [255, 255, 240],\n \"khaki\": [240, 230, 140],\n \"lavender\": [230, 230, 250],\n \"lavenderblush\": [255, 240, 245],\n \"lawngreen\": [124, 252, 0],\n \"lemonchiffon\": [255, 250, 205],\n \"lightblue\": [173, 216, 230],\n \"lightcoral\": [240, 128, 128],\n \"lightcyan\": [224, 255, 255],\n \"lightgoldenrodyellow\": [250, 250, 210],\n \"lightgray\": [211, 211, 211],\n \"lightgreen\": [144, 238, 144],\n \"lightgrey\": [211, 211, 211],\n \"lightpink\": [255, 182, 193],\n \"lightsalmon\": [255, 160, 122],\n \"lightseagreen\": [32, 178, 170],\n \"lightskyblue\": [135, 206, 250],\n \"lightslategray\": [119, 136, 153],\n \"lightslategrey\": [119, 136, 153],\n \"lightsteelblue\": [176, 196, 222],\n \"lightyellow\": [255, 255, 224],\n \"lime\": [0, 255, 0],\n \"limegreen\": [50, 205, 50],\n \"linen\": [250, 240, 230],\n \"magenta\": [255, 0, 255],\n \"maroon\": [128, 0, 0],\n \"mediumaquamarine\": [102, 205, 170],\n \"mediumblue\": [0, 0, 205],\n \"mediumorchid\": [186, 85, 211],\n \"mediumpurple\": [147, 112, 219],\n \"mediumseagreen\": [60, 179, 113],\n \"mediumslateblue\": [123, 104, 238],\n \"mediumspringgreen\": [0, 250, 154],\n \"mediumturquoise\": [72, 209, 204],\n \"mediumvioletred\": [199, 21, 133],\n \"midnightblue\": [25, 25, 112],\n \"mintcream\": [245, 255, 250],\n \"mistyrose\": [255, 228, 225],\n \"moccasin\": [255, 228, 181],\n \"navajowhite\": [255, 222, 173],\n \"navy\": [0, 0, 128],\n \"oldlace\": [253, 245, 230],\n \"olive\": [128, 128, 0],\n \"olivedrab\": [107, 142, 35],\n \"orange\": [255, 165, 0],\n \"orangered\": [255, 69, 0],\n \"orchid\": [218, 112, 214],\n \"palegoldenrod\": [238, 232, 170],\n \"palegreen\": [152, 251, 152],\n \"paleturquoise\": [175, 238, 238],\n \"palevioletred\": [219, 112, 147],\n \"papayawhip\": [255, 239, 213],\n \"peachpuff\": [255, 218, 185],\n \"peru\": [205, 133, 63],\n \"pink\": [255, 192, 203],\n \"plum\": [221, 160, 221],\n \"powderblue\": [176, 224, 230],\n \"purple\": [128, 0, 128],\n \"rebeccapurple\": [102, 51, 153],\n \"red\": [255, 0, 0],\n \"rosybrown\": [188, 143, 143],\n \"royalblue\": [65, 105, 225],\n \"saddlebrown\": [139, 69, 19],\n \"salmon\": [250, 128, 114],\n \"sandybrown\": [244, 164, 96],\n \"seagreen\": [46, 139, 87],\n \"seashell\": [255, 245, 238],\n \"sienna\": [160, 82, 45],\n \"silver\": [192, 192, 192],\n \"skyblue\": [135, 206, 235],\n \"slateblue\": [106, 90, 205],\n \"slategray\": [112, 128, 144],\n \"slategrey\": [112, 128, 144],\n \"snow\": [255, 250, 250],\n \"springgreen\": [0, 255, 127],\n \"steelblue\": [70, 130, 180],\n \"tan\": [210, 180, 140],\n \"teal\": [0, 128, 128],\n \"thistle\": [216, 191, 216],\n \"tomato\": [255, 99, 71],\n \"turquoise\": [64, 224, 208],\n \"violet\": [238, 130, 238],\n \"wheat\": [245, 222, 179],\n \"white\": [255, 255, 255],\n \"whitesmoke\": [245, 245, 245],\n \"yellow\": [255, 255, 0],\n \"yellowgreen\": [154, 205, 50]\n };\n /* MIT license */\n\n var colorString = {\n getRgba: getRgba,\n getHsla: getHsla,\n getRgb: getRgb,\n getHsl: getHsl,\n getHwb: getHwb,\n getAlpha: getAlpha,\n hexString: hexString,\n rgbString: rgbString,\n rgbaString: rgbaString,\n percentString: percentString,\n percentaString: percentaString,\n hslString: hslString,\n hslaString: hslaString,\n hwbString: hwbString,\n keyword: keyword\n };\n\n function getRgba(string) {\n if (!string) {\n return;\n }\n\n var abbr = /^#([a-fA-F0-9]{3,4})$/i,\n hex = /^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,\n rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i,\n per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i,\n keyword = /(\\w+)/;\n var rgb = [0, 0, 0],\n a = 1,\n match = string.match(abbr),\n hexAlpha = \"\";\n\n if (match) {\n match = match[1];\n hexAlpha = match[3];\n\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match[i] + match[i], 16);\n }\n\n if (hexAlpha) {\n a = Math.round(parseInt(hexAlpha + hexAlpha, 16) / 255 * 100) / 100;\n }\n } else if (match = string.match(hex)) {\n hexAlpha = match[2];\n match = match[1];\n\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match.slice(i * 2, i * 2 + 2), 16);\n }\n\n if (hexAlpha) {\n a = Math.round(parseInt(hexAlpha, 16) / 255 * 100) / 100;\n }\n } else if (match = string.match(rgba)) {\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match[i + 1]);\n }\n\n a = parseFloat(match[4]);\n } else if (match = string.match(per)) {\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n }\n\n a = parseFloat(match[4]);\n } else if (match = string.match(keyword)) {\n if (match[1] == \"transparent\") {\n return [0, 0, 0, 0];\n }\n\n rgb = colorName$1[match[1]];\n\n if (!rgb) {\n return;\n }\n }\n\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = scale(rgb[i], 0, 255);\n }\n\n if (!a && a != 0) {\n a = 1;\n } else {\n a = scale(a, 0, 1);\n }\n\n rgb[3] = a;\n return rgb;\n }\n\n function getHsla(string) {\n if (!string) {\n return;\n }\n\n var hsl = /^hsla?\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\n var match = string.match(hsl);\n\n if (match) {\n var alpha = parseFloat(match[4]);\n var h = scale(parseInt(match[1]), 0, 360),\n s = scale(parseFloat(match[2]), 0, 100),\n l = scale(parseFloat(match[3]), 0, 100),\n a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\n return [h, s, l, a];\n }\n }\n\n function getHwb(string) {\n if (!string) {\n return;\n }\n\n var hwb = /^hwb\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\n var match = string.match(hwb);\n\n if (match) {\n var alpha = parseFloat(match[4]);\n var h = scale(parseInt(match[1]), 0, 360),\n w = scale(parseFloat(match[2]), 0, 100),\n b = scale(parseFloat(match[3]), 0, 100),\n a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\n return [h, w, b, a];\n }\n }\n\n function getRgb(string) {\n var rgba = getRgba(string);\n return rgba && rgba.slice(0, 3);\n }\n\n function getHsl(string) {\n var hsla = getHsla(string);\n return hsla && hsla.slice(0, 3);\n }\n\n function getAlpha(string) {\n var vals = getRgba(string);\n\n if (vals) {\n return vals[3];\n } else if (vals = getHsla(string)) {\n return vals[3];\n } else if (vals = getHwb(string)) {\n return vals[3];\n }\n } // generators\n\n\n function hexString(rgba, a) {\n var a = a !== undefined && rgba.length === 3 ? a : rgba[3];\n return \"#\" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (a >= 0 && a < 1 ? hexDouble(Math.round(a * 255)) : \"\");\n }\n\n function rgbString(rgba, alpha) {\n if (alpha < 1 || rgba[3] && rgba[3] < 1) {\n return rgbaString(rgba, alpha);\n }\n\n return \"rgb(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2] + \")\";\n }\n\n function rgbaString(rgba, alpha) {\n if (alpha === undefined) {\n alpha = rgba[3] !== undefined ? rgba[3] : 1;\n }\n\n return \"rgba(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2] + \", \" + alpha + \")\";\n }\n\n function percentString(rgba, alpha) {\n if (alpha < 1 || rgba[3] && rgba[3] < 1) {\n return percentaString(rgba, alpha);\n }\n\n var r = Math.round(rgba[0] / 255 * 100),\n g = Math.round(rgba[1] / 255 * 100),\n b = Math.round(rgba[2] / 255 * 100);\n return \"rgb(\" + r + \"%, \" + g + \"%, \" + b + \"%)\";\n }\n\n function percentaString(rgba, alpha) {\n var r = Math.round(rgba[0] / 255 * 100),\n g = Math.round(rgba[1] / 255 * 100),\n b = Math.round(rgba[2] / 255 * 100);\n return \"rgba(\" + r + \"%, \" + g + \"%, \" + b + \"%, \" + (alpha || rgba[3] || 1) + \")\";\n }\n\n function hslString(hsla, alpha) {\n if (alpha < 1 || hsla[3] && hsla[3] < 1) {\n return hslaString(hsla, alpha);\n }\n\n return \"hsl(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%)\";\n }\n\n function hslaString(hsla, alpha) {\n if (alpha === undefined) {\n alpha = hsla[3] !== undefined ? hsla[3] : 1;\n }\n\n return \"hsla(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%, \" + alpha + \")\";\n } // hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n // (hwb have alpha optional & 1 is default value)\n\n\n function hwbString(hwb, alpha) {\n if (alpha === undefined) {\n alpha = hwb[3] !== undefined ? hwb[3] : 1;\n }\n\n return \"hwb(\" + hwb[0] + \", \" + hwb[1] + \"%, \" + hwb[2] + \"%\" + (alpha !== undefined && alpha !== 1 ? \", \" + alpha : \"\") + \")\";\n }\n\n function keyword(rgb) {\n return reverseNames[rgb.slice(0, 3)];\n } // helpers\n\n\n function scale(num, min, max) {\n return Math.min(Math.max(min, num), max);\n }\n\n function hexDouble(num) {\n var str = num.toString(16).toUpperCase();\n return str.length < 2 ? \"0\" + str : str;\n } //create a list of reverse color names\n\n\n var reverseNames = {};\n\n for (var name in colorName$1) {\n reverseNames[colorName$1[name]] = name;\n }\n /* MIT license */\n\n\n var Color = function Color(obj) {\n if (obj instanceof Color) {\n return obj;\n }\n\n if (!(this instanceof Color)) {\n return new Color(obj);\n }\n\n this.valid = false;\n this.values = {\n rgb: [0, 0, 0],\n hsl: [0, 0, 0],\n hsv: [0, 0, 0],\n hwb: [0, 0, 0],\n cmyk: [0, 0, 0, 0],\n alpha: 1\n }; // parse Color() argument\n\n var vals;\n\n if (typeof obj === 'string') {\n vals = colorString.getRgba(obj);\n\n if (vals) {\n this.setValues('rgb', vals);\n } else if (vals = colorString.getHsla(obj)) {\n this.setValues('hsl', vals);\n } else if (vals = colorString.getHwb(obj)) {\n this.setValues('hwb', vals);\n }\n } else if (_typeof(obj) === 'object') {\n vals = obj;\n\n if (vals.r !== undefined || vals.red !== undefined) {\n this.setValues('rgb', vals);\n } else if (vals.l !== undefined || vals.lightness !== undefined) {\n this.setValues('hsl', vals);\n } else if (vals.v !== undefined || vals.value !== undefined) {\n this.setValues('hsv', vals);\n } else if (vals.w !== undefined || vals.whiteness !== undefined) {\n this.setValues('hwb', vals);\n } else if (vals.c !== undefined || vals.cyan !== undefined) {\n this.setValues('cmyk', vals);\n }\n }\n };\n\n Color.prototype = {\n isValid: function isValid() {\n return this.valid;\n },\n rgb: function rgb() {\n return this.setSpace('rgb', arguments);\n },\n hsl: function hsl() {\n return this.setSpace('hsl', arguments);\n },\n hsv: function hsv() {\n return this.setSpace('hsv', arguments);\n },\n hwb: function hwb() {\n return this.setSpace('hwb', arguments);\n },\n cmyk: function cmyk() {\n return this.setSpace('cmyk', arguments);\n },\n rgbArray: function rgbArray() {\n return this.values.rgb;\n },\n hslArray: function hslArray() {\n return this.values.hsl;\n },\n hsvArray: function hsvArray() {\n return this.values.hsv;\n },\n hwbArray: function hwbArray() {\n var values = this.values;\n\n if (values.alpha !== 1) {\n return values.hwb.concat([values.alpha]);\n }\n\n return values.hwb;\n },\n cmykArray: function cmykArray() {\n return this.values.cmyk;\n },\n rgbaArray: function rgbaArray() {\n var values = this.values;\n return values.rgb.concat([values.alpha]);\n },\n hslaArray: function hslaArray() {\n var values = this.values;\n return values.hsl.concat([values.alpha]);\n },\n alpha: function alpha(val) {\n if (val === undefined) {\n return this.values.alpha;\n }\n\n this.setValues('alpha', val);\n return this;\n },\n red: function red(val) {\n return this.setChannel('rgb', 0, val);\n },\n green: function green(val) {\n return this.setChannel('rgb', 1, val);\n },\n blue: function blue(val) {\n return this.setChannel('rgb', 2, val);\n },\n hue: function hue(val) {\n if (val) {\n val %= 360;\n val = val < 0 ? 360 + val : val;\n }\n\n return this.setChannel('hsl', 0, val);\n },\n saturation: function saturation(val) {\n return this.setChannel('hsl', 1, val);\n },\n lightness: function lightness(val) {\n return this.setChannel('hsl', 2, val);\n },\n saturationv: function saturationv(val) {\n return this.setChannel('hsv', 1, val);\n },\n whiteness: function whiteness(val) {\n return this.setChannel('hwb', 1, val);\n },\n blackness: function blackness(val) {\n return this.setChannel('hwb', 2, val);\n },\n value: function value(val) {\n return this.setChannel('hsv', 2, val);\n },\n cyan: function cyan(val) {\n return this.setChannel('cmyk', 0, val);\n },\n magenta: function magenta(val) {\n return this.setChannel('cmyk', 1, val);\n },\n yellow: function yellow(val) {\n return this.setChannel('cmyk', 2, val);\n },\n black: function black(val) {\n return this.setChannel('cmyk', 3, val);\n },\n hexString: function hexString() {\n return colorString.hexString(this.values.rgb);\n },\n rgbString: function rgbString() {\n return colorString.rgbString(this.values.rgb, this.values.alpha);\n },\n rgbaString: function rgbaString() {\n return colorString.rgbaString(this.values.rgb, this.values.alpha);\n },\n percentString: function percentString() {\n return colorString.percentString(this.values.rgb, this.values.alpha);\n },\n hslString: function hslString() {\n return colorString.hslString(this.values.hsl, this.values.alpha);\n },\n hslaString: function hslaString() {\n return colorString.hslaString(this.values.hsl, this.values.alpha);\n },\n hwbString: function hwbString() {\n return colorString.hwbString(this.values.hwb, this.values.alpha);\n },\n keyword: function keyword() {\n return colorString.keyword(this.values.rgb, this.values.alpha);\n },\n rgbNumber: function rgbNumber() {\n var rgb = this.values.rgb;\n return rgb[0] << 16 | rgb[1] << 8 | rgb[2];\n },\n luminosity: function luminosity() {\n // http://www.w3.org/TR/WCAG20/#relativeluminancedef\n var rgb = this.values.rgb;\n var lum = [];\n\n for (var i = 0; i < rgb.length; i++) {\n var chan = rgb[i] / 255;\n lum[i] = chan <= 0.03928 ? chan / 12.92 : Math.pow((chan + 0.055) / 1.055, 2.4);\n }\n\n return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n },\n contrast: function contrast(color2) {\n // http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n var lum1 = this.luminosity();\n var lum2 = color2.luminosity();\n\n if (lum1 > lum2) {\n return (lum1 + 0.05) / (lum2 + 0.05);\n }\n\n return (lum2 + 0.05) / (lum1 + 0.05);\n },\n level: function level(color2) {\n var contrastRatio = this.contrast(color2);\n\n if (contrastRatio >= 7.1) {\n return 'AAA';\n }\n\n return contrastRatio >= 4.5 ? 'AA' : '';\n },\n dark: function dark() {\n // YIQ equation from http://24ways.org/2010/calculating-color-contrast\n var rgb = this.values.rgb;\n var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n return yiq < 128;\n },\n light: function light() {\n return !this.dark();\n },\n negate: function negate() {\n var rgb = [];\n\n for (var i = 0; i < 3; i++) {\n rgb[i] = 255 - this.values.rgb[i];\n }\n\n this.setValues('rgb', rgb);\n return this;\n },\n lighten: function lighten(ratio) {\n var hsl = this.values.hsl;\n hsl[2] += hsl[2] * ratio;\n this.setValues('hsl', hsl);\n return this;\n },\n darken: function darken(ratio) {\n var hsl = this.values.hsl;\n hsl[2] -= hsl[2] * ratio;\n this.setValues('hsl', hsl);\n return this;\n },\n saturate: function saturate(ratio) {\n var hsl = this.values.hsl;\n hsl[1] += hsl[1] * ratio;\n this.setValues('hsl', hsl);\n return this;\n },\n desaturate: function desaturate(ratio) {\n var hsl = this.values.hsl;\n hsl[1] -= hsl[1] * ratio;\n this.setValues('hsl', hsl);\n return this;\n },\n whiten: function whiten(ratio) {\n var hwb = this.values.hwb;\n hwb[1] += hwb[1] * ratio;\n this.setValues('hwb', hwb);\n return this;\n },\n blacken: function blacken(ratio) {\n var hwb = this.values.hwb;\n hwb[2] += hwb[2] * ratio;\n this.setValues('hwb', hwb);\n return this;\n },\n greyscale: function greyscale() {\n var rgb = this.values.rgb; // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\n var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n this.setValues('rgb', [val, val, val]);\n return this;\n },\n clearer: function clearer(ratio) {\n var alpha = this.values.alpha;\n this.setValues('alpha', alpha - alpha * ratio);\n return this;\n },\n opaquer: function opaquer(ratio) {\n var alpha = this.values.alpha;\n this.setValues('alpha', alpha + alpha * ratio);\n return this;\n },\n rotate: function rotate(degrees) {\n var hsl = this.values.hsl;\n var hue = (hsl[0] + degrees) % 360;\n hsl[0] = hue < 0 ? 360 + hue : hue;\n this.setValues('hsl', hsl);\n return this;\n },\n\n /**\n * Ported from sass implementation in C\n * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n */\n mix: function mix(mixinColor, weight) {\n var color1 = this;\n var color2 = mixinColor;\n var p = weight === undefined ? 0.5 : weight;\n var w = 2 * p - 1;\n var a = color1.alpha() - color2.alpha();\n var w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n var w2 = 1 - w1;\n return this.rgb(w1 * color1.red() + w2 * color2.red(), w1 * color1.green() + w2 * color2.green(), w1 * color1.blue() + w2 * color2.blue()).alpha(color1.alpha() * p + color2.alpha() * (1 - p));\n },\n toJSON: function toJSON() {\n return this.rgb();\n },\n clone: function clone() {\n // NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,\n // making the final build way to big to embed in Chart.js. So let's do it manually,\n // assuming that values to clone are 1 dimension arrays containing only numbers,\n // except 'alpha' which is a number.\n var result = new Color();\n var source = this.values;\n var target = result.values;\n var value, type;\n\n for (var prop in source) {\n if (source.hasOwnProperty(prop)) {\n value = source[prop];\n type = {}.toString.call(value);\n\n if (type === '[object Array]') {\n target[prop] = value.slice(0);\n } else if (type === '[object Number]') {\n target[prop] = value;\n } else {\n console.error('unexpected color value:', value);\n }\n }\n }\n\n return result;\n }\n };\n Color.prototype.spaces = {\n rgb: ['red', 'green', 'blue'],\n hsl: ['hue', 'saturation', 'lightness'],\n hsv: ['hue', 'saturation', 'value'],\n hwb: ['hue', 'whiteness', 'blackness'],\n cmyk: ['cyan', 'magenta', 'yellow', 'black']\n };\n Color.prototype.maxes = {\n rgb: [255, 255, 255],\n hsl: [360, 100, 100],\n hsv: [360, 100, 100],\n hwb: [360, 100, 100],\n cmyk: [100, 100, 100, 100]\n };\n\n Color.prototype.getValues = function (space) {\n var values = this.values;\n var vals = {};\n\n for (var i = 0; i < space.length; i++) {\n vals[space.charAt(i)] = values[space][i];\n }\n\n if (values.alpha !== 1) {\n vals.a = values.alpha;\n } // {r: 255, g: 255, b: 255, a: 0.4}\n\n\n return vals;\n };\n\n Color.prototype.setValues = function (space, vals) {\n var values = this.values;\n var spaces = this.spaces;\n var maxes = this.maxes;\n var alpha = 1;\n var i;\n this.valid = true;\n\n if (space === 'alpha') {\n alpha = vals;\n } else if (vals.length) {\n // [10, 10, 10]\n values[space] = vals.slice(0, space.length);\n alpha = vals[space.length];\n } else if (vals[space.charAt(0)] !== undefined) {\n // {r: 10, g: 10, b: 10}\n for (i = 0; i < space.length; i++) {\n values[space][i] = vals[space.charAt(i)];\n }\n\n alpha = vals.a;\n } else if (vals[spaces[space][0]] !== undefined) {\n // {red: 10, green: 10, blue: 10}\n var chans = spaces[space];\n\n for (i = 0; i < space.length; i++) {\n values[space][i] = vals[chans[i]];\n }\n\n alpha = vals.alpha;\n }\n\n values.alpha = Math.max(0, Math.min(1, alpha === undefined ? values.alpha : alpha));\n\n if (space === 'alpha') {\n return false;\n }\n\n var capped; // cap values of the space prior converting all values\n\n for (i = 0; i < space.length; i++) {\n capped = Math.max(0, Math.min(maxes[space][i], values[space][i]));\n values[space][i] = Math.round(capped);\n } // convert to all the other color spaces\n\n\n for (var sname in spaces) {\n if (sname !== space) {\n values[sname] = colorConvert[space][sname](values[space]);\n }\n }\n\n return true;\n };\n\n Color.prototype.setSpace = function (space, args) {\n var vals = args[0];\n\n if (vals === undefined) {\n // color.rgb()\n return this.getValues(space);\n } // color.rgb(10, 10, 10)\n\n\n if (typeof vals === 'number') {\n vals = Array.prototype.slice.call(args);\n }\n\n this.setValues(space, vals);\n return this;\n };\n\n Color.prototype.setChannel = function (space, index, val) {\n var svalues = this.values[space];\n\n if (val === undefined) {\n // color.red()\n return svalues[index];\n } else if (val === svalues[index]) {\n // color.red(color.red())\n return this;\n } // color.red(100)\n\n\n svalues[index] = val;\n this.setValues(space, svalues);\n return this;\n };\n\n if (typeof window !== 'undefined') {\n window.Color = Color;\n }\n\n var chartjsColor = Color;\n\n function isValidKey(key) {\n return ['__proto__', 'prototype', 'constructor'].indexOf(key) === -1;\n }\n /**\r\n * @namespace Chart.helpers\r\n */\n\n\n var helpers = {\n /**\r\n * An empty function that can be used, for example, for optional callback.\r\n */\n noop: function noop() {},\n\n /**\r\n * Returns a unique id, sequentially generated from a global variable.\r\n * @returns {number}\r\n * @function\r\n */\n uid: function () {\n var id = 0;\n return function () {\n return id++;\n };\n }(),\n\n /**\r\n * Returns true if `value` is neither null nor undefined, else returns false.\r\n * @param {*} value - The value to test.\r\n * @returns {boolean}\r\n * @since 2.7.0\r\n */\n isNullOrUndef: function isNullOrUndef(value) {\n return value === null || typeof value === 'undefined';\n },\n\n /**\r\n * Returns true if `value` is an array (including typed arrays), else returns false.\r\n * @param {*} value - The value to test.\r\n * @returns {boolean}\r\n * @function\r\n */\n isArray: function isArray(value) {\n if (Array.isArray && Array.isArray(value)) {\n return true;\n }\n\n var type = Object.prototype.toString.call(value);\n\n if (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') {\n return true;\n }\n\n return false;\n },\n\n /**\r\n * Returns true if `value` is an object (excluding null), else returns false.\r\n * @param {*} value - The value to test.\r\n * @returns {boolean}\r\n * @since 2.7.0\r\n */\n isObject: function isObject(value) {\n return value !== null && Object.prototype.toString.call(value) === '[object Object]';\n },\n\n /**\r\n * Returns true if `value` is a finite number, else returns false\r\n * @param {*} value - The value to test.\r\n * @returns {boolean}\r\n */\n isFinite: function (_isFinite) {\n function isFinite(_x) {\n return _isFinite.apply(this, arguments);\n }\n\n isFinite.toString = function () {\n return _isFinite.toString();\n };\n\n return isFinite;\n }(function (value) {\n return (typeof value === 'number' || value instanceof Number) && isFinite(value);\n }),\n\n /**\r\n * Returns `value` if defined, else returns `defaultValue`.\r\n * @param {*} value - The value to return if defined.\r\n * @param {*} defaultValue - The value to return if `value` is undefined.\r\n * @returns {*}\r\n */\n valueOrDefault: function valueOrDefault(value, defaultValue) {\n return typeof value === 'undefined' ? defaultValue : value;\n },\n\n /**\r\n * Returns value at the given `index` in array if defined, else returns `defaultValue`.\r\n * @param {Array} value - The array to lookup for value at `index`.\r\n * @param {number} index - The index in `value` to lookup for value.\r\n * @param {*} defaultValue - The value to return if `value[index]` is undefined.\r\n * @returns {*}\r\n */\n valueAtIndexOrDefault: function valueAtIndexOrDefault(value, index, defaultValue) {\n return helpers.valueOrDefault(helpers.isArray(value) ? value[index] : value, defaultValue);\n },\n\n /**\r\n * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the\r\n * value returned by `fn`. If `fn` is not a function, this method returns undefined.\r\n * @param {function} fn - The function to call.\r\n * @param {Array|undefined|null} args - The arguments with which `fn` should be called.\r\n * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.\r\n * @returns {*}\r\n */\n callback: function callback(fn, args, thisArg) {\n if (fn && typeof fn.call === 'function') {\n return fn.apply(thisArg, args);\n }\n },\n\n /**\r\n * Note(SB) for performance sake, this method should only be used when loopable type\r\n * is unknown or in none intensive code (not called often and small loopable). Else\r\n * it's preferable to use a regular for() loop and save extra function calls.\r\n * @param {object|Array} loopable - The object or array to be iterated.\r\n * @param {function} fn - The function to call for each item.\r\n * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.\r\n * @param {boolean} [reverse] - If true, iterates backward on the loopable.\r\n */\n each: function each(loopable, fn, thisArg, reverse) {\n var i, len, keys;\n\n if (helpers.isArray(loopable)) {\n len = loopable.length;\n\n if (reverse) {\n for (i = len - 1; i >= 0; i--) {\n fn.call(thisArg, loopable[i], i);\n }\n } else {\n for (i = 0; i < len; i++) {\n fn.call(thisArg, loopable[i], i);\n }\n }\n } else if (helpers.isObject(loopable)) {\n keys = Object.keys(loopable);\n len = keys.length;\n\n for (i = 0; i < len; i++) {\n fn.call(thisArg, loopable[keys[i]], keys[i]);\n }\n }\n },\n\n /**\r\n * Returns true if the `a0` and `a1` arrays have the same content, else returns false.\r\n * @see https://stackoverflow.com/a/14853974\r\n * @param {Array} a0 - The array to compare\r\n * @param {Array} a1 - The array to compare\r\n * @returns {boolean}\r\n */\n arrayEquals: function arrayEquals(a0, a1) {\n var i, ilen, v0, v1;\n\n if (!a0 || !a1 || a0.length !== a1.length) {\n return false;\n }\n\n for (i = 0, ilen = a0.length; i < ilen; ++i) {\n v0 = a0[i];\n v1 = a1[i];\n\n if (v0 instanceof Array && v1 instanceof Array) {\n if (!helpers.arrayEquals(v0, v1)) {\n return false;\n }\n } else if (v0 !== v1) {\n // NOTE: two different object instances will never be equal: {x:20} != {x:20}\n return false;\n }\n }\n\n return true;\n },\n\n /**\r\n * Returns a deep copy of `source` without keeping references on objects and arrays.\r\n * @param {*} source - The value to clone.\r\n * @returns {*}\r\n */\n clone: function clone(source) {\n if (helpers.isArray(source)) {\n return source.map(helpers.clone);\n }\n\n if (helpers.isObject(source)) {\n var target = Object.create(source);\n var keys = Object.keys(source);\n var klen = keys.length;\n var k = 0;\n\n for (; k < klen; ++k) {\n target[keys[k]] = helpers.clone(source[keys[k]]);\n }\n\n return target;\n }\n\n return source;\n },\n\n /**\r\n * The default merger when Chart.helpers.merge is called without merger option.\r\n * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback.\r\n * @private\r\n */\n _merger: function _merger(key, target, source, options) {\n if (!isValidKey(key)) {\n // We want to ensure we do not copy prototypes over\n // as this can pollute global namespaces\n return;\n }\n\n var tval = target[key];\n var sval = source[key];\n\n if (helpers.isObject(tval) && helpers.isObject(sval)) {\n helpers.merge(tval, sval, options);\n } else {\n target[key] = helpers.clone(sval);\n }\n },\n\n /**\r\n * Merges source[key] in target[key] only if target[key] is undefined.\r\n * @private\r\n */\n _mergerIf: function _mergerIf(key, target, source) {\n if (!isValidKey(key)) {\n // We want to ensure we do not copy prototypes over\n // as this can pollute global namespaces\n return;\n }\n\n var tval = target[key];\n var sval = source[key];\n\n if (helpers.isObject(tval) && helpers.isObject(sval)) {\n helpers.mergeIf(tval, sval);\n } else if (!target.hasOwnProperty(key)) {\n target[key] = helpers.clone(sval);\n }\n },\n\n /**\r\n * Recursively deep copies `source` properties into `target` with the given `options`.\r\n * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\r\n * @param {object} target - The target object in which all sources are merged into.\r\n * @param {object|object[]} source - Object(s) to merge into `target`.\r\n * @param {object} [options] - Merging options:\r\n * @param {function} [options.merger] - The merge method (key, target, source, options)\r\n * @returns {object} The `target` object.\r\n */\n merge: function merge(target, source, options) {\n var sources = helpers.isArray(source) ? source : [source];\n var ilen = sources.length;\n var merge, i, keys, klen, k;\n\n if (!helpers.isObject(target)) {\n return target;\n }\n\n options = options || {};\n merge = options.merger || helpers._merger;\n\n for (i = 0; i < ilen; ++i) {\n source = sources[i];\n\n if (!helpers.isObject(source)) {\n continue;\n }\n\n keys = Object.keys(source);\n\n for (k = 0, klen = keys.length; k < klen; ++k) {\n merge(keys[k], target, source, options);\n }\n }\n\n return target;\n },\n\n /**\r\n * Recursively deep copies `source` properties into `target` *only* if not defined in target.\r\n * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\r\n * @param {object} target - The target object in which all sources are merged into.\r\n * @param {object|object[]} source - Object(s) to merge into `target`.\r\n * @returns {object} The `target` object.\r\n */\n mergeIf: function mergeIf(target, source) {\n return helpers.merge(target, source, {\n merger: helpers._mergerIf\n });\n },\n\n /**\r\n * Applies the contents of two or more objects together into the first object.\r\n * @param {object} target - The target object in which all objects are merged into.\r\n * @param {object} arg1 - Object containing additional properties to merge in target.\r\n * @param {object} argN - Additional objects containing properties to merge in target.\r\n * @returns {object} The `target` object.\r\n */\n extend: Object.assign || function (target) {\n return helpers.merge(target, [].slice.call(arguments, 1), {\n merger: function merger(key, dst, src) {\n dst[key] = src[key];\n }\n });\n },\n\n /**\r\n * Basic javascript inheritance based on the model created in Backbone.js\r\n */\n inherits: function inherits(extensions) {\n var me = this;\n var ChartElement = extensions && extensions.hasOwnProperty('constructor') ? extensions.constructor : function () {\n return me.apply(this, arguments);\n };\n\n var Surrogate = function Surrogate() {\n this.constructor = ChartElement;\n };\n\n Surrogate.prototype = me.prototype;\n ChartElement.prototype = new Surrogate();\n ChartElement.extend = helpers.inherits;\n\n if (extensions) {\n helpers.extend(ChartElement.prototype, extensions);\n }\n\n ChartElement.__super__ = me.prototype;\n return ChartElement;\n },\n _deprecated: function _deprecated(scope, value, previous, current) {\n if (value !== undefined) {\n console.warn(scope + ': \"' + previous + '\" is deprecated. Please use \"' + current + '\" instead');\n }\n }\n };\n var helpers_core = helpers; // DEPRECATIONS\n\n /**\r\n * Provided for backward compatibility, use Chart.helpers.callback instead.\r\n * @function Chart.helpers.callCallback\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n * @private\r\n */\n\n helpers.callCallback = helpers.callback;\n /**\r\n * Provided for backward compatibility, use Array.prototype.indexOf instead.\r\n * Array.prototype.indexOf compatibility: Chrome, Opera, Safari, FF1.5+, IE9+\r\n * @function Chart.helpers.indexOf\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\n\n helpers.indexOf = function (array, item, fromIndex) {\n return Array.prototype.indexOf.call(array, item, fromIndex);\n };\n /**\r\n * Provided for backward compatibility, use Chart.helpers.valueOrDefault instead.\r\n * @function Chart.helpers.getValueOrDefault\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\n\n\n helpers.getValueOrDefault = helpers.valueOrDefault;\n /**\r\n * Provided for backward compatibility, use Chart.helpers.valueAtIndexOrDefault instead.\r\n * @function Chart.helpers.getValueAtIndexOrDefault\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\n\n helpers.getValueAtIndexOrDefault = helpers.valueAtIndexOrDefault;\n /**\r\n * Easing functions adapted from Robert Penner's easing equations.\r\n * @namespace Chart.helpers.easingEffects\r\n * @see http://www.robertpenner.com/easing/\r\n */\n\n var effects = {\n linear: function linear(t) {\n return t;\n },\n easeInQuad: function easeInQuad(t) {\n return t * t;\n },\n easeOutQuad: function easeOutQuad(t) {\n return -t * (t - 2);\n },\n easeInOutQuad: function easeInOutQuad(t) {\n if ((t /= 0.5) < 1) {\n return 0.5 * t * t;\n }\n\n return -0.5 * (--t * (t - 2) - 1);\n },\n easeInCubic: function easeInCubic(t) {\n return t * t * t;\n },\n easeOutCubic: function easeOutCubic(t) {\n return (t = t - 1) * t * t + 1;\n },\n easeInOutCubic: function easeInOutCubic(t) {\n if ((t /= 0.5) < 1) {\n return 0.5 * t * t * t;\n }\n\n return 0.5 * ((t -= 2) * t * t + 2);\n },\n easeInQuart: function easeInQuart(t) {\n return t * t * t * t;\n },\n easeOutQuart: function easeOutQuart(t) {\n return -((t = t - 1) * t * t * t - 1);\n },\n easeInOutQuart: function easeInOutQuart(t) {\n if ((t /= 0.5) < 1) {\n return 0.5 * t * t * t * t;\n }\n\n return -0.5 * ((t -= 2) * t * t * t - 2);\n },\n easeInQuint: function easeInQuint(t) {\n return t * t * t * t * t;\n },\n easeOutQuint: function easeOutQuint(t) {\n return (t = t - 1) * t * t * t * t + 1;\n },\n easeInOutQuint: function easeInOutQuint(t) {\n if ((t /= 0.5) < 1) {\n return 0.5 * t * t * t * t * t;\n }\n\n return 0.5 * ((t -= 2) * t * t * t * t + 2);\n },\n easeInSine: function easeInSine(t) {\n return -Math.cos(t * (Math.PI / 2)) + 1;\n },\n easeOutSine: function easeOutSine(t) {\n return Math.sin(t * (Math.PI / 2));\n },\n easeInOutSine: function easeInOutSine(t) {\n return -0.5 * (Math.cos(Math.PI * t) - 1);\n },\n easeInExpo: function easeInExpo(t) {\n return t === 0 ? 0 : Math.pow(2, 10 * (t - 1));\n },\n easeOutExpo: function easeOutExpo(t) {\n return t === 1 ? 1 : -Math.pow(2, -10 * t) + 1;\n },\n easeInOutExpo: function easeInOutExpo(t) {\n if (t === 0) {\n return 0;\n }\n\n if (t === 1) {\n return 1;\n }\n\n if ((t /= 0.5) < 1) {\n return 0.5 * Math.pow(2, 10 * (t - 1));\n }\n\n return 0.5 * (-Math.pow(2, -10 * --t) + 2);\n },\n easeInCirc: function easeInCirc(t) {\n if (t >= 1) {\n return t;\n }\n\n return -(Math.sqrt(1 - t * t) - 1);\n },\n easeOutCirc: function easeOutCirc(t) {\n return Math.sqrt(1 - (t = t - 1) * t);\n },\n easeInOutCirc: function easeInOutCirc(t) {\n if ((t /= 0.5) < 1) {\n return -0.5 * (Math.sqrt(1 - t * t) - 1);\n }\n\n return 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\n },\n easeInElastic: function easeInElastic(t) {\n var s = 1.70158;\n var p = 0;\n var a = 1;\n\n if (t === 0) {\n return 0;\n }\n\n if (t === 1) {\n return 1;\n }\n\n if (!p) {\n p = 0.3;\n }\n\n if (a < 1) {\n a = 1;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(1 / a);\n }\n\n return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));\n },\n easeOutElastic: function easeOutElastic(t) {\n var s = 1.70158;\n var p = 0;\n var a = 1;\n\n if (t === 0) {\n return 0;\n }\n\n if (t === 1) {\n return 1;\n }\n\n if (!p) {\n p = 0.3;\n }\n\n if (a < 1) {\n a = 1;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(1 / a);\n }\n\n return a * Math.pow(2, -10 * t) * Math.sin((t - s) * (2 * Math.PI) / p) + 1;\n },\n easeInOutElastic: function easeInOutElastic(t) {\n var s = 1.70158;\n var p = 0;\n var a = 1;\n\n if (t === 0) {\n return 0;\n }\n\n if ((t /= 0.5) === 2) {\n return 1;\n }\n\n if (!p) {\n p = 0.45;\n }\n\n if (a < 1) {\n a = 1;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(1 / a);\n }\n\n if (t < 1) {\n return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));\n }\n\n return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p) * 0.5 + 1;\n },\n easeInBack: function easeInBack(t) {\n var s = 1.70158;\n return t * t * ((s + 1) * t - s);\n },\n easeOutBack: function easeOutBack(t) {\n var s = 1.70158;\n return (t = t - 1) * t * ((s + 1) * t + s) + 1;\n },\n easeInOutBack: function easeInOutBack(t) {\n var s = 1.70158;\n\n if ((t /= 0.5) < 1) {\n return 0.5 * (t * t * (((s *= 1.525) + 1) * t - s));\n }\n\n return 0.5 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2);\n },\n easeInBounce: function easeInBounce(t) {\n return 1 - effects.easeOutBounce(1 - t);\n },\n easeOutBounce: function easeOutBounce(t) {\n if (t < 1 / 2.75) {\n return 7.5625 * t * t;\n }\n\n if (t < 2 / 2.75) {\n return 7.5625 * (t -= 1.5 / 2.75) * t + 0.75;\n }\n\n if (t < 2.5 / 2.75) {\n return 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375;\n }\n\n return 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375;\n },\n easeInOutBounce: function easeInOutBounce(t) {\n if (t < 0.5) {\n return effects.easeInBounce(t * 2) * 0.5;\n }\n\n return effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5;\n }\n };\n var helpers_easing = {\n effects: effects\n }; // DEPRECATIONS\n\n /**\r\n * Provided for backward compatibility, use Chart.helpers.easing.effects instead.\r\n * @function Chart.helpers.easingEffects\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\n\n helpers_core.easingEffects = effects;\n var PI = Math.PI;\n var RAD_PER_DEG = PI / 180;\n var DOUBLE_PI = PI * 2;\n var HALF_PI = PI / 2;\n var QUARTER_PI = PI / 4;\n var TWO_THIRDS_PI = PI * 2 / 3;\n /**\r\n * @namespace Chart.helpers.canvas\r\n */\n\n var exports$1 = {\n /**\r\n * Clears the entire canvas associated to the given `chart`.\r\n * @param {Chart} chart - The chart for which to clear the canvas.\r\n */\n clear: function clear(chart) {\n chart.ctx.clearRect(0, 0, chart.width, chart.height);\n },\n\n /**\r\n * Creates a \"path\" for a rectangle with rounded corners at position (x, y) with a\r\n * given size (width, height) and the same `radius` for all corners.\r\n * @param {CanvasRenderingContext2D} ctx - The canvas 2D Context.\r\n * @param {number} x - The x axis of the coordinate for the rectangle starting point.\r\n * @param {number} y - The y axis of the coordinate for the rectangle starting point.\r\n * @param {number} width - The rectangle's width.\r\n * @param {number} height - The rectangle's height.\r\n * @param {number} radius - The rounded amount (in pixels) for the four corners.\r\n * @todo handle `radius` as top-left, top-right, bottom-right, bottom-left array/object?\r\n */\n roundedRect: function roundedRect(ctx, x, y, width, height, radius) {\n if (radius) {\n var r = Math.min(radius, height / 2, width / 2);\n var left = x + r;\n var top = y + r;\n var right = x + width - r;\n var bottom = y + height - r;\n ctx.moveTo(x, top);\n\n if (left < right && top < bottom) {\n ctx.arc(left, top, r, -PI, -HALF_PI);\n ctx.arc(right, top, r, -HALF_PI, 0);\n ctx.arc(right, bottom, r, 0, HALF_PI);\n ctx.arc(left, bottom, r, HALF_PI, PI);\n } else if (left < right) {\n ctx.moveTo(left, y);\n ctx.arc(right, top, r, -HALF_PI, HALF_PI);\n ctx.arc(left, top, r, HALF_PI, PI + HALF_PI);\n } else if (top < bottom) {\n ctx.arc(left, top, r, -PI, 0);\n ctx.arc(left, bottom, r, 0, PI);\n } else {\n ctx.arc(left, top, r, -PI, PI);\n }\n\n ctx.closePath();\n ctx.moveTo(x, y);\n } else {\n ctx.rect(x, y, width, height);\n }\n },\n drawPoint: function drawPoint(ctx, style, radius, x, y, rotation) {\n var type, xOffset, yOffset, size, cornerRadius;\n var rad = (rotation || 0) * RAD_PER_DEG;\n\n if (style && _typeof(style) === 'object') {\n type = style.toString();\n\n if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\n ctx.save();\n ctx.translate(x, y);\n ctx.rotate(rad);\n ctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);\n ctx.restore();\n return;\n }\n }\n\n if (isNaN(radius) || radius <= 0) {\n return;\n }\n\n ctx.beginPath();\n\n switch (style) {\n // Default includes circle\n default:\n ctx.arc(x, y, radius, 0, DOUBLE_PI);\n ctx.closePath();\n break;\n\n case 'triangle':\n ctx.moveTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\n rad += TWO_THIRDS_PI;\n ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\n rad += TWO_THIRDS_PI;\n ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\n ctx.closePath();\n break;\n\n case 'rectRounded':\n // NOTE: the rounded rect implementation changed to use `arc` instead of\n // `quadraticCurveTo` since it generates better results when rect is\n // almost a circle. 0.516 (instead of 0.5) produces results with visually\n // closer proportion to the previous impl and it is inscribed in the\n // circle with `radius`. For more details, see the following PRs:\n // https://github.com/chartjs/Chart.js/issues/5597\n // https://github.com/chartjs/Chart.js/issues/5858\n cornerRadius = radius * 0.516;\n size = radius - cornerRadius;\n xOffset = Math.cos(rad + QUARTER_PI) * size;\n yOffset = Math.sin(rad + QUARTER_PI) * size;\n ctx.arc(x - xOffset, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);\n ctx.arc(x + yOffset, y - xOffset, cornerRadius, rad - HALF_PI, rad);\n ctx.arc(x + xOffset, y + yOffset, cornerRadius, rad, rad + HALF_PI);\n ctx.arc(x - yOffset, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);\n ctx.closePath();\n break;\n\n case 'rect':\n if (!rotation) {\n size = Math.SQRT1_2 * radius;\n ctx.rect(x - size, y - size, 2 * size, 2 * size);\n break;\n }\n\n rad += QUARTER_PI;\n\n /* falls through */\n\n case 'rectRot':\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n ctx.moveTo(x - xOffset, y - yOffset);\n ctx.lineTo(x + yOffset, y - xOffset);\n ctx.lineTo(x + xOffset, y + yOffset);\n ctx.lineTo(x - yOffset, y + xOffset);\n ctx.closePath();\n break;\n\n case 'crossRot':\n rad += QUARTER_PI;\n\n /* falls through */\n\n case 'cross':\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n ctx.moveTo(x - xOffset, y - yOffset);\n ctx.lineTo(x + xOffset, y + yOffset);\n ctx.moveTo(x + yOffset, y - xOffset);\n ctx.lineTo(x - yOffset, y + xOffset);\n break;\n\n case 'star':\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n ctx.moveTo(x - xOffset, y - yOffset);\n ctx.lineTo(x + xOffset, y + yOffset);\n ctx.moveTo(x + yOffset, y - xOffset);\n ctx.lineTo(x - yOffset, y + xOffset);\n rad += QUARTER_PI;\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n ctx.moveTo(x - xOffset, y - yOffset);\n ctx.lineTo(x + xOffset, y + yOffset);\n ctx.moveTo(x + yOffset, y - xOffset);\n ctx.lineTo(x - yOffset, y + xOffset);\n break;\n\n case 'line':\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n ctx.moveTo(x - xOffset, y - yOffset);\n ctx.lineTo(x + xOffset, y + yOffset);\n break;\n\n case 'dash':\n ctx.moveTo(x, y);\n ctx.lineTo(x + Math.cos(rad) * radius, y + Math.sin(rad) * radius);\n break;\n }\n\n ctx.fill();\n ctx.stroke();\n },\n\n /**\r\n * Returns true if the point is inside the rectangle\r\n * @param {object} point - The point to test\r\n * @param {object} area - The rectangle\r\n * @returns {boolean}\r\n * @private\r\n */\n _isPointInArea: function _isPointInArea(point, area) {\n var epsilon = 1e-6; // 1e-6 is margin in pixels for accumulated error.\n\n return point.x > area.left - epsilon && point.x < area.right + epsilon && point.y > area.top - epsilon && point.y < area.bottom + epsilon;\n },\n clipArea: function clipArea(ctx, area) {\n ctx.save();\n ctx.beginPath();\n ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);\n ctx.clip();\n },\n unclipArea: function unclipArea(ctx) {\n ctx.restore();\n },\n lineTo: function lineTo(ctx, previous, target, flip) {\n var stepped = target.steppedLine;\n\n if (stepped) {\n if (stepped === 'middle') {\n var midpoint = (previous.x + target.x) / 2.0;\n ctx.lineTo(midpoint, flip ? target.y : previous.y);\n ctx.lineTo(midpoint, flip ? previous.y : target.y);\n } else if (stepped === 'after' && !flip || stepped !== 'after' && flip) {\n ctx.lineTo(previous.x, target.y);\n } else {\n ctx.lineTo(target.x, previous.y);\n }\n\n ctx.lineTo(target.x, target.y);\n return;\n }\n\n if (!target.tension) {\n ctx.lineTo(target.x, target.y);\n return;\n }\n\n ctx.bezierCurveTo(flip ? previous.controlPointPreviousX : previous.controlPointNextX, flip ? previous.controlPointPreviousY : previous.controlPointNextY, flip ? target.controlPointNextX : target.controlPointPreviousX, flip ? target.controlPointNextY : target.controlPointPreviousY, target.x, target.y);\n }\n };\n var helpers_canvas = exports$1; // DEPRECATIONS\n\n /**\r\n * Provided for backward compatibility, use Chart.helpers.canvas.clear instead.\r\n * @namespace Chart.helpers.clear\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\n\n helpers_core.clear = exports$1.clear;\n /**\r\n * Provided for backward compatibility, use Chart.helpers.canvas.roundedRect instead.\r\n * @namespace Chart.helpers.drawRoundedRectangle\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\n\n helpers_core.drawRoundedRectangle = function (ctx) {\n ctx.beginPath();\n exports$1.roundedRect.apply(exports$1, arguments);\n };\n\n var defaults = {\n /**\r\n * @private\r\n */\n _set: function _set(scope, values) {\n return helpers_core.merge(this[scope] || (this[scope] = {}), values);\n }\n }; // TODO(v3): remove 'global' from namespace. all default are global and\n // there's inconsistency around which options are under 'global'\n\n defaults._set('global', {\n defaultColor: 'rgba(0,0,0,0.1)',\n defaultFontColor: '#666',\n defaultFontFamily: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\n defaultFontSize: 12,\n defaultFontStyle: 'normal',\n defaultLineHeight: 1.2,\n showLines: true\n });\n\n var core_defaults = defaults;\n var valueOrDefault = helpers_core.valueOrDefault;\n /**\r\n * Converts the given font object into a CSS font string.\r\n * @param {object} font - A font object.\r\n * @return {string} The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font\r\n * @private\r\n */\n\n function toFontString(font) {\n if (!font || helpers_core.isNullOrUndef(font.size) || helpers_core.isNullOrUndef(font.family)) {\n return null;\n }\n\n return (font.style ? font.style + ' ' : '') + (font.weight ? font.weight + ' ' : '') + font.size + 'px ' + font.family;\n }\n /**\r\n * @alias Chart.helpers.options\r\n * @namespace\r\n */\n\n\n var helpers_options = {\n /**\r\n * Converts the given line height `value` in pixels for a specific font `size`.\r\n * @param {number|string} value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').\r\n * @param {number} size - The font size (in pixels) used to resolve relative `value`.\r\n * @returns {number} The effective line height in pixels (size * 1.2 if value is invalid).\r\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\r\n * @since 2.7.0\r\n */\n toLineHeight: function toLineHeight(value, size) {\n var matches = ('' + value).match(/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/);\n\n if (!matches || matches[1] === 'normal') {\n return size * 1.2;\n }\n\n value = +matches[2];\n\n switch (matches[3]) {\n case 'px':\n return value;\n\n case '%':\n value /= 100;\n break;\n }\n\n return size * value;\n },\n\n /**\r\n * Converts the given value into a padding object with pre-computed width/height.\r\n * @param {number|object} value - If a number, set the value to all TRBL component,\r\n * else, if and object, use defined properties and sets undefined ones to 0.\r\n * @returns {object} The padding values (top, right, bottom, left, width, height)\r\n * @since 2.7.0\r\n */\n toPadding: function toPadding(value) {\n var t, r, b, l;\n\n if (helpers_core.isObject(value)) {\n t = +value.top || 0;\n r = +value.right || 0;\n b = +value.bottom || 0;\n l = +value.left || 0;\n } else {\n t = r = b = l = +value || 0;\n }\n\n return {\n top: t,\n right: r,\n bottom: b,\n left: l,\n height: t + b,\n width: l + r\n };\n },\n\n /**\r\n * Parses font options and returns the font object.\r\n * @param {object} options - A object that contains font options to be parsed.\r\n * @return {object} The font object.\r\n * @todo Support font.* options and renamed to toFont().\r\n * @private\r\n */\n _parseFont: function _parseFont(options) {\n var globalDefaults = core_defaults.global;\n var size = valueOrDefault(options.fontSize, globalDefaults.defaultFontSize);\n var font = {\n family: valueOrDefault(options.fontFamily, globalDefaults.defaultFontFamily),\n lineHeight: helpers_core.options.toLineHeight(valueOrDefault(options.lineHeight, globalDefaults.defaultLineHeight), size),\n size: size,\n style: valueOrDefault(options.fontStyle, globalDefaults.defaultFontStyle),\n weight: null,\n string: ''\n };\n font.string = toFontString(font);\n return font;\n },\n\n /**\r\n * Evaluates the given `inputs` sequentially and returns the first defined value.\r\n * @param {Array} inputs - An array of values, falling back to the last value.\r\n * @param {object} [context] - If defined and the current value is a function, the value\r\n * is called with `context` as first argument and the result becomes the new input.\r\n * @param {number} [index] - If defined and the current value is an array, the value\r\n * at `index` become the new input.\r\n * @param {object} [info] - object to return information about resolution in\r\n * @param {boolean} [info.cacheable] - Will be set to `false` if option is not cacheable.\r\n * @since 2.7.0\r\n */\n resolve: function resolve(inputs, context, index, info) {\n var cacheable = true;\n var i, ilen, value;\n\n for (i = 0, ilen = inputs.length; i < ilen; ++i) {\n value = inputs[i];\n\n if (value === undefined) {\n continue;\n }\n\n if (context !== undefined && typeof value === 'function') {\n value = value(context);\n cacheable = false;\n }\n\n if (index !== undefined && helpers_core.isArray(value)) {\n value = value[index];\n cacheable = false;\n }\n\n if (value !== undefined) {\n if (info && !cacheable) {\n info.cacheable = false;\n }\n\n return value;\n }\n }\n }\n };\n /**\r\n * @alias Chart.helpers.math\r\n * @namespace\r\n */\n\n var exports$2 = {\n /**\r\n * Returns an array of factors sorted from 1 to sqrt(value)\r\n * @private\r\n */\n _factorize: function _factorize(value) {\n var result = [];\n var sqrt = Math.sqrt(value);\n var i;\n\n for (i = 1; i < sqrt; i++) {\n if (value % i === 0) {\n result.push(i);\n result.push(value / i);\n }\n }\n\n if (sqrt === (sqrt | 0)) {\n // if value is a square number\n result.push(sqrt);\n }\n\n result.sort(function (a, b) {\n return a - b;\n }).pop();\n return result;\n },\n log10: Math.log10 || function (x) {\n var exponent = Math.log(x) * Math.LOG10E; // Math.LOG10E = 1 / Math.LN10.\n // Check for whole powers of 10,\n // which due to floating point rounding error should be corrected.\n\n var powerOf10 = Math.round(exponent);\n var isPowerOf10 = x === Math.pow(10, powerOf10);\n return isPowerOf10 ? powerOf10 : exponent;\n }\n };\n var helpers_math = exports$2; // DEPRECATIONS\n\n /**\r\n * Provided for backward compatibility, use Chart.helpers.math.log10 instead.\r\n * @namespace Chart.helpers.log10\r\n * @deprecated since version 2.9.0\r\n * @todo remove at version 3\r\n * @private\r\n */\n\n helpers_core.log10 = exports$2.log10;\n\n var getRtlAdapter = function getRtlAdapter(rectX, width) {\n return {\n x: function x(_x2) {\n return rectX + rectX + width - _x2;\n },\n setWidth: function setWidth(w) {\n width = w;\n },\n textAlign: function textAlign(align) {\n if (align === 'center') {\n return align;\n }\n\n return align === 'right' ? 'left' : 'right';\n },\n xPlus: function xPlus(x, value) {\n return x - value;\n },\n leftForLtr: function leftForLtr(x, itemWidth) {\n return x - itemWidth;\n }\n };\n };\n\n var getLtrAdapter = function getLtrAdapter() {\n return {\n x: function x(_x3) {\n return _x3;\n },\n setWidth: function setWidth(w) {// eslint-disable-line no-unused-vars\n },\n textAlign: function textAlign(align) {\n return align;\n },\n xPlus: function xPlus(x, value) {\n return x + value;\n },\n leftForLtr: function leftForLtr(x, _itemWidth) {\n // eslint-disable-line no-unused-vars\n return x;\n }\n };\n };\n\n var getAdapter = function getAdapter(rtl, rectX, width) {\n return rtl ? getRtlAdapter(rectX, width) : getLtrAdapter();\n };\n\n var overrideTextDirection = function overrideTextDirection(ctx, direction) {\n var style, original;\n\n if (direction === 'ltr' || direction === 'rtl') {\n style = ctx.canvas.style;\n original = [style.getPropertyValue('direction'), style.getPropertyPriority('direction')];\n style.setProperty('direction', direction, 'important');\n ctx.prevTextDirection = original;\n }\n };\n\n var restoreTextDirection = function restoreTextDirection(ctx) {\n var original = ctx.prevTextDirection;\n\n if (original !== undefined) {\n delete ctx.prevTextDirection;\n ctx.canvas.style.setProperty('direction', original[0], original[1]);\n }\n };\n\n var helpers_rtl = {\n getRtlAdapter: getAdapter,\n overrideTextDirection: overrideTextDirection,\n restoreTextDirection: restoreTextDirection\n };\n var helpers$1 = helpers_core;\n var easing = helpers_easing;\n var canvas = helpers_canvas;\n var options = helpers_options;\n var math = helpers_math;\n var rtl = helpers_rtl;\n helpers$1.easing = easing;\n helpers$1.canvas = canvas;\n helpers$1.options = options;\n helpers$1.math = math;\n helpers$1.rtl = rtl;\n\n function interpolate(start, view, model, ease) {\n var keys = Object.keys(model);\n var i, ilen, key, actual, origin, target, type, c0, c1;\n\n for (i = 0, ilen = keys.length; i < ilen; ++i) {\n key = keys[i];\n target = model[key]; // if a value is added to the model after pivot() has been called, the view\n // doesn't contain it, so let's initialize the view to the target value.\n\n if (!view.hasOwnProperty(key)) {\n view[key] = target;\n }\n\n actual = view[key];\n\n if (actual === target || key[0] === '_') {\n continue;\n }\n\n if (!start.hasOwnProperty(key)) {\n start[key] = actual;\n }\n\n origin = start[key];\n type = _typeof(target);\n\n if (type === _typeof(origin)) {\n if (type === 'string') {\n c0 = chartjsColor(origin);\n\n if (c0.valid) {\n c1 = chartjsColor(target);\n\n if (c1.valid) {\n view[key] = c1.mix(c0, ease).rgbString();\n continue;\n }\n }\n } else if (helpers$1.isFinite(origin) && helpers$1.isFinite(target)) {\n view[key] = origin + (target - origin) * ease;\n continue;\n }\n }\n\n view[key] = target;\n }\n }\n\n var Element = function Element(configuration) {\n helpers$1.extend(this, configuration);\n this.initialize.apply(this, arguments);\n };\n\n helpers$1.extend(Element.prototype, {\n _type: undefined,\n initialize: function initialize() {\n this.hidden = false;\n },\n pivot: function pivot() {\n var me = this;\n\n if (!me._view) {\n me._view = helpers$1.extend({}, me._model);\n }\n\n me._start = {};\n return me;\n },\n transition: function transition(ease) {\n var me = this;\n var model = me._model;\n var start = me._start;\n var view = me._view; // No animation -> No Transition\n\n if (!model || ease === 1) {\n me._view = helpers$1.extend({}, model);\n me._start = null;\n return me;\n }\n\n if (!view) {\n view = me._view = {};\n }\n\n if (!start) {\n start = me._start = {};\n }\n\n interpolate(start, view, model, ease);\n return me;\n },\n tooltipPosition: function tooltipPosition() {\n return {\n x: this._model.x,\n y: this._model.y\n };\n },\n hasValue: function hasValue() {\n return helpers$1.isNumber(this._model.x) && helpers$1.isNumber(this._model.y);\n }\n });\n Element.extend = helpers$1.inherits;\n var core_element = Element;\n var exports$3 = core_element.extend({\n chart: null,\n // the animation associated chart instance\n currentStep: 0,\n // the current animation step\n numSteps: 60,\n // default number of steps\n easing: '',\n // the easing to use for this animation\n render: null,\n // render function used by the animation service\n onAnimationProgress: null,\n // user specified callback to fire on each step of the animation\n onAnimationComplete: null // user specified callback to fire when the animation finishes\n\n });\n var core_animation = exports$3; // DEPRECATIONS\n\n /**\r\n * Provided for backward compatibility, use Chart.Animation instead\r\n * @prop Chart.Animation#animationObject\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n */\n\n Object.defineProperty(exports$3.prototype, 'animationObject', {\n get: function get() {\n return this;\n }\n });\n /**\r\n * Provided for backward compatibility, use Chart.Animation#chart instead\r\n * @prop Chart.Animation#chartInstance\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n */\n\n Object.defineProperty(exports$3.prototype, 'chartInstance', {\n get: function get() {\n return this.chart;\n },\n set: function set(value) {\n this.chart = value;\n }\n });\n\n core_defaults._set('global', {\n animation: {\n duration: 1000,\n easing: 'easeOutQuart',\n onProgress: helpers$1.noop,\n onComplete: helpers$1.noop\n }\n });\n\n var core_animations = {\n animations: [],\n request: null,\n\n /**\r\n * @param {Chart} chart - The chart to animate.\r\n * @param {Chart.Animation} animation - The animation that we will animate.\r\n * @param {number} duration - The animation duration in ms.\r\n * @param {boolean} lazy - if true, the chart is not marked as animating to enable more responsive interactions\r\n */\n addAnimation: function addAnimation(chart, animation, duration, lazy) {\n var animations = this.animations;\n var i, ilen;\n animation.chart = chart;\n animation.startTime = Date.now();\n animation.duration = duration;\n\n if (!lazy) {\n chart.animating = true;\n }\n\n for (i = 0, ilen = animations.length; i < ilen; ++i) {\n if (animations[i].chart === chart) {\n animations[i] = animation;\n return;\n }\n }\n\n animations.push(animation); // If there are no animations queued, manually kickstart a digest, for lack of a better word\n\n if (animations.length === 1) {\n this.requestAnimationFrame();\n }\n },\n cancelAnimation: function cancelAnimation(chart) {\n var index = helpers$1.findIndex(this.animations, function (animation) {\n return animation.chart === chart;\n });\n\n if (index !== -1) {\n this.animations.splice(index, 1);\n chart.animating = false;\n }\n },\n requestAnimationFrame: function requestAnimationFrame() {\n var me = this;\n\n if (me.request === null) {\n // Skip animation frame requests until the active one is executed.\n // This can happen when processing mouse events, e.g. 'mousemove'\n // and 'mouseout' events will trigger multiple renders.\n me.request = helpers$1.requestAnimFrame.call(window, function () {\n me.request = null;\n me.startDigest();\n });\n }\n },\n\n /**\r\n * @private\r\n */\n startDigest: function startDigest() {\n var me = this;\n me.advance(); // Do we have more stuff to animate?\n\n if (me.animations.length > 0) {\n me.requestAnimationFrame();\n }\n },\n\n /**\r\n * @private\r\n */\n advance: function advance() {\n var animations = this.animations;\n var animation, chart, numSteps, nextStep;\n var i = 0; // 1 animation per chart, so we are looping charts here\n\n while (i < animations.length) {\n animation = animations[i];\n chart = animation.chart;\n numSteps = animation.numSteps; // Make sure that currentStep starts at 1\n // https://github.com/chartjs/Chart.js/issues/6104\n\n nextStep = Math.floor((Date.now() - animation.startTime) / animation.duration * numSteps) + 1;\n animation.currentStep = Math.min(nextStep, numSteps);\n helpers$1.callback(animation.render, [chart, animation], chart);\n helpers$1.callback(animation.onAnimationProgress, [animation], chart);\n\n if (animation.currentStep >= numSteps) {\n helpers$1.callback(animation.onAnimationComplete, [animation], chart);\n chart.animating = false;\n animations.splice(i, 1);\n } else {\n ++i;\n }\n }\n }\n };\n var resolve = helpers$1.options.resolve;\n var arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];\n /**\r\n * Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice',\r\n * 'unshift') and notify the listener AFTER the array has been altered. Listeners are\r\n * called on the 'onData*' callbacks (e.g. onDataPush, etc.) with same arguments.\r\n */\n\n function listenArrayEvents(array, listener) {\n if (array._chartjs) {\n array._chartjs.listeners.push(listener);\n\n return;\n }\n\n Object.defineProperty(array, '_chartjs', {\n configurable: true,\n enumerable: false,\n value: {\n listeners: [listener]\n }\n });\n arrayEvents.forEach(function (key) {\n var method = 'onData' + key.charAt(0).toUpperCase() + key.slice(1);\n var base = array[key];\n Object.defineProperty(array, key, {\n configurable: true,\n enumerable: false,\n value: function value() {\n var args = Array.prototype.slice.call(arguments);\n var res = base.apply(this, args);\n helpers$1.each(array._chartjs.listeners, function (object) {\n if (typeof object[method] === 'function') {\n object[method].apply(object, args);\n }\n });\n return res;\n }\n });\n });\n }\n /**\r\n * Removes the given array event listener and cleanup extra attached properties (such as\r\n * the _chartjs stub and overridden methods) if array doesn't have any more listeners.\r\n */\n\n\n function unlistenArrayEvents(array, listener) {\n var stub = array._chartjs;\n\n if (!stub) {\n return;\n }\n\n var listeners = stub.listeners;\n var index = listeners.indexOf(listener);\n\n if (index !== -1) {\n listeners.splice(index, 1);\n }\n\n if (listeners.length > 0) {\n return;\n }\n\n arrayEvents.forEach(function (key) {\n delete array[key];\n });\n delete array._chartjs;\n } // Base class for all dataset controllers (line, bar, etc)\n\n\n var DatasetController = function DatasetController(chart, datasetIndex) {\n this.initialize(chart, datasetIndex);\n };\n\n helpers$1.extend(DatasetController.prototype, {\n /**\r\n * Element type used to generate a meta dataset (e.g. Chart.element.Line).\r\n * @type {Chart.core.element}\r\n */\n datasetElementType: null,\n\n /**\r\n * Element type used to generate a meta data (e.g. Chart.element.Point).\r\n * @type {Chart.core.element}\r\n */\n dataElementType: null,\n\n /**\r\n * Dataset element option keys to be resolved in _resolveDatasetElementOptions.\r\n * A derived controller may override this to resolve controller-specific options.\r\n * The keys defined here are for backward compatibility for legend styles.\r\n * @private\r\n */\n _datasetElementOptions: ['backgroundColor', 'borderCapStyle', 'borderColor', 'borderDash', 'borderDashOffset', 'borderJoinStyle', 'borderWidth'],\n\n /**\r\n * Data element option keys to be resolved in _resolveDataElementOptions.\r\n * A derived controller may override this to resolve controller-specific options.\r\n * The keys defined here are for backward compatibility for legend styles.\r\n * @private\r\n */\n _dataElementOptions: ['backgroundColor', 'borderColor', 'borderWidth', 'pointStyle'],\n initialize: function initialize(chart, datasetIndex) {\n var me = this;\n me.chart = chart;\n me.index = datasetIndex;\n me.linkScales();\n me.addElements();\n me._type = me.getMeta().type;\n },\n updateIndex: function updateIndex(datasetIndex) {\n this.index = datasetIndex;\n },\n linkScales: function linkScales() {\n var me = this;\n var meta = me.getMeta();\n var chart = me.chart;\n var scales = chart.scales;\n var dataset = me.getDataset();\n var scalesOpts = chart.options.scales;\n\n if (meta.xAxisID === null || !(meta.xAxisID in scales) || dataset.xAxisID) {\n meta.xAxisID = dataset.xAxisID || scalesOpts.xAxes[0].id;\n }\n\n if (meta.yAxisID === null || !(meta.yAxisID in scales) || dataset.yAxisID) {\n meta.yAxisID = dataset.yAxisID || scalesOpts.yAxes[0].id;\n }\n },\n getDataset: function getDataset() {\n return this.chart.data.datasets[this.index];\n },\n getMeta: function getMeta() {\n return this.chart.getDatasetMeta(this.index);\n },\n getScaleForId: function getScaleForId(scaleID) {\n return this.chart.scales[scaleID];\n },\n\n /**\r\n * @private\r\n */\n _getValueScaleId: function _getValueScaleId() {\n return this.getMeta().yAxisID;\n },\n\n /**\r\n * @private\r\n */\n _getIndexScaleId: function _getIndexScaleId() {\n return this.getMeta().xAxisID;\n },\n\n /**\r\n * @private\r\n */\n _getValueScale: function _getValueScale() {\n return this.getScaleForId(this._getValueScaleId());\n },\n\n /**\r\n * @private\r\n */\n _getIndexScale: function _getIndexScale() {\n return this.getScaleForId(this._getIndexScaleId());\n },\n reset: function reset() {\n this._update(true);\n },\n\n /**\r\n * @private\r\n */\n destroy: function destroy() {\n if (this._data) {\n unlistenArrayEvents(this._data, this);\n }\n },\n createMetaDataset: function createMetaDataset() {\n var me = this;\n var type = me.datasetElementType;\n return type && new type({\n _chart: me.chart,\n _datasetIndex: me.index\n });\n },\n createMetaData: function createMetaData(index) {\n var me = this;\n var type = me.dataElementType;\n return type && new type({\n _chart: me.chart,\n _datasetIndex: me.index,\n _index: index\n });\n },\n addElements: function addElements() {\n var me = this;\n var meta = me.getMeta();\n var data = me.getDataset().data || [];\n var metaData = meta.data;\n var i, ilen;\n\n for (i = 0, ilen = data.length; i < ilen; ++i) {\n metaData[i] = metaData[i] || me.createMetaData(i);\n }\n\n meta.dataset = meta.dataset || me.createMetaDataset();\n },\n addElementAndReset: function addElementAndReset(index) {\n var element = this.createMetaData(index);\n this.getMeta().data.splice(index, 0, element);\n this.updateElement(element, index, true);\n },\n buildOrUpdateElements: function buildOrUpdateElements() {\n var me = this;\n var dataset = me.getDataset();\n var data = dataset.data || (dataset.data = []); // In order to correctly handle data addition/deletion animation (an thus simulate\n // real-time charts), we need to monitor these data modifications and synchronize\n // the internal meta data accordingly.\n\n if (me._data !== data) {\n if (me._data) {\n // This case happens when the user replaced the data array instance.\n unlistenArrayEvents(me._data, me);\n }\n\n if (data && Object.isExtensible(data)) {\n listenArrayEvents(data, me);\n }\n\n me._data = data;\n } // Re-sync meta data in case the user replaced the data array or if we missed\n // any updates and so make sure that we handle number of datapoints changing.\n\n\n me.resyncElements();\n },\n\n /**\r\n * Returns the merged user-supplied and default dataset-level options\r\n * @private\r\n */\n _configure: function _configure() {\n var me = this;\n me._config = helpers$1.merge(Object.create(null), [me.chart.options.datasets[me._type], me.getDataset()], {\n merger: function merger(key, target, source) {\n if (key !== '_meta' && key !== 'data') {\n helpers$1._merger(key, target, source);\n }\n }\n });\n },\n _update: function _update(reset) {\n var me = this;\n\n me._configure();\n\n me._cachedDataOpts = null;\n me.update(reset);\n },\n update: helpers$1.noop,\n transition: function transition(easingValue) {\n var meta = this.getMeta();\n var elements = meta.data || [];\n var ilen = elements.length;\n var i = 0;\n\n for (; i < ilen; ++i) {\n elements[i].transition(easingValue);\n }\n\n if (meta.dataset) {\n meta.dataset.transition(easingValue);\n }\n },\n draw: function draw() {\n var meta = this.getMeta();\n var elements = meta.data || [];\n var ilen = elements.length;\n var i = 0;\n\n if (meta.dataset) {\n meta.dataset.draw();\n }\n\n for (; i < ilen; ++i) {\n elements[i].draw();\n }\n },\n\n /**\r\n * Returns a set of predefined style properties that should be used to represent the dataset\r\n * or the data if the index is specified\r\n * @param {number} index - data index\r\n * @return {IStyleInterface} style object\r\n */\n getStyle: function getStyle(index) {\n var me = this;\n var meta = me.getMeta();\n var dataset = meta.dataset;\n var style;\n\n me._configure();\n\n if (dataset && index === undefined) {\n style = me._resolveDatasetElementOptions(dataset || {});\n } else {\n index = index || 0;\n style = me._resolveDataElementOptions(meta.data[index] || {}, index);\n }\n\n if (style.fill === false || style.fill === null) {\n style.backgroundColor = style.borderColor;\n }\n\n return style;\n },\n\n /**\r\n * @private\r\n */\n _resolveDatasetElementOptions: function _resolveDatasetElementOptions(element, hover) {\n var me = this;\n var chart = me.chart;\n var datasetOpts = me._config;\n var custom = element.custom || {};\n var options = chart.options.elements[me.datasetElementType.prototype._type] || {};\n var elementOptions = me._datasetElementOptions;\n var values = {};\n var i, ilen, key, readKey; // Scriptable options\n\n var context = {\n chart: chart,\n dataset: me.getDataset(),\n datasetIndex: me.index,\n hover: hover\n };\n\n for (i = 0, ilen = elementOptions.length; i < ilen; ++i) {\n key = elementOptions[i];\n readKey = hover ? 'hover' + key.charAt(0).toUpperCase() + key.slice(1) : key;\n values[key] = resolve([custom[readKey], datasetOpts[readKey], options[readKey]], context);\n }\n\n return values;\n },\n\n /**\r\n * @private\r\n */\n _resolveDataElementOptions: function _resolveDataElementOptions(element, index) {\n var me = this;\n var custom = element && element.custom;\n var cached = me._cachedDataOpts;\n\n if (cached && !custom) {\n return cached;\n }\n\n var chart = me.chart;\n var datasetOpts = me._config;\n var options = chart.options.elements[me.dataElementType.prototype._type] || {};\n var elementOptions = me._dataElementOptions;\n var values = {}; // Scriptable options\n\n var context = {\n chart: chart,\n dataIndex: index,\n dataset: me.getDataset(),\n datasetIndex: me.index\n }; // `resolve` sets cacheable to `false` if any option is indexed or scripted\n\n var info = {\n cacheable: !custom\n };\n var keys, i, ilen, key;\n custom = custom || {};\n\n if (helpers$1.isArray(elementOptions)) {\n for (i = 0, ilen = elementOptions.length; i < ilen; ++i) {\n key = elementOptions[i];\n values[key] = resolve([custom[key], datasetOpts[key], options[key]], context, index, info);\n }\n } else {\n keys = Object.keys(elementOptions);\n\n for (i = 0, ilen = keys.length; i < ilen; ++i) {\n key = keys[i];\n values[key] = resolve([custom[key], datasetOpts[elementOptions[key]], datasetOpts[key], options[key]], context, index, info);\n }\n }\n\n if (info.cacheable) {\n me._cachedDataOpts = Object.freeze(values);\n }\n\n return values;\n },\n removeHoverStyle: function removeHoverStyle(element) {\n helpers$1.merge(element._model, element.$previousStyle || {});\n delete element.$previousStyle;\n },\n setHoverStyle: function setHoverStyle(element) {\n var dataset = this.chart.data.datasets[element._datasetIndex];\n var index = element._index;\n var custom = element.custom || {};\n var model = element._model;\n var getHoverColor = helpers$1.getHoverColor;\n element.$previousStyle = {\n backgroundColor: model.backgroundColor,\n borderColor: model.borderColor,\n borderWidth: model.borderWidth\n };\n model.backgroundColor = resolve([custom.hoverBackgroundColor, dataset.hoverBackgroundColor, getHoverColor(model.backgroundColor)], undefined, index);\n model.borderColor = resolve([custom.hoverBorderColor, dataset.hoverBorderColor, getHoverColor(model.borderColor)], undefined, index);\n model.borderWidth = resolve([custom.hoverBorderWidth, dataset.hoverBorderWidth, model.borderWidth], undefined, index);\n },\n\n /**\r\n * @private\r\n */\n _removeDatasetHoverStyle: function _removeDatasetHoverStyle() {\n var element = this.getMeta().dataset;\n\n if (element) {\n this.removeHoverStyle(element);\n }\n },\n\n /**\r\n * @private\r\n */\n _setDatasetHoverStyle: function _setDatasetHoverStyle() {\n var element = this.getMeta().dataset;\n var prev = {};\n var i, ilen, key, keys, hoverOptions, model;\n\n if (!element) {\n return;\n }\n\n model = element._model;\n hoverOptions = this._resolveDatasetElementOptions(element, true);\n keys = Object.keys(hoverOptions);\n\n for (i = 0, ilen = keys.length; i < ilen; ++i) {\n key = keys[i];\n prev[key] = model[key];\n model[key] = hoverOptions[key];\n }\n\n element.$previousStyle = prev;\n },\n\n /**\r\n * @private\r\n */\n resyncElements: function resyncElements() {\n var me = this;\n var meta = me.getMeta();\n var data = me.getDataset().data;\n var numMeta = meta.data.length;\n var numData = data.length;\n\n if (numData < numMeta) {\n meta.data.splice(numData, numMeta - numData);\n } else if (numData > numMeta) {\n me.insertElements(numMeta, numData - numMeta);\n }\n },\n\n /**\r\n * @private\r\n */\n insertElements: function insertElements(start, count) {\n for (var i = 0; i < count; ++i) {\n this.addElementAndReset(start + i);\n }\n },\n\n /**\r\n * @private\r\n */\n onDataPush: function onDataPush() {\n var count = arguments.length;\n this.insertElements(this.getDataset().data.length - count, count);\n },\n\n /**\r\n * @private\r\n */\n onDataPop: function onDataPop() {\n this.getMeta().data.pop();\n },\n\n /**\r\n * @private\r\n */\n onDataShift: function onDataShift() {\n this.getMeta().data.shift();\n },\n\n /**\r\n * @private\r\n */\n onDataSplice: function onDataSplice(start, count) {\n this.getMeta().data.splice(start, count);\n this.insertElements(start, arguments.length - 2);\n },\n\n /**\r\n * @private\r\n */\n onDataUnshift: function onDataUnshift() {\n this.insertElements(0, arguments.length);\n }\n });\n DatasetController.extend = helpers$1.inherits;\n var core_datasetController = DatasetController;\n var TAU = Math.PI * 2;\n\n core_defaults._set('global', {\n elements: {\n arc: {\n backgroundColor: core_defaults.global.defaultColor,\n borderColor: '#fff',\n borderWidth: 2,\n borderAlign: 'center'\n }\n }\n });\n\n function clipArc(ctx, arc) {\n var startAngle = arc.startAngle;\n var endAngle = arc.endAngle;\n var pixelMargin = arc.pixelMargin;\n var angleMargin = pixelMargin / arc.outerRadius;\n var x = arc.x;\n var y = arc.y; // Draw an inner border by cliping the arc and drawing a double-width border\n // Enlarge the clipping arc by 0.33 pixels to eliminate glitches between borders\n\n ctx.beginPath();\n ctx.arc(x, y, arc.outerRadius, startAngle - angleMargin, endAngle + angleMargin);\n\n if (arc.innerRadius > pixelMargin) {\n angleMargin = pixelMargin / arc.innerRadius;\n ctx.arc(x, y, arc.innerRadius - pixelMargin, endAngle + angleMargin, startAngle - angleMargin, true);\n } else {\n ctx.arc(x, y, pixelMargin, endAngle + Math.PI / 2, startAngle - Math.PI / 2);\n }\n\n ctx.closePath();\n ctx.clip();\n }\n\n function drawFullCircleBorders(ctx, vm, arc, inner) {\n var endAngle = arc.endAngle;\n var i;\n\n if (inner) {\n arc.endAngle = arc.startAngle + TAU;\n clipArc(ctx, arc);\n arc.endAngle = endAngle;\n\n if (arc.endAngle === arc.startAngle && arc.fullCircles) {\n arc.endAngle += TAU;\n arc.fullCircles--;\n }\n }\n\n ctx.beginPath();\n ctx.arc(arc.x, arc.y, arc.innerRadius, arc.startAngle + TAU, arc.startAngle, true);\n\n for (i = 0; i < arc.fullCircles; ++i) {\n ctx.stroke();\n }\n\n ctx.beginPath();\n ctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.startAngle + TAU);\n\n for (i = 0; i < arc.fullCircles; ++i) {\n ctx.stroke();\n }\n }\n\n function drawBorder(ctx, vm, arc) {\n var inner = vm.borderAlign === 'inner';\n\n if (inner) {\n ctx.lineWidth = vm.borderWidth * 2;\n ctx.lineJoin = 'round';\n } else {\n ctx.lineWidth = vm.borderWidth;\n ctx.lineJoin = 'bevel';\n }\n\n if (arc.fullCircles) {\n drawFullCircleBorders(ctx, vm, arc, inner);\n }\n\n if (inner) {\n clipArc(ctx, arc);\n }\n\n ctx.beginPath();\n ctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.endAngle);\n ctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\n ctx.closePath();\n ctx.stroke();\n }\n\n var element_arc = core_element.extend({\n _type: 'arc',\n inLabelRange: function inLabelRange(mouseX) {\n var vm = this._view;\n\n if (vm) {\n return Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hoverRadius, 2);\n }\n\n return false;\n },\n inRange: function inRange(chartX, chartY) {\n var vm = this._view;\n\n if (vm) {\n var pointRelativePosition = helpers$1.getAngleFromPoint(vm, {\n x: chartX,\n y: chartY\n });\n var angle = pointRelativePosition.angle;\n var distance = pointRelativePosition.distance; // Sanitise angle range\n\n var startAngle = vm.startAngle;\n var endAngle = vm.endAngle;\n\n while (endAngle < startAngle) {\n endAngle += TAU;\n }\n\n while (angle > endAngle) {\n angle -= TAU;\n }\n\n while (angle < startAngle) {\n angle += TAU;\n } // Check if within the range of the open/close angle\n\n\n var betweenAngles = angle >= startAngle && angle <= endAngle;\n var withinRadius = distance >= vm.innerRadius && distance <= vm.outerRadius;\n return betweenAngles && withinRadius;\n }\n\n return false;\n },\n getCenterPoint: function getCenterPoint() {\n var vm = this._view;\n var halfAngle = (vm.startAngle + vm.endAngle) / 2;\n var halfRadius = (vm.innerRadius + vm.outerRadius) / 2;\n return {\n x: vm.x + Math.cos(halfAngle) * halfRadius,\n y: vm.y + Math.sin(halfAngle) * halfRadius\n };\n },\n getArea: function getArea() {\n var vm = this._view;\n return Math.PI * ((vm.endAngle - vm.startAngle) / (2 * Math.PI)) * (Math.pow(vm.outerRadius, 2) - Math.pow(vm.innerRadius, 2));\n },\n tooltipPosition: function tooltipPosition() {\n var vm = this._view;\n var centreAngle = vm.startAngle + (vm.endAngle - vm.startAngle) / 2;\n var rangeFromCentre = (vm.outerRadius - vm.innerRadius) / 2 + vm.innerRadius;\n return {\n x: vm.x + Math.cos(centreAngle) * rangeFromCentre,\n y: vm.y + Math.sin(centreAngle) * rangeFromCentre\n };\n },\n draw: function draw() {\n var ctx = this._chart.ctx;\n var vm = this._view;\n var pixelMargin = vm.borderAlign === 'inner' ? 0.33 : 0;\n var arc = {\n x: vm.x,\n y: vm.y,\n innerRadius: vm.innerRadius,\n outerRadius: Math.max(vm.outerRadius - pixelMargin, 0),\n pixelMargin: pixelMargin,\n startAngle: vm.startAngle,\n endAngle: vm.endAngle,\n fullCircles: Math.floor(vm.circumference / TAU)\n };\n var i;\n ctx.save();\n ctx.fillStyle = vm.backgroundColor;\n ctx.strokeStyle = vm.borderColor;\n\n if (arc.fullCircles) {\n arc.endAngle = arc.startAngle + TAU;\n ctx.beginPath();\n ctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle);\n ctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\n ctx.closePath();\n\n for (i = 0; i < arc.fullCircles; ++i) {\n ctx.fill();\n }\n\n arc.endAngle = arc.startAngle + vm.circumference % TAU;\n }\n\n ctx.beginPath();\n ctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle);\n ctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\n ctx.closePath();\n ctx.fill();\n\n if (vm.borderWidth) {\n drawBorder(ctx, vm, arc);\n }\n\n ctx.restore();\n }\n });\n var valueOrDefault$1 = helpers$1.valueOrDefault;\n var defaultColor = core_defaults.global.defaultColor;\n\n core_defaults._set('global', {\n elements: {\n line: {\n tension: 0.4,\n backgroundColor: defaultColor,\n borderWidth: 3,\n borderColor: defaultColor,\n borderCapStyle: 'butt',\n borderDash: [],\n borderDashOffset: 0.0,\n borderJoinStyle: 'miter',\n capBezierPoints: true,\n fill: true // do we fill in the area between the line and its base axis\n\n }\n }\n });\n\n var element_line = core_element.extend({\n _type: 'line',\n draw: function draw() {\n var me = this;\n var vm = me._view;\n var ctx = me._chart.ctx;\n var spanGaps = vm.spanGaps;\n\n var points = me._children.slice(); // clone array\n\n\n var globalDefaults = core_defaults.global;\n var globalOptionLineElements = globalDefaults.elements.line;\n var lastDrawnIndex = -1;\n var closePath = me._loop;\n var index, previous, currentVM;\n\n if (!points.length) {\n return;\n }\n\n if (me._loop) {\n for (index = 0; index < points.length; ++index) {\n previous = helpers$1.previousItem(points, index); // If the line has an open path, shift the point array\n\n if (!points[index]._view.skip && previous._view.skip) {\n points = points.slice(index).concat(points.slice(0, index));\n closePath = spanGaps;\n break;\n }\n } // If the line has a close path, add the first point again\n\n\n if (closePath) {\n points.push(points[0]);\n }\n }\n\n ctx.save(); // Stroke Line Options\n\n ctx.lineCap = vm.borderCapStyle || globalOptionLineElements.borderCapStyle; // IE 9 and 10 do not support line dash\n\n if (ctx.setLineDash) {\n ctx.setLineDash(vm.borderDash || globalOptionLineElements.borderDash);\n }\n\n ctx.lineDashOffset = valueOrDefault$1(vm.borderDashOffset, globalOptionLineElements.borderDashOffset);\n ctx.lineJoin = vm.borderJoinStyle || globalOptionLineElements.borderJoinStyle;\n ctx.lineWidth = valueOrDefault$1(vm.borderWidth, globalOptionLineElements.borderWidth);\n ctx.strokeStyle = vm.borderColor || globalDefaults.defaultColor; // Stroke Line\n\n ctx.beginPath(); // First point moves to it's starting position no matter what\n\n currentVM = points[0]._view;\n\n if (!currentVM.skip) {\n ctx.moveTo(currentVM.x, currentVM.y);\n lastDrawnIndex = 0;\n }\n\n for (index = 1; index < points.length; ++index) {\n currentVM = points[index]._view;\n previous = lastDrawnIndex === -1 ? helpers$1.previousItem(points, index) : points[lastDrawnIndex];\n\n if (!currentVM.skip) {\n if (lastDrawnIndex !== index - 1 && !spanGaps || lastDrawnIndex === -1) {\n // There was a gap and this is the first point after the gap\n ctx.moveTo(currentVM.x, currentVM.y);\n } else {\n // Line to next point\n helpers$1.canvas.lineTo(ctx, previous._view, currentVM);\n }\n\n lastDrawnIndex = index;\n }\n }\n\n if (closePath) {\n ctx.closePath();\n }\n\n ctx.stroke();\n ctx.restore();\n }\n });\n var valueOrDefault$2 = helpers$1.valueOrDefault;\n var defaultColor$1 = core_defaults.global.defaultColor;\n\n core_defaults._set('global', {\n elements: {\n point: {\n radius: 3,\n pointStyle: 'circle',\n backgroundColor: defaultColor$1,\n borderColor: defaultColor$1,\n borderWidth: 1,\n // Hover\n hitRadius: 1,\n hoverRadius: 4,\n hoverBorderWidth: 1\n }\n }\n });\n\n function xRange(mouseX) {\n var vm = this._view;\n return vm ? Math.abs(mouseX - vm.x) < vm.radius + vm.hitRadius : false;\n }\n\n function yRange(mouseY) {\n var vm = this._view;\n return vm ? Math.abs(mouseY - vm.y) < vm.radius + vm.hitRadius : false;\n }\n\n var element_point = core_element.extend({\n _type: 'point',\n inRange: function inRange(mouseX, mouseY) {\n var vm = this._view;\n return vm ? Math.pow(mouseX - vm.x, 2) + Math.pow(mouseY - vm.y, 2) < Math.pow(vm.hitRadius + vm.radius, 2) : false;\n },\n inLabelRange: xRange,\n inXRange: xRange,\n inYRange: yRange,\n getCenterPoint: function getCenterPoint() {\n var vm = this._view;\n return {\n x: vm.x,\n y: vm.y\n };\n },\n getArea: function getArea() {\n return Math.PI * Math.pow(this._view.radius, 2);\n },\n tooltipPosition: function tooltipPosition() {\n var vm = this._view;\n return {\n x: vm.x,\n y: vm.y,\n padding: vm.radius + vm.borderWidth\n };\n },\n draw: function draw(chartArea) {\n var vm = this._view;\n var ctx = this._chart.ctx;\n var pointStyle = vm.pointStyle;\n var rotation = vm.rotation;\n var radius = vm.radius;\n var x = vm.x;\n var y = vm.y;\n var globalDefaults = core_defaults.global;\n var defaultColor = globalDefaults.defaultColor; // eslint-disable-line no-shadow\n\n if (vm.skip) {\n return;\n } // Clipping for Points.\n\n\n if (chartArea === undefined || helpers$1.canvas._isPointInArea(vm, chartArea)) {\n ctx.strokeStyle = vm.borderColor || defaultColor;\n ctx.lineWidth = valueOrDefault$2(vm.borderWidth, globalDefaults.elements.point.borderWidth);\n ctx.fillStyle = vm.backgroundColor || defaultColor;\n helpers$1.canvas.drawPoint(ctx, pointStyle, radius, x, y, rotation);\n }\n }\n });\n var defaultColor$2 = core_defaults.global.defaultColor;\n\n core_defaults._set('global', {\n elements: {\n rectangle: {\n backgroundColor: defaultColor$2,\n borderColor: defaultColor$2,\n borderSkipped: 'bottom',\n borderWidth: 0\n }\n }\n });\n\n function isVertical(vm) {\n return vm && vm.width !== undefined;\n }\n /**\r\n * Helper function to get the bounds of the bar regardless of the orientation\r\n * @param bar {Chart.Element.Rectangle} the bar\r\n * @return {Bounds} bounds of the bar\r\n * @private\r\n */\n\n\n function getBarBounds(vm) {\n var x1, x2, y1, y2, half;\n\n if (isVertical(vm)) {\n half = vm.width / 2;\n x1 = vm.x - half;\n x2 = vm.x + half;\n y1 = Math.min(vm.y, vm.base);\n y2 = Math.max(vm.y, vm.base);\n } else {\n half = vm.height / 2;\n x1 = Math.min(vm.x, vm.base);\n x2 = Math.max(vm.x, vm.base);\n y1 = vm.y - half;\n y2 = vm.y + half;\n }\n\n return {\n left: x1,\n top: y1,\n right: x2,\n bottom: y2\n };\n }\n\n function swap(orig, v1, v2) {\n return orig === v1 ? v2 : orig === v2 ? v1 : orig;\n }\n\n function parseBorderSkipped(vm) {\n var edge = vm.borderSkipped;\n var res = {};\n\n if (!edge) {\n return res;\n }\n\n if (vm.horizontal) {\n if (vm.base > vm.x) {\n edge = swap(edge, 'left', 'right');\n }\n } else if (vm.base < vm.y) {\n edge = swap(edge, 'bottom', 'top');\n }\n\n res[edge] = true;\n return res;\n }\n\n function parseBorderWidth(vm, maxW, maxH) {\n var value = vm.borderWidth;\n var skip = parseBorderSkipped(vm);\n var t, r, b, l;\n\n if (helpers$1.isObject(value)) {\n t = +value.top || 0;\n r = +value.right || 0;\n b = +value.bottom || 0;\n l = +value.left || 0;\n } else {\n t = r = b = l = +value || 0;\n }\n\n return {\n t: skip.top || t < 0 ? 0 : t > maxH ? maxH : t,\n r: skip.right || r < 0 ? 0 : r > maxW ? maxW : r,\n b: skip.bottom || b < 0 ? 0 : b > maxH ? maxH : b,\n l: skip.left || l < 0 ? 0 : l > maxW ? maxW : l\n };\n }\n\n function boundingRects(vm) {\n var bounds = getBarBounds(vm);\n var width = bounds.right - bounds.left;\n var height = bounds.bottom - bounds.top;\n var border = parseBorderWidth(vm, width / 2, height / 2);\n return {\n outer: {\n x: bounds.left,\n y: bounds.top,\n w: width,\n h: height\n },\n inner: {\n x: bounds.left + border.l,\n y: bounds.top + border.t,\n w: width - border.l - border.r,\n h: height - border.t - border.b\n }\n };\n }\n\n function _inRange(vm, x, y) {\n var skipX = x === null;\n var skipY = y === null;\n var bounds = !vm || skipX && skipY ? false : getBarBounds(vm);\n return bounds && (skipX || x >= bounds.left && x <= bounds.right) && (skipY || y >= bounds.top && y <= bounds.bottom);\n }\n\n var element_rectangle = core_element.extend({\n _type: 'rectangle',\n draw: function draw() {\n var ctx = this._chart.ctx;\n var vm = this._view;\n var rects = boundingRects(vm);\n var outer = rects.outer;\n var inner = rects.inner;\n ctx.fillStyle = vm.backgroundColor;\n ctx.fillRect(outer.x, outer.y, outer.w, outer.h);\n\n if (outer.w === inner.w && outer.h === inner.h) {\n return;\n }\n\n ctx.save();\n ctx.beginPath();\n ctx.rect(outer.x, outer.y, outer.w, outer.h);\n ctx.clip();\n ctx.fillStyle = vm.borderColor;\n ctx.rect(inner.x, inner.y, inner.w, inner.h);\n ctx.fill('evenodd');\n ctx.restore();\n },\n height: function height() {\n var vm = this._view;\n return vm.base - vm.y;\n },\n inRange: function inRange(mouseX, mouseY) {\n return _inRange(this._view, mouseX, mouseY);\n },\n inLabelRange: function inLabelRange(mouseX, mouseY) {\n var vm = this._view;\n return isVertical(vm) ? _inRange(vm, mouseX, null) : _inRange(vm, null, mouseY);\n },\n inXRange: function inXRange(mouseX) {\n return _inRange(this._view, mouseX, null);\n },\n inYRange: function inYRange(mouseY) {\n return _inRange(this._view, null, mouseY);\n },\n getCenterPoint: function getCenterPoint() {\n var vm = this._view;\n var x, y;\n\n if (isVertical(vm)) {\n x = vm.x;\n y = (vm.y + vm.base) / 2;\n } else {\n x = (vm.x + vm.base) / 2;\n y = vm.y;\n }\n\n return {\n x: x,\n y: y\n };\n },\n getArea: function getArea() {\n var vm = this._view;\n return isVertical(vm) ? vm.width * Math.abs(vm.y - vm.base) : vm.height * Math.abs(vm.x - vm.base);\n },\n tooltipPosition: function tooltipPosition() {\n var vm = this._view;\n return {\n x: vm.x,\n y: vm.y\n };\n }\n });\n var elements = {};\n var Arc = element_arc;\n var Line = element_line;\n var Point = element_point;\n var Rectangle = element_rectangle;\n elements.Arc = Arc;\n elements.Line = Line;\n elements.Point = Point;\n elements.Rectangle = Rectangle;\n var deprecated = helpers$1._deprecated;\n var valueOrDefault$3 = helpers$1.valueOrDefault;\n\n core_defaults._set('bar', {\n hover: {\n mode: 'label'\n },\n scales: {\n xAxes: [{\n type: 'category',\n offset: true,\n gridLines: {\n offsetGridLines: true\n }\n }],\n yAxes: [{\n type: 'linear'\n }]\n }\n });\n\n core_defaults._set('global', {\n datasets: {\n bar: {\n categoryPercentage: 0.8,\n barPercentage: 0.9\n }\n }\n });\n /**\r\n * Computes the \"optimal\" sample size to maintain bars equally sized while preventing overlap.\r\n * @private\r\n */\n\n\n function computeMinSampleSize(scale, pixels) {\n var min = scale._length;\n var prev, curr, i, ilen;\n\n for (i = 1, ilen = pixels.length; i < ilen; ++i) {\n min = Math.min(min, Math.abs(pixels[i] - pixels[i - 1]));\n }\n\n for (i = 0, ilen = scale.getTicks().length; i < ilen; ++i) {\n curr = scale.getPixelForTick(i);\n min = i > 0 ? Math.min(min, Math.abs(curr - prev)) : min;\n prev = curr;\n }\n\n return min;\n }\n /**\r\n * Computes an \"ideal\" category based on the absolute bar thickness or, if undefined or null,\r\n * uses the smallest interval (see computeMinSampleSize) that prevents bar overlapping. This\r\n * mode currently always generates bars equally sized (until we introduce scriptable options?).\r\n * @private\r\n */\n\n\n function computeFitCategoryTraits(index, ruler, options) {\n var thickness = options.barThickness;\n var count = ruler.stackCount;\n var curr = ruler.pixels[index];\n var min = helpers$1.isNullOrUndef(thickness) ? computeMinSampleSize(ruler.scale, ruler.pixels) : -1;\n var size, ratio;\n\n if (helpers$1.isNullOrUndef(thickness)) {\n size = min * options.categoryPercentage;\n ratio = options.barPercentage;\n } else {\n // When bar thickness is enforced, category and bar percentages are ignored.\n // Note(SB): we could add support for relative bar thickness (e.g. barThickness: '50%')\n // and deprecate barPercentage since this value is ignored when thickness is absolute.\n size = thickness * count;\n ratio = 1;\n }\n\n return {\n chunk: size / count,\n ratio: ratio,\n start: curr - size / 2\n };\n }\n /**\r\n * Computes an \"optimal\" category that globally arranges bars side by side (no gap when\r\n * percentage options are 1), based on the previous and following categories. This mode\r\n * generates bars with different widths when data are not evenly spaced.\r\n * @private\r\n */\n\n\n function computeFlexCategoryTraits(index, ruler, options) {\n var pixels = ruler.pixels;\n var curr = pixels[index];\n var prev = index > 0 ? pixels[index - 1] : null;\n var next = index < pixels.length - 1 ? pixels[index + 1] : null;\n var percent = options.categoryPercentage;\n var start, size;\n\n if (prev === null) {\n // first data: its size is double based on the next point or,\n // if it's also the last data, we use the scale size.\n prev = curr - (next === null ? ruler.end - ruler.start : next - curr);\n }\n\n if (next === null) {\n // last data: its size is also double based on the previous point.\n next = curr + curr - prev;\n }\n\n start = curr - (curr - Math.min(prev, next)) / 2 * percent;\n size = Math.abs(next - prev) / 2 * percent;\n return {\n chunk: size / ruler.stackCount,\n ratio: options.barPercentage,\n start: start\n };\n }\n\n var controller_bar = core_datasetController.extend({\n dataElementType: elements.Rectangle,\n\n /**\r\n * @private\r\n */\n _dataElementOptions: ['backgroundColor', 'borderColor', 'borderSkipped', 'borderWidth', 'barPercentage', 'barThickness', 'categoryPercentage', 'maxBarThickness', 'minBarLength'],\n initialize: function initialize() {\n var me = this;\n var meta, scaleOpts;\n core_datasetController.prototype.initialize.apply(me, arguments);\n meta = me.getMeta();\n meta.stack = me.getDataset().stack;\n meta.bar = true;\n scaleOpts = me._getIndexScale().options;\n deprecated('bar chart', scaleOpts.barPercentage, 'scales.[x/y]Axes.barPercentage', 'dataset.barPercentage');\n deprecated('bar chart', scaleOpts.barThickness, 'scales.[x/y]Axes.barThickness', 'dataset.barThickness');\n deprecated('bar chart', scaleOpts.categoryPercentage, 'scales.[x/y]Axes.categoryPercentage', 'dataset.categoryPercentage');\n deprecated('bar chart', me._getValueScale().options.minBarLength, 'scales.[x/y]Axes.minBarLength', 'dataset.minBarLength');\n deprecated('bar chart', scaleOpts.maxBarThickness, 'scales.[x/y]Axes.maxBarThickness', 'dataset.maxBarThickness');\n },\n update: function update(reset) {\n var me = this;\n var rects = me.getMeta().data;\n var i, ilen;\n me._ruler = me.getRuler();\n\n for (i = 0, ilen = rects.length; i < ilen; ++i) {\n me.updateElement(rects[i], i, reset);\n }\n },\n updateElement: function updateElement(rectangle, index, reset) {\n var me = this;\n var meta = me.getMeta();\n var dataset = me.getDataset();\n\n var options = me._resolveDataElementOptions(rectangle, index);\n\n rectangle._xScale = me.getScaleForId(meta.xAxisID);\n rectangle._yScale = me.getScaleForId(meta.yAxisID);\n rectangle._datasetIndex = me.index;\n rectangle._index = index;\n rectangle._model = {\n backgroundColor: options.backgroundColor,\n borderColor: options.borderColor,\n borderSkipped: options.borderSkipped,\n borderWidth: options.borderWidth,\n datasetLabel: dataset.label,\n label: me.chart.data.labels[index]\n };\n\n if (helpers$1.isArray(dataset.data[index])) {\n rectangle._model.borderSkipped = null;\n }\n\n me._updateElementGeometry(rectangle, index, reset, options);\n\n rectangle.pivot();\n },\n\n /**\r\n * @private\r\n */\n _updateElementGeometry: function _updateElementGeometry(rectangle, index, reset, options) {\n var me = this;\n var model = rectangle._model;\n\n var vscale = me._getValueScale();\n\n var base = vscale.getBasePixel();\n var horizontal = vscale.isHorizontal();\n var ruler = me._ruler || me.getRuler();\n var vpixels = me.calculateBarValuePixels(me.index, index, options);\n var ipixels = me.calculateBarIndexPixels(me.index, index, ruler, options);\n model.horizontal = horizontal;\n model.base = reset ? base : vpixels.base;\n model.x = horizontal ? reset ? base : vpixels.head : ipixels.center;\n model.y = horizontal ? ipixels.center : reset ? base : vpixels.head;\n model.height = horizontal ? ipixels.size : undefined;\n model.width = horizontal ? undefined : ipixels.size;\n },\n\n /**\r\n * Returns the stacks based on groups and bar visibility.\r\n * @param {number} [last] - The dataset index\r\n * @returns {string[]} The list of stack IDs\r\n * @private\r\n */\n _getStacks: function _getStacks(last) {\n var me = this;\n\n var scale = me._getIndexScale();\n\n var metasets = scale._getMatchingVisibleMetas(me._type);\n\n var stacked = scale.options.stacked;\n var ilen = metasets.length;\n var stacks = [];\n var i, meta;\n\n for (i = 0; i < ilen; ++i) {\n meta = metasets[i]; // stacked | meta.stack\n // | found | not found | undefined\n // false | x | x | x\n // true | | x |\n // undefined | | x | x\n\n if (stacked === false || stacks.indexOf(meta.stack) === -1 || stacked === undefined && meta.stack === undefined) {\n stacks.push(meta.stack);\n }\n\n if (meta.index === last) {\n break;\n }\n }\n\n return stacks;\n },\n\n /**\r\n * Returns the effective number of stacks based on groups and bar visibility.\r\n * @private\r\n */\n getStackCount: function getStackCount() {\n return this._getStacks().length;\n },\n\n /**\r\n * Returns the stack index for the given dataset based on groups and bar visibility.\r\n * @param {number} [datasetIndex] - The dataset index\r\n * @param {string} [name] - The stack name to find\r\n * @returns {number} The stack index\r\n * @private\r\n */\n getStackIndex: function getStackIndex(datasetIndex, name) {\n var stacks = this._getStacks(datasetIndex);\n\n var index = name !== undefined ? stacks.indexOf(name) : -1; // indexOf returns -1 if element is not present\n\n return index === -1 ? stacks.length - 1 : index;\n },\n\n /**\r\n * @private\r\n */\n getRuler: function getRuler() {\n var me = this;\n\n var scale = me._getIndexScale();\n\n var pixels = [];\n var i, ilen;\n\n for (i = 0, ilen = me.getMeta().data.length; i < ilen; ++i) {\n pixels.push(scale.getPixelForValue(null, i, me.index));\n }\n\n return {\n pixels: pixels,\n start: scale._startPixel,\n end: scale._endPixel,\n stackCount: me.getStackCount(),\n scale: scale\n };\n },\n\n /**\r\n * Note: pixel values are not clamped to the scale area.\r\n * @private\r\n */\n calculateBarValuePixels: function calculateBarValuePixels(datasetIndex, index, options) {\n var me = this;\n var chart = me.chart;\n\n var scale = me._getValueScale();\n\n var isHorizontal = scale.isHorizontal();\n var datasets = chart.data.datasets;\n\n var metasets = scale._getMatchingVisibleMetas(me._type);\n\n var value = scale._parseValue(datasets[datasetIndex].data[index]);\n\n var minBarLength = options.minBarLength;\n var stacked = scale.options.stacked;\n var stack = me.getMeta().stack;\n var start = value.start === undefined ? 0 : value.max >= 0 && value.min >= 0 ? value.min : value.max;\n var length = value.start === undefined ? value.end : value.max >= 0 && value.min >= 0 ? value.max - value.min : value.min - value.max;\n var ilen = metasets.length;\n var i, imeta, ivalue, base, head, size, stackLength;\n\n if (stacked || stacked === undefined && stack !== undefined) {\n for (i = 0; i < ilen; ++i) {\n imeta = metasets[i];\n\n if (imeta.index === datasetIndex) {\n break;\n }\n\n if (imeta.stack === stack) {\n stackLength = scale._parseValue(datasets[imeta.index].data[index]);\n ivalue = stackLength.start === undefined ? stackLength.end : stackLength.min >= 0 && stackLength.max >= 0 ? stackLength.max : stackLength.min;\n\n if (value.min < 0 && ivalue < 0 || value.max >= 0 && ivalue > 0) {\n start += ivalue;\n }\n }\n }\n }\n\n base = scale.getPixelForValue(start);\n head = scale.getPixelForValue(start + length);\n size = head - base;\n\n if (minBarLength !== undefined && Math.abs(size) < minBarLength) {\n size = minBarLength;\n\n if (length >= 0 && !isHorizontal || length < 0 && isHorizontal) {\n head = base - minBarLength;\n } else {\n head = base + minBarLength;\n }\n }\n\n return {\n size: size,\n base: base,\n head: head,\n center: head + size / 2\n };\n },\n\n /**\r\n * @private\r\n */\n calculateBarIndexPixels: function calculateBarIndexPixels(datasetIndex, index, ruler, options) {\n var me = this;\n var range = options.barThickness === 'flex' ? computeFlexCategoryTraits(index, ruler, options) : computeFitCategoryTraits(index, ruler, options);\n var stackIndex = me.getStackIndex(datasetIndex, me.getMeta().stack);\n var center = range.start + range.chunk * stackIndex + range.chunk / 2;\n var size = Math.min(valueOrDefault$3(options.maxBarThickness, Infinity), range.chunk * range.ratio);\n return {\n base: center - size / 2,\n head: center + size / 2,\n center: center,\n size: size\n };\n },\n draw: function draw() {\n var me = this;\n var chart = me.chart;\n\n var scale = me._getValueScale();\n\n var rects = me.getMeta().data;\n var dataset = me.getDataset();\n var ilen = rects.length;\n var i = 0;\n helpers$1.canvas.clipArea(chart.ctx, chart.chartArea);\n\n for (; i < ilen; ++i) {\n var val = scale._parseValue(dataset.data[i]);\n\n if (!isNaN(val.min) && !isNaN(val.max)) {\n rects[i].draw();\n }\n }\n\n helpers$1.canvas.unclipArea(chart.ctx);\n },\n\n /**\r\n * @private\r\n */\n _resolveDataElementOptions: function _resolveDataElementOptions() {\n var me = this;\n var values = helpers$1.extend({}, core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments));\n\n var indexOpts = me._getIndexScale().options;\n\n var valueOpts = me._getValueScale().options;\n\n values.barPercentage = valueOrDefault$3(indexOpts.barPercentage, values.barPercentage);\n values.barThickness = valueOrDefault$3(indexOpts.barThickness, values.barThickness);\n values.categoryPercentage = valueOrDefault$3(indexOpts.categoryPercentage, values.categoryPercentage);\n values.maxBarThickness = valueOrDefault$3(indexOpts.maxBarThickness, values.maxBarThickness);\n values.minBarLength = valueOrDefault$3(valueOpts.minBarLength, values.minBarLength);\n return values;\n }\n });\n var valueOrDefault$4 = helpers$1.valueOrDefault;\n var resolve$1 = helpers$1.options.resolve;\n\n core_defaults._set('bubble', {\n hover: {\n mode: 'single'\n },\n scales: {\n xAxes: [{\n type: 'linear',\n // bubble should probably use a linear scale by default\n position: 'bottom',\n id: 'x-axis-0' // need an ID so datasets can reference the scale\n\n }],\n yAxes: [{\n type: 'linear',\n position: 'left',\n id: 'y-axis-0'\n }]\n },\n tooltips: {\n callbacks: {\n title: function title() {\n // Title doesn't make sense for scatter since we format the data as a point\n return '';\n },\n label: function label(item, data) {\n var datasetLabel = data.datasets[item.datasetIndex].label || '';\n var dataPoint = data.datasets[item.datasetIndex].data[item.index];\n return datasetLabel + ': (' + item.xLabel + ', ' + item.yLabel + ', ' + dataPoint.r + ')';\n }\n }\n }\n });\n\n var controller_bubble = core_datasetController.extend({\n /**\r\n * @protected\r\n */\n dataElementType: elements.Point,\n\n /**\r\n * @private\r\n */\n _dataElementOptions: ['backgroundColor', 'borderColor', 'borderWidth', 'hoverBackgroundColor', 'hoverBorderColor', 'hoverBorderWidth', 'hoverRadius', 'hitRadius', 'pointStyle', 'rotation'],\n\n /**\r\n * @protected\r\n */\n update: function update(reset) {\n var me = this;\n var meta = me.getMeta();\n var points = meta.data; // Update Points\n\n helpers$1.each(points, function (point, index) {\n me.updateElement(point, index, reset);\n });\n },\n\n /**\r\n * @protected\r\n */\n updateElement: function updateElement(point, index, reset) {\n var me = this;\n var meta = me.getMeta();\n var custom = point.custom || {};\n var xScale = me.getScaleForId(meta.xAxisID);\n var yScale = me.getScaleForId(meta.yAxisID);\n\n var options = me._resolveDataElementOptions(point, index);\n\n var data = me.getDataset().data[index];\n var dsIndex = me.index;\n var x = reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(_typeof(data) === 'object' ? data : NaN, index, dsIndex);\n var y = reset ? yScale.getBasePixel() : yScale.getPixelForValue(data, index, dsIndex);\n point._xScale = xScale;\n point._yScale = yScale;\n point._options = options;\n point._datasetIndex = dsIndex;\n point._index = index;\n point._model = {\n backgroundColor: options.backgroundColor,\n borderColor: options.borderColor,\n borderWidth: options.borderWidth,\n hitRadius: options.hitRadius,\n pointStyle: options.pointStyle,\n rotation: options.rotation,\n radius: reset ? 0 : options.radius,\n skip: custom.skip || isNaN(x) || isNaN(y),\n x: x,\n y: y\n };\n point.pivot();\n },\n\n /**\r\n * @protected\r\n */\n setHoverStyle: function setHoverStyle(point) {\n var model = point._model;\n var options = point._options;\n var getHoverColor = helpers$1.getHoverColor;\n point.$previousStyle = {\n backgroundColor: model.backgroundColor,\n borderColor: model.borderColor,\n borderWidth: model.borderWidth,\n radius: model.radius\n };\n model.backgroundColor = valueOrDefault$4(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\n model.borderColor = valueOrDefault$4(options.hoverBorderColor, getHoverColor(options.borderColor));\n model.borderWidth = valueOrDefault$4(options.hoverBorderWidth, options.borderWidth);\n model.radius = options.radius + options.hoverRadius;\n },\n\n /**\r\n * @private\r\n */\n _resolveDataElementOptions: function _resolveDataElementOptions(point, index) {\n var me = this;\n var chart = me.chart;\n var dataset = me.getDataset();\n var custom = point.custom || {};\n var data = dataset.data[index] || {};\n\n var values = core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments); // Scriptable options\n\n\n var context = {\n chart: chart,\n dataIndex: index,\n dataset: dataset,\n datasetIndex: me.index\n }; // In case values were cached (and thus frozen), we need to clone the values\n\n if (me._cachedDataOpts === values) {\n values = helpers$1.extend({}, values);\n } // Custom radius resolution\n\n\n values.radius = resolve$1([custom.radius, data.r, me._config.radius, chart.options.elements.point.radius], context, index);\n return values;\n }\n });\n var valueOrDefault$5 = helpers$1.valueOrDefault;\n var PI$1 = Math.PI;\n var DOUBLE_PI$1 = PI$1 * 2;\n var HALF_PI$1 = PI$1 / 2;\n\n core_defaults._set('doughnut', {\n animation: {\n // Boolean - Whether we animate the rotation of the Doughnut\n animateRotate: true,\n // Boolean - Whether we animate scaling the Doughnut from the centre\n animateScale: false\n },\n hover: {\n mode: 'single'\n },\n legendCallback: function legendCallback(chart) {\n var list = document.createElement('ul');\n var data = chart.data;\n var datasets = data.datasets;\n var labels = data.labels;\n var i, ilen, listItem, listItemSpan;\n list.setAttribute('class', chart.id + '-legend');\n\n if (datasets.length) {\n for (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) {\n listItem = list.appendChild(document.createElement('li'));\n listItemSpan = listItem.appendChild(document.createElement('span'));\n listItemSpan.style.backgroundColor = datasets[0].backgroundColor[i];\n\n if (labels[i]) {\n listItem.appendChild(document.createTextNode(labels[i]));\n }\n }\n }\n\n return list.outerHTML;\n },\n legend: {\n labels: {\n generateLabels: function generateLabels(chart) {\n var data = chart.data;\n\n if (data.labels.length && data.datasets.length) {\n return data.labels.map(function (label, i) {\n var meta = chart.getDatasetMeta(0);\n var style = meta.controller.getStyle(i);\n return {\n text: label,\n fillStyle: style.backgroundColor,\n strokeStyle: style.borderColor,\n lineWidth: style.borderWidth,\n hidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden,\n // Extra data used for toggling the correct item\n index: i\n };\n });\n }\n\n return [];\n }\n },\n onClick: function onClick(e, legendItem) {\n var index = legendItem.index;\n var chart = this.chart;\n var i, ilen, meta;\n\n for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\n meta = chart.getDatasetMeta(i); // toggle visibility of index if exists\n\n if (meta.data[index]) {\n meta.data[index].hidden = !meta.data[index].hidden;\n }\n }\n\n chart.update();\n }\n },\n // The percentage of the chart that we cut out of the middle.\n cutoutPercentage: 50,\n // The rotation of the chart, where the first data arc begins.\n rotation: -HALF_PI$1,\n // The total circumference of the chart.\n circumference: DOUBLE_PI$1,\n // Need to override these to give a nice default\n tooltips: {\n callbacks: {\n title: function title() {\n return '';\n },\n label: function label(tooltipItem, data) {\n var dataLabel = data.labels[tooltipItem.index];\n var value = ': ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\n\n if (helpers$1.isArray(dataLabel)) {\n // show value on first line of multiline label\n // need to clone because we are changing the value\n dataLabel = dataLabel.slice();\n dataLabel[0] += value;\n } else {\n dataLabel += value;\n }\n\n return dataLabel;\n }\n }\n }\n });\n\n var controller_doughnut = core_datasetController.extend({\n dataElementType: elements.Arc,\n linkScales: helpers$1.noop,\n\n /**\r\n * @private\r\n */\n _dataElementOptions: ['backgroundColor', 'borderColor', 'borderWidth', 'borderAlign', 'hoverBackgroundColor', 'hoverBorderColor', 'hoverBorderWidth'],\n // Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly\n getRingIndex: function getRingIndex(datasetIndex) {\n var ringIndex = 0;\n\n for (var j = 0; j < datasetIndex; ++j) {\n if (this.chart.isDatasetVisible(j)) {\n ++ringIndex;\n }\n }\n\n return ringIndex;\n },\n update: function update(reset) {\n var me = this;\n var chart = me.chart;\n var chartArea = chart.chartArea;\n var opts = chart.options;\n var ratioX = 1;\n var ratioY = 1;\n var offsetX = 0;\n var offsetY = 0;\n var meta = me.getMeta();\n var arcs = meta.data;\n var cutout = opts.cutoutPercentage / 100 || 0;\n var circumference = opts.circumference;\n\n var chartWeight = me._getRingWeight(me.index);\n\n var maxWidth, maxHeight, i, ilen; // If the chart's circumference isn't a full circle, calculate size as a ratio of the width/height of the arc\n\n if (circumference < DOUBLE_PI$1) {\n var startAngle = opts.rotation % DOUBLE_PI$1;\n startAngle += startAngle >= PI$1 ? -DOUBLE_PI$1 : startAngle < -PI$1 ? DOUBLE_PI$1 : 0;\n var endAngle = startAngle + circumference;\n var startX = Math.cos(startAngle);\n var startY = Math.sin(startAngle);\n var endX = Math.cos(endAngle);\n var endY = Math.sin(endAngle);\n var contains0 = startAngle <= 0 && endAngle >= 0 || endAngle >= DOUBLE_PI$1;\n var contains90 = startAngle <= HALF_PI$1 && endAngle >= HALF_PI$1 || endAngle >= DOUBLE_PI$1 + HALF_PI$1;\n var contains180 = startAngle === -PI$1 || endAngle >= PI$1;\n var contains270 = startAngle <= -HALF_PI$1 && endAngle >= -HALF_PI$1 || endAngle >= PI$1 + HALF_PI$1;\n var minX = contains180 ? -1 : Math.min(startX, startX * cutout, endX, endX * cutout);\n var minY = contains270 ? -1 : Math.min(startY, startY * cutout, endY, endY * cutout);\n var maxX = contains0 ? 1 : Math.max(startX, startX * cutout, endX, endX * cutout);\n var maxY = contains90 ? 1 : Math.max(startY, startY * cutout, endY, endY * cutout);\n ratioX = (maxX - minX) / 2;\n ratioY = (maxY - minY) / 2;\n offsetX = -(maxX + minX) / 2;\n offsetY = -(maxY + minY) / 2;\n }\n\n for (i = 0, ilen = arcs.length; i < ilen; ++i) {\n arcs[i]._options = me._resolveDataElementOptions(arcs[i], i);\n }\n\n chart.borderWidth = me.getMaxBorderWidth();\n maxWidth = (chartArea.right - chartArea.left - chart.borderWidth) / ratioX;\n maxHeight = (chartArea.bottom - chartArea.top - chart.borderWidth) / ratioY;\n chart.outerRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);\n chart.innerRadius = Math.max(chart.outerRadius * cutout, 0);\n chart.radiusLength = (chart.outerRadius - chart.innerRadius) / (me._getVisibleDatasetWeightTotal() || 1);\n chart.offsetX = offsetX * chart.outerRadius;\n chart.offsetY = offsetY * chart.outerRadius;\n meta.total = me.calculateTotal();\n me.outerRadius = chart.outerRadius - chart.radiusLength * me._getRingWeightOffset(me.index);\n me.innerRadius = Math.max(me.outerRadius - chart.radiusLength * chartWeight, 0);\n\n for (i = 0, ilen = arcs.length; i < ilen; ++i) {\n me.updateElement(arcs[i], i, reset);\n }\n },\n updateElement: function updateElement(arc, index, reset) {\n var me = this;\n var chart = me.chart;\n var chartArea = chart.chartArea;\n var opts = chart.options;\n var animationOpts = opts.animation;\n var centerX = (chartArea.left + chartArea.right) / 2;\n var centerY = (chartArea.top + chartArea.bottom) / 2;\n var startAngle = opts.rotation; // non reset case handled later\n\n var endAngle = opts.rotation; // non reset case handled later\n\n var dataset = me.getDataset();\n var circumference = reset && animationOpts.animateRotate ? 0 : arc.hidden ? 0 : me.calculateCircumference(dataset.data[index]) * (opts.circumference / DOUBLE_PI$1);\n var innerRadius = reset && animationOpts.animateScale ? 0 : me.innerRadius;\n var outerRadius = reset && animationOpts.animateScale ? 0 : me.outerRadius;\n var options = arc._options || {};\n helpers$1.extend(arc, {\n // Utility\n _datasetIndex: me.index,\n _index: index,\n // Desired view properties\n _model: {\n backgroundColor: options.backgroundColor,\n borderColor: options.borderColor,\n borderWidth: options.borderWidth,\n borderAlign: options.borderAlign,\n x: centerX + chart.offsetX,\n y: centerY + chart.offsetY,\n startAngle: startAngle,\n endAngle: endAngle,\n circumference: circumference,\n outerRadius: outerRadius,\n innerRadius: innerRadius,\n label: helpers$1.valueAtIndexOrDefault(dataset.label, index, chart.data.labels[index])\n }\n });\n var model = arc._model; // Set correct angles if not resetting\n\n if (!reset || !animationOpts.animateRotate) {\n if (index === 0) {\n model.startAngle = opts.rotation;\n } else {\n model.startAngle = me.getMeta().data[index - 1]._model.endAngle;\n }\n\n model.endAngle = model.startAngle + model.circumference;\n }\n\n arc.pivot();\n },\n calculateTotal: function calculateTotal() {\n var dataset = this.getDataset();\n var meta = this.getMeta();\n var total = 0;\n var value;\n helpers$1.each(meta.data, function (element, index) {\n value = dataset.data[index];\n\n if (!isNaN(value) && !element.hidden) {\n total += Math.abs(value);\n }\n });\n /* if (total === 0) {\r\n \ttotal = NaN;\r\n }*/\n\n return total;\n },\n calculateCircumference: function calculateCircumference(value) {\n var total = this.getMeta().total;\n\n if (total > 0 && !isNaN(value)) {\n return DOUBLE_PI$1 * (Math.abs(value) / total);\n }\n\n return 0;\n },\n // gets the max border or hover width to properly scale pie charts\n getMaxBorderWidth: function getMaxBorderWidth(arcs) {\n var me = this;\n var max = 0;\n var chart = me.chart;\n var i, ilen, meta, arc, controller, options, borderWidth, hoverWidth;\n\n if (!arcs) {\n // Find the outmost visible dataset\n for (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {\n if (chart.isDatasetVisible(i)) {\n meta = chart.getDatasetMeta(i);\n arcs = meta.data;\n\n if (i !== me.index) {\n controller = meta.controller;\n }\n\n break;\n }\n }\n }\n\n if (!arcs) {\n return 0;\n }\n\n for (i = 0, ilen = arcs.length; i < ilen; ++i) {\n arc = arcs[i];\n\n if (controller) {\n controller._configure();\n\n options = controller._resolveDataElementOptions(arc, i);\n } else {\n options = arc._options;\n }\n\n if (options.borderAlign !== 'inner') {\n borderWidth = options.borderWidth;\n hoverWidth = options.hoverBorderWidth;\n max = borderWidth > max ? borderWidth : max;\n max = hoverWidth > max ? hoverWidth : max;\n }\n }\n\n return max;\n },\n\n /**\r\n * @protected\r\n */\n setHoverStyle: function setHoverStyle(arc) {\n var model = arc._model;\n var options = arc._options;\n var getHoverColor = helpers$1.getHoverColor;\n arc.$previousStyle = {\n backgroundColor: model.backgroundColor,\n borderColor: model.borderColor,\n borderWidth: model.borderWidth\n };\n model.backgroundColor = valueOrDefault$5(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\n model.borderColor = valueOrDefault$5(options.hoverBorderColor, getHoverColor(options.borderColor));\n model.borderWidth = valueOrDefault$5(options.hoverBorderWidth, options.borderWidth);\n },\n\n /**\r\n * Get radius length offset of the dataset in relation to the visible datasets weights. This allows determining the inner and outer radius correctly\r\n * @private\r\n */\n _getRingWeightOffset: function _getRingWeightOffset(datasetIndex) {\n var ringWeightOffset = 0;\n\n for (var i = 0; i < datasetIndex; ++i) {\n if (this.chart.isDatasetVisible(i)) {\n ringWeightOffset += this._getRingWeight(i);\n }\n }\n\n return ringWeightOffset;\n },\n\n /**\r\n * @private\r\n */\n _getRingWeight: function _getRingWeight(dataSetIndex) {\n return Math.max(valueOrDefault$5(this.chart.data.datasets[dataSetIndex].weight, 1), 0);\n },\n\n /**\r\n * Returns the sum of all visibile data set weights. This value can be 0.\r\n * @private\r\n */\n _getVisibleDatasetWeightTotal: function _getVisibleDatasetWeightTotal() {\n return this._getRingWeightOffset(this.chart.data.datasets.length);\n }\n });\n\n core_defaults._set('horizontalBar', {\n hover: {\n mode: 'index',\n axis: 'y'\n },\n scales: {\n xAxes: [{\n type: 'linear',\n position: 'bottom'\n }],\n yAxes: [{\n type: 'category',\n position: 'left',\n offset: true,\n gridLines: {\n offsetGridLines: true\n }\n }]\n },\n elements: {\n rectangle: {\n borderSkipped: 'left'\n }\n },\n tooltips: {\n mode: 'index',\n axis: 'y'\n }\n });\n\n core_defaults._set('global', {\n datasets: {\n horizontalBar: {\n categoryPercentage: 0.8,\n barPercentage: 0.9\n }\n }\n });\n\n var controller_horizontalBar = controller_bar.extend({\n /**\r\n * @private\r\n */\n _getValueScaleId: function _getValueScaleId() {\n return this.getMeta().xAxisID;\n },\n\n /**\r\n * @private\r\n */\n _getIndexScaleId: function _getIndexScaleId() {\n return this.getMeta().yAxisID;\n }\n });\n var valueOrDefault$6 = helpers$1.valueOrDefault;\n var resolve$2 = helpers$1.options.resolve;\n var isPointInArea = helpers$1.canvas._isPointInArea;\n\n core_defaults._set('line', {\n showLines: true,\n spanGaps: false,\n hover: {\n mode: 'label'\n },\n scales: {\n xAxes: [{\n type: 'category',\n id: 'x-axis-0'\n }],\n yAxes: [{\n type: 'linear',\n id: 'y-axis-0'\n }]\n }\n });\n\n function scaleClip(scale, halfBorderWidth) {\n var tickOpts = scale && scale.options.ticks || {};\n var reverse = tickOpts.reverse;\n var min = tickOpts.min === undefined ? halfBorderWidth : 0;\n var max = tickOpts.max === undefined ? halfBorderWidth : 0;\n return {\n start: reverse ? max : min,\n end: reverse ? min : max\n };\n }\n\n function defaultClip(xScale, yScale, borderWidth) {\n var halfBorderWidth = borderWidth / 2;\n var x = scaleClip(xScale, halfBorderWidth);\n var y = scaleClip(yScale, halfBorderWidth);\n return {\n top: y.end,\n right: x.end,\n bottom: y.start,\n left: x.start\n };\n }\n\n function toClip(value) {\n var t, r, b, l;\n\n if (helpers$1.isObject(value)) {\n t = value.top;\n r = value.right;\n b = value.bottom;\n l = value.left;\n } else {\n t = r = b = l = value;\n }\n\n return {\n top: t,\n right: r,\n bottom: b,\n left: l\n };\n }\n\n var controller_line = core_datasetController.extend({\n datasetElementType: elements.Line,\n dataElementType: elements.Point,\n\n /**\r\n * @private\r\n */\n _datasetElementOptions: ['backgroundColor', 'borderCapStyle', 'borderColor', 'borderDash', 'borderDashOffset', 'borderJoinStyle', 'borderWidth', 'cubicInterpolationMode', 'fill'],\n\n /**\r\n * @private\r\n */\n _dataElementOptions: {\n backgroundColor: 'pointBackgroundColor',\n borderColor: 'pointBorderColor',\n borderWidth: 'pointBorderWidth',\n hitRadius: 'pointHitRadius',\n hoverBackgroundColor: 'pointHoverBackgroundColor',\n hoverBorderColor: 'pointHoverBorderColor',\n hoverBorderWidth: 'pointHoverBorderWidth',\n hoverRadius: 'pointHoverRadius',\n pointStyle: 'pointStyle',\n radius: 'pointRadius',\n rotation: 'pointRotation'\n },\n update: function update(reset) {\n var me = this;\n var meta = me.getMeta();\n var line = meta.dataset;\n var points = meta.data || [];\n var options = me.chart.options;\n var config = me._config;\n var showLine = me._showLine = valueOrDefault$6(config.showLine, options.showLines);\n var i, ilen;\n me._xScale = me.getScaleForId(meta.xAxisID);\n me._yScale = me.getScaleForId(meta.yAxisID); // Update Line\n\n if (showLine) {\n // Compatibility: If the properties are defined with only the old name, use those values\n if (config.tension !== undefined && config.lineTension === undefined) {\n config.lineTension = config.tension;\n } // Utility\n\n\n line._scale = me._yScale;\n line._datasetIndex = me.index; // Data\n\n line._children = points; // Model\n\n line._model = me._resolveDatasetElementOptions(line);\n line.pivot();\n } // Update Points\n\n\n for (i = 0, ilen = points.length; i < ilen; ++i) {\n me.updateElement(points[i], i, reset);\n }\n\n if (showLine && line._model.tension !== 0) {\n me.updateBezierControlPoints();\n } // Now pivot the point for animation\n\n\n for (i = 0, ilen = points.length; i < ilen; ++i) {\n points[i].pivot();\n }\n },\n updateElement: function updateElement(point, index, reset) {\n var me = this;\n var meta = me.getMeta();\n var custom = point.custom || {};\n var dataset = me.getDataset();\n var datasetIndex = me.index;\n var value = dataset.data[index];\n var xScale = me._xScale;\n var yScale = me._yScale;\n var lineModel = meta.dataset._model;\n var x, y;\n\n var options = me._resolveDataElementOptions(point, index);\n\n x = xScale.getPixelForValue(_typeof(value) === 'object' ? value : NaN, index, datasetIndex);\n y = reset ? yScale.getBasePixel() : me.calculatePointY(value, index, datasetIndex); // Utility\n\n point._xScale = xScale;\n point._yScale = yScale;\n point._options = options;\n point._datasetIndex = datasetIndex;\n point._index = index; // Desired view properties\n\n point._model = {\n x: x,\n y: y,\n skip: custom.skip || isNaN(x) || isNaN(y),\n // Appearance\n radius: options.radius,\n pointStyle: options.pointStyle,\n rotation: options.rotation,\n backgroundColor: options.backgroundColor,\n borderColor: options.borderColor,\n borderWidth: options.borderWidth,\n tension: valueOrDefault$6(custom.tension, lineModel ? lineModel.tension : 0),\n steppedLine: lineModel ? lineModel.steppedLine : false,\n // Tooltip\n hitRadius: options.hitRadius\n };\n },\n\n /**\r\n * @private\r\n */\n _resolveDatasetElementOptions: function _resolveDatasetElementOptions(element) {\n var me = this;\n var config = me._config;\n var custom = element.custom || {};\n var options = me.chart.options;\n var lineOptions = options.elements.line;\n\n var values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments); // The default behavior of lines is to break at null values, according\n // to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158\n // This option gives lines the ability to span gaps\n\n\n values.spanGaps = valueOrDefault$6(config.spanGaps, options.spanGaps);\n values.tension = valueOrDefault$6(config.lineTension, lineOptions.tension);\n values.steppedLine = resolve$2([custom.steppedLine, config.steppedLine, lineOptions.stepped]);\n values.clip = toClip(valueOrDefault$6(config.clip, defaultClip(me._xScale, me._yScale, values.borderWidth)));\n return values;\n },\n calculatePointY: function calculatePointY(value, index, datasetIndex) {\n var me = this;\n var chart = me.chart;\n var yScale = me._yScale;\n var sumPos = 0;\n var sumNeg = 0;\n var i, ds, dsMeta, stackedRightValue, rightValue, metasets, ilen;\n\n if (yScale.options.stacked) {\n rightValue = +yScale.getRightValue(value);\n metasets = chart._getSortedVisibleDatasetMetas();\n ilen = metasets.length;\n\n for (i = 0; i < ilen; ++i) {\n dsMeta = metasets[i];\n\n if (dsMeta.index === datasetIndex) {\n break;\n }\n\n ds = chart.data.datasets[dsMeta.index];\n\n if (dsMeta.type === 'line' && dsMeta.yAxisID === yScale.id) {\n stackedRightValue = +yScale.getRightValue(ds.data[index]);\n\n if (stackedRightValue < 0) {\n sumNeg += stackedRightValue || 0;\n } else {\n sumPos += stackedRightValue || 0;\n }\n }\n }\n\n if (rightValue < 0) {\n return yScale.getPixelForValue(sumNeg + rightValue);\n }\n\n return yScale.getPixelForValue(sumPos + rightValue);\n }\n\n return yScale.getPixelForValue(value);\n },\n updateBezierControlPoints: function updateBezierControlPoints() {\n var me = this;\n var chart = me.chart;\n var meta = me.getMeta();\n var lineModel = meta.dataset._model;\n var area = chart.chartArea;\n var points = meta.data || [];\n var i, ilen, model, controlPoints; // Only consider points that are drawn in case the spanGaps option is used\n\n if (lineModel.spanGaps) {\n points = points.filter(function (pt) {\n return !pt._model.skip;\n });\n }\n\n function capControlPoint(pt, min, max) {\n return Math.max(Math.min(pt, max), min);\n }\n\n if (lineModel.cubicInterpolationMode === 'monotone') {\n helpers$1.splineCurveMonotone(points);\n } else {\n for (i = 0, ilen = points.length; i < ilen; ++i) {\n model = points[i]._model;\n controlPoints = helpers$1.splineCurve(helpers$1.previousItem(points, i)._model, model, helpers$1.nextItem(points, i)._model, lineModel.tension);\n model.controlPointPreviousX = controlPoints.previous.x;\n model.controlPointPreviousY = controlPoints.previous.y;\n model.controlPointNextX = controlPoints.next.x;\n model.controlPointNextY = controlPoints.next.y;\n }\n }\n\n if (chart.options.elements.line.capBezierPoints) {\n for (i = 0, ilen = points.length; i < ilen; ++i) {\n model = points[i]._model;\n\n if (isPointInArea(model, area)) {\n if (i > 0 && isPointInArea(points[i - 1]._model, area)) {\n model.controlPointPreviousX = capControlPoint(model.controlPointPreviousX, area.left, area.right);\n model.controlPointPreviousY = capControlPoint(model.controlPointPreviousY, area.top, area.bottom);\n }\n\n if (i < points.length - 1 && isPointInArea(points[i + 1]._model, area)) {\n model.controlPointNextX = capControlPoint(model.controlPointNextX, area.left, area.right);\n model.controlPointNextY = capControlPoint(model.controlPointNextY, area.top, area.bottom);\n }\n }\n }\n }\n },\n draw: function draw() {\n var me = this;\n var chart = me.chart;\n var meta = me.getMeta();\n var points = meta.data || [];\n var area = chart.chartArea;\n var canvas = chart.canvas;\n var i = 0;\n var ilen = points.length;\n var clip;\n\n if (me._showLine) {\n clip = meta.dataset._model.clip;\n helpers$1.canvas.clipArea(chart.ctx, {\n left: clip.left === false ? 0 : area.left - clip.left,\n right: clip.right === false ? canvas.width : area.right + clip.right,\n top: clip.top === false ? 0 : area.top - clip.top,\n bottom: clip.bottom === false ? canvas.height : area.bottom + clip.bottom\n });\n meta.dataset.draw();\n helpers$1.canvas.unclipArea(chart.ctx);\n } // Draw the points\n\n\n for (; i < ilen; ++i) {\n points[i].draw(area);\n }\n },\n\n /**\r\n * @protected\r\n */\n setHoverStyle: function setHoverStyle(point) {\n var model = point._model;\n var options = point._options;\n var getHoverColor = helpers$1.getHoverColor;\n point.$previousStyle = {\n backgroundColor: model.backgroundColor,\n borderColor: model.borderColor,\n borderWidth: model.borderWidth,\n radius: model.radius\n };\n model.backgroundColor = valueOrDefault$6(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\n model.borderColor = valueOrDefault$6(options.hoverBorderColor, getHoverColor(options.borderColor));\n model.borderWidth = valueOrDefault$6(options.hoverBorderWidth, options.borderWidth);\n model.radius = valueOrDefault$6(options.hoverRadius, options.radius);\n }\n });\n var resolve$3 = helpers$1.options.resolve;\n\n core_defaults._set('polarArea', {\n scale: {\n type: 'radialLinear',\n angleLines: {\n display: false\n },\n gridLines: {\n circular: true\n },\n pointLabels: {\n display: false\n },\n ticks: {\n beginAtZero: true\n }\n },\n // Boolean - Whether to animate the rotation of the chart\n animation: {\n animateRotate: true,\n animateScale: true\n },\n startAngle: -0.5 * Math.PI,\n legendCallback: function legendCallback(chart) {\n var list = document.createElement('ul');\n var data = chart.data;\n var datasets = data.datasets;\n var labels = data.labels;\n var i, ilen, listItem, listItemSpan;\n list.setAttribute('class', chart.id + '-legend');\n\n if (datasets.length) {\n for (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) {\n listItem = list.appendChild(document.createElement('li'));\n listItemSpan = listItem.appendChild(document.createElement('span'));\n listItemSpan.style.backgroundColor = datasets[0].backgroundColor[i];\n\n if (labels[i]) {\n listItem.appendChild(document.createTextNode(labels[i]));\n }\n }\n }\n\n return list.outerHTML;\n },\n legend: {\n labels: {\n generateLabels: function generateLabels(chart) {\n var data = chart.data;\n\n if (data.labels.length && data.datasets.length) {\n return data.labels.map(function (label, i) {\n var meta = chart.getDatasetMeta(0);\n var style = meta.controller.getStyle(i);\n return {\n text: label,\n fillStyle: style.backgroundColor,\n strokeStyle: style.borderColor,\n lineWidth: style.borderWidth,\n hidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden,\n // Extra data used for toggling the correct item\n index: i\n };\n });\n }\n\n return [];\n }\n },\n onClick: function onClick(e, legendItem) {\n var index = legendItem.index;\n var chart = this.chart;\n var i, ilen, meta;\n\n for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\n meta = chart.getDatasetMeta(i);\n meta.data[index].hidden = !meta.data[index].hidden;\n }\n\n chart.update();\n }\n },\n // Need to override these to give a nice default\n tooltips: {\n callbacks: {\n title: function title() {\n return '';\n },\n label: function label(item, data) {\n return data.labels[item.index] + ': ' + item.yLabel;\n }\n }\n }\n });\n\n var controller_polarArea = core_datasetController.extend({\n dataElementType: elements.Arc,\n linkScales: helpers$1.noop,\n\n /**\r\n * @private\r\n */\n _dataElementOptions: ['backgroundColor', 'borderColor', 'borderWidth', 'borderAlign', 'hoverBackgroundColor', 'hoverBorderColor', 'hoverBorderWidth'],\n\n /**\r\n * @private\r\n */\n _getIndexScaleId: function _getIndexScaleId() {\n return this.chart.scale.id;\n },\n\n /**\r\n * @private\r\n */\n _getValueScaleId: function _getValueScaleId() {\n return this.chart.scale.id;\n },\n update: function update(reset) {\n var me = this;\n var dataset = me.getDataset();\n var meta = me.getMeta();\n var start = me.chart.options.startAngle || 0;\n var starts = me._starts = [];\n var angles = me._angles = [];\n var arcs = meta.data;\n var i, ilen, angle;\n\n me._updateRadius();\n\n meta.count = me.countVisibleElements();\n\n for (i = 0, ilen = dataset.data.length; i < ilen; i++) {\n starts[i] = start;\n angle = me._computeAngle(i);\n angles[i] = angle;\n start += angle;\n }\n\n for (i = 0, ilen = arcs.length; i < ilen; ++i) {\n arcs[i]._options = me._resolveDataElementOptions(arcs[i], i);\n me.updateElement(arcs[i], i, reset);\n }\n },\n\n /**\r\n * @private\r\n */\n _updateRadius: function _updateRadius() {\n var me = this;\n var chart = me.chart;\n var chartArea = chart.chartArea;\n var opts = chart.options;\n var minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\n chart.outerRadius = Math.max(minSize / 2, 0);\n chart.innerRadius = Math.max(opts.cutoutPercentage ? chart.outerRadius / 100 * opts.cutoutPercentage : 1, 0);\n chart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount();\n me.outerRadius = chart.outerRadius - chart.radiusLength * me.index;\n me.innerRadius = me.outerRadius - chart.radiusLength;\n },\n updateElement: function updateElement(arc, index, reset) {\n var me = this;\n var chart = me.chart;\n var dataset = me.getDataset();\n var opts = chart.options;\n var animationOpts = opts.animation;\n var scale = chart.scale;\n var labels = chart.data.labels;\n var centerX = scale.xCenter;\n var centerY = scale.yCenter; // var negHalfPI = -0.5 * Math.PI;\n\n var datasetStartAngle = opts.startAngle;\n var distance = arc.hidden ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\n var startAngle = me._starts[index];\n var endAngle = startAngle + (arc.hidden ? 0 : me._angles[index]);\n var resetRadius = animationOpts.animateScale ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\n var options = arc._options || {};\n helpers$1.extend(arc, {\n // Utility\n _datasetIndex: me.index,\n _index: index,\n _scale: scale,\n // Desired view properties\n _model: {\n backgroundColor: options.backgroundColor,\n borderColor: options.borderColor,\n borderWidth: options.borderWidth,\n borderAlign: options.borderAlign,\n x: centerX,\n y: centerY,\n innerRadius: 0,\n outerRadius: reset ? resetRadius : distance,\n startAngle: reset && animationOpts.animateRotate ? datasetStartAngle : startAngle,\n endAngle: reset && animationOpts.animateRotate ? datasetStartAngle : endAngle,\n label: helpers$1.valueAtIndexOrDefault(labels, index, labels[index])\n }\n });\n arc.pivot();\n },\n countVisibleElements: function countVisibleElements() {\n var dataset = this.getDataset();\n var meta = this.getMeta();\n var count = 0;\n helpers$1.each(meta.data, function (element, index) {\n if (!isNaN(dataset.data[index]) && !element.hidden) {\n count++;\n }\n });\n return count;\n },\n\n /**\r\n * @protected\r\n */\n setHoverStyle: function setHoverStyle(arc) {\n var model = arc._model;\n var options = arc._options;\n var getHoverColor = helpers$1.getHoverColor;\n var valueOrDefault = helpers$1.valueOrDefault;\n arc.$previousStyle = {\n backgroundColor: model.backgroundColor,\n borderColor: model.borderColor,\n borderWidth: model.borderWidth\n };\n model.backgroundColor = valueOrDefault(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\n model.borderColor = valueOrDefault(options.hoverBorderColor, getHoverColor(options.borderColor));\n model.borderWidth = valueOrDefault(options.hoverBorderWidth, options.borderWidth);\n },\n\n /**\r\n * @private\r\n */\n _computeAngle: function _computeAngle(index) {\n var me = this;\n var count = this.getMeta().count;\n var dataset = me.getDataset();\n var meta = me.getMeta();\n\n if (isNaN(dataset.data[index]) || meta.data[index].hidden) {\n return 0;\n } // Scriptable options\n\n\n var context = {\n chart: me.chart,\n dataIndex: index,\n dataset: dataset,\n datasetIndex: me.index\n };\n return resolve$3([me.chart.options.elements.arc.angle, 2 * Math.PI / count], context, index);\n }\n });\n\n core_defaults._set('pie', helpers$1.clone(core_defaults.doughnut));\n\n core_defaults._set('pie', {\n cutoutPercentage: 0\n }); // Pie charts are Doughnut chart with different defaults\n\n\n var controller_pie = controller_doughnut;\n var valueOrDefault$7 = helpers$1.valueOrDefault;\n\n core_defaults._set('radar', {\n spanGaps: false,\n scale: {\n type: 'radialLinear'\n },\n elements: {\n line: {\n fill: 'start',\n tension: 0 // no bezier in radar\n\n }\n }\n });\n\n var controller_radar = core_datasetController.extend({\n datasetElementType: elements.Line,\n dataElementType: elements.Point,\n linkScales: helpers$1.noop,\n\n /**\r\n * @private\r\n */\n _datasetElementOptions: ['backgroundColor', 'borderWidth', 'borderColor', 'borderCapStyle', 'borderDash', 'borderDashOffset', 'borderJoinStyle', 'fill'],\n\n /**\r\n * @private\r\n */\n _dataElementOptions: {\n backgroundColor: 'pointBackgroundColor',\n borderColor: 'pointBorderColor',\n borderWidth: 'pointBorderWidth',\n hitRadius: 'pointHitRadius',\n hoverBackgroundColor: 'pointHoverBackgroundColor',\n hoverBorderColor: 'pointHoverBorderColor',\n hoverBorderWidth: 'pointHoverBorderWidth',\n hoverRadius: 'pointHoverRadius',\n pointStyle: 'pointStyle',\n radius: 'pointRadius',\n rotation: 'pointRotation'\n },\n\n /**\r\n * @private\r\n */\n _getIndexScaleId: function _getIndexScaleId() {\n return this.chart.scale.id;\n },\n\n /**\r\n * @private\r\n */\n _getValueScaleId: function _getValueScaleId() {\n return this.chart.scale.id;\n },\n update: function update(reset) {\n var me = this;\n var meta = me.getMeta();\n var line = meta.dataset;\n var points = meta.data || [];\n var scale = me.chart.scale;\n var config = me._config;\n var i, ilen; // Compatibility: If the properties are defined with only the old name, use those values\n\n if (config.tension !== undefined && config.lineTension === undefined) {\n config.lineTension = config.tension;\n } // Utility\n\n\n line._scale = scale;\n line._datasetIndex = me.index; // Data\n\n line._children = points;\n line._loop = true; // Model\n\n line._model = me._resolveDatasetElementOptions(line);\n line.pivot(); // Update Points\n\n for (i = 0, ilen = points.length; i < ilen; ++i) {\n me.updateElement(points[i], i, reset);\n } // Update bezier control points\n\n\n me.updateBezierControlPoints(); // Now pivot the point for animation\n\n for (i = 0, ilen = points.length; i < ilen; ++i) {\n points[i].pivot();\n }\n },\n updateElement: function updateElement(point, index, reset) {\n var me = this;\n var custom = point.custom || {};\n var dataset = me.getDataset();\n var scale = me.chart.scale;\n var pointPosition = scale.getPointPositionForValue(index, dataset.data[index]);\n\n var options = me._resolveDataElementOptions(point, index);\n\n var lineModel = me.getMeta().dataset._model;\n\n var x = reset ? scale.xCenter : pointPosition.x;\n var y = reset ? scale.yCenter : pointPosition.y; // Utility\n\n point._scale = scale;\n point._options = options;\n point._datasetIndex = me.index;\n point._index = index; // Desired view properties\n\n point._model = {\n x: x,\n // value not used in dataset scale, but we want a consistent API between scales\n y: y,\n skip: custom.skip || isNaN(x) || isNaN(y),\n // Appearance\n radius: options.radius,\n pointStyle: options.pointStyle,\n rotation: options.rotation,\n backgroundColor: options.backgroundColor,\n borderColor: options.borderColor,\n borderWidth: options.borderWidth,\n tension: valueOrDefault$7(custom.tension, lineModel ? lineModel.tension : 0),\n // Tooltip\n hitRadius: options.hitRadius\n };\n },\n\n /**\r\n * @private\r\n */\n _resolveDatasetElementOptions: function _resolveDatasetElementOptions() {\n var me = this;\n var config = me._config;\n var options = me.chart.options;\n\n var values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments);\n\n values.spanGaps = valueOrDefault$7(config.spanGaps, options.spanGaps);\n values.tension = valueOrDefault$7(config.lineTension, options.elements.line.tension);\n return values;\n },\n updateBezierControlPoints: function updateBezierControlPoints() {\n var me = this;\n var meta = me.getMeta();\n var area = me.chart.chartArea;\n var points = meta.data || [];\n var i, ilen, model, controlPoints; // Only consider points that are drawn in case the spanGaps option is used\n\n if (meta.dataset._model.spanGaps) {\n points = points.filter(function (pt) {\n return !pt._model.skip;\n });\n }\n\n function capControlPoint(pt, min, max) {\n return Math.max(Math.min(pt, max), min);\n }\n\n for (i = 0, ilen = points.length; i < ilen; ++i) {\n model = points[i]._model;\n controlPoints = helpers$1.splineCurve(helpers$1.previousItem(points, i, true)._model, model, helpers$1.nextItem(points, i, true)._model, model.tension); // Prevent the bezier going outside of the bounds of the graph\n\n model.controlPointPreviousX = capControlPoint(controlPoints.previous.x, area.left, area.right);\n model.controlPointPreviousY = capControlPoint(controlPoints.previous.y, area.top, area.bottom);\n model.controlPointNextX = capControlPoint(controlPoints.next.x, area.left, area.right);\n model.controlPointNextY = capControlPoint(controlPoints.next.y, area.top, area.bottom);\n }\n },\n setHoverStyle: function setHoverStyle(point) {\n var model = point._model;\n var options = point._options;\n var getHoverColor = helpers$1.getHoverColor;\n point.$previousStyle = {\n backgroundColor: model.backgroundColor,\n borderColor: model.borderColor,\n borderWidth: model.borderWidth,\n radius: model.radius\n };\n model.backgroundColor = valueOrDefault$7(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\n model.borderColor = valueOrDefault$7(options.hoverBorderColor, getHoverColor(options.borderColor));\n model.borderWidth = valueOrDefault$7(options.hoverBorderWidth, options.borderWidth);\n model.radius = valueOrDefault$7(options.hoverRadius, options.radius);\n }\n });\n\n core_defaults._set('scatter', {\n hover: {\n mode: 'single'\n },\n scales: {\n xAxes: [{\n id: 'x-axis-1',\n // need an ID so datasets can reference the scale\n type: 'linear',\n // scatter should not use a category axis\n position: 'bottom'\n }],\n yAxes: [{\n id: 'y-axis-1',\n type: 'linear',\n position: 'left'\n }]\n },\n tooltips: {\n callbacks: {\n title: function title() {\n return ''; // doesn't make sense for scatter since data are formatted as a point\n },\n label: function label(item) {\n return '(' + item.xLabel + ', ' + item.yLabel + ')';\n }\n }\n }\n });\n\n core_defaults._set('global', {\n datasets: {\n scatter: {\n showLine: false\n }\n }\n }); // Scatter charts use line controllers\n\n\n var controller_scatter = controller_line; // NOTE export a map in which the key represents the controller type, not\n // the class, and so must be CamelCase in order to be correctly retrieved\n // by the controller in core.controller.js (`controllers[meta.type]`).\n\n var controllers = {\n bar: controller_bar,\n bubble: controller_bubble,\n doughnut: controller_doughnut,\n horizontalBar: controller_horizontalBar,\n line: controller_line,\n polarArea: controller_polarArea,\n pie: controller_pie,\n radar: controller_radar,\n scatter: controller_scatter\n };\n /**\r\n * Helper function to get relative position for an event\r\n * @param {Event|IEvent} event - The event to get the position for\r\n * @param {Chart} chart - The chart\r\n * @returns {object} the event position\r\n */\n\n function getRelativePosition(e, chart) {\n if (e[\"native\"]) {\n return {\n x: e.x,\n y: e.y\n };\n }\n\n return helpers$1.getRelativePosition(e, chart);\n }\n /**\r\n * Helper function to traverse all of the visible elements in the chart\r\n * @param {Chart} chart - the chart\r\n * @param {function} handler - the callback to execute for each visible item\r\n */\n\n\n function parseVisibleItems(chart, handler) {\n var metasets = chart._getSortedVisibleDatasetMetas();\n\n var metadata, i, j, ilen, jlen, element;\n\n for (i = 0, ilen = metasets.length; i < ilen; ++i) {\n metadata = metasets[i].data;\n\n for (j = 0, jlen = metadata.length; j < jlen; ++j) {\n element = metadata[j];\n\n if (!element._view.skip) {\n handler(element);\n }\n }\n }\n }\n /**\r\n * Helper function to get the items that intersect the event position\r\n * @param {ChartElement[]} items - elements to filter\r\n * @param {object} position - the point to be nearest to\r\n * @return {ChartElement[]} the nearest items\r\n */\n\n\n function getIntersectItems(chart, position) {\n var elements = [];\n parseVisibleItems(chart, function (element) {\n if (element.inRange(position.x, position.y)) {\n elements.push(element);\n }\n });\n return elements;\n }\n /**\r\n * Helper function to get the items nearest to the event position considering all visible items in teh chart\r\n * @param {Chart} chart - the chart to look at elements from\r\n * @param {object} position - the point to be nearest to\r\n * @param {boolean} intersect - if true, only consider items that intersect the position\r\n * @param {function} distanceMetric - function to provide the distance between points\r\n * @return {ChartElement[]} the nearest items\r\n */\n\n\n function getNearestItems(chart, position, intersect, distanceMetric) {\n var minDistance = Number.POSITIVE_INFINITY;\n var nearestItems = [];\n parseVisibleItems(chart, function (element) {\n if (intersect && !element.inRange(position.x, position.y)) {\n return;\n }\n\n var center = element.getCenterPoint();\n var distance = distanceMetric(position, center);\n\n if (distance < minDistance) {\n nearestItems = [element];\n minDistance = distance;\n } else if (distance === minDistance) {\n // Can have multiple items at the same distance in which case we sort by size\n nearestItems.push(element);\n }\n });\n return nearestItems;\n }\n /**\r\n * Get a distance metric function for two points based on the\r\n * axis mode setting\r\n * @param {string} axis - the axis mode. x|y|xy\r\n */\n\n\n function getDistanceMetricForAxis(axis) {\n var useX = axis.indexOf('x') !== -1;\n var useY = axis.indexOf('y') !== -1;\n return function (pt1, pt2) {\n var deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;\n var deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;\n return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));\n };\n }\n\n function indexMode(chart, e, options) {\n var position = getRelativePosition(e, chart); // Default axis for index mode is 'x' to match old behaviour\n\n options.axis = options.axis || 'x';\n var distanceMetric = getDistanceMetricForAxis(options.axis);\n var items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);\n var elements = [];\n\n if (!items.length) {\n return [];\n }\n\n chart._getSortedVisibleDatasetMetas().forEach(function (meta) {\n var element = meta.data[items[0]._index]; // don't count items that are skipped (null data)\n\n if (element && !element._view.skip) {\n elements.push(element);\n }\n });\n\n return elements;\n }\n /**\r\n * @interface IInteractionOptions\r\n */\n\n /**\r\n * If true, only consider items that intersect the point\r\n * @name IInterfaceOptions#boolean\r\n * @type Boolean\r\n */\n\n /**\r\n * Contains interaction related functions\r\n * @namespace Chart.Interaction\r\n */\n\n\n var core_interaction = {\n // Helper function for different modes\n modes: {\n single: function single(chart, e) {\n var position = getRelativePosition(e, chart);\n var elements = [];\n parseVisibleItems(chart, function (element) {\n if (element.inRange(position.x, position.y)) {\n elements.push(element);\n return elements;\n }\n });\n return elements.slice(0, 1);\n },\n\n /**\r\n * @function Chart.Interaction.modes.label\r\n * @deprecated since version 2.4.0\r\n * @todo remove at version 3\r\n * @private\r\n */\n label: indexMode,\n\n /**\r\n * Returns items at the same index. If the options.intersect parameter is true, we only return items if we intersect something\r\n * If the options.intersect mode is false, we find the nearest item and return the items at the same index as that item\r\n * @function Chart.Interaction.modes.index\r\n * @since v2.4.0\r\n * @param {Chart} chart - the chart we are returning items from\r\n * @param {Event} e - the event we are find things at\r\n * @param {IInteractionOptions} options - options to use during interaction\r\n * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n */\n index: indexMode,\n\n /**\r\n * Returns items in the same dataset. If the options.intersect parameter is true, we only return items if we intersect something\r\n * If the options.intersect is false, we find the nearest item and return the items in that dataset\r\n * @function Chart.Interaction.modes.dataset\r\n * @param {Chart} chart - the chart we are returning items from\r\n * @param {Event} e - the event we are find things at\r\n * @param {IInteractionOptions} options - options to use during interaction\r\n * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n */\n dataset: function dataset(chart, e, options) {\n var position = getRelativePosition(e, chart);\n options.axis = options.axis || 'xy';\n var distanceMetric = getDistanceMetricForAxis(options.axis);\n var items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);\n\n if (items.length > 0) {\n items = chart.getDatasetMeta(items[0]._datasetIndex).data;\n }\n\n return items;\n },\n\n /**\r\n * @function Chart.Interaction.modes.x-axis\r\n * @deprecated since version 2.4.0. Use index mode and intersect == true\r\n * @todo remove at version 3\r\n * @private\r\n */\n 'x-axis': function xAxis(chart, e) {\n return indexMode(chart, e, {\n intersect: false\n });\n },\n\n /**\r\n * Point mode returns all elements that hit test based on the event position\r\n * of the event\r\n * @function Chart.Interaction.modes.intersect\r\n * @param {Chart} chart - the chart we are returning items from\r\n * @param {Event} e - the event we are find things at\r\n * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n */\n point: function point(chart, e) {\n var position = getRelativePosition(e, chart);\n return getIntersectItems(chart, position);\n },\n\n /**\r\n * nearest mode returns the element closest to the point\r\n * @function Chart.Interaction.modes.intersect\r\n * @param {Chart} chart - the chart we are returning items from\r\n * @param {Event} e - the event we are find things at\r\n * @param {IInteractionOptions} options - options to use\r\n * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n */\n nearest: function nearest(chart, e, options) {\n var position = getRelativePosition(e, chart);\n options.axis = options.axis || 'xy';\n var distanceMetric = getDistanceMetricForAxis(options.axis);\n return getNearestItems(chart, position, options.intersect, distanceMetric);\n },\n\n /**\r\n * x mode returns the elements that hit-test at the current x coordinate\r\n * @function Chart.Interaction.modes.x\r\n * @param {Chart} chart - the chart we are returning items from\r\n * @param {Event} e - the event we are find things at\r\n * @param {IInteractionOptions} options - options to use\r\n * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n */\n x: function x(chart, e, options) {\n var position = getRelativePosition(e, chart);\n var items = [];\n var intersectsItem = false;\n parseVisibleItems(chart, function (element) {\n if (element.inXRange(position.x)) {\n items.push(element);\n }\n\n if (element.inRange(position.x, position.y)) {\n intersectsItem = true;\n }\n }); // If we want to trigger on an intersect and we don't have any items\n // that intersect the position, return nothing\n\n if (options.intersect && !intersectsItem) {\n items = [];\n }\n\n return items;\n },\n\n /**\r\n * y mode returns the elements that hit-test at the current y coordinate\r\n * @function Chart.Interaction.modes.y\r\n * @param {Chart} chart - the chart we are returning items from\r\n * @param {Event} e - the event we are find things at\r\n * @param {IInteractionOptions} options - options to use\r\n * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n */\n y: function y(chart, e, options) {\n var position = getRelativePosition(e, chart);\n var items = [];\n var intersectsItem = false;\n parseVisibleItems(chart, function (element) {\n if (element.inYRange(position.y)) {\n items.push(element);\n }\n\n if (element.inRange(position.x, position.y)) {\n intersectsItem = true;\n }\n }); // If we want to trigger on an intersect and we don't have any items\n // that intersect the position, return nothing\n\n if (options.intersect && !intersectsItem) {\n items = [];\n }\n\n return items;\n }\n }\n };\n var extend = helpers$1.extend;\n\n function filterByPosition(array, position) {\n return helpers$1.where(array, function (v) {\n return v.pos === position;\n });\n }\n\n function sortByWeight(array, reverse) {\n return array.sort(function (a, b) {\n var v0 = reverse ? b : a;\n var v1 = reverse ? a : b;\n return v0.weight === v1.weight ? v0.index - v1.index : v0.weight - v1.weight;\n });\n }\n\n function wrapBoxes(boxes) {\n var layoutBoxes = [];\n var i, ilen, box;\n\n for (i = 0, ilen = (boxes || []).length; i < ilen; ++i) {\n box = boxes[i];\n layoutBoxes.push({\n index: i,\n box: box,\n pos: box.position,\n horizontal: box.isHorizontal(),\n weight: box.weight\n });\n }\n\n return layoutBoxes;\n }\n\n function setLayoutDims(layouts, params) {\n var i, ilen, layout;\n\n for (i = 0, ilen = layouts.length; i < ilen; ++i) {\n layout = layouts[i]; // store width used instead of chartArea.w in fitBoxes\n\n layout.width = layout.horizontal ? layout.box.fullWidth && params.availableWidth : params.vBoxMaxWidth; // store height used instead of chartArea.h in fitBoxes\n\n layout.height = layout.horizontal && params.hBoxMaxHeight;\n }\n }\n\n function buildLayoutBoxes(boxes) {\n var layoutBoxes = wrapBoxes(boxes);\n var left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);\n var right = sortByWeight(filterByPosition(layoutBoxes, 'right'));\n var top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);\n var bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));\n return {\n leftAndTop: left.concat(top),\n rightAndBottom: right.concat(bottom),\n chartArea: filterByPosition(layoutBoxes, 'chartArea'),\n vertical: left.concat(right),\n horizontal: top.concat(bottom)\n };\n }\n\n function getCombinedMax(maxPadding, chartArea, a, b) {\n return Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);\n }\n\n function updateDims(chartArea, params, layout) {\n var box = layout.box;\n var maxPadding = chartArea.maxPadding;\n var newWidth, newHeight;\n\n if (layout.size) {\n // this layout was already counted for, lets first reduce old size\n chartArea[layout.pos] -= layout.size;\n }\n\n layout.size = layout.horizontal ? box.height : box.width;\n chartArea[layout.pos] += layout.size;\n\n if (box.getPadding) {\n var boxPadding = box.getPadding();\n maxPadding.top = Math.max(maxPadding.top, boxPadding.top);\n maxPadding.left = Math.max(maxPadding.left, boxPadding.left);\n maxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);\n maxPadding.right = Math.max(maxPadding.right, boxPadding.right);\n }\n\n newWidth = params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right');\n newHeight = params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom');\n\n if (newWidth !== chartArea.w || newHeight !== chartArea.h) {\n chartArea.w = newWidth;\n chartArea.h = newHeight; // return true if chart area changed in layout's direction\n\n var sizes = layout.horizontal ? [newWidth, chartArea.w] : [newHeight, chartArea.h];\n return sizes[0] !== sizes[1] && (!isNaN(sizes[0]) || !isNaN(sizes[1]));\n }\n }\n\n function handleMaxPadding(chartArea) {\n var maxPadding = chartArea.maxPadding;\n\n function updatePos(pos) {\n var change = Math.max(maxPadding[pos] - chartArea[pos], 0);\n chartArea[pos] += change;\n return change;\n }\n\n chartArea.y += updatePos('top');\n chartArea.x += updatePos('left');\n updatePos('right');\n updatePos('bottom');\n }\n\n function getMargins(horizontal, chartArea) {\n var maxPadding = chartArea.maxPadding;\n\n function marginForPositions(positions) {\n var margin = {\n left: 0,\n top: 0,\n right: 0,\n bottom: 0\n };\n positions.forEach(function (pos) {\n margin[pos] = Math.max(chartArea[pos], maxPadding[pos]);\n });\n return margin;\n }\n\n return horizontal ? marginForPositions(['left', 'right']) : marginForPositions(['top', 'bottom']);\n }\n\n function fitBoxes(boxes, chartArea, params) {\n var refitBoxes = [];\n var i, ilen, layout, box, refit, changed;\n\n for (i = 0, ilen = boxes.length; i < ilen; ++i) {\n layout = boxes[i];\n box = layout.box;\n box.update(layout.width || chartArea.w, layout.height || chartArea.h, getMargins(layout.horizontal, chartArea));\n\n if (updateDims(chartArea, params, layout)) {\n changed = true;\n\n if (refitBoxes.length) {\n // Dimensions changed and there were non full width boxes before this\n // -> we have to refit those\n refit = true;\n }\n }\n\n if (!box.fullWidth) {\n // fullWidth boxes don't need to be re-fitted in any case\n refitBoxes.push(layout);\n }\n }\n\n return refit ? fitBoxes(refitBoxes, chartArea, params) || changed : changed;\n }\n\n function placeBoxes(boxes, chartArea, params) {\n var userPadding = params.padding;\n var x = chartArea.x;\n var y = chartArea.y;\n var i, ilen, layout, box;\n\n for (i = 0, ilen = boxes.length; i < ilen; ++i) {\n layout = boxes[i];\n box = layout.box;\n\n if (layout.horizontal) {\n box.left = box.fullWidth ? userPadding.left : chartArea.left;\n box.right = box.fullWidth ? params.outerWidth - userPadding.right : chartArea.left + chartArea.w;\n box.top = y;\n box.bottom = y + box.height;\n box.width = box.right - box.left;\n y = box.bottom;\n } else {\n box.left = x;\n box.right = x + box.width;\n box.top = chartArea.top;\n box.bottom = chartArea.top + chartArea.h;\n box.height = box.bottom - box.top;\n x = box.right;\n }\n }\n\n chartArea.x = x;\n chartArea.y = y;\n }\n\n core_defaults._set('global', {\n layout: {\n padding: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n }\n }\n });\n /**\r\n * @interface ILayoutItem\r\n * @prop {string} position - The position of the item in the chart layout. Possible values are\r\n * 'left', 'top', 'right', 'bottom', and 'chartArea'\r\n * @prop {number} weight - The weight used to sort the item. Higher weights are further away from the chart area\r\n * @prop {boolean} fullWidth - if true, and the item is horizontal, then push vertical boxes down\r\n * @prop {function} isHorizontal - returns true if the layout item is horizontal (ie. top or bottom)\r\n * @prop {function} update - Takes two parameters: width and height. Returns size of item\r\n * @prop {function} getPadding - Returns an object with padding on the edges\r\n * @prop {number} width - Width of item. Must be valid after update()\r\n * @prop {number} height - Height of item. Must be valid after update()\r\n * @prop {number} left - Left edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} top - Top edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} right - Right edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} bottom - Bottom edge of the item. Set by layout system and cannot be used in update\r\n */\n // The layout service is very self explanatory. It's responsible for the layout within a chart.\n // Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need\n // It is this service's responsibility of carrying out that layout.\n\n\n var core_layouts = {\n defaults: {},\n\n /**\r\n * Register a box to a chart.\r\n * A box is simply a reference to an object that requires layout. eg. Scales, Legend, Title.\r\n * @param {Chart} chart - the chart to use\r\n * @param {ILayoutItem} item - the item to add to be layed out\r\n */\n addBox: function addBox(chart, item) {\n if (!chart.boxes) {\n chart.boxes = [];\n } // initialize item with default values\n\n\n item.fullWidth = item.fullWidth || false;\n item.position = item.position || 'top';\n item.weight = item.weight || 0;\n\n item._layers = item._layers || function () {\n return [{\n z: 0,\n draw: function draw() {\n item.draw.apply(item, arguments);\n }\n }];\n };\n\n chart.boxes.push(item);\n },\n\n /**\r\n * Remove a layoutItem from a chart\r\n * @param {Chart} chart - the chart to remove the box from\r\n * @param {ILayoutItem} layoutItem - the item to remove from the layout\r\n */\n removeBox: function removeBox(chart, layoutItem) {\n var index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;\n\n if (index !== -1) {\n chart.boxes.splice(index, 1);\n }\n },\n\n /**\r\n * Sets (or updates) options on the given `item`.\r\n * @param {Chart} chart - the chart in which the item lives (or will be added to)\r\n * @param {ILayoutItem} item - the item to configure with the given options\r\n * @param {object} options - the new item options.\r\n */\n configure: function configure(chart, item, options) {\n var props = ['fullWidth', 'position', 'weight'];\n var ilen = props.length;\n var i = 0;\n var prop;\n\n for (; i < ilen; ++i) {\n prop = props[i];\n\n if (options.hasOwnProperty(prop)) {\n item[prop] = options[prop];\n }\n }\n },\n\n /**\r\n * Fits boxes of the given chart into the given size by having each box measure itself\r\n * then running a fitting algorithm\r\n * @param {Chart} chart - the chart\r\n * @param {number} width - the width to fit into\r\n * @param {number} height - the height to fit into\r\n */\n update: function update(chart, width, height) {\n if (!chart) {\n return;\n }\n\n var layoutOptions = chart.options.layout || {};\n var padding = helpers$1.options.toPadding(layoutOptions.padding);\n var availableWidth = width - padding.width;\n var availableHeight = height - padding.height;\n var boxes = buildLayoutBoxes(chart.boxes);\n var verticalBoxes = boxes.vertical;\n var horizontalBoxes = boxes.horizontal; // Essentially we now have any number of boxes on each of the 4 sides.\n // Our canvas looks like the following.\n // The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and\n // B1 is the bottom axis\n // There are also 4 quadrant-like locations (left to right instead of clockwise) reserved for chart overlays\n // These locations are single-box locations only, when trying to register a chartArea location that is already taken,\n // an error will be thrown.\n //\n // |----------------------------------------------------|\n // | T1 (Full Width) |\n // |----------------------------------------------------|\n // | | | T2 | |\n // | |----|-------------------------------------|----|\n // | | | C1 | | C2 | |\n // | | |----| |----| |\n // | | | | |\n // | L1 | L2 | ChartArea (C0) | R1 |\n // | | | | |\n // | | |----| |----| |\n // | | | C3 | | C4 | |\n // | |----|-------------------------------------|----|\n // | | | B1 | |\n // |----------------------------------------------------|\n // | B2 (Full Width) |\n // |----------------------------------------------------|\n //\n\n var params = Object.freeze({\n outerWidth: width,\n outerHeight: height,\n padding: padding,\n availableWidth: availableWidth,\n vBoxMaxWidth: availableWidth / 2 / verticalBoxes.length,\n hBoxMaxHeight: availableHeight / 2\n });\n var chartArea = extend({\n maxPadding: extend({}, padding),\n w: availableWidth,\n h: availableHeight,\n x: padding.left,\n y: padding.top\n }, padding);\n setLayoutDims(verticalBoxes.concat(horizontalBoxes), params); // First fit vertical boxes\n\n fitBoxes(verticalBoxes, chartArea, params); // Then fit horizontal boxes\n\n if (fitBoxes(horizontalBoxes, chartArea, params)) {\n // if the area changed, re-fit vertical boxes\n fitBoxes(verticalBoxes, chartArea, params);\n }\n\n handleMaxPadding(chartArea); // Finally place the boxes to correct coordinates\n\n placeBoxes(boxes.leftAndTop, chartArea, params); // Move to opposite side of chart\n\n chartArea.x += chartArea.w;\n chartArea.y += chartArea.h;\n placeBoxes(boxes.rightAndBottom, chartArea, params);\n chart.chartArea = {\n left: chartArea.left,\n top: chartArea.top,\n right: chartArea.left + chartArea.w,\n bottom: chartArea.top + chartArea.h\n }; // Finally update boxes in chartArea (radial scale for example)\n\n helpers$1.each(boxes.chartArea, function (layout) {\n var box = layout.box;\n extend(box, chart.chartArea);\n box.update(chartArea.w, chartArea.h);\n });\n }\n };\n /**\r\n * Platform fallback implementation (minimal).\r\n * @see https://github.com/chartjs/Chart.js/pull/4591#issuecomment-319575939\r\n */\n\n var platform_basic = {\n acquireContext: function acquireContext(item) {\n if (item && item.canvas) {\n // Support for any object associated to a canvas (including a context2d)\n item = item.canvas;\n }\n\n return item && item.getContext('2d') || null;\n }\n };\n var platform_dom = \"/*\\r\\n * DOM element rendering detection\\r\\n * https://davidwalsh.name/detect-node-insertion\\r\\n */\\r\\n@keyframes chartjs-render-animation {\\r\\n\\tfrom { opacity: 0.99; }\\r\\n\\tto { opacity: 1; }\\r\\n}\\r\\n\\r\\n.chartjs-render-monitor {\\r\\n\\tanimation: chartjs-render-animation 0.001s;\\r\\n}\\r\\n\\r\\n/*\\r\\n * DOM element resizing detection\\r\\n * https://github.com/marcj/css-element-queries\\r\\n */\\r\\n.chartjs-size-monitor,\\r\\n.chartjs-size-monitor-expand,\\r\\n.chartjs-size-monitor-shrink {\\r\\n\\tposition: absolute;\\r\\n\\tdirection: ltr;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n\\tright: 0;\\r\\n\\tbottom: 0;\\r\\n\\toverflow: hidden;\\r\\n\\tpointer-events: none;\\r\\n\\tvisibility: hidden;\\r\\n\\tz-index: -1;\\r\\n}\\r\\n\\r\\n.chartjs-size-monitor-expand > div {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 1000000px;\\r\\n\\theight: 1000000px;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n}\\r\\n\\r\\n.chartjs-size-monitor-shrink > div {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 200%;\\r\\n\\theight: 200%;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n}\\r\\n\";\n var platform_dom$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n 'default': platform_dom\n });\n var stylesheet = getCjsExportFromNamespace(platform_dom$1);\n var EXPANDO_KEY = '$chartjs';\n var CSS_PREFIX = 'chartjs-';\n var CSS_SIZE_MONITOR = CSS_PREFIX + 'size-monitor';\n var CSS_RENDER_MONITOR = CSS_PREFIX + 'render-monitor';\n var CSS_RENDER_ANIMATION = CSS_PREFIX + 'render-animation';\n var ANIMATION_START_EVENTS = ['animationstart', 'webkitAnimationStart'];\n /**\r\n * DOM event types -> Chart.js event types.\r\n * Note: only events with different types are mapped.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/Events\r\n */\n\n var EVENT_TYPES = {\n touchstart: 'mousedown',\n touchmove: 'mousemove',\n touchend: 'mouseup',\n pointerenter: 'mouseenter',\n pointerdown: 'mousedown',\n pointermove: 'mousemove',\n pointerup: 'mouseup',\n pointerleave: 'mouseout',\n pointerout: 'mouseout'\n };\n /**\r\n * The \"used\" size is the final value of a dimension property after all calculations have\r\n * been performed. This method uses the computed style of `element` but returns undefined\r\n * if the computed style is not expressed in pixels. That can happen in some cases where\r\n * `element` has a size relative to its parent and this last one is not yet displayed,\r\n * for example because of `display: none` on a parent node.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\r\n * @returns {number} Size in pixels or undefined if unknown.\r\n */\n\n function readUsedSize(element, property) {\n var value = helpers$1.getStyle(element, property);\n var matches = value && value.match(/^(\\d+)(\\.\\d+)?px$/);\n return matches ? Number(matches[1]) : undefined;\n }\n /**\r\n * Initializes the canvas style and render size without modifying the canvas display size,\r\n * since responsiveness is handled by the controller.resize() method. The config is used\r\n * to determine the aspect ratio to apply in case no explicit height has been specified.\r\n */\n\n\n function initCanvas(canvas, config) {\n var style = canvas.style; // NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it\n // returns null or '' if no explicit value has been set to the canvas attribute.\n\n var renderHeight = canvas.getAttribute('height');\n var renderWidth = canvas.getAttribute('width'); // Chart.js modifies some canvas values that we want to restore on destroy\n\n canvas[EXPANDO_KEY] = {\n initial: {\n height: renderHeight,\n width: renderWidth,\n style: {\n display: style.display,\n height: style.height,\n width: style.width\n }\n }\n }; // Force canvas to display as block to avoid extra space caused by inline\n // elements, which would interfere with the responsive resize process.\n // https://github.com/chartjs/Chart.js/issues/2538\n\n style.display = style.display || 'block';\n\n if (renderWidth === null || renderWidth === '') {\n var displayWidth = readUsedSize(canvas, 'width');\n\n if (displayWidth !== undefined) {\n canvas.width = displayWidth;\n }\n }\n\n if (renderHeight === null || renderHeight === '') {\n if (canvas.style.height === '') {\n // If no explicit render height and style height, let's apply the aspect ratio,\n // which one can be specified by the user but also by charts as default option\n // (i.e. options.aspectRatio). If not specified, use canvas aspect ratio of 2.\n canvas.height = canvas.width / (config.options.aspectRatio || 2);\n } else {\n var displayHeight = readUsedSize(canvas, 'height');\n\n if (displayWidth !== undefined) {\n canvas.height = displayHeight;\n }\n }\n }\n\n return canvas;\n }\n /**\r\n * Detects support for options object argument in addEventListener.\r\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\r\n * @private\r\n */\n\n\n var supportsEventListenerOptions = function () {\n var supports = false;\n\n try {\n var options = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line getter-return\n get: function get() {\n supports = true;\n }\n });\n window.addEventListener('e', null, options);\n } catch (e) {// continue regardless of error\n }\n\n return supports;\n }(); // Default passive to true as expected by Chrome for 'touchstart' and 'touchend' events.\n // https://github.com/chartjs/Chart.js/issues/4287\n\n\n var eventListenerOptions = supportsEventListenerOptions ? {\n passive: true\n } : false;\n\n function addListener(node, type, listener) {\n node.addEventListener(type, listener, eventListenerOptions);\n }\n\n function removeListener(node, type, listener) {\n node.removeEventListener(type, listener, eventListenerOptions);\n }\n\n function createEvent(type, chart, x, y, nativeEvent) {\n return {\n type: type,\n chart: chart,\n \"native\": nativeEvent || null,\n x: x !== undefined ? x : null,\n y: y !== undefined ? y : null\n };\n }\n\n function fromNativeEvent(event, chart) {\n var type = EVENT_TYPES[event.type] || event.type;\n var pos = helpers$1.getRelativePosition(event, chart);\n return createEvent(type, chart, pos.x, pos.y, event);\n }\n\n function throttled(fn, thisArg) {\n var ticking = false;\n var args = [];\n return function () {\n args = Array.prototype.slice.call(arguments);\n thisArg = thisArg || this;\n\n if (!ticking) {\n ticking = true;\n helpers$1.requestAnimFrame.call(window, function () {\n ticking = false;\n fn.apply(thisArg, args);\n });\n }\n };\n }\n\n function createDiv(cls) {\n var el = document.createElement('div');\n el.className = cls || '';\n return el;\n } // Implementation based on https://github.com/marcj/css-element-queries\n\n\n function createResizer(handler) {\n var maxSize = 1000000; // NOTE(SB) Don't use innerHTML because it could be considered unsafe.\n // https://github.com/chartjs/Chart.js/issues/5902\n\n var resizer = createDiv(CSS_SIZE_MONITOR);\n var expand = createDiv(CSS_SIZE_MONITOR + '-expand');\n var shrink = createDiv(CSS_SIZE_MONITOR + '-shrink');\n expand.appendChild(createDiv());\n shrink.appendChild(createDiv());\n resizer.appendChild(expand);\n resizer.appendChild(shrink);\n\n resizer._reset = function () {\n expand.scrollLeft = maxSize;\n expand.scrollTop = maxSize;\n shrink.scrollLeft = maxSize;\n shrink.scrollTop = maxSize;\n };\n\n var onScroll = function onScroll() {\n resizer._reset();\n\n handler();\n };\n\n addListener(expand, 'scroll', onScroll.bind(expand, 'expand'));\n addListener(shrink, 'scroll', onScroll.bind(shrink, 'shrink'));\n return resizer;\n } // https://davidwalsh.name/detect-node-insertion\n\n\n function watchForRender(node, handler) {\n var expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});\n\n var proxy = expando.renderProxy = function (e) {\n if (e.animationName === CSS_RENDER_ANIMATION) {\n handler();\n }\n };\n\n helpers$1.each(ANIMATION_START_EVENTS, function (type) {\n addListener(node, type, proxy);\n }); // #4737: Chrome might skip the CSS animation when the CSS_RENDER_MONITOR class\n // is removed then added back immediately (same animation frame?). Accessing the\n // `offsetParent` property will force a reflow and re-evaluate the CSS animation.\n // https://gist.github.com/paulirish/5d52fb081b3570c81e3a#box-metrics\n // https://github.com/chartjs/Chart.js/issues/4737\n\n expando.reflow = !!node.offsetParent;\n node.classList.add(CSS_RENDER_MONITOR);\n }\n\n function unwatchForRender(node) {\n var expando = node[EXPANDO_KEY] || {};\n var proxy = expando.renderProxy;\n\n if (proxy) {\n helpers$1.each(ANIMATION_START_EVENTS, function (type) {\n removeListener(node, type, proxy);\n });\n delete expando.renderProxy;\n }\n\n node.classList.remove(CSS_RENDER_MONITOR);\n }\n\n function addResizeListener(node, listener, chart) {\n var expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {}); // Let's keep track of this added resizer and thus avoid DOM query when removing it.\n\n var resizer = expando.resizer = createResizer(throttled(function () {\n if (expando.resizer) {\n var container = chart.options.maintainAspectRatio && node.parentNode;\n var w = container ? container.clientWidth : 0;\n listener(createEvent('resize', chart));\n\n if (container && container.clientWidth < w && chart.canvas) {\n // If the container size shrank during chart resize, let's assume\n // scrollbar appeared. So we resize again with the scrollbar visible -\n // effectively making chart smaller and the scrollbar hidden again.\n // Because we are inside `throttled`, and currently `ticking`, scroll\n // events are ignored during this whole 2 resize process.\n // If we assumed wrong and something else happened, we are resizing\n // twice in a frame (potential performance issue)\n listener(createEvent('resize', chart));\n }\n }\n })); // The resizer needs to be attached to the node parent, so we first need to be\n // sure that `node` is attached to the DOM before injecting the resizer element.\n\n watchForRender(node, function () {\n if (expando.resizer) {\n var container = node.parentNode;\n\n if (container && container !== resizer.parentNode) {\n container.insertBefore(resizer, container.firstChild);\n } // The container size might have changed, let's reset the resizer state.\n\n\n resizer._reset();\n }\n });\n }\n\n function removeResizeListener(node) {\n var expando = node[EXPANDO_KEY] || {};\n var resizer = expando.resizer;\n delete expando.resizer;\n unwatchForRender(node);\n\n if (resizer && resizer.parentNode) {\n resizer.parentNode.removeChild(resizer);\n }\n }\n /**\r\n * Injects CSS styles inline if the styles are not already present.\r\n * @param {HTMLDocument|ShadowRoot} rootNode - the node to contain the