` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: _propTypes.default.any,\n\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: _propTypes.default.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: _propTypes.default.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: _propTypes.default.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: _propTypes.default.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: _propTypes.default.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\n\nvar _default = (0, _reactLifecyclesCompat.polyfill)(TransitionGroup);\n\nexports.default = _default;\nmodule.exports = exports[\"default\"];","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.is === 'function' ? Object.is : implementation;\n};\n","'use strict';\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\nvar $TypeError = TypeError;\n\nmodule.exports = function getPolyfill() {\n\tif (!supportsDescriptors) {\n\t\tthrow new $TypeError('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tif ((/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (descriptor && typeof descriptor.get === 'function' && typeof (/a/).dotAll === 'boolean') {\n\t\t\treturn descriptor.get;\n\t\t}\n\t}\n\treturn implementation;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HitContext = exports.SceneContext = exports.Context = void 0;\nconst Util_1 = require(\"./Util\");\nconst Global_1 = require(\"./Global\");\nfunction simplifyArray(arr) {\n var retArr = [], len = arr.length, util = Util_1.Util, n, val;\n for (n = 0; n < len; n++) {\n val = arr[n];\n if (util._isNumber(val)) {\n val = Math.round(val * 1000) / 1000;\n }\n else if (!util._isString(val)) {\n val = val + '';\n }\n retArr.push(val);\n }\n return retArr;\n}\nvar COMMA = ',', OPEN_PAREN = '(', CLOSE_PAREN = ')', OPEN_PAREN_BRACKET = '([', CLOSE_BRACKET_PAREN = '])', SEMICOLON = ';', DOUBLE_PAREN = '()', EQUALS = '=', CONTEXT_METHODS = [\n 'arc',\n 'arcTo',\n 'beginPath',\n 'bezierCurveTo',\n 'clearRect',\n 'clip',\n 'closePath',\n 'createLinearGradient',\n 'createPattern',\n 'createRadialGradient',\n 'drawImage',\n 'ellipse',\n 'fill',\n 'fillText',\n 'getImageData',\n 'createImageData',\n 'lineTo',\n 'moveTo',\n 'putImageData',\n 'quadraticCurveTo',\n 'rect',\n 'restore',\n 'rotate',\n 'save',\n 'scale',\n 'setLineDash',\n 'setTransform',\n 'stroke',\n 'strokeText',\n 'transform',\n 'translate',\n];\nvar CONTEXT_PROPERTIES = [\n 'fillStyle',\n 'strokeStyle',\n 'shadowColor',\n 'shadowBlur',\n 'shadowOffsetX',\n 'shadowOffsetY',\n 'letterSpacing',\n 'lineCap',\n 'lineDashOffset',\n 'lineJoin',\n 'lineWidth',\n 'miterLimit',\n 'direction',\n 'font',\n 'textAlign',\n 'textBaseline',\n 'globalAlpha',\n 'globalCompositeOperation',\n 'imageSmoothingEnabled',\n];\nconst traceArrMax = 100;\nclass Context {\n constructor(canvas) {\n this.canvas = canvas;\n if (Global_1.Konva.enableTrace) {\n this.traceArr = [];\n this._enableTrace();\n }\n }\n fillShape(shape) {\n if (shape.fillEnabled()) {\n this._fill(shape);\n }\n }\n _fill(shape) {\n }\n strokeShape(shape) {\n if (shape.hasStroke()) {\n this._stroke(shape);\n }\n }\n _stroke(shape) {\n }\n fillStrokeShape(shape) {\n if (shape.attrs.fillAfterStrokeEnabled) {\n this.strokeShape(shape);\n this.fillShape(shape);\n }\n else {\n this.fillShape(shape);\n this.strokeShape(shape);\n }\n }\n getTrace(relaxed, rounded) {\n var traceArr = this.traceArr, len = traceArr.length, str = '', n, trace, method, args;\n for (n = 0; n < len; n++) {\n trace = traceArr[n];\n method = trace.method;\n if (method) {\n args = trace.args;\n str += method;\n if (relaxed) {\n str += DOUBLE_PAREN;\n }\n else {\n if (Util_1.Util._isArray(args[0])) {\n str += OPEN_PAREN_BRACKET + args.join(COMMA) + CLOSE_BRACKET_PAREN;\n }\n else {\n if (rounded) {\n args = args.map((a) => typeof a === 'number' ? Math.floor(a) : a);\n }\n str += OPEN_PAREN + args.join(COMMA) + CLOSE_PAREN;\n }\n }\n }\n else {\n str += trace.property;\n if (!relaxed) {\n str += EQUALS + trace.val;\n }\n }\n str += SEMICOLON;\n }\n return str;\n }\n clearTrace() {\n this.traceArr = [];\n }\n _trace(str) {\n var traceArr = this.traceArr, len;\n traceArr.push(str);\n len = traceArr.length;\n if (len >= traceArrMax) {\n traceArr.shift();\n }\n }\n reset() {\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(1 * pixelRatio, 0, 0, 1 * pixelRatio, 0, 0);\n }\n getCanvas() {\n return this.canvas;\n }\n clear(bounds) {\n var canvas = this.getCanvas();\n if (bounds) {\n this.clearRect(bounds.x || 0, bounds.y || 0, bounds.width || 0, bounds.height || 0);\n }\n else {\n this.clearRect(0, 0, canvas.getWidth() / canvas.pixelRatio, canvas.getHeight() / canvas.pixelRatio);\n }\n }\n _applyLineCap(shape) {\n const lineCap = shape.attrs.lineCap;\n if (lineCap) {\n this.setAttr('lineCap', lineCap);\n }\n }\n _applyOpacity(shape) {\n var absOpacity = shape.getAbsoluteOpacity();\n if (absOpacity !== 1) {\n this.setAttr('globalAlpha', absOpacity);\n }\n }\n _applyLineJoin(shape) {\n const lineJoin = shape.attrs.lineJoin;\n if (lineJoin) {\n this.setAttr('lineJoin', lineJoin);\n }\n }\n setAttr(attr, val) {\n this._context[attr] = val;\n }\n arc(x, y, radius, startAngle, endAngle, counterClockwise) {\n this._context.arc(x, y, radius, startAngle, endAngle, counterClockwise);\n }\n arcTo(x1, y1, x2, y2, radius) {\n this._context.arcTo(x1, y1, x2, y2, radius);\n }\n beginPath() {\n this._context.beginPath();\n }\n bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {\n this._context.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n }\n clearRect(x, y, width, height) {\n this._context.clearRect(x, y, width, height);\n }\n clip(...args) {\n this._context.clip.apply(this._context, args);\n }\n closePath() {\n this._context.closePath();\n }\n createImageData(width, height) {\n var a = arguments;\n if (a.length === 2) {\n return this._context.createImageData(width, height);\n }\n else if (a.length === 1) {\n return this._context.createImageData(width);\n }\n }\n createLinearGradient(x0, y0, x1, y1) {\n return this._context.createLinearGradient(x0, y0, x1, y1);\n }\n createPattern(image, repetition) {\n return this._context.createPattern(image, repetition);\n }\n createRadialGradient(x0, y0, r0, x1, y1, r1) {\n return this._context.createRadialGradient(x0, y0, r0, x1, y1, r1);\n }\n drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight) {\n var a = arguments, _context = this._context;\n if (a.length === 3) {\n _context.drawImage(image, sx, sy);\n }\n else if (a.length === 5) {\n _context.drawImage(image, sx, sy, sWidth, sHeight);\n }\n else if (a.length === 9) {\n _context.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight);\n }\n }\n ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, counterclockwise) {\n this._context.ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, counterclockwise);\n }\n isPointInPath(x, y, path, fillRule) {\n if (path) {\n return this._context.isPointInPath(path, x, y, fillRule);\n }\n return this._context.isPointInPath(x, y, fillRule);\n }\n fill(...args) {\n this._context.fill.apply(this._context, args);\n }\n fillRect(x, y, width, height) {\n this._context.fillRect(x, y, width, height);\n }\n strokeRect(x, y, width, height) {\n this._context.strokeRect(x, y, width, height);\n }\n fillText(text, x, y, maxWidth) {\n if (maxWidth) {\n this._context.fillText(text, x, y, maxWidth);\n }\n else {\n this._context.fillText(text, x, y);\n }\n }\n measureText(text) {\n return this._context.measureText(text);\n }\n getImageData(sx, sy, sw, sh) {\n return this._context.getImageData(sx, sy, sw, sh);\n }\n lineTo(x, y) {\n this._context.lineTo(x, y);\n }\n moveTo(x, y) {\n this._context.moveTo(x, y);\n }\n rect(x, y, width, height) {\n this._context.rect(x, y, width, height);\n }\n putImageData(imageData, dx, dy) {\n this._context.putImageData(imageData, dx, dy);\n }\n quadraticCurveTo(cpx, cpy, x, y) {\n this._context.quadraticCurveTo(cpx, cpy, x, y);\n }\n restore() {\n this._context.restore();\n }\n rotate(angle) {\n this._context.rotate(angle);\n }\n save() {\n this._context.save();\n }\n scale(x, y) {\n this._context.scale(x, y);\n }\n setLineDash(segments) {\n if (this._context.setLineDash) {\n this._context.setLineDash(segments);\n }\n else if ('mozDash' in this._context) {\n this._context['mozDash'] = segments;\n }\n else if ('webkitLineDash' in this._context) {\n this._context['webkitLineDash'] = segments;\n }\n }\n getLineDash() {\n return this._context.getLineDash();\n }\n setTransform(a, b, c, d, e, f) {\n this._context.setTransform(a, b, c, d, e, f);\n }\n stroke(path2d) {\n if (path2d) {\n this._context.stroke(path2d);\n }\n else {\n this._context.stroke();\n }\n }\n strokeText(text, x, y, maxWidth) {\n this._context.strokeText(text, x, y, maxWidth);\n }\n transform(a, b, c, d, e, f) {\n this._context.transform(a, b, c, d, e, f);\n }\n translate(x, y) {\n this._context.translate(x, y);\n }\n _enableTrace() {\n var that = this, len = CONTEXT_METHODS.length, origSetter = this.setAttr, n, args;\n var func = function (methodName) {\n var origMethod = that[methodName], ret;\n that[methodName] = function () {\n args = simplifyArray(Array.prototype.slice.call(arguments, 0));\n ret = origMethod.apply(that, arguments);\n that._trace({\n method: methodName,\n args: args,\n });\n return ret;\n };\n };\n for (n = 0; n < len; n++) {\n func(CONTEXT_METHODS[n]);\n }\n that.setAttr = function () {\n origSetter.apply(that, arguments);\n var prop = arguments[0];\n var val = arguments[1];\n if (prop === 'shadowOffsetX' ||\n prop === 'shadowOffsetY' ||\n prop === 'shadowBlur') {\n val = val / this.canvas.getPixelRatio();\n }\n that._trace({\n property: prop,\n val: val,\n });\n };\n }\n _applyGlobalCompositeOperation(node) {\n const op = node.attrs.globalCompositeOperation;\n var def = !op || op === 'source-over';\n if (!def) {\n this.setAttr('globalCompositeOperation', op);\n }\n }\n}\nexports.Context = Context;\nCONTEXT_PROPERTIES.forEach(function (prop) {\n Object.defineProperty(Context.prototype, prop, {\n get() {\n return this._context[prop];\n },\n set(val) {\n this._context[prop] = val;\n },\n });\n});\nclass SceneContext extends Context {\n constructor(canvas, { willReadFrequently = false } = {}) {\n super(canvas);\n this._context = canvas._canvas.getContext('2d', {\n willReadFrequently,\n });\n }\n _fillColor(shape) {\n var fill = shape.fill();\n this.setAttr('fillStyle', fill);\n shape._fillFunc(this);\n }\n _fillPattern(shape) {\n this.setAttr('fillStyle', shape._getFillPattern());\n shape._fillFunc(this);\n }\n _fillLinearGradient(shape) {\n var grd = shape._getLinearGradient();\n if (grd) {\n this.setAttr('fillStyle', grd);\n shape._fillFunc(this);\n }\n }\n _fillRadialGradient(shape) {\n const grd = shape._getRadialGradient();\n if (grd) {\n this.setAttr('fillStyle', grd);\n shape._fillFunc(this);\n }\n }\n _fill(shape) {\n const hasColor = shape.fill(), fillPriority = shape.getFillPriority();\n if (hasColor && fillPriority === 'color') {\n this._fillColor(shape);\n return;\n }\n const hasPattern = shape.getFillPatternImage();\n if (hasPattern && fillPriority === 'pattern') {\n this._fillPattern(shape);\n return;\n }\n const hasLinearGradient = shape.getFillLinearGradientColorStops();\n if (hasLinearGradient && fillPriority === 'linear-gradient') {\n this._fillLinearGradient(shape);\n return;\n }\n const hasRadialGradient = shape.getFillRadialGradientColorStops();\n if (hasRadialGradient && fillPriority === 'radial-gradient') {\n this._fillRadialGradient(shape);\n return;\n }\n if (hasColor) {\n this._fillColor(shape);\n }\n else if (hasPattern) {\n this._fillPattern(shape);\n }\n else if (hasLinearGradient) {\n this._fillLinearGradient(shape);\n }\n else if (hasRadialGradient) {\n this._fillRadialGradient(shape);\n }\n }\n _strokeLinearGradient(shape) {\n const start = shape.getStrokeLinearGradientStartPoint(), end = shape.getStrokeLinearGradientEndPoint(), colorStops = shape.getStrokeLinearGradientColorStops(), grd = this.createLinearGradient(start.x, start.y, end.x, end.y);\n if (colorStops) {\n for (var n = 0; n < colorStops.length; n += 2) {\n grd.addColorStop(colorStops[n], colorStops[n + 1]);\n }\n this.setAttr('strokeStyle', grd);\n }\n }\n _stroke(shape) {\n var dash = shape.dash(), strokeScaleEnabled = shape.getStrokeScaleEnabled();\n if (shape.hasStroke()) {\n if (!strokeScaleEnabled) {\n this.save();\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n }\n this._applyLineCap(shape);\n if (dash && shape.dashEnabled()) {\n this.setLineDash(dash);\n this.setAttr('lineDashOffset', shape.dashOffset());\n }\n this.setAttr('lineWidth', shape.strokeWidth());\n if (!shape.getShadowForStrokeEnabled()) {\n this.setAttr('shadowColor', 'rgba(0,0,0,0)');\n }\n var hasLinearGradient = shape.getStrokeLinearGradientColorStops();\n if (hasLinearGradient) {\n this._strokeLinearGradient(shape);\n }\n else {\n this.setAttr('strokeStyle', shape.stroke());\n }\n shape._strokeFunc(this);\n if (!strokeScaleEnabled) {\n this.restore();\n }\n }\n }\n _applyShadow(shape) {\n var _a, _b, _c;\n var color = (_a = shape.getShadowRGBA()) !== null && _a !== void 0 ? _a : 'black', blur = (_b = shape.getShadowBlur()) !== null && _b !== void 0 ? _b : 5, offset = (_c = shape.getShadowOffset()) !== null && _c !== void 0 ? _c : {\n x: 0,\n y: 0,\n }, scale = shape.getAbsoluteScale(), ratio = this.canvas.getPixelRatio(), scaleX = scale.x * ratio, scaleY = scale.y * ratio;\n this.setAttr('shadowColor', color);\n this.setAttr('shadowBlur', blur * Math.min(Math.abs(scaleX), Math.abs(scaleY)));\n this.setAttr('shadowOffsetX', offset.x * scaleX);\n this.setAttr('shadowOffsetY', offset.y * scaleY);\n }\n}\nexports.SceneContext = SceneContext;\nclass HitContext extends Context {\n constructor(canvas) {\n super(canvas);\n this._context = canvas._canvas.getContext('2d', {\n willReadFrequently: true,\n });\n }\n _fill(shape) {\n this.save();\n this.setAttr('fillStyle', shape.colorKey);\n shape._fillFuncHit(this);\n this.restore();\n }\n strokeShape(shape) {\n if (shape.hasHitStroke()) {\n this._stroke(shape);\n }\n }\n _stroke(shape) {\n if (shape.hasHitStroke()) {\n const strokeScaleEnabled = shape.getStrokeScaleEnabled();\n if (!strokeScaleEnabled) {\n this.save();\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n }\n this._applyLineCap(shape);\n var hitStrokeWidth = shape.hitStrokeWidth();\n var strokeWidth = hitStrokeWidth === 'auto' ? shape.strokeWidth() : hitStrokeWidth;\n this.setAttr('lineWidth', strokeWidth);\n this.setAttr('strokeStyle', shape.colorKey);\n shape._strokeFuncHit(this);\n if (!strokeScaleEnabled) {\n this.restore();\n }\n }\n }\n}\nexports.HitContext = HitContext;\n","var defineProperty = require(\"./defineProperty\");\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectSpread2;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.releaseCapture = exports.setPointerCapture = exports.hasPointerCapture = exports.createEvent = exports.getCapturedShape = void 0;\nconst Global_1 = require(\"./Global\");\nconst Captures = new Map();\nconst SUPPORT_POINTER_EVENTS = Global_1.Konva._global['PointerEvent'] !== undefined;\nfunction getCapturedShape(pointerId) {\n return Captures.get(pointerId);\n}\nexports.getCapturedShape = getCapturedShape;\nfunction createEvent(evt) {\n return {\n evt,\n pointerId: evt.pointerId,\n };\n}\nexports.createEvent = createEvent;\nfunction hasPointerCapture(pointerId, shape) {\n return Captures.get(pointerId) === shape;\n}\nexports.hasPointerCapture = hasPointerCapture;\nfunction setPointerCapture(pointerId, shape) {\n releaseCapture(pointerId);\n const stage = shape.getStage();\n if (!stage)\n return;\n Captures.set(pointerId, shape);\n if (SUPPORT_POINTER_EVENTS) {\n shape._fire('gotpointercapture', createEvent(new PointerEvent('gotpointercapture')));\n }\n}\nexports.setPointerCapture = setPointerCapture;\nfunction releaseCapture(pointerId, target) {\n const shape = Captures.get(pointerId);\n if (!shape)\n return;\n const stage = shape.getStage();\n if (stage && stage.content) {\n }\n Captures.delete(pointerId);\n if (SUPPORT_POINTER_EVENTS) {\n shape._fire('lostpointercapture', createEvent(new PointerEvent('lostpointercapture')));\n }\n}\nexports.releaseCapture = releaseCapture;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Layer = void 0;\nconst Util_1 = require(\"./Util\");\nconst Container_1 = require(\"./Container\");\nconst Node_1 = require(\"./Node\");\nconst Factory_1 = require(\"./Factory\");\nconst Canvas_1 = require(\"./Canvas\");\nconst Validators_1 = require(\"./Validators\");\nconst Shape_1 = require(\"./Shape\");\nconst Global_1 = require(\"./Global\");\nvar HASH = '#', BEFORE_DRAW = 'beforeDraw', DRAW = 'draw', INTERSECTION_OFFSETS = [\n { x: 0, y: 0 },\n { x: -1, y: -1 },\n { x: 1, y: -1 },\n { x: 1, y: 1 },\n { x: -1, y: 1 },\n], INTERSECTION_OFFSETS_LEN = INTERSECTION_OFFSETS.length;\nclass Layer extends Container_1.Container {\n constructor(config) {\n super(config);\n this.canvas = new Canvas_1.SceneCanvas();\n this.hitCanvas = new Canvas_1.HitCanvas({\n pixelRatio: 1,\n });\n this._waitingForDraw = false;\n this.on('visibleChange.konva', this._checkVisibility);\n this._checkVisibility();\n this.on('imageSmoothingEnabledChange.konva', this._setSmoothEnabled);\n this._setSmoothEnabled();\n }\n createPNGStream() {\n const c = this.canvas._canvas;\n return c.createPNGStream();\n }\n getCanvas() {\n return this.canvas;\n }\n getNativeCanvasElement() {\n return this.canvas._canvas;\n }\n getHitCanvas() {\n return this.hitCanvas;\n }\n getContext() {\n return this.getCanvas().getContext();\n }\n clear(bounds) {\n this.getContext().clear(bounds);\n this.getHitCanvas().getContext().clear(bounds);\n return this;\n }\n setZIndex(index) {\n super.setZIndex(index);\n var stage = this.getStage();\n if (stage && stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n if (index < stage.children.length - 1) {\n stage.content.insertBefore(this.getNativeCanvasElement(), stage.children[index + 1].getCanvas()._canvas);\n }\n else {\n stage.content.appendChild(this.getNativeCanvasElement());\n }\n }\n return this;\n }\n moveToTop() {\n Node_1.Node.prototype.moveToTop.call(this);\n var stage = this.getStage();\n if (stage && stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n stage.content.appendChild(this.getNativeCanvasElement());\n }\n return true;\n }\n moveUp() {\n var moved = Node_1.Node.prototype.moveUp.call(this);\n if (!moved) {\n return false;\n }\n var stage = this.getStage();\n if (!stage || !stage.content) {\n return false;\n }\n stage.content.removeChild(this.getNativeCanvasElement());\n if (this.index < stage.children.length - 1) {\n stage.content.insertBefore(this.getNativeCanvasElement(), stage.children[this.index + 1].getCanvas()._canvas);\n }\n else {\n stage.content.appendChild(this.getNativeCanvasElement());\n }\n return true;\n }\n moveDown() {\n if (Node_1.Node.prototype.moveDown.call(this)) {\n var stage = this.getStage();\n if (stage) {\n var children = stage.children;\n if (stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n stage.content.insertBefore(this.getNativeCanvasElement(), children[this.index + 1].getCanvas()._canvas);\n }\n }\n return true;\n }\n return false;\n }\n moveToBottom() {\n if (Node_1.Node.prototype.moveToBottom.call(this)) {\n var stage = this.getStage();\n if (stage) {\n var children = stage.children;\n if (stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n stage.content.insertBefore(this.getNativeCanvasElement(), children[1].getCanvas()._canvas);\n }\n }\n return true;\n }\n return false;\n }\n getLayer() {\n return this;\n }\n remove() {\n var _canvas = this.getNativeCanvasElement();\n Node_1.Node.prototype.remove.call(this);\n if (_canvas && _canvas.parentNode && Util_1.Util._isInDocument(_canvas)) {\n _canvas.parentNode.removeChild(_canvas);\n }\n return this;\n }\n getStage() {\n return this.parent;\n }\n setSize({ width, height }) {\n this.canvas.setSize(width, height);\n this.hitCanvas.setSize(width, height);\n this._setSmoothEnabled();\n return this;\n }\n _validateAdd(child) {\n var type = child.getType();\n if (type !== 'Group' && type !== 'Shape') {\n Util_1.Util.throw('You may only add groups and shapes to a layer.');\n }\n }\n _toKonvaCanvas(config) {\n config = config || {};\n config.width = config.width || this.getWidth();\n config.height = config.height || this.getHeight();\n config.x = config.x !== undefined ? config.x : this.x();\n config.y = config.y !== undefined ? config.y : this.y();\n return Node_1.Node.prototype._toKonvaCanvas.call(this, config);\n }\n _checkVisibility() {\n const visible = this.visible();\n if (visible) {\n this.canvas._canvas.style.display = 'block';\n }\n else {\n this.canvas._canvas.style.display = 'none';\n }\n }\n _setSmoothEnabled() {\n this.getContext()._context.imageSmoothingEnabled =\n this.imageSmoothingEnabled();\n }\n getWidth() {\n if (this.parent) {\n return this.parent.width();\n }\n }\n setWidth() {\n Util_1.Util.warn('Can not change width of layer. Use \"stage.width(value)\" function instead.');\n }\n getHeight() {\n if (this.parent) {\n return this.parent.height();\n }\n }\n setHeight() {\n Util_1.Util.warn('Can not change height of layer. Use \"stage.height(value)\" function instead.');\n }\n batchDraw() {\n if (!this._waitingForDraw) {\n this._waitingForDraw = true;\n Util_1.Util.requestAnimFrame(() => {\n this.draw();\n this._waitingForDraw = false;\n });\n }\n return this;\n }\n getIntersection(pos) {\n if (!this.isListening() || !this.isVisible()) {\n return null;\n }\n var spiralSearchDistance = 1;\n var continueSearch = false;\n while (true) {\n for (let i = 0; i < INTERSECTION_OFFSETS_LEN; i++) {\n const intersectionOffset = INTERSECTION_OFFSETS[i];\n const obj = this._getIntersection({\n x: pos.x + intersectionOffset.x * spiralSearchDistance,\n y: pos.y + intersectionOffset.y * spiralSearchDistance,\n });\n const shape = obj.shape;\n if (shape) {\n return shape;\n }\n continueSearch = !!obj.antialiased;\n if (!obj.antialiased) {\n break;\n }\n }\n if (continueSearch) {\n spiralSearchDistance += 1;\n }\n else {\n return null;\n }\n }\n }\n _getIntersection(pos) {\n const ratio = this.hitCanvas.pixelRatio;\n const p = this.hitCanvas.context.getImageData(Math.round(pos.x * ratio), Math.round(pos.y * ratio), 1, 1).data;\n const p3 = p[3];\n if (p3 === 255) {\n const colorKey = Util_1.Util._rgbToHex(p[0], p[1], p[2]);\n const shape = Shape_1.shapes[HASH + colorKey];\n if (shape) {\n return {\n shape: shape,\n };\n }\n return {\n antialiased: true,\n };\n }\n else if (p3 > 0) {\n return {\n antialiased: true,\n };\n }\n return {};\n }\n drawScene(can, top) {\n var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas());\n this._fire(BEFORE_DRAW, {\n node: this,\n });\n if (this.clearBeforeDraw()) {\n canvas.getContext().clear();\n }\n Container_1.Container.prototype.drawScene.call(this, canvas, top);\n this._fire(DRAW, {\n node: this,\n });\n return this;\n }\n drawHit(can, top) {\n var layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas);\n if (layer && layer.clearBeforeDraw()) {\n layer.getHitCanvas().getContext().clear();\n }\n Container_1.Container.prototype.drawHit.call(this, canvas, top);\n return this;\n }\n enableHitGraph() {\n this.hitGraphEnabled(true);\n return this;\n }\n disableHitGraph() {\n this.hitGraphEnabled(false);\n return this;\n }\n setHitGraphEnabled(val) {\n Util_1.Util.warn('hitGraphEnabled method is deprecated. Please use layer.listening() instead.');\n this.listening(val);\n }\n getHitGraphEnabled(val) {\n Util_1.Util.warn('hitGraphEnabled method is deprecated. Please use layer.listening() instead.');\n return this.listening();\n }\n toggleHitCanvas() {\n if (!this.parent || !this.parent['content']) {\n return;\n }\n var parent = this.parent;\n var added = !!this.hitCanvas._canvas.parentNode;\n if (added) {\n parent.content.removeChild(this.hitCanvas._canvas);\n }\n else {\n parent.content.appendChild(this.hitCanvas._canvas);\n }\n }\n destroy() {\n Util_1.Util.releaseCanvas(this.getNativeCanvasElement(), this.getHitCanvas()._canvas);\n return super.destroy();\n }\n}\nexports.Layer = Layer;\nLayer.prototype.nodeType = 'Layer';\n(0, Global_1._registerNode)(Layer);\nFactory_1.Factory.addGetterSetter(Layer, 'imageSmoothingEnabled', true);\nFactory_1.Factory.addGetterSetter(Layer, 'clearBeforeDraw', true);\nFactory_1.Factory.addGetterSetter(Layer, 'hitGraphEnabled', true, (0, Validators_1.getBooleanValidator)());\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Line = void 0;\nconst Factory_1 = require(\"../Factory\");\nconst Shape_1 = require(\"../Shape\");\nconst Validators_1 = require(\"../Validators\");\nconst Global_1 = require(\"../Global\");\nfunction getControlPoints(x0, y0, x1, y1, x2, y2, t) {\n var d01 = Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2)), d12 = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)), fa = (t * d01) / (d01 + d12), fb = (t * d12) / (d01 + d12), p1x = x1 - fa * (x2 - x0), p1y = y1 - fa * (y2 - y0), p2x = x1 + fb * (x2 - x0), p2y = y1 + fb * (y2 - y0);\n return [p1x, p1y, p2x, p2y];\n}\nfunction expandPoints(p, tension) {\n var len = p.length, allPoints = [], n, cp;\n for (n = 2; n < len - 2; n += 2) {\n cp = getControlPoints(p[n - 2], p[n - 1], p[n], p[n + 1], p[n + 2], p[n + 3], tension);\n if (isNaN(cp[0])) {\n continue;\n }\n allPoints.push(cp[0]);\n allPoints.push(cp[1]);\n allPoints.push(p[n]);\n allPoints.push(p[n + 1]);\n allPoints.push(cp[2]);\n allPoints.push(cp[3]);\n }\n return allPoints;\n}\nclass Line extends Shape_1.Shape {\n constructor(config) {\n super(config);\n this.on('pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva', function () {\n this._clearCache('tensionPoints');\n });\n }\n _sceneFunc(context) {\n var points = this.points(), length = points.length, tension = this.tension(), closed = this.closed(), bezier = this.bezier(), tp, len, n;\n if (!length) {\n return;\n }\n context.beginPath();\n context.moveTo(points[0], points[1]);\n if (tension !== 0 && length > 4) {\n tp = this.getTensionPoints();\n len = tp.length;\n n = closed ? 0 : 4;\n if (!closed) {\n context.quadraticCurveTo(tp[0], tp[1], tp[2], tp[3]);\n }\n while (n < len - 2) {\n context.bezierCurveTo(tp[n++], tp[n++], tp[n++], tp[n++], tp[n++], tp[n++]);\n }\n if (!closed) {\n context.quadraticCurveTo(tp[len - 2], tp[len - 1], points[length - 2], points[length - 1]);\n }\n }\n else if (bezier) {\n n = 2;\n while (n < length) {\n context.bezierCurveTo(points[n++], points[n++], points[n++], points[n++], points[n++], points[n++]);\n }\n }\n else {\n for (n = 2; n < length; n += 2) {\n context.lineTo(points[n], points[n + 1]);\n }\n }\n if (closed) {\n context.closePath();\n context.fillStrokeShape(this);\n }\n else {\n context.strokeShape(this);\n }\n }\n getTensionPoints() {\n return this._getCache('tensionPoints', this._getTensionPoints);\n }\n _getTensionPoints() {\n if (this.closed()) {\n return this._getTensionPointsClosed();\n }\n else {\n return expandPoints(this.points(), this.tension());\n }\n }\n _getTensionPointsClosed() {\n var p = this.points(), len = p.length, tension = this.tension(), firstControlPoints = getControlPoints(p[len - 2], p[len - 1], p[0], p[1], p[2], p[3], tension), lastControlPoints = getControlPoints(p[len - 4], p[len - 3], p[len - 2], p[len - 1], p[0], p[1], tension), middle = expandPoints(p, tension), tp = [firstControlPoints[2], firstControlPoints[3]]\n .concat(middle)\n .concat([\n lastControlPoints[0],\n lastControlPoints[1],\n p[len - 2],\n p[len - 1],\n lastControlPoints[2],\n lastControlPoints[3],\n firstControlPoints[0],\n firstControlPoints[1],\n p[0],\n p[1],\n ]);\n return tp;\n }\n getWidth() {\n return this.getSelfRect().width;\n }\n getHeight() {\n return this.getSelfRect().height;\n }\n getSelfRect() {\n var points = this.points();\n if (points.length < 4) {\n return {\n x: points[0] || 0,\n y: points[1] || 0,\n width: 0,\n height: 0,\n };\n }\n if (this.tension() !== 0) {\n points = [\n points[0],\n points[1],\n ...this._getTensionPoints(),\n points[points.length - 2],\n points[points.length - 1],\n ];\n }\n else {\n points = this.points();\n }\n var minX = points[0];\n var maxX = points[0];\n var minY = points[1];\n var maxY = points[1];\n var x, y;\n for (var i = 0; i < points.length / 2; i++) {\n x = points[i * 2];\n y = points[i * 2 + 1];\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n}\nexports.Line = Line;\nLine.prototype.className = 'Line';\nLine.prototype._attrsAffectingSize = ['points', 'bezier', 'tension'];\n(0, Global_1._registerNode)(Line);\nFactory_1.Factory.addGetterSetter(Line, 'closed', false);\nFactory_1.Factory.addGetterSetter(Line, 'bezier', false);\nFactory_1.Factory.addGetterSetter(Line, 'tension', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Line, 'points', [], (0, Validators_1.getNumberArrayValidator)());\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Rect = void 0;\nconst Factory_1 = require(\"../Factory\");\nconst Shape_1 = require(\"../Shape\");\nconst Global_1 = require(\"../Global\");\nconst Util_1 = require(\"../Util\");\nconst Validators_1 = require(\"../Validators\");\nclass Rect extends Shape_1.Shape {\n _sceneFunc(context) {\n var cornerRadius = this.cornerRadius(), width = this.width(), height = this.height();\n context.beginPath();\n if (!cornerRadius) {\n context.rect(0, 0, width, height);\n }\n else {\n Util_1.Util.drawRoundedRectPath(context, width, height, cornerRadius);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n}\nexports.Rect = Rect;\nRect.prototype.className = 'Rect';\n(0, Global_1._registerNode)(Rect);\nFactory_1.Factory.addGetterSetter(Rect, 'cornerRadius', 0, (0, Validators_1.getNumberOrArrayOfNumbersValidator)(4));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Text = exports.stringToArray = void 0;\nconst Util_1 = require(\"../Util\");\nconst Factory_1 = require(\"../Factory\");\nconst Shape_1 = require(\"../Shape\");\nconst Validators_1 = require(\"../Validators\");\nconst Global_1 = require(\"../Global\");\nfunction stringToArray(string) {\n return Array.from(string);\n}\nexports.stringToArray = stringToArray;\nvar AUTO = 'auto', CENTER = 'center', INHERIT = 'inherit', JUSTIFY = 'justify', CHANGE_KONVA = 'Change.konva', CONTEXT_2D = '2d', DASH = '-', LEFT = 'left', LTR = 'ltr', TEXT = 'text', TEXT_UPPER = 'Text', TOP = 'top', BOTTOM = 'bottom', MIDDLE = 'middle', NORMAL = 'normal', PX_SPACE = 'px ', SPACE = ' ', RIGHT = 'right', RTL = 'rtl', WORD = 'word', CHAR = 'char', NONE = 'none', ELLIPSIS = '…', ATTR_CHANGE_LIST = [\n 'direction',\n 'fontFamily',\n 'fontSize',\n 'fontStyle',\n 'fontVariant',\n 'padding',\n 'align',\n 'verticalAlign',\n 'lineHeight',\n 'text',\n 'width',\n 'height',\n 'wrap',\n 'ellipsis',\n 'letterSpacing',\n], attrChangeListLen = ATTR_CHANGE_LIST.length;\nfunction normalizeFontFamily(fontFamily) {\n return fontFamily\n .split(',')\n .map((family) => {\n family = family.trim();\n const hasSpace = family.indexOf(' ') >= 0;\n const hasQuotes = family.indexOf('\"') >= 0 || family.indexOf(\"'\") >= 0;\n if (hasSpace && !hasQuotes) {\n family = `\"${family}\"`;\n }\n return family;\n })\n .join(', ');\n}\nvar dummyContext;\nfunction getDummyContext() {\n if (dummyContext) {\n return dummyContext;\n }\n dummyContext = Util_1.Util.createCanvasElement().getContext(CONTEXT_2D);\n return dummyContext;\n}\nfunction _fillFunc(context) {\n context.fillText(this._partialText, this._partialTextX, this._partialTextY);\n}\nfunction _strokeFunc(context) {\n context.setAttr('miterLimit', 2);\n context.strokeText(this._partialText, this._partialTextX, this._partialTextY);\n}\nfunction checkDefaultFill(config) {\n config = config || {};\n if (!config.fillLinearGradientColorStops &&\n !config.fillRadialGradientColorStops &&\n !config.fillPatternImage) {\n config.fill = config.fill || 'black';\n }\n return config;\n}\nclass Text extends Shape_1.Shape {\n constructor(config) {\n super(checkDefaultFill(config));\n this._partialTextX = 0;\n this._partialTextY = 0;\n for (var n = 0; n < attrChangeListLen; n++) {\n this.on(ATTR_CHANGE_LIST[n] + CHANGE_KONVA, this._setTextData);\n }\n this._setTextData();\n }\n _sceneFunc(context) {\n var textArr = this.textArr, textArrLen = textArr.length;\n if (!this.text()) {\n return;\n }\n var padding = this.padding(), fontSize = this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, verticalAlign = this.verticalAlign(), direction = this.direction(), alignY = 0, align = this.align(), totalWidth = this.getWidth(), letterSpacing = this.letterSpacing(), fill = this.fill(), textDecoration = this.textDecoration(), shouldUnderline = textDecoration.indexOf('underline') !== -1, shouldLineThrough = textDecoration.indexOf('line-through') !== -1, n;\n direction = direction === INHERIT ? context.direction : direction;\n var translateY = 0;\n var translateY = lineHeightPx / 2;\n var lineTranslateX = 0;\n var lineTranslateY = 0;\n if (direction === RTL) {\n context.setAttr('direction', direction);\n }\n context.setAttr('font', this._getContextFont());\n context.setAttr('textBaseline', MIDDLE);\n context.setAttr('textAlign', LEFT);\n if (verticalAlign === MIDDLE) {\n alignY = (this.getHeight() - textArrLen * lineHeightPx - padding * 2) / 2;\n }\n else if (verticalAlign === BOTTOM) {\n alignY = this.getHeight() - textArrLen * lineHeightPx - padding * 2;\n }\n context.translate(padding, alignY + padding);\n for (n = 0; n < textArrLen; n++) {\n var lineTranslateX = 0;\n var lineTranslateY = 0;\n var obj = textArr[n], text = obj.text, width = obj.width, lastLine = obj.lastInParagraph, spacesNumber, oneWord, lineWidth;\n context.save();\n if (align === RIGHT) {\n lineTranslateX += totalWidth - width - padding * 2;\n }\n else if (align === CENTER) {\n lineTranslateX += (totalWidth - width - padding * 2) / 2;\n }\n if (shouldUnderline) {\n context.save();\n context.beginPath();\n context.moveTo(lineTranslateX, translateY + lineTranslateY + Math.round(fontSize / 2));\n spacesNumber = text.split(' ').length - 1;\n oneWord = spacesNumber === 0;\n lineWidth =\n align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width;\n context.lineTo(lineTranslateX + Math.round(lineWidth), translateY + lineTranslateY + Math.round(fontSize / 2));\n context.lineWidth = fontSize / 15;\n const gradient = this._getLinearGradient();\n context.strokeStyle = gradient || fill;\n context.stroke();\n context.restore();\n }\n if (shouldLineThrough) {\n context.save();\n context.beginPath();\n context.moveTo(lineTranslateX, translateY + lineTranslateY);\n spacesNumber = text.split(' ').length - 1;\n oneWord = spacesNumber === 0;\n lineWidth =\n align === JUSTIFY && lastLine && !oneWord\n ? totalWidth - padding * 2\n : width;\n context.lineTo(lineTranslateX + Math.round(lineWidth), translateY + lineTranslateY);\n context.lineWidth = fontSize / 15;\n const gradient = this._getLinearGradient();\n context.strokeStyle = gradient || fill;\n context.stroke();\n context.restore();\n }\n if (direction !== RTL && (letterSpacing !== 0 || align === JUSTIFY)) {\n spacesNumber = text.split(' ').length - 1;\n var array = stringToArray(text);\n for (var li = 0; li < array.length; li++) {\n var letter = array[li];\n if (letter === ' ' && !lastLine && align === JUSTIFY) {\n lineTranslateX += (totalWidth - padding * 2 - width) / spacesNumber;\n }\n this._partialTextX = lineTranslateX;\n this._partialTextY = translateY + lineTranslateY;\n this._partialText = letter;\n context.fillStrokeShape(this);\n lineTranslateX += this.measureSize(letter).width + letterSpacing;\n }\n }\n else {\n if (letterSpacing !== 0) {\n context.setAttr('letterSpacing', `${letterSpacing}px`);\n }\n this._partialTextX = lineTranslateX;\n this._partialTextY = translateY + lineTranslateY;\n this._partialText = text;\n context.fillStrokeShape(this);\n }\n context.restore();\n if (textArrLen > 1) {\n translateY += lineHeightPx;\n }\n }\n }\n _hitFunc(context) {\n var width = this.getWidth(), height = this.getHeight();\n context.beginPath();\n context.rect(0, 0, width, height);\n context.closePath();\n context.fillStrokeShape(this);\n }\n setText(text) {\n var str = Util_1.Util._isString(text)\n ? text\n : text === null || text === undefined\n ? ''\n : text + '';\n this._setAttr(TEXT, str);\n return this;\n }\n getWidth() {\n var isAuto = this.attrs.width === AUTO || this.attrs.width === undefined;\n return isAuto ? this.getTextWidth() + this.padding() * 2 : this.attrs.width;\n }\n getHeight() {\n var isAuto = this.attrs.height === AUTO || this.attrs.height === undefined;\n return isAuto\n ? this.fontSize() * this.textArr.length * this.lineHeight() +\n this.padding() * 2\n : this.attrs.height;\n }\n getTextWidth() {\n return this.textWidth;\n }\n getTextHeight() {\n Util_1.Util.warn('text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.');\n return this.textHeight;\n }\n measureSize(text) {\n var _context = getDummyContext(), fontSize = this.fontSize(), metrics;\n _context.save();\n _context.font = this._getContextFont();\n metrics = _context.measureText(text);\n _context.restore();\n return {\n width: metrics.width,\n height: fontSize,\n };\n }\n _getContextFont() {\n return (this.fontStyle() +\n SPACE +\n this.fontVariant() +\n SPACE +\n (this.fontSize() + PX_SPACE) +\n normalizeFontFamily(this.fontFamily()));\n }\n _addTextLine(line) {\n const align = this.align();\n if (align === JUSTIFY) {\n line = line.trim();\n }\n var width = this._getTextWidth(line);\n return this.textArr.push({\n text: line,\n width: width,\n lastInParagraph: false,\n });\n }\n _getTextWidth(text) {\n var letterSpacing = this.letterSpacing();\n var length = text.length;\n return (getDummyContext().measureText(text).width +\n (length ? letterSpacing * (length - 1) : 0));\n }\n _setTextData() {\n var lines = this.text().split('\\n'), fontSize = +this.fontSize(), textWidth = 0, lineHeightPx = this.lineHeight() * fontSize, width = this.attrs.width, height = this.attrs.height, fixedWidth = width !== AUTO && width !== undefined, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxWidth = width - padding * 2, maxHeightPx = height - padding * 2, currentHeightPx = 0, wrap = this.wrap(), shouldWrap = wrap !== NONE, wrapAtWord = wrap !== CHAR && shouldWrap, shouldAddEllipsis = this.ellipsis();\n this.textArr = [];\n getDummyContext().font = this._getContextFont();\n var additionalWidth = shouldAddEllipsis ? this._getTextWidth(ELLIPSIS) : 0;\n for (var i = 0, max = lines.length; i < max; ++i) {\n var line = lines[i];\n var lineWidth = this._getTextWidth(line);\n if (fixedWidth && lineWidth > maxWidth) {\n while (line.length > 0) {\n var low = 0, high = line.length, match = '', matchWidth = 0;\n while (low < high) {\n var mid = (low + high) >>> 1, substr = line.slice(0, mid + 1), substrWidth = this._getTextWidth(substr) + additionalWidth;\n if (substrWidth <= maxWidth) {\n low = mid + 1;\n match = substr;\n matchWidth = substrWidth;\n }\n else {\n high = mid;\n }\n }\n if (match) {\n if (wrapAtWord) {\n var wrapIndex;\n var nextChar = line[match.length];\n var nextIsSpaceOrDash = nextChar === SPACE || nextChar === DASH;\n if (nextIsSpaceOrDash && matchWidth <= maxWidth) {\n wrapIndex = match.length;\n }\n else {\n wrapIndex =\n Math.max(match.lastIndexOf(SPACE), match.lastIndexOf(DASH)) +\n 1;\n }\n if (wrapIndex > 0) {\n low = wrapIndex;\n match = match.slice(0, low);\n matchWidth = this._getTextWidth(match);\n }\n }\n match = match.trimRight();\n this._addTextLine(match);\n textWidth = Math.max(textWidth, matchWidth);\n currentHeightPx += lineHeightPx;\n var shouldHandleEllipsis = this._shouldHandleEllipsis(currentHeightPx);\n if (shouldHandleEllipsis) {\n this._tryToAddEllipsisToLastLine();\n break;\n }\n line = line.slice(low);\n line = line.trimLeft();\n if (line.length > 0) {\n lineWidth = this._getTextWidth(line);\n if (lineWidth <= maxWidth) {\n this._addTextLine(line);\n currentHeightPx += lineHeightPx;\n textWidth = Math.max(textWidth, lineWidth);\n break;\n }\n }\n }\n else {\n break;\n }\n }\n }\n else {\n this._addTextLine(line);\n currentHeightPx += lineHeightPx;\n textWidth = Math.max(textWidth, lineWidth);\n if (this._shouldHandleEllipsis(currentHeightPx) && i < max - 1) {\n this._tryToAddEllipsisToLastLine();\n }\n }\n if (this.textArr[this.textArr.length - 1]) {\n this.textArr[this.textArr.length - 1].lastInParagraph = true;\n }\n if (fixedHeight && currentHeightPx + lineHeightPx > maxHeightPx) {\n break;\n }\n }\n this.textHeight = fontSize;\n this.textWidth = textWidth;\n }\n _shouldHandleEllipsis(currentHeightPx) {\n var fontSize = +this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, height = this.attrs.height, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxHeightPx = height - padding * 2, wrap = this.wrap(), shouldWrap = wrap !== NONE;\n return (!shouldWrap ||\n (fixedHeight && currentHeightPx + lineHeightPx > maxHeightPx));\n }\n _tryToAddEllipsisToLastLine() {\n var width = this.attrs.width, fixedWidth = width !== AUTO && width !== undefined, padding = this.padding(), maxWidth = width - padding * 2, shouldAddEllipsis = this.ellipsis();\n var lastLine = this.textArr[this.textArr.length - 1];\n if (!lastLine || !shouldAddEllipsis) {\n return;\n }\n if (fixedWidth) {\n var haveSpace = this._getTextWidth(lastLine.text + ELLIPSIS) < maxWidth;\n if (!haveSpace) {\n lastLine.text = lastLine.text.slice(0, lastLine.text.length - 3);\n }\n }\n this.textArr.splice(this.textArr.length - 1, 1);\n this._addTextLine(lastLine.text + ELLIPSIS);\n }\n getStrokeScaleEnabled() {\n return true;\n }\n _useBufferCanvas() {\n const hasLine = this.textDecoration().indexOf('underline') !== -1 ||\n this.textDecoration().indexOf('line-through') !== -1;\n const hasShadow = this.hasShadow();\n if (hasLine && hasShadow) {\n return true;\n }\n return super._useBufferCanvas();\n }\n}\nexports.Text = Text;\nText.prototype._fillFunc = _fillFunc;\nText.prototype._strokeFunc = _strokeFunc;\nText.prototype.className = TEXT_UPPER;\nText.prototype._attrsAffectingSize = [\n 'text',\n 'fontSize',\n 'padding',\n 'wrap',\n 'lineHeight',\n 'letterSpacing',\n];\n(0, Global_1._registerNode)(Text);\nFactory_1.Factory.overWriteSetter(Text, 'width', (0, Validators_1.getNumberOrAutoValidator)());\nFactory_1.Factory.overWriteSetter(Text, 'height', (0, Validators_1.getNumberOrAutoValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'direction', INHERIT);\nFactory_1.Factory.addGetterSetter(Text, 'fontFamily', 'Arial');\nFactory_1.Factory.addGetterSetter(Text, 'fontSize', 12, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'fontStyle', NORMAL);\nFactory_1.Factory.addGetterSetter(Text, 'fontVariant', NORMAL);\nFactory_1.Factory.addGetterSetter(Text, 'padding', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'align', LEFT);\nFactory_1.Factory.addGetterSetter(Text, 'verticalAlign', TOP);\nFactory_1.Factory.addGetterSetter(Text, 'lineHeight', 1, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'wrap', WORD);\nFactory_1.Factory.addGetterSetter(Text, 'ellipsis', false, (0, Validators_1.getBooleanValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'letterSpacing', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'text', '', (0, Validators_1.getStringValidator)());\nFactory_1.Factory.addGetterSetter(Text, 'textDecoration', '');\n","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(n); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { CALL_HISTORY_METHOD } from './actions';\n/**\n * This middleware captures CALL_HISTORY_METHOD actions to redirect to the\n * provided history object. This will prevent these actions from reaching your\n * reducer or any middleware that comes after this one.\n */\n\nvar routerMiddleware = function routerMiddleware(history) {\n return function (store) {\n return function (next) {\n return function (action) {\n // eslint-disable-line no-unused-vars\n if (action.type !== CALL_HISTORY_METHOD) {\n return next(action);\n }\n\n var _action$payload = action.payload,\n method = _action$payload.method,\n args = _action$payload.args;\n history[method].apply(history, _toConsumableArray(args));\n };\n };\n };\n};\n\nexport default routerMiddleware;","export default {\n GLOBAL: {\n HIDE: '__react_tooltip_hide_event',\n REBUILD: '__react_tooltip_rebuild_event',\n SHOW: '__react_tooltip_show_event'\n }\n};\n","/**\n * Static methods for react-tooltip\n */\nimport CONSTANT from '../constant';\n\nconst dispatchGlobalEvent = (eventName, opts) => {\n // Compatible with IE\n // @see http://stackoverflow.com/questions/26596123/internet-explorer-9-10-11-event-constructor-doesnt-work\n // @see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent\n let event;\n\n if (typeof window.CustomEvent === 'function') {\n event = new window.CustomEvent(eventName, { detail: opts });\n } else {\n event = document.createEvent('Event');\n event.initEvent(eventName, false, true, opts);\n }\n\n window.dispatchEvent(event);\n};\n\nexport default function(target) {\n /**\n * Hide all tooltip\n * @trigger ReactTooltip.hide()\n */\n target.hide = target => {\n dispatchGlobalEvent(CONSTANT.GLOBAL.HIDE, { target });\n };\n\n /**\n * Rebuild all tooltip\n * @trigger ReactTooltip.rebuild()\n */\n target.rebuild = () => {\n dispatchGlobalEvent(CONSTANT.GLOBAL.REBUILD);\n };\n\n /**\n * Show specific tooltip\n * @trigger ReactTooltip.show()\n */\n target.show = target => {\n dispatchGlobalEvent(CONSTANT.GLOBAL.SHOW, { target });\n };\n\n target.prototype.globalRebuild = function() {\n if (this.mount) {\n this.unbindListener();\n this.bindListener();\n }\n };\n\n target.prototype.globalShow = function(event) {\n if (this.mount) {\n const hasTarget =\n (event && event.detail && event.detail.target && true) || false;\n // Create a fake event, specific show will limit the type to `solid`\n // only `float` type cares e.clientX e.clientY\n this.showTooltip(\n { currentTarget: hasTarget && event.detail.target },\n true\n );\n }\n };\n\n target.prototype.globalHide = function(event) {\n if (this.mount) {\n const hasTarget =\n (event && event.detail && event.detail.target && true) || false;\n this.hideTooltip(\n { currentTarget: hasTarget && event.detail.target },\n hasTarget\n );\n }\n };\n}\n","/**\n * Custom events to control showing and hiding of tooltip\n *\n * @attributes\n * - `event` {String}\n * - `eventOff` {String}\n */\n\nexport const checkStatus = function(dataEventOff, e) {\n const { show } = this.state;\n const { id } = this.props;\n const isCapture = this.isCapture(e.currentTarget);\n const currentItem = e.currentTarget.getAttribute('currentItem');\n\n if (!isCapture) e.stopPropagation();\n if (show && currentItem === 'true') {\n if (!dataEventOff) this.hideTooltip(e);\n } else {\n e.currentTarget.setAttribute('currentItem', 'true');\n setUntargetItems(e.currentTarget, this.getTargetArray(id));\n this.showTooltip(e);\n }\n};\n\nconst setUntargetItems = function(currentTarget, targetArray) {\n for (let i = 0; i < targetArray.length; i++) {\n if (currentTarget !== targetArray[i]) {\n targetArray[i].setAttribute('currentItem', 'false');\n } else {\n targetArray[i].setAttribute('currentItem', 'true');\n }\n }\n};\n\nconst customListeners = {\n id: '9b69f92e-d3fe-498b-b1b4-c5e63a51b0cf',\n set(target, event, listener) {\n if (this.id in target) {\n const map = target[this.id];\n map[event] = listener;\n } else {\n // this is workaround for WeakMap, which is not supported in older browsers, such as IE\n Object.defineProperty(target, this.id, {\n configurable: true,\n value: { [event]: listener }\n });\n }\n },\n get(target, event) {\n const map = target[this.id];\n if (map !== undefined) {\n return map[event];\n }\n }\n};\n\nexport default function(target) {\n target.prototype.isCustomEvent = function(ele) {\n const { event } = this.state;\n return event || !!ele.getAttribute('data-event');\n };\n\n /* Bind listener for custom event */\n target.prototype.customBindListener = function(ele) {\n const { event, eventOff } = this.state;\n const dataEvent = ele.getAttribute('data-event') || event;\n const dataEventOff = ele.getAttribute('data-event-off') || eventOff;\n\n dataEvent.split(' ').forEach(event => {\n ele.removeEventListener(event, customListeners.get(ele, event));\n const customListener = checkStatus.bind(this, dataEventOff);\n customListeners.set(ele, event, customListener);\n ele.addEventListener(event, customListener, false);\n });\n if (dataEventOff) {\n dataEventOff.split(' ').forEach(event => {\n ele.removeEventListener(event, this.hideTooltip);\n ele.addEventListener(event, this.hideTooltip, false);\n });\n }\n };\n\n /* Unbind listener for custom event */\n target.prototype.customUnbindListener = function(ele) {\n const { event, eventOff } = this.state;\n const dataEvent = event || ele.getAttribute('data-event');\n const dataEventOff = eventOff || ele.getAttribute('data-event-off');\n\n ele.removeEventListener(dataEvent, customListeners.get(ele, event));\n if (dataEventOff) ele.removeEventListener(dataEventOff, this.hideTooltip);\n };\n}\n","/**\n * Util method to get effect\n */\nimport { checkStatus } from './customEvent';\n\nconst makeProxy = e => {\n const proxy = {};\n for (const key in e) {\n if (typeof e[key] === 'function') {\n proxy[key] = e[key].bind(e);\n } else {\n proxy[key] = e[key];\n }\n }\n return proxy;\n};\n\nconst bodyListener = function(callback, options, e) {\n const { respectEffect = false, customEvent = false } = options;\n const { id } = this.props;\n\n const tip = e.target.getAttribute('data-tip') || null;\n const forId = e.target.getAttribute('data-for') || null;\n\n const target = e.target;\n if (this.isCustomEvent(target) && !customEvent) {\n return;\n }\n\n const isTargetBelongsToTooltip =\n (id == null && forId == null) || forId === id;\n\n if (\n tip != null &&\n (!respectEffect || this.getEffect(target) === 'float') &&\n isTargetBelongsToTooltip\n ) {\n const proxy = makeProxy(e);\n proxy.currentTarget = target;\n callback(proxy);\n }\n};\n\nconst findCustomEvents = (targetArray, dataAttribute) => {\n const events = {};\n targetArray.forEach(target => {\n const event = target.getAttribute(dataAttribute);\n if (event) event.split(' ').forEach(event => (events[event] = true));\n });\n\n return events;\n};\n\nconst getBody = () => document.getElementsByTagName('body')[0];\n\nexport default function(target) {\n target.prototype.isBodyMode = function() {\n return !!this.props.bodyMode;\n };\n\n target.prototype.bindBodyListener = function(targetArray) {\n const {\n event,\n eventOff,\n possibleCustomEvents,\n possibleCustomEventsOff\n } = this.state;\n const body = getBody();\n\n const customEvents = findCustomEvents(targetArray, 'data-event');\n const customEventsOff = findCustomEvents(targetArray, 'data-event-off');\n\n if (event != null) customEvents[event] = true;\n if (eventOff != null) customEventsOff[eventOff] = true;\n possibleCustomEvents\n .split(' ')\n .forEach(event => (customEvents[event] = true));\n possibleCustomEventsOff\n .split(' ')\n .forEach(event => (customEventsOff[event] = true));\n\n this.unbindBodyListener(body);\n\n const listeners = (this.bodyModeListeners = {});\n if (event == null) {\n listeners.mouseover = bodyListener.bind(this, this.showTooltip, {});\n listeners.mousemove = bodyListener.bind(this, this.updateTooltip, {\n respectEffect: true\n });\n listeners.mouseout = bodyListener.bind(this, this.hideTooltip, {});\n }\n\n for (const event in customEvents) {\n listeners[event] = bodyListener.bind(\n this,\n e => {\n const targetEventOff =\n e.currentTarget.getAttribute('data-event-off') || eventOff;\n checkStatus.call(this, targetEventOff, e);\n },\n { customEvent: true }\n );\n }\n for (const event in customEventsOff) {\n listeners[event] = bodyListener.bind(this, this.hideTooltip, {\n customEvent: true\n });\n }\n for (const event in listeners) {\n body.addEventListener(event, listeners[event]);\n }\n };\n\n target.prototype.unbindBodyListener = function(body) {\n body = body || getBody();\n\n const listeners = this.bodyModeListeners;\n for (const event in listeners) {\n body.removeEventListener(event, listeners[event]);\n }\n };\n}\n","/**\n * Calculate the position of tooltip\n *\n * @params\n * - `e` {Event} the event of current mouse\n * - `target` {Element} the currentTarget of the event\n * - `node` {DOM} the react-tooltip object\n * - `place` {String} top / right / bottom / left\n * - `effect` {String} float / solid\n * - `offset` {Object} the offset to default position\n *\n * @return {Object}\n * - `isNewState` {Bool} required\n * - `newState` {Object}\n * - `position` {Object} {left: {Number}, top: {Number}}\n */\nexport default function(e, target, node, place, desiredPlace, effect, offset) {\n const { width: tipWidth, height: tipHeight } = getDimensions(node);\n\n const { width: targetWidth, height: targetHeight } = getDimensions(target);\n\n const { mouseX, mouseY } = getCurrentOffset(e, target, effect);\n const defaultOffset = getDefaultPosition(\n effect,\n targetWidth,\n targetHeight,\n tipWidth,\n tipHeight\n );\n const { extraOffsetX, extraOffsetY } = calculateOffset(offset);\n\n const windowWidth = window.innerWidth;\n const windowHeight = window.innerHeight;\n\n const { parentTop, parentLeft } = getParent(node);\n\n // Get the edge offset of the tooltip\n const getTipOffsetLeft = place => {\n const offsetX = defaultOffset[place].l;\n return mouseX + offsetX + extraOffsetX;\n };\n const getTipOffsetRight = place => {\n const offsetX = defaultOffset[place].r;\n return mouseX + offsetX + extraOffsetX;\n };\n const getTipOffsetTop = place => {\n const offsetY = defaultOffset[place].t;\n return mouseY + offsetY + extraOffsetY;\n };\n const getTipOffsetBottom = place => {\n const offsetY = defaultOffset[place].b;\n return mouseY + offsetY + extraOffsetY;\n };\n\n //\n // Functions to test whether the tooltip's sides are inside\n // the client window for a given orientation p\n //\n // _____________\n // | | <-- Right side\n // | p = 'left' |\\\n // | |/ |\\\n // |_____________| |_\\ <-- Mouse\n // / \\ |\n // |\n // |\n // Bottom side\n //\n const outsideLeft = p => getTipOffsetLeft(p) < 0;\n const outsideRight = p => getTipOffsetRight(p) > windowWidth;\n const outsideTop = p => getTipOffsetTop(p) < 0;\n const outsideBottom = p => getTipOffsetBottom(p) > windowHeight;\n\n // Check whether the tooltip with orientation p is completely inside the client window\n const outside = p =>\n outsideLeft(p) || outsideRight(p) || outsideTop(p) || outsideBottom(p);\n const inside = p => !outside(p);\n\n const placesList = ['top', 'bottom', 'left', 'right'];\n const insideList = [];\n for (let i = 0; i < 4; i++) {\n const p = placesList[i];\n if (inside(p)) {\n insideList.push(p);\n }\n }\n\n let isNewState = false;\n let newPlace;\n const shouldUpdatePlace = desiredPlace !== place;\n if (inside(desiredPlace) && shouldUpdatePlace) {\n isNewState = true;\n newPlace = desiredPlace;\n } else if (insideList.length > 0 && outside(desiredPlace) && outside(place)) {\n isNewState = true;\n newPlace = insideList[0];\n }\n\n if (isNewState) {\n return {\n isNewState: true,\n newState: { place: newPlace }\n };\n }\n\n return {\n isNewState: false,\n position: {\n left: parseInt(getTipOffsetLeft(place) - parentLeft, 10),\n top: parseInt(getTipOffsetTop(place) - parentTop, 10)\n }\n };\n}\n\nconst getDimensions = node => {\n const { height, width } = node.getBoundingClientRect();\n return {\n height: parseInt(height, 10),\n width: parseInt(width, 10)\n };\n};\n\n// Get current mouse offset\nconst getCurrentOffset = (e, currentTarget, effect) => {\n const boundingClientRect = currentTarget.getBoundingClientRect();\n const targetTop = boundingClientRect.top;\n const targetLeft = boundingClientRect.left;\n const { width: targetWidth, height: targetHeight } = getDimensions(\n currentTarget\n );\n\n if (effect === 'float') {\n return {\n mouseX: e.clientX,\n mouseY: e.clientY\n };\n }\n return {\n mouseX: targetLeft + targetWidth / 2,\n mouseY: targetTop + targetHeight / 2\n };\n};\n\n// List all possibility of tooltip final offset\n// This is useful in judging if it is necessary for tooltip to switch position when out of window\nconst getDefaultPosition = (\n effect,\n targetWidth,\n targetHeight,\n tipWidth,\n tipHeight\n) => {\n let top;\n let right;\n let bottom;\n let left;\n const disToMouse = 3;\n const triangleHeight = 2;\n const cursorHeight = 12; // Optimize for float bottom only, cause the cursor will hide the tooltip\n\n if (effect === 'float') {\n top = {\n l: -(tipWidth / 2),\n r: tipWidth / 2,\n t: -(tipHeight + disToMouse + triangleHeight),\n b: -disToMouse\n };\n bottom = {\n l: -(tipWidth / 2),\n r: tipWidth / 2,\n t: disToMouse + cursorHeight,\n b: tipHeight + disToMouse + triangleHeight + cursorHeight\n };\n left = {\n l: -(tipWidth + disToMouse + triangleHeight),\n r: -disToMouse,\n t: -(tipHeight / 2),\n b: tipHeight / 2\n };\n right = {\n l: disToMouse,\n r: tipWidth + disToMouse + triangleHeight,\n t: -(tipHeight / 2),\n b: tipHeight / 2\n };\n } else if (effect === 'solid') {\n top = {\n l: -(tipWidth / 2),\n r: tipWidth / 2,\n t: -(targetHeight / 2 + tipHeight + triangleHeight),\n b: -(targetHeight / 2)\n };\n bottom = {\n l: -(tipWidth / 2),\n r: tipWidth / 2,\n t: targetHeight / 2,\n b: targetHeight / 2 + tipHeight + triangleHeight\n };\n left = {\n l: -(tipWidth + targetWidth / 2 + triangleHeight),\n r: -(targetWidth / 2),\n t: -(tipHeight / 2),\n b: tipHeight / 2\n };\n right = {\n l: targetWidth / 2,\n r: tipWidth + targetWidth / 2 + triangleHeight,\n t: -(tipHeight / 2),\n b: tipHeight / 2\n };\n }\n\n return { top, bottom, left, right };\n};\n\n// Consider additional offset into position calculation\nconst calculateOffset = offset => {\n let extraOffsetX = 0;\n let extraOffsetY = 0;\n\n if (Object.prototype.toString.apply(offset) === '[object String]') {\n offset = JSON.parse(offset.toString().replace(/'/g, '\"'));\n }\n for (const key in offset) {\n if (key === 'top') {\n extraOffsetY -= parseInt(offset[key], 10);\n } else if (key === 'bottom') {\n extraOffsetY += parseInt(offset[key], 10);\n } else if (key === 'left') {\n extraOffsetX -= parseInt(offset[key], 10);\n } else if (key === 'right') {\n extraOffsetX += parseInt(offset[key], 10);\n }\n }\n\n return { extraOffsetX, extraOffsetY };\n};\n\n// Get the offset of the parent elements\nconst getParent = currentTarget => {\n let currentParent = currentTarget;\n while (currentParent) {\n const computedStyle = window.getComputedStyle(currentParent);\n // transform and will-change: transform change the containing block\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_Block\n if (\n computedStyle.getPropertyValue('transform') !== 'none' ||\n computedStyle.getPropertyValue('will-change') === 'transform'\n )\n break;\n currentParent = currentParent.parentElement;\n }\n\n const parentTop =\n (currentParent && currentParent.getBoundingClientRect().top) || 0;\n const parentLeft =\n (currentParent && currentParent.getBoundingClientRect().left) || 0;\n\n return { parentTop, parentLeft };\n};\n","/**\n * To get the tooltip content\n * it may comes from data-tip or this.props.children\n * it should support multiline\n *\n * @params\n * - `tip` {String} value of data-tip\n * - `children` {ReactElement} this.props.children\n * - `multiline` {Any} could be Bool(true/false) or String('true'/'false')\n *\n * @return\n * - String or react component\n */\nimport React from 'react';\n\nexport default function(tip, children, getContent, multiline) {\n if (children) return children;\n if (getContent !== undefined && getContent !== null) return getContent; // getContent can be 0, '', etc.\n if (getContent === null) return null; // Tip not exist and children is null or undefined\n\n const regexp = /
/;\n if (!multiline || multiline === 'false' || !regexp.test(tip)) {\n // No trim(), so that user can keep their input\n return tip;\n }\n\n // Multiline tooltip content\n return tip.split(regexp).map((d, i) => {\n return (\n \n {d}\n \n );\n });\n}\n","/**\n * Support aria- and role in ReactTooltip\n *\n * @params props {Object}\n * @return {Object}\n */\nexport function parseAria(props) {\n const ariaObj = {};\n Object.keys(props)\n .filter(prop => {\n // aria-xxx and role is acceptable\n return /(^aria-\\w+$|^role$)/.test(prop);\n })\n .forEach(prop => {\n ariaObj[prop] = props[prop];\n });\n\n return ariaObj;\n}\n","/**\n * Convert nodelist to array\n * @see https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/core/createArrayFromMixed.js#L24\n * NodeLists are functions in Safari\n */\n\nexport default function(nodeList) {\n const length = nodeList.length;\n if (nodeList.hasOwnProperty) {\n return Array.prototype.slice.call(nodeList);\n }\n return new Array(length).fill().map(index => nodeList[index]);\n}\n","/**\n * Default pop-up style values (text color, background color).\n */\nconst defaultColors = {\n dark: {\n text: '#fff',\n background: '#222',\n border: 'transparent',\n arrow: '#222'\n },\n success: {\n text: '#fff',\n background: '#8DC572',\n border: 'transparent',\n arrow: '#8DC572'\n },\n warning: {\n text: '#fff',\n background: '#F0AD4E',\n border: 'transparent',\n arrow: '#F0AD4E'\n },\n error: {\n text: '#fff',\n background: '#BE6464',\n border: 'transparent',\n arrow: '#BE6464'\n },\n info: {\n text: '#fff',\n background: '#337AB7',\n border: 'transparent',\n arrow: '#337AB7'\n },\n light: {\n text: '#222',\n background: '#fff',\n border: 'transparent',\n arrow: '#fff'\n }\n};\n\nexport function getDefaultPopupColors(type) {\n return defaultColors[type] ? { ...defaultColors[type] } : undefined;\n}\n","import { getDefaultPopupColors } from './defaultStyles';\n\n/**\n * Generates the specific tooltip style for use on render.\n */\nexport function generateTooltipStyle(uuid, customColors, type, hasBorder) {\n return generateStyle(uuid, getPopupColors(customColors, type, hasBorder));\n}\n\n/**\n * Generates the tooltip style rules based on the element-specified \"data-type\" property.\n */\nfunction generateStyle(uuid, colors) {\n const textColor = colors.text;\n const backgroundColor = colors.background;\n const borderColor = colors.border;\n const arrowColor = colors.arrow;\n\n return `\n \t.${uuid} {\n\t color: ${textColor};\n\t background: ${backgroundColor};\n\t border: 1px solid ${borderColor};\n \t}\n\n \t.${uuid}.place-top {\n margin-top: -10px;\n }\n .${uuid}.place-top::before {\n border-top: 8px solid ${borderColor};\n }\n .${uuid}.place-top::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n bottom: -6px;\n left: 50%;\n margin-left: -8px;\n border-top-color: ${arrowColor};\n border-top-style: solid;\n border-top-width: 6px;\n }\n\n .${uuid}.place-bottom {\n margin-top: 10px;\n }\n .${uuid}.place-bottom::before {\n border-bottom: 8px solid ${borderColor};\n }\n .${uuid}.place-bottom::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n top: -6px;\n left: 50%;\n margin-left: -8px;\n border-bottom-color: ${arrowColor};\n border-bottom-style: solid;\n border-bottom-width: 6px;\n }\n\n .${uuid}.place-left {\n margin-left: -10px;\n }\n .${uuid}.place-left::before {\n border-left: 8px solid ${borderColor};\n }\n .${uuid}.place-left::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n right: -6px;\n top: 50%;\n margin-top: -4px;\n border-left-color: ${arrowColor};\n border-left-style: solid;\n border-left-width: 6px;\n }\n\n .${uuid}.place-right {\n margin-left: 10px;\n }\n .${uuid}.place-right::before {\n border-right: 8px solid ${borderColor};\n }\n .${uuid}.place-right::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n left: -6px;\n top: 50%;\n margin-top: -4px;\n border-right-color: ${arrowColor};\n border-right-style: solid;\n border-right-width: 6px;\n }\n `;\n}\n\nfunction getPopupColors(customColors, type, hasBorder) {\n const textColor = customColors.text;\n const backgroundColor = customColors.background;\n const borderColor = customColors.border;\n const arrowColor = customColors.arrow\n ? customColors.arrow\n : customColors.background;\n\n const colors = getDefaultPopupColors(type);\n\n if (textColor) {\n colors.text = textColor;\n }\n\n if (backgroundColor) {\n colors.background = backgroundColor;\n }\n\n if (hasBorder) {\n if (borderColor) {\n colors.border = borderColor;\n } else {\n colors.border = type === 'light' ? 'black' : 'white';\n }\n }\n\n if (arrowColor) {\n colors.arrow = arrowColor;\n }\n\n return colors;\n}\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(it), key);\n};\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- requied for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.12.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2021 Denis Pushkarev (zloirock.ru)'\n});\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","module.exports = {};\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var state;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) {\n createNonEnumerableProperty(value, 'name', key);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(arg) {\n return classof(arg) == 'Array';\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","var anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject -- old IE */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n return !String(Symbol()) ||\n // Chrome 38 Symbol has incorrect toString conversion\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n if (NATIVE_SYMBOL && has(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\n } return WellKnownSymbolsStore[name];\n};\n","var isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_OUT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push.call(target, value); // filterOut\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterOut` method\n // https://github.com/tc39/proposal-array-filtering\n filterOut: createMethod(7)\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $find = require('../internals/array-iteration').find;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND = 'find';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.find` method\n// https://tc39.es/ecma262/#sec-array.prototype.find\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND);\n","/**\n * Tracking target removing from DOM.\n * It's necessary to hide tooltip when it's target disappears.\n * Otherwise, the tooltip would be shown forever until another target\n * is triggered.\n *\n * If MutationObserver is not available, this feature just doesn't work.\n */\n\n// https://hacks.mozilla.org/2012/05/dom-mutationobserver-reacting-to-dom-changes-without-killing-browser-performance/\nconst getMutationObserverClass = () => {\n return (\n window.MutationObserver ||\n window.WebKitMutationObserver ||\n window.MozMutationObserver\n );\n};\n\nexport default function(target) {\n target.prototype.bindRemovalTracker = function() {\n const MutationObserver = getMutationObserverClass();\n if (MutationObserver == null) return;\n\n const observer = new MutationObserver(mutations => {\n for (let m1 = 0; m1 < mutations.length; m1++) {\n const mutation = mutations[m1];\n for (let m2 = 0; m2 < mutation.removedNodes.length; m2++) {\n const element = mutation.removedNodes[m2];\n if (element === this.state.currentTarget) {\n this.hideTooltip();\n return;\n }\n }\n }\n });\n\n observer.observe(window.document, { childList: true, subtree: true });\n\n this.removalTracker = observer;\n };\n\n target.prototype.unbindRemovalTracker = function() {\n if (this.removalTracker) {\n this.removalTracker.disconnect();\n this.removalTracker = null;\n }\n };\n}\n","import withSize from './with-size'\nimport SizeMe from './component'\n\nwithSize.SizeMe = SizeMe\nwithSize.withSize = withSize\n\nexport default withSize\n","/**\n * Events that should be bound to the window\n */\nimport CONSTANT from '../constant';\n\nexport default function(target) {\n target.prototype.bindWindowEvents = function(resizeHide) {\n // ReactTooltip.hide\n window.removeEventListener(CONSTANT.GLOBAL.HIDE, this.globalHide);\n window.addEventListener(CONSTANT.GLOBAL.HIDE, this.globalHide, false);\n\n // ReactTooltip.rebuild\n window.removeEventListener(CONSTANT.GLOBAL.REBUILD, this.globalRebuild);\n window.addEventListener(CONSTANT.GLOBAL.REBUILD, this.globalRebuild, false);\n\n // ReactTooltip.show\n window.removeEventListener(CONSTANT.GLOBAL.SHOW, this.globalShow);\n window.addEventListener(CONSTANT.GLOBAL.SHOW, this.globalShow, false);\n\n // Resize\n if (resizeHide) {\n window.removeEventListener('resize', this.onWindowResize);\n window.addEventListener('resize', this.onWindowResize, false);\n }\n };\n\n target.prototype.unbindWindowEvents = function() {\n window.removeEventListener(CONSTANT.GLOBAL.HIDE, this.globalHide);\n window.removeEventListener(CONSTANT.GLOBAL.REBUILD, this.globalRebuild);\n window.removeEventListener(CONSTANT.GLOBAL.SHOW, this.globalShow);\n window.removeEventListener('resize', this.onWindowResize);\n };\n\n /**\n * invoked by resize event of window\n */\n target.prototype.onWindowResize = function() {\n if (!this.mount) return;\n this.hideTooltip();\n };\n}\n","/**\n * Util method to judge if it should follow capture model\n */\n\nexport default function(target) {\n target.prototype.isCapture = function(currentTarget) {\n return (\n (currentTarget &&\n currentTarget.getAttribute('data-iscapture') === 'true') ||\n this.props.isCapture ||\n false\n );\n };\n}\n","/**\n * Util method to get effect\n */\n\nexport default function(target) {\n target.prototype.getEffect = function(currentTarget) {\n const dataEffect = currentTarget.getAttribute('data-effect');\n return dataEffect || this.props.effect || 'float';\n };\n}\n","import { v4 as uuid } from 'uuid';\n\nexport function generateUUID() {\n return 't' + uuid();\n}\n","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport matchPath from \"./matchPath\";\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n return React.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n _inherits(Route, _React$Component);\n\n function Route() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Route);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props, _this.context.router)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Route.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n route: {\n location: this.props.location || this.context.router.route.location,\n match: this.state.match\n }\n })\n };\n };\n\n Route.prototype.computeMatch = function computeMatch(_ref, router) {\n var computedMatch = _ref.computedMatch,\n location = _ref.location,\n path = _ref.path,\n strict = _ref.strict,\n exact = _ref.exact,\n sensitive = _ref.sensitive;\n\n if (computedMatch) return computedMatch; // already computed the match for us\n\n invariant(router, \"You should not use or withRouter() outside a \");\n\n var route = router.route;\n\n var pathname = (location || route.location).pathname;\n\n return matchPath(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);\n };\n\n Route.prototype.componentWillMount = function componentWillMount() {\n warning(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\");\n\n warning(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n\n warning(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n };\n\n Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n warning(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n warning(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n\n this.setState({\n match: this.computeMatch(nextProps, nextContext.router)\n });\n };\n\n Route.prototype.render = function render() {\n var match = this.state.match;\n var _props = this.props,\n children = _props.children,\n component = _props.component,\n render = _props.render;\n var _context$router = this.context.router,\n history = _context$router.history,\n route = _context$router.route,\n staticContext = _context$router.staticContext;\n\n var location = this.props.location || route.location;\n var props = { match: match, location: location, history: history, staticContext: staticContext };\n\n if (component) return match ? React.createElement(component, props) : null;\n\n if (render) return match ? render(props) : null;\n\n if (typeof children === \"function\") return children(props);\n\n if (children && !isEmptyChildren(children)) return React.Children.only(children);\n\n return null;\n };\n\n return Route;\n}(React.Component);\n\nRoute.propTypes = {\n computedMatch: PropTypes.object, // private, from \n path: PropTypes.string,\n exact: PropTypes.bool,\n strict: PropTypes.bool,\n sensitive: PropTypes.bool,\n component: PropTypes.func,\n render: PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n location: PropTypes.object\n};\nRoute.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n staticContext: PropTypes.object\n })\n};\nRoute.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default Route;","var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nvar BrowserInfo = /** @class */ (function () {\n function BrowserInfo(name, version, os) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.type = 'browser';\n }\n return BrowserInfo;\n}());\nexport { BrowserInfo };\nvar NodeInfo = /** @class */ (function () {\n function NodeInfo(version) {\n this.version = version;\n this.type = 'node';\n this.name = 'node';\n this.os = process.platform;\n }\n return NodeInfo;\n}());\nexport { NodeInfo };\nvar SearchBotDeviceInfo = /** @class */ (function () {\n function SearchBotDeviceInfo(name, version, os, bot) {\n this.name = name;\n this.version = version;\n this.os = os;\n this.bot = bot;\n this.type = 'bot-device';\n }\n return SearchBotDeviceInfo;\n}());\nexport { SearchBotDeviceInfo };\nvar BotInfo = /** @class */ (function () {\n function BotInfo() {\n this.type = 'bot';\n this.bot = true; // NOTE: deprecated test name instead\n this.name = 'bot';\n this.version = null;\n this.os = null;\n }\n return BotInfo;\n}());\nexport { BotInfo };\nvar ReactNativeInfo = /** @class */ (function () {\n function ReactNativeInfo() {\n this.type = 'react-native';\n this.name = 'react-native';\n this.version = null;\n this.os = null;\n }\n return ReactNativeInfo;\n}());\nexport { ReactNativeInfo };\n// tslint:disable-next-line:max-line-length\nvar SEARCHBOX_UA_REGEX = /alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/;\nvar SEARCHBOT_OS_REGEX = /(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\\ Jeeves\\/Teoma|ia_archiver)/;\nvar REQUIRED_VERSION_PARTS = 3;\nvar userAgentRules = [\n ['aol', /AOLShield\\/([0-9\\._]+)/],\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['edge-ios', /EdgiOS\\/([0-9\\._]+)/],\n ['yandexbrowser', /YaBrowser\\/([0-9\\._]+)/],\n ['kakaotalk', /KAKAOTALK\\s([0-9\\.]+)/],\n ['samsung', /SamsungBrowser\\/([0-9\\.]+)/],\n ['silk', /\\bSilk\\/([0-9._-]+)\\b/],\n ['miui', /MiuiBrowser\\/([0-9\\.]+)$/],\n ['beaker', /BeakerBrowser\\/([0-9\\.]+)/],\n ['edge-chromium', /EdgA?\\/([0-9\\.]+)/],\n [\n 'chromium-webview',\n /(?!Chrom.*OPR)wv\\).*Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/,\n ],\n ['chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\\/([0-9\\.]+)(:?\\s|$)/],\n ['phantomjs', /PhantomJS\\/([0-9\\.]+)(:?\\s|$)/],\n ['crios', /CriOS\\/([0-9\\.]+)(:?\\s|$)/],\n ['firefox', /Firefox\\/([0-9\\.]+)(?:\\s|$)/],\n ['fxios', /FxiOS\\/([0-9\\.]+)/],\n ['opera-mini', /Opera Mini.*Version\\/([0-9\\.]+)/],\n ['opera', /Opera\\/([0-9\\.]+)(?:\\s|$)/],\n ['opera', /OPR\\/([0-9\\.]+)(:?\\s|$)/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['bb10', /BB10;\\sTouch.*Version\\/([0-9\\.]+)/],\n ['android', /Android\\s([0-9\\.]+)/],\n ['ios', /Version\\/([0-9\\._]+).*Mobile.*Safari.*/],\n ['safari', /Version\\/([0-9\\._]+).*Safari/],\n ['facebook', /FBAV\\/([0-9\\.]+)/],\n ['instagram', /Instagram\\s([0-9\\.]+)/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Mobile/],\n ['ios-webview', /AppleWebKit\\/([0-9\\.]+).*Gecko\\)$/],\n ['searchbot', SEARCHBOX_UA_REGEX],\n];\nvar operatingSystemRules = [\n ['iOS', /iP(hone|od|ad)/],\n ['Android OS', /Android/],\n ['BlackBerry OS', /BlackBerry|BB10/],\n ['Windows Mobile', /IEMobile/],\n ['Amazon OS', /Kindle/],\n ['Windows 3.11', /Win16/],\n ['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],\n ['Windows 98', /(Windows 98)|(Win98)/],\n ['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],\n ['Windows XP', /(Windows NT 5.1)|(Windows XP)/],\n ['Windows Server 2003', /(Windows NT 5.2)/],\n ['Windows Vista', /(Windows NT 6.0)/],\n ['Windows 7', /(Windows NT 6.1)/],\n ['Windows 8', /(Windows NT 6.2)/],\n ['Windows 8.1', /(Windows NT 6.3)/],\n ['Windows 10', /(Windows NT 10.0)/],\n ['Windows ME', /Windows ME/],\n ['Open BSD', /OpenBSD/],\n ['Sun OS', /SunOS/],\n ['Chrome OS', /CrOS/],\n ['Linux', /(Linux)|(X11)/],\n ['Mac OS', /(Mac_PowerPC)|(Macintosh)/],\n ['QNX', /QNX/],\n ['BeOS', /BeOS/],\n ['OS/2', /OS\\/2/],\n];\nexport function detect(userAgent) {\n if (!!userAgent) {\n return parseUserAgent(userAgent);\n }\n if (typeof document === 'undefined' &&\n typeof navigator !== 'undefined' &&\n navigator.product === 'ReactNative') {\n return new ReactNativeInfo();\n }\n if (typeof navigator !== 'undefined') {\n return parseUserAgent(navigator.userAgent);\n }\n return getNodeVersion();\n}\nfunction matchUserAgent(ua) {\n // opted for using reduce here rather than Array#first with a regex.test call\n // this is primarily because using the reduce we only perform the regex\n // execution once rather than once for the test and for the exec again below\n // probably something that needs to be benchmarked though\n return (ua !== '' &&\n userAgentRules.reduce(function (matched, _a) {\n var browser = _a[0], regex = _a[1];\n if (matched) {\n return matched;\n }\n var uaMatch = regex.exec(ua);\n return !!uaMatch && [browser, uaMatch];\n }, false));\n}\nexport function browserName(ua) {\n var data = matchUserAgent(ua);\n return data ? data[0] : null;\n}\nexport function parseUserAgent(ua) {\n var matchedRule = matchUserAgent(ua);\n if (!matchedRule) {\n return null;\n }\n var name = matchedRule[0], match = matchedRule[1];\n if (name === 'searchbot') {\n return new BotInfo();\n }\n var versionParts = match[1] && match[1].split(/[._]/).slice(0, 3);\n if (versionParts) {\n if (versionParts.length < REQUIRED_VERSION_PARTS) {\n versionParts = __spreadArrays(versionParts, createVersionParts(REQUIRED_VERSION_PARTS - versionParts.length));\n }\n }\n else {\n versionParts = [];\n }\n var version = versionParts.join('.');\n var os = detectOS(ua);\n var searchBotMatch = SEARCHBOT_OS_REGEX.exec(ua);\n if (searchBotMatch && searchBotMatch[1]) {\n return new SearchBotDeviceInfo(name, version, os, searchBotMatch[1]);\n }\n return new BrowserInfo(name, version, os);\n}\nexport function detectOS(ua) {\n for (var ii = 0, count = operatingSystemRules.length; ii < count; ii++) {\n var _a = operatingSystemRules[ii], os = _a[0], regex = _a[1];\n var match = regex.exec(ua);\n if (match) {\n return os;\n }\n }\n return null;\n}\nexport function getNodeVersion() {\n var isNode = typeof process !== 'undefined' && process.version;\n return isNode ? new NodeInfo(process.version.slice(1)) : null;\n}\nfunction createVersionParts(count) {\n var output = [];\n for (var ii = 0; ii < count; ii++) {\n output.push('0');\n }\n return output;\n}\n","/** Types of elements found in htmlparser2's DOM */\nexport var ElementType;\n(function (ElementType) {\n /** Type for the root element of a document */\n ElementType[\"Root\"] = \"root\";\n /** Type for Text */\n ElementType[\"Text\"] = \"text\";\n /** Type for ... ?> */\n ElementType[\"Directive\"] = \"directive\";\n /** Type for */\n ElementType[\"Comment\"] = \"comment\";\n /** Type for