UNPKG

@assistant-ui/react

Version:

Typescript/React library for AI Chat

1 lines 215 kB
{"version":3,"sources":["../../../../node_modules/.pnpm/vitest@3.1.1_@types+debug@4.1.12_@types+node@22.14.0_jiti@2.4.2_lightningcss@1.29.2_terser@5.39.0_tsx@4.19.3_yaml@2.7.1/node_modules/vitest/dist/chunks/vi.B-PuvDzu.js","../../../../node_modules/.pnpm/vitest@3.1.1_@types+debug@4.1.12_@types+node@22.14.0_jiti@2.4.2_lightningcss@1.29.2_terser@5.39.0_tsx@4.19.3_yaml@2.7.1/node_modules/vitest/dist/chunks/utils.CtocqOoE.js","../../../../node_modules/.pnpm/vitest@3.1.1_@types+debug@4.1.12_@types+node@22.14.0_jiti@2.4.2_lightningcss@1.29.2_terser@5.39.0_tsx@4.19.3_yaml@2.7.1/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js","../../../../node_modules/.pnpm/vitest@3.1.1_@types+debug@4.1.12_@types+node@22.14.0_jiti@2.4.2_lightningcss@1.29.2_terser@5.39.0_tsx@4.19.3_yaml@2.7.1/node_modules/vitest/dist/chunks/date.CDOsz-HY.js","../../../../node_modules/.pnpm/vitest@3.1.1_@types+debug@4.1.12_@types+node@22.14.0_jiti@2.4.2_lightningcss@1.29.2_terser@5.39.0_tsx@4.19.3_yaml@2.7.1/node_modules/vitest/dist/index.js","../../src/tests/setup.ts"],"sourcesContent":["import { equals, iterableEquality, subsetEquality, JestExtend, JestChaiExpect, JestAsymmetricMatchers, GLOBAL_EXPECT, ASYMMETRIC_MATCHERS_OBJECT, getState, setState, addCustomEqualityTesters, customMatchers } from '@vitest/expect';\nimport { getCurrentTest } from '@vitest/runner';\nimport { getNames, getTestName } from '@vitest/runner/utils';\nimport * as chai$1 from 'chai';\nimport { g as getWorkerState, a as getCurrentEnvironment, i as isChildProcess, w as waitForImportsToResolve, r as resetModules } from './utils.CtocqOoE.js';\nimport { getSafeTimers, assertTypes, createSimpleStackTrace } from '@vitest/utils';\nimport { g as getDefaultExportFromCjs, c as commonjsGlobal } from './_commonjsHelpers.BFTU3MAI.js';\nimport { stripSnapshotIndentation, addSerializer, SnapshotClient } from '@vitest/snapshot';\nimport '@vitest/utils/error';\nimport { fn, spyOn, mocks, isMockFunction } from '@vitest/spy';\nimport { parseSingleStack } from '@vitest/utils/source-map';\nimport { R as RealDate, r as resetDate, m as mockDate } from './date.CDOsz-HY.js';\n\nconst unsupported = [\n\t\"matchSnapshot\",\n\t\"toMatchSnapshot\",\n\t\"toMatchInlineSnapshot\",\n\t\"toThrowErrorMatchingSnapshot\",\n\t\"toThrowErrorMatchingInlineSnapshot\",\n\t\"throws\",\n\t\"Throw\",\n\t\"throw\",\n\t\"toThrow\",\n\t\"toThrowError\"\n];\nfunction createExpectPoll(expect) {\n\treturn function poll(fn, options = {}) {\n\t\tconst state = getWorkerState();\n\t\tconst defaults = state.config.expect?.poll ?? {};\n\t\tconst { interval = defaults.interval ?? 50, timeout = defaults.timeout ?? 1e3, message } = options;\n\t\tconst assertion = expect(null, message).withContext({ poll: true });\n\t\tfn = fn.bind(assertion);\n\t\tconst test = chai$1.util.flag(assertion, \"vitest-test\");\n\t\tif (!test) {\n\t\t\tthrow new Error(\"expect.poll() must be called inside a test\");\n\t\t}\n\t\tconst proxy = new Proxy(assertion, { get(target, key, receiver) {\n\t\t\tconst assertionFunction = Reflect.get(target, key, receiver);\n\t\t\tif (typeof assertionFunction !== \"function\") {\n\t\t\t\treturn assertionFunction instanceof chai$1.Assertion ? proxy : assertionFunction;\n\t\t\t}\n\t\t\tif (key === \"assert\") {\n\t\t\t\treturn assertionFunction;\n\t\t\t}\n\t\t\tif (typeof key === \"string\" && unsupported.includes(key)) {\n\t\t\t\tthrow new SyntaxError(`expect.poll() is not supported in combination with .${key}(). Use vi.waitFor() if your assertion condition is unstable.`);\n\t\t\t}\n\t\t\treturn function(...args) {\n\t\t\t\tconst STACK_TRACE_ERROR = new Error(\"STACK_TRACE_ERROR\");\n\t\t\t\tconst promise = () => new Promise((resolve, reject) => {\n\t\t\t\t\tlet intervalId;\n\t\t\t\t\tlet timeoutId;\n\t\t\t\t\tlet lastError;\n\t\t\t\t\tconst { setTimeout, clearTimeout } = getSafeTimers();\n\t\t\t\t\tconst check = async () => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tchai$1.util.flag(assertion, \"_name\", key);\n\t\t\t\t\t\t\tconst obj = await fn();\n\t\t\t\t\t\t\tchai$1.util.flag(assertion, \"object\", obj);\n\t\t\t\t\t\t\tresolve(await assertionFunction.call(assertion, ...args));\n\t\t\t\t\t\t\tclearTimeout(intervalId);\n\t\t\t\t\t\t\tclearTimeout(timeoutId);\n\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\tlastError = err;\n\t\t\t\t\t\t\tif (!chai$1.util.flag(assertion, \"_isLastPollAttempt\")) {\n\t\t\t\t\t\t\t\tintervalId = setTimeout(check, interval);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\ttimeoutId = setTimeout(() => {\n\t\t\t\t\t\tclearTimeout(intervalId);\n\t\t\t\t\t\tchai$1.util.flag(assertion, \"_isLastPollAttempt\", true);\n\t\t\t\t\t\tconst rejectWithCause = (cause) => {\n\t\t\t\t\t\t\treject(copyStackTrace$1(new Error(\"Matcher did not succeed in time.\", { cause }), STACK_TRACE_ERROR));\n\t\t\t\t\t\t};\n\t\t\t\t\t\tcheck().then(() => rejectWithCause(lastError)).catch((e) => rejectWithCause(e));\n\t\t\t\t\t}, timeout);\n\t\t\t\t\tcheck();\n\t\t\t\t});\n\t\t\t\tlet awaited = false;\n\t\t\t\ttest.onFinished ??= [];\n\t\t\t\ttest.onFinished.push(() => {\n\t\t\t\t\tif (!awaited) {\n\t\t\t\t\t\tconst negated = chai$1.util.flag(assertion, \"negate\") ? \"not.\" : \"\";\n\t\t\t\t\t\tconst name = chai$1.util.flag(assertion, \"_poll.element\") ? \"element(locator)\" : \"poll(assertion)\";\n\t\t\t\t\t\tconst assertionString = `expect.${name}.${negated}${String(key)}()`;\n\t\t\t\t\t\tconst error = new Error(`${assertionString} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:\\n\\nawait ${assertionString}\\n`);\n\t\t\t\t\t\tthrow copyStackTrace$1(error, STACK_TRACE_ERROR);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tlet resultPromise;\n\t\t\t\treturn {\n\t\t\t\t\tthen(onFulfilled, onRejected) {\n\t\t\t\t\t\tawaited = true;\n\t\t\t\t\t\treturn (resultPromise ||= promise()).then(onFulfilled, onRejected);\n\t\t\t\t\t},\n\t\t\t\t\tcatch(onRejected) {\n\t\t\t\t\t\treturn (resultPromise ||= promise()).catch(onRejected);\n\t\t\t\t\t},\n\t\t\t\t\tfinally(onFinally) {\n\t\t\t\t\t\treturn (resultPromise ||= promise()).finally(onFinally);\n\t\t\t\t\t},\n\t\t\t\t\t[Symbol.toStringTag]: \"Promise\"\n\t\t\t\t};\n\t\t\t};\n\t\t} });\n\t\treturn proxy;\n\t};\n}\nfunction copyStackTrace$1(target, source) {\n\tif (source.stack !== undefined) {\n\t\ttarget.stack = source.stack.replace(source.message, target.message);\n\t}\n\treturn target;\n}\n\nfunction commonjsRequire(path) {\n\tthrow new Error('Could not dynamically require \"' + path + '\". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');\n}\n\nvar chaiSubset$1 = {exports: {}};\n\nvar chaiSubset = chaiSubset$1.exports;\n\nvar hasRequiredChaiSubset;\n\nfunction requireChaiSubset () {\n\tif (hasRequiredChaiSubset) return chaiSubset$1.exports;\n\thasRequiredChaiSubset = 1;\n\t(function (module, exports) {\n\t\t(function() {\n\t\t\t(function(chaiSubset) {\n\t\t\t\tif (typeof commonjsRequire === 'function' && 'object' === 'object' && 'object' === 'object') {\n\t\t\t\t\treturn module.exports = chaiSubset;\n\t\t\t\t} else {\n\t\t\t\t\treturn chai.use(chaiSubset);\n\t\t\t\t}\n\t\t\t})(function(chai, utils) {\n\t\t\t\tvar Assertion = chai.Assertion;\n\t\t\t\tvar assertionPrototype = Assertion.prototype;\n\n\t\t\t\tAssertion.addMethod('containSubset', function (expected) {\n\t\t\t\t\tvar actual = utils.flag(this, 'object');\n\t\t\t\t\tvar showDiff = chai.config.showDiff;\n\n\t\t\t\t\tassertionPrototype.assert.call(this,\n\t\t\t\t\t\tcompare(expected, actual),\n\t\t\t\t\t\t'expected #{act} to contain subset #{exp}',\n\t\t\t\t\t\t'expected #{act} to not contain subset #{exp}',\n\t\t\t\t\t\texpected,\n\t\t\t\t\t\tactual,\n\t\t\t\t\t\tshowDiff\n\t\t\t\t\t);\n\t\t\t\t});\n\n\t\t\t\tchai.assert.containSubset = function(val, exp, msg) {\n\t\t\t\t\tnew chai.Assertion(val, msg).to.be.containSubset(exp);\n\t\t\t\t};\n\n\t\t\t\tfunction compare(expected, actual) {\n\t\t\t\t\tif (expected === actual) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof(actual) !== typeof(expected)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof(expected) !== 'object' || expected === null) {\n\t\t\t\t\t\treturn expected === actual;\n\t\t\t\t\t}\n\t\t\t\t\tif (!!expected && !actual) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (Array.isArray(expected)) {\n\t\t\t\t\t\tif (typeof(actual.length) !== 'number') {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar aa = Array.prototype.slice.call(actual);\n\t\t\t\t\t\treturn expected.every(function (exp) {\n\t\t\t\t\t\t\treturn aa.some(function (act) {\n\t\t\t\t\t\t\t\treturn compare(exp, act);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tif (expected instanceof Date) {\n\t\t\t\t\t\tif (actual instanceof Date) {\n\t\t\t\t\t\t\treturn expected.getTime() === actual.getTime();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Object.keys(expected).every(function (key) {\n\t\t\t\t\t\tvar eo = expected[key];\n\t\t\t\t\t\tvar ao = actual[key];\n\t\t\t\t\t\tif (typeof(eo) === 'object' && eo !== null && ao !== null) {\n\t\t\t\t\t\t\treturn compare(eo, ao);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (typeof(eo) === 'function') {\n\t\t\t\t\t\t\treturn eo(ao);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn ao === eo;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t}).call(chaiSubset); \n\t} (chaiSubset$1));\n\treturn chaiSubset$1.exports;\n}\n\nvar chaiSubsetExports = requireChaiSubset();\nvar Subset = /*@__PURE__*/getDefaultExportFromCjs(chaiSubsetExports);\n\nfunction createAssertionMessage(util, assertion, hasArgs) {\n\tconst not = util.flag(assertion, \"negate\") ? \"not.\" : \"\";\n\tconst name = `${util.flag(assertion, \"_name\")}(${\"expected\" })`;\n\tconst promiseName = util.flag(assertion, \"promise\");\n\tconst promise = promiseName ? `.${promiseName}` : \"\";\n\treturn `expect(actual)${promise}.${not}${name}`;\n}\nfunction recordAsyncExpect(_test, promise, assertion, error) {\n\tconst test = _test;\n\tif (test && promise instanceof Promise) {\n\t\tpromise = promise.finally(() => {\n\t\t\tif (!test.promises) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst index = test.promises.indexOf(promise);\n\t\t\tif (index !== -1) {\n\t\t\t\ttest.promises.splice(index, 1);\n\t\t\t}\n\t\t});\n\t\tif (!test.promises) {\n\t\t\ttest.promises = [];\n\t\t}\n\t\ttest.promises.push(promise);\n\t\tlet resolved = false;\n\t\ttest.onFinished ??= [];\n\t\ttest.onFinished.push(() => {\n\t\t\tif (!resolved) {\n\t\t\t\tconst processor = globalThis.__vitest_worker__?.onFilterStackTrace || ((s) => s || \"\");\n\t\t\t\tconst stack = processor(error.stack);\n\t\t\t\tconsole.warn([\n\t\t\t\t\t`Promise returned by \\`${assertion}\\` was not awaited. `,\n\t\t\t\t\t\"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. \",\n\t\t\t\t\t\"Please remember to await the assertion.\\n\",\n\t\t\t\t\tstack\n\t\t\t\t].join(\"\"));\n\t\t\t}\n\t\t});\n\t\treturn {\n\t\t\tthen(onFulfilled, onRejected) {\n\t\t\t\tresolved = true;\n\t\t\t\treturn promise.then(onFulfilled, onRejected);\n\t\t\t},\n\t\t\tcatch(onRejected) {\n\t\t\t\treturn promise.catch(onRejected);\n\t\t\t},\n\t\t\tfinally(onFinally) {\n\t\t\t\treturn promise.finally(onFinally);\n\t\t\t},\n\t\t\t[Symbol.toStringTag]: \"Promise\"\n\t\t};\n\t}\n\treturn promise;\n}\n\nlet _client;\nfunction getSnapshotClient() {\n\tif (!_client) {\n\t\t_client = new SnapshotClient({ isEqual: (received, expected) => {\n\t\t\treturn equals(received, expected, [iterableEquality, subsetEquality]);\n\t\t} });\n\t}\n\treturn _client;\n}\nfunction getError(expected, promise) {\n\tif (typeof expected !== \"function\") {\n\t\tif (!promise) {\n\t\t\tthrow new Error(`expected must be a function, received ${typeof expected}`);\n\t\t}\n\t\treturn expected;\n\t}\n\ttry {\n\t\texpected();\n\t} catch (e) {\n\t\treturn e;\n\t}\n\tthrow new Error(\"snapshot function didn't throw\");\n}\nfunction getTestNames(test) {\n\treturn {\n\t\tfilepath: test.file.filepath,\n\t\tname: getNames(test).slice(1).join(\" > \"),\n\t\ttestId: test.id\n\t};\n}\nconst SnapshotPlugin = (chai, utils) => {\n\tfunction getTest(assertionName, obj) {\n\t\tconst test = utils.flag(obj, \"vitest-test\");\n\t\tif (!test) {\n\t\t\tthrow new Error(`'${assertionName}' cannot be used without test context`);\n\t\t}\n\t\treturn test;\n\t}\n\tfor (const key of [\"matchSnapshot\", \"toMatchSnapshot\"]) {\n\t\tutils.addMethod(chai.Assertion.prototype, key, function(properties, message) {\n\t\t\tutils.flag(this, \"_name\", key);\n\t\t\tconst isNot = utils.flag(this, \"negate\");\n\t\t\tif (isNot) {\n\t\t\t\tthrow new Error(`${key} cannot be used with \"not\"`);\n\t\t\t}\n\t\t\tconst expected = utils.flag(this, \"object\");\n\t\t\tconst test = getTest(key, this);\n\t\t\tif (typeof properties === \"string\" && typeof message === \"undefined\") {\n\t\t\t\tmessage = properties;\n\t\t\t\tproperties = undefined;\n\t\t\t}\n\t\t\tconst errorMessage = utils.flag(this, \"message\");\n\t\t\tgetSnapshotClient().assert({\n\t\t\t\treceived: expected,\n\t\t\t\tmessage,\n\t\t\t\tisInline: false,\n\t\t\t\tproperties,\n\t\t\t\terrorMessage,\n\t\t\t\t...getTestNames(test)\n\t\t\t});\n\t\t});\n\t}\n\tutils.addMethod(chai.Assertion.prototype, \"toMatchFileSnapshot\", function(file, message) {\n\t\tutils.flag(this, \"_name\", \"toMatchFileSnapshot\");\n\t\tconst isNot = utils.flag(this, \"negate\");\n\t\tif (isNot) {\n\t\t\tthrow new Error(\"toMatchFileSnapshot cannot be used with \\\"not\\\"\");\n\t\t}\n\t\tconst error = new Error(\"resolves\");\n\t\tconst expected = utils.flag(this, \"object\");\n\t\tconst test = getTest(\"toMatchFileSnapshot\", this);\n\t\tconst errorMessage = utils.flag(this, \"message\");\n\t\tconst promise = getSnapshotClient().assertRaw({\n\t\t\treceived: expected,\n\t\t\tmessage,\n\t\t\tisInline: false,\n\t\t\trawSnapshot: { file },\n\t\t\terrorMessage,\n\t\t\t...getTestNames(test)\n\t\t});\n\t\treturn recordAsyncExpect(test, promise, createAssertionMessage(utils, this), error);\n\t});\n\tutils.addMethod(chai.Assertion.prototype, \"toMatchInlineSnapshot\", function __INLINE_SNAPSHOT__(properties, inlineSnapshot, message) {\n\t\tutils.flag(this, \"_name\", \"toMatchInlineSnapshot\");\n\t\tconst isNot = utils.flag(this, \"negate\");\n\t\tif (isNot) {\n\t\t\tthrow new Error(\"toMatchInlineSnapshot cannot be used with \\\"not\\\"\");\n\t\t}\n\t\tconst test = getTest(\"toMatchInlineSnapshot\", this);\n\t\tconst isInsideEach = test.each || test.suite?.each;\n\t\tif (isInsideEach) {\n\t\t\tthrow new Error(\"InlineSnapshot cannot be used inside of test.each or describe.each\");\n\t\t}\n\t\tconst expected = utils.flag(this, \"object\");\n\t\tconst error = utils.flag(this, \"error\");\n\t\tif (typeof properties === \"string\") {\n\t\t\tmessage = inlineSnapshot;\n\t\t\tinlineSnapshot = properties;\n\t\t\tproperties = undefined;\n\t\t}\n\t\tif (inlineSnapshot) {\n\t\t\tinlineSnapshot = stripSnapshotIndentation(inlineSnapshot);\n\t\t}\n\t\tconst errorMessage = utils.flag(this, \"message\");\n\t\tgetSnapshotClient().assert({\n\t\t\treceived: expected,\n\t\t\tmessage,\n\t\t\tisInline: true,\n\t\t\tproperties,\n\t\t\tinlineSnapshot,\n\t\t\terror,\n\t\t\terrorMessage,\n\t\t\t...getTestNames(test)\n\t\t});\n\t});\n\tutils.addMethod(chai.Assertion.prototype, \"toThrowErrorMatchingSnapshot\", function(message) {\n\t\tutils.flag(this, \"_name\", \"toThrowErrorMatchingSnapshot\");\n\t\tconst isNot = utils.flag(this, \"negate\");\n\t\tif (isNot) {\n\t\t\tthrow new Error(\"toThrowErrorMatchingSnapshot cannot be used with \\\"not\\\"\");\n\t\t}\n\t\tconst expected = utils.flag(this, \"object\");\n\t\tconst test = getTest(\"toThrowErrorMatchingSnapshot\", this);\n\t\tconst promise = utils.flag(this, \"promise\");\n\t\tconst errorMessage = utils.flag(this, \"message\");\n\t\tgetSnapshotClient().assert({\n\t\t\treceived: getError(expected, promise),\n\t\t\tmessage,\n\t\t\terrorMessage,\n\t\t\t...getTestNames(test)\n\t\t});\n\t});\n\tutils.addMethod(chai.Assertion.prototype, \"toThrowErrorMatchingInlineSnapshot\", function __INLINE_SNAPSHOT__(inlineSnapshot, message) {\n\t\tconst isNot = utils.flag(this, \"negate\");\n\t\tif (isNot) {\n\t\t\tthrow new Error(\"toThrowErrorMatchingInlineSnapshot cannot be used with \\\"not\\\"\");\n\t\t}\n\t\tconst test = getTest(\"toThrowErrorMatchingInlineSnapshot\", this);\n\t\tconst isInsideEach = test.each || test.suite?.each;\n\t\tif (isInsideEach) {\n\t\t\tthrow new Error(\"InlineSnapshot cannot be used inside of test.each or describe.each\");\n\t\t}\n\t\tconst expected = utils.flag(this, \"object\");\n\t\tconst error = utils.flag(this, \"error\");\n\t\tconst promise = utils.flag(this, \"promise\");\n\t\tconst errorMessage = utils.flag(this, \"message\");\n\t\tif (inlineSnapshot) {\n\t\t\tinlineSnapshot = stripSnapshotIndentation(inlineSnapshot);\n\t\t}\n\t\tgetSnapshotClient().assert({\n\t\t\treceived: getError(expected, promise),\n\t\t\tmessage,\n\t\t\tinlineSnapshot,\n\t\t\tisInline: true,\n\t\t\terror,\n\t\t\terrorMessage,\n\t\t\t...getTestNames(test)\n\t\t});\n\t});\n\tutils.addMethod(chai.expect, \"addSnapshotSerializer\", addSerializer);\n};\n\nchai$1.use(JestExtend);\nchai$1.use(JestChaiExpect);\nchai$1.use(Subset);\nchai$1.use(SnapshotPlugin);\nchai$1.use(JestAsymmetricMatchers);\n\nfunction createExpect(test) {\n\tconst expect = (value, message) => {\n\t\tconst { assertionCalls } = getState(expect);\n\t\tsetState({ assertionCalls: assertionCalls + 1 }, expect);\n\t\tconst assert = chai$1.expect(value, message);\n\t\tconst _test = test || getCurrentTest();\n\t\tif (_test) {\n\t\t\treturn assert.withTest(_test);\n\t\t} else {\n\t\t\treturn assert;\n\t\t}\n\t};\n\tObject.assign(expect, chai$1.expect);\n\tObject.assign(expect, globalThis[ASYMMETRIC_MATCHERS_OBJECT]);\n\texpect.getState = () => getState(expect);\n\texpect.setState = (state) => setState(state, expect);\n\tconst globalState = getState(globalThis[GLOBAL_EXPECT]) || {};\n\tsetState({\n\t\t...globalState,\n\t\tassertionCalls: 0,\n\t\tisExpectingAssertions: false,\n\t\tisExpectingAssertionsError: null,\n\t\texpectedAssertionsNumber: null,\n\t\texpectedAssertionsNumberErrorGen: null,\n\t\tenvironment: getCurrentEnvironment(),\n\t\tget testPath() {\n\t\t\treturn getWorkerState().filepath;\n\t\t},\n\t\tcurrentTestName: test ? getTestName(test) : globalState.currentTestName\n\t}, expect);\n\texpect.extend = (matchers) => chai$1.expect.extend(expect, matchers);\n\texpect.addEqualityTesters = (customTesters) => addCustomEqualityTesters(customTesters);\n\texpect.soft = (...args) => {\n\t\treturn expect(...args).withContext({ soft: true });\n\t};\n\texpect.poll = createExpectPoll(expect);\n\texpect.unreachable = (message) => {\n\t\tchai$1.assert.fail(`expected${message ? ` \"${message}\" ` : \" \"}not to be reached`);\n\t};\n\tfunction assertions(expected) {\n\t\tconst errorGen = () => new Error(`expected number of assertions to be ${expected}, but got ${expect.getState().assertionCalls}`);\n\t\tif (Error.captureStackTrace) {\n\t\t\tError.captureStackTrace(errorGen(), assertions);\n\t\t}\n\t\texpect.setState({\n\t\t\texpectedAssertionsNumber: expected,\n\t\t\texpectedAssertionsNumberErrorGen: errorGen\n\t\t});\n\t}\n\tfunction hasAssertions() {\n\t\tconst error = new Error(\"expected any number of assertion, but got none\");\n\t\tif (Error.captureStackTrace) {\n\t\t\tError.captureStackTrace(error, hasAssertions);\n\t\t}\n\t\texpect.setState({\n\t\t\tisExpectingAssertions: true,\n\t\t\tisExpectingAssertionsError: error\n\t\t});\n\t}\n\tchai$1.util.addMethod(expect, \"assertions\", assertions);\n\tchai$1.util.addMethod(expect, \"hasAssertions\", hasAssertions);\n\texpect.extend(customMatchers);\n\treturn expect;\n}\nconst globalExpect = createExpect();\nObject.defineProperty(globalThis, GLOBAL_EXPECT, {\n\tvalue: globalExpect,\n\twritable: true,\n\tconfigurable: true\n});\n\n/**\n* Gives access to injected context provided from the main thread.\n* This usually returns a value provided by `globalSetup` or an external library.\n*/\nfunction inject(key) {\n\tconst workerState = getWorkerState();\n\treturn workerState.providedContext[key];\n}\n\nvar fakeTimersSrc = {};\n\nvar global;\nvar hasRequiredGlobal;\n\nfunction requireGlobal () {\n\tif (hasRequiredGlobal) return global;\n\thasRequiredGlobal = 1;\n\n\t/**\n\t * A reference to the global object\n\t * @type {object} globalObject\n\t */\n\tvar globalObject;\n\n\t/* istanbul ignore else */\n\tif (typeof commonjsGlobal !== \"undefined\") {\n\t // Node\n\t globalObject = commonjsGlobal;\n\t} else if (typeof window !== \"undefined\") {\n\t // Browser\n\t globalObject = window;\n\t} else {\n\t // WebWorker\n\t globalObject = self;\n\t}\n\n\tglobal = globalObject;\n\treturn global;\n}\n\nvar throwsOnProto_1;\nvar hasRequiredThrowsOnProto;\n\nfunction requireThrowsOnProto () {\n\tif (hasRequiredThrowsOnProto) return throwsOnProto_1;\n\thasRequiredThrowsOnProto = 1;\n\n\t/**\n\t * Is true when the environment causes an error to be thrown for accessing the\n\t * __proto__ property.\n\t * This is necessary in order to support `node --disable-proto=throw`.\n\t *\n\t * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto\n\t * @type {boolean}\n\t */\n\tlet throwsOnProto;\n\ttry {\n\t const object = {};\n\t // eslint-disable-next-line no-proto, no-unused-expressions\n\t object.__proto__;\n\t throwsOnProto = false;\n\t} catch (_) {\n\t // This branch is covered when tests are run with `--disable-proto=throw`,\n\t // however we can test both branches at the same time, so this is ignored\n\t /* istanbul ignore next */\n\t throwsOnProto = true;\n\t}\n\n\tthrowsOnProto_1 = throwsOnProto;\n\treturn throwsOnProto_1;\n}\n\nvar copyPrototypeMethods;\nvar hasRequiredCopyPrototypeMethods;\n\nfunction requireCopyPrototypeMethods () {\n\tif (hasRequiredCopyPrototypeMethods) return copyPrototypeMethods;\n\thasRequiredCopyPrototypeMethods = 1;\n\n\tvar call = Function.call;\n\tvar throwsOnProto = requireThrowsOnProto();\n\n\tvar disallowedProperties = [\n\t // ignore size because it throws from Map\n\t \"size\",\n\t \"caller\",\n\t \"callee\",\n\t \"arguments\",\n\t];\n\n\t// This branch is covered when tests are run with `--disable-proto=throw`,\n\t// however we can test both branches at the same time, so this is ignored\n\t/* istanbul ignore next */\n\tif (throwsOnProto) {\n\t disallowedProperties.push(\"__proto__\");\n\t}\n\n\tcopyPrototypeMethods = function copyPrototypeMethods(prototype) {\n\t // eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods\n\t return Object.getOwnPropertyNames(prototype).reduce(function (\n\t result,\n\t name\n\t ) {\n\t if (disallowedProperties.includes(name)) {\n\t return result;\n\t }\n\n\t if (typeof prototype[name] !== \"function\") {\n\t return result;\n\t }\n\n\t result[name] = call.bind(prototype[name]);\n\n\t return result;\n\t },\n\t Object.create(null));\n\t};\n\treturn copyPrototypeMethods;\n}\n\nvar array;\nvar hasRequiredArray;\n\nfunction requireArray () {\n\tif (hasRequiredArray) return array;\n\thasRequiredArray = 1;\n\n\tvar copyPrototype = requireCopyPrototypeMethods();\n\n\tarray = copyPrototype(Array.prototype);\n\treturn array;\n}\n\nvar calledInOrder_1;\nvar hasRequiredCalledInOrder;\n\nfunction requireCalledInOrder () {\n\tif (hasRequiredCalledInOrder) return calledInOrder_1;\n\thasRequiredCalledInOrder = 1;\n\n\tvar every = requireArray().every;\n\n\t/**\n\t * @private\n\t */\n\tfunction hasCallsLeft(callMap, spy) {\n\t if (callMap[spy.id] === undefined) {\n\t callMap[spy.id] = 0;\n\t }\n\n\t return callMap[spy.id] < spy.callCount;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tfunction checkAdjacentCalls(callMap, spy, index, spies) {\n\t var calledBeforeNext = true;\n\n\t if (index !== spies.length - 1) {\n\t calledBeforeNext = spy.calledBefore(spies[index + 1]);\n\t }\n\n\t if (hasCallsLeft(callMap, spy) && calledBeforeNext) {\n\t callMap[spy.id] += 1;\n\t return true;\n\t }\n\n\t return false;\n\t}\n\n\t/**\n\t * A Sinon proxy object (fake, spy, stub)\n\t * @typedef {object} SinonProxy\n\t * @property {Function} calledBefore - A method that determines if this proxy was called before another one\n\t * @property {string} id - Some id\n\t * @property {number} callCount - Number of times this proxy has been called\n\t */\n\n\t/**\n\t * Returns true when the spies have been called in the order they were supplied in\n\t * @param {SinonProxy[] | SinonProxy} spies An array of proxies, or several proxies as arguments\n\t * @returns {boolean} true when spies are called in order, false otherwise\n\t */\n\tfunction calledInOrder(spies) {\n\t var callMap = {};\n\t // eslint-disable-next-line no-underscore-dangle\n\t var _spies = arguments.length > 1 ? arguments : spies;\n\n\t return every(_spies, checkAdjacentCalls.bind(null, callMap));\n\t}\n\n\tcalledInOrder_1 = calledInOrder;\n\treturn calledInOrder_1;\n}\n\nvar className_1;\nvar hasRequiredClassName;\n\nfunction requireClassName () {\n\tif (hasRequiredClassName) return className_1;\n\thasRequiredClassName = 1;\n\n\t/**\n\t * Returns a display name for a value from a constructor\n\t * @param {object} value A value to examine\n\t * @returns {(string|null)} A string or null\n\t */\n\tfunction className(value) {\n\t const name = value.constructor && value.constructor.name;\n\t return name || null;\n\t}\n\n\tclassName_1 = className;\n\treturn className_1;\n}\n\nvar deprecated = {};\n\n/* eslint-disable no-console */\n\nvar hasRequiredDeprecated;\n\nfunction requireDeprecated () {\n\tif (hasRequiredDeprecated) return deprecated;\n\thasRequiredDeprecated = 1;\n\t(function (exports) {\n\n\t\t/**\n\t\t * Returns a function that will invoke the supplied function and print a\n\t\t * deprecation warning to the console each time it is called.\n\t\t * @param {Function} func\n\t\t * @param {string} msg\n\t\t * @returns {Function}\n\t\t */\n\t\texports.wrap = function (func, msg) {\n\t\t var wrapped = function () {\n\t\t exports.printWarning(msg);\n\t\t return func.apply(this, arguments);\n\t\t };\n\t\t if (func.prototype) {\n\t\t wrapped.prototype = func.prototype;\n\t\t }\n\t\t return wrapped;\n\t\t};\n\n\t\t/**\n\t\t * Returns a string which can be supplied to `wrap()` to notify the user that a\n\t\t * particular part of the sinon API has been deprecated.\n\t\t * @param {string} packageName\n\t\t * @param {string} funcName\n\t\t * @returns {string}\n\t\t */\n\t\texports.defaultMsg = function (packageName, funcName) {\n\t\t return `${packageName}.${funcName} is deprecated and will be removed from the public API in a future version of ${packageName}.`;\n\t\t};\n\n\t\t/**\n\t\t * Prints a warning on the console, when it exists\n\t\t * @param {string} msg\n\t\t * @returns {undefined}\n\t\t */\n\t\texports.printWarning = function (msg) {\n\t\t /* istanbul ignore next */\n\t\t if (typeof process === \"object\" && process.emitWarning) {\n\t\t // Emit Warnings in Node\n\t\t process.emitWarning(msg);\n\t\t } else if (console.info) {\n\t\t console.info(msg);\n\t\t } else {\n\t\t console.log(msg);\n\t\t }\n\t\t}; \n\t} (deprecated));\n\treturn deprecated;\n}\n\nvar every;\nvar hasRequiredEvery;\n\nfunction requireEvery () {\n\tif (hasRequiredEvery) return every;\n\thasRequiredEvery = 1;\n\n\t/**\n\t * Returns true when fn returns true for all members of obj.\n\t * This is an every implementation that works for all iterables\n\t * @param {object} obj\n\t * @param {Function} fn\n\t * @returns {boolean}\n\t */\n\tevery = function every(obj, fn) {\n\t var pass = true;\n\n\t try {\n\t // eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods\n\t obj.forEach(function () {\n\t if (!fn.apply(this, arguments)) {\n\t // Throwing an error is the only way to break `forEach`\n\t throw new Error();\n\t }\n\t });\n\t } catch (e) {\n\t pass = false;\n\t }\n\n\t return pass;\n\t};\n\treturn every;\n}\n\nvar functionName;\nvar hasRequiredFunctionName;\n\nfunction requireFunctionName () {\n\tif (hasRequiredFunctionName) return functionName;\n\thasRequiredFunctionName = 1;\n\n\t/**\n\t * Returns a display name for a function\n\t * @param {Function} func\n\t * @returns {string}\n\t */\n\tfunctionName = function functionName(func) {\n\t if (!func) {\n\t return \"\";\n\t }\n\n\t try {\n\t return (\n\t func.displayName ||\n\t func.name ||\n\t // Use function decomposition as a last resort to get function\n\t // name. Does not rely on function decomposition to work - if it\n\t // doesn't debugging will be slightly less informative\n\t // (i.e. toString will say 'spy' rather than 'myFunc').\n\t (String(func).match(/function ([^\\s(]+)/) || [])[1]\n\t );\n\t } catch (e) {\n\t // Stringify may fail and we might get an exception, as a last-last\n\t // resort fall back to empty string.\n\t return \"\";\n\t }\n\t};\n\treturn functionName;\n}\n\nvar orderByFirstCall_1;\nvar hasRequiredOrderByFirstCall;\n\nfunction requireOrderByFirstCall () {\n\tif (hasRequiredOrderByFirstCall) return orderByFirstCall_1;\n\thasRequiredOrderByFirstCall = 1;\n\n\tvar sort = requireArray().sort;\n\tvar slice = requireArray().slice;\n\n\t/**\n\t * @private\n\t */\n\tfunction comparator(a, b) {\n\t // uuid, won't ever be equal\n\t var aCall = a.getCall(0);\n\t var bCall = b.getCall(0);\n\t var aId = (aCall && aCall.callId) || -1;\n\t var bId = (bCall && bCall.callId) || -1;\n\n\t return aId < bId ? -1 : 1;\n\t}\n\n\t/**\n\t * A Sinon proxy object (fake, spy, stub)\n\t * @typedef {object} SinonProxy\n\t * @property {Function} getCall - A method that can return the first call\n\t */\n\n\t/**\n\t * Sorts an array of SinonProxy instances (fake, spy, stub) by their first call\n\t * @param {SinonProxy[] | SinonProxy} spies\n\t * @returns {SinonProxy[]}\n\t */\n\tfunction orderByFirstCall(spies) {\n\t return sort(slice(spies), comparator);\n\t}\n\n\torderByFirstCall_1 = orderByFirstCall;\n\treturn orderByFirstCall_1;\n}\n\nvar _function;\nvar hasRequired_function;\n\nfunction require_function () {\n\tif (hasRequired_function) return _function;\n\thasRequired_function = 1;\n\n\tvar copyPrototype = requireCopyPrototypeMethods();\n\n\t_function = copyPrototype(Function.prototype);\n\treturn _function;\n}\n\nvar map;\nvar hasRequiredMap;\n\nfunction requireMap () {\n\tif (hasRequiredMap) return map;\n\thasRequiredMap = 1;\n\n\tvar copyPrototype = requireCopyPrototypeMethods();\n\n\tmap = copyPrototype(Map.prototype);\n\treturn map;\n}\n\nvar object;\nvar hasRequiredObject;\n\nfunction requireObject () {\n\tif (hasRequiredObject) return object;\n\thasRequiredObject = 1;\n\n\tvar copyPrototype = requireCopyPrototypeMethods();\n\n\tobject = copyPrototype(Object.prototype);\n\treturn object;\n}\n\nvar set;\nvar hasRequiredSet;\n\nfunction requireSet () {\n\tif (hasRequiredSet) return set;\n\thasRequiredSet = 1;\n\n\tvar copyPrototype = requireCopyPrototypeMethods();\n\n\tset = copyPrototype(Set.prototype);\n\treturn set;\n}\n\nvar string;\nvar hasRequiredString;\n\nfunction requireString () {\n\tif (hasRequiredString) return string;\n\thasRequiredString = 1;\n\n\tvar copyPrototype = requireCopyPrototypeMethods();\n\n\tstring = copyPrototype(String.prototype);\n\treturn string;\n}\n\nvar prototypes;\nvar hasRequiredPrototypes;\n\nfunction requirePrototypes () {\n\tif (hasRequiredPrototypes) return prototypes;\n\thasRequiredPrototypes = 1;\n\n\tprototypes = {\n\t array: requireArray(),\n\t function: require_function(),\n\t map: requireMap(),\n\t object: requireObject(),\n\t set: requireSet(),\n\t string: requireString(),\n\t};\n\treturn prototypes;\n}\n\nvar typeDetect$1 = {exports: {}};\n\nvar typeDetect = typeDetect$1.exports;\n\nvar hasRequiredTypeDetect;\n\nfunction requireTypeDetect () {\n\tif (hasRequiredTypeDetect) return typeDetect$1.exports;\n\thasRequiredTypeDetect = 1;\n\t(function (module, exports) {\n\t\t(function (global, factory) {\n\t\t\tmodule.exports = factory() ;\n\t\t}(typeDetect, (function () {\n\t\t/* !\n\t\t * type-detect\n\t\t * Copyright(c) 2013 jake luer <jake@alogicalparadox.com>\n\t\t * MIT Licensed\n\t\t */\n\t\tvar promiseExists = typeof Promise === 'function';\n\n\t\t/* eslint-disable no-undef */\n\t\tvar globalObject = typeof self === 'object' ? self : commonjsGlobal; // eslint-disable-line id-blacklist\n\n\t\tvar symbolExists = typeof Symbol !== 'undefined';\n\t\tvar mapExists = typeof Map !== 'undefined';\n\t\tvar setExists = typeof Set !== 'undefined';\n\t\tvar weakMapExists = typeof WeakMap !== 'undefined';\n\t\tvar weakSetExists = typeof WeakSet !== 'undefined';\n\t\tvar dataViewExists = typeof DataView !== 'undefined';\n\t\tvar symbolIteratorExists = symbolExists && typeof Symbol.iterator !== 'undefined';\n\t\tvar symbolToStringTagExists = symbolExists && typeof Symbol.toStringTag !== 'undefined';\n\t\tvar setEntriesExists = setExists && typeof Set.prototype.entries === 'function';\n\t\tvar mapEntriesExists = mapExists && typeof Map.prototype.entries === 'function';\n\t\tvar setIteratorPrototype = setEntriesExists && Object.getPrototypeOf(new Set().entries());\n\t\tvar mapIteratorPrototype = mapEntriesExists && Object.getPrototypeOf(new Map().entries());\n\t\tvar arrayIteratorExists = symbolIteratorExists && typeof Array.prototype[Symbol.iterator] === 'function';\n\t\tvar arrayIteratorPrototype = arrayIteratorExists && Object.getPrototypeOf([][Symbol.iterator]());\n\t\tvar stringIteratorExists = symbolIteratorExists && typeof String.prototype[Symbol.iterator] === 'function';\n\t\tvar stringIteratorPrototype = stringIteratorExists && Object.getPrototypeOf(''[Symbol.iterator]());\n\t\tvar toStringLeftSliceLength = 8;\n\t\tvar toStringRightSliceLength = -1;\n\t\t/**\n\t\t * ### typeOf (obj)\n\t\t *\n\t\t * Uses `Object.prototype.toString` to determine the type of an object,\n\t\t * normalising behaviour across engine versions & well optimised.\n\t\t *\n\t\t * @param {Mixed} object\n\t\t * @return {String} object type\n\t\t * @api public\n\t\t */\n\t\tfunction typeDetect(obj) {\n\t\t /* ! Speed optimisation\n\t\t * Pre:\n\t\t * string literal x 3,039,035 ops/sec ±1.62% (78 runs sampled)\n\t\t * boolean literal x 1,424,138 ops/sec ±4.54% (75 runs sampled)\n\t\t * number literal x 1,653,153 ops/sec ±1.91% (82 runs sampled)\n\t\t * undefined x 9,978,660 ops/sec ±1.92% (75 runs sampled)\n\t\t * function x 2,556,769 ops/sec ±1.73% (77 runs sampled)\n\t\t * Post:\n\t\t * string literal x 38,564,796 ops/sec ±1.15% (79 runs sampled)\n\t\t * boolean literal x 31,148,940 ops/sec ±1.10% (79 runs sampled)\n\t\t * number literal x 32,679,330 ops/sec ±1.90% (78 runs sampled)\n\t\t * undefined x 32,363,368 ops/sec ±1.07% (82 runs sampled)\n\t\t * function x 31,296,870 ops/sec ±0.96% (83 runs sampled)\n\t\t */\n\t\t var typeofObj = typeof obj;\n\t\t if (typeofObj !== 'object') {\n\t\t return typeofObj;\n\t\t }\n\n\t\t /* ! Speed optimisation\n\t\t * Pre:\n\t\t * null x 28,645,765 ops/sec ±1.17% (82 runs sampled)\n\t\t * Post:\n\t\t * null x 36,428,962 ops/sec ±1.37% (84 runs sampled)\n\t\t */\n\t\t if (obj === null) {\n\t\t return 'null';\n\t\t }\n\n\t\t /* ! Spec Conformance\n\t\t * Test: `Object.prototype.toString.call(window)``\n\t\t * - Node === \"[object global]\"\n\t\t * - Chrome === \"[object global]\"\n\t\t * - Firefox === \"[object Window]\"\n\t\t * - PhantomJS === \"[object Window]\"\n\t\t * - Safari === \"[object Window]\"\n\t\t * - IE 11 === \"[object Window]\"\n\t\t * - IE Edge === \"[object Window]\"\n\t\t * Test: `Object.prototype.toString.call(this)``\n\t\t * - Chrome Worker === \"[object global]\"\n\t\t * - Firefox Worker === \"[object DedicatedWorkerGlobalScope]\"\n\t\t * - Safari Worker === \"[object DedicatedWorkerGlobalScope]\"\n\t\t * - IE 11 Worker === \"[object WorkerGlobalScope]\"\n\t\t * - IE Edge Worker === \"[object WorkerGlobalScope]\"\n\t\t */\n\t\t if (obj === globalObject) {\n\t\t return 'global';\n\t\t }\n\n\t\t /* ! Speed optimisation\n\t\t * Pre:\n\t\t * array literal x 2,888,352 ops/sec ±0.67% (82 runs sampled)\n\t\t * Post:\n\t\t * array literal x 22,479,650 ops/sec ±0.96% (81 runs sampled)\n\t\t */\n\t\t if (\n\t\t Array.isArray(obj) &&\n\t\t (symbolToStringTagExists === false || !(Symbol.toStringTag in obj))\n\t\t ) {\n\t\t return 'Array';\n\t\t }\n\n\t\t // Not caching existence of `window` and related properties due to potential\n\t\t // for `window` to be unset before tests in quasi-browser environments.\n\t\t if (typeof window === 'object' && window !== null) {\n\t\t /* ! Spec Conformance\n\t\t * (https://html.spec.whatwg.org/multipage/browsers.html#location)\n\t\t * WhatWG HTML$7.7.3 - The `Location` interface\n\t\t * Test: `Object.prototype.toString.call(window.location)``\n\t\t * - IE <=11 === \"[object Object]\"\n\t\t * - IE Edge <=13 === \"[object Object]\"\n\t\t */\n\t\t if (typeof window.location === 'object' && obj === window.location) {\n\t\t return 'Location';\n\t\t }\n\n\t\t /* ! Spec Conformance\n\t\t * (https://html.spec.whatwg.org/#document)\n\t\t * WhatWG HTML$3.1.1 - The `Document` object\n\t\t * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n\t\t * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268)\n\t\t * which suggests that browsers should use HTMLTableCellElement for\n\t\t * both TD and TH elements. WhatWG separates these.\n\t\t * WhatWG HTML states:\n\t\t * > For historical reasons, Window objects must also have a\n\t\t * > writable, configurable, non-enumerable property named\n\t\t * > HTMLDocument whose value is the Document interface object.\n\t\t * Test: `Object.prototype.toString.call(document)``\n\t\t * - Chrome === \"[object HTMLDocument]\"\n\t\t * - Firefox === \"[object HTMLDocument]\"\n\t\t * - Safari === \"[object HTMLDocument]\"\n\t\t * - IE <=10 === \"[object Document]\"\n\t\t * - IE 11 === \"[object HTMLDocument]\"\n\t\t * - IE Edge <=13 === \"[object HTMLDocument]\"\n\t\t */\n\t\t if (typeof window.document === 'object' && obj === window.document) {\n\t\t return 'Document';\n\t\t }\n\n\t\t if (typeof window.navigator === 'object') {\n\t\t /* ! Spec Conformance\n\t\t * (https://html.spec.whatwg.org/multipage/webappapis.html#mimetypearray)\n\t\t * WhatWG HTML$8.6.1.5 - Plugins - Interface MimeTypeArray\n\t\t * Test: `Object.prototype.toString.call(navigator.mimeTypes)``\n\t\t * - IE <=10 === \"[object MSMimeTypesCollection]\"\n\t\t */\n\t\t if (typeof window.navigator.mimeTypes === 'object' &&\n\t\t obj === window.navigator.mimeTypes) {\n\t\t return 'MimeTypeArray';\n\t\t }\n\n\t\t /* ! Spec Conformance\n\t\t * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)\n\t\t * WhatWG HTML$8.6.1.5 - Plugins - Interface PluginArray\n\t\t * Test: `Object.prototype.toString.call(navigator.plugins)``\n\t\t * - IE <=10 === \"[object MSPluginsCollection]\"\n\t\t */\n\t\t if (typeof window.navigator.plugins === 'object' &&\n\t\t obj === window.navigator.plugins) {\n\t\t return 'PluginArray';\n\t\t }\n\t\t }\n\n\t\t if ((typeof window.HTMLElement === 'function' ||\n\t\t typeof window.HTMLElement === 'object') &&\n\t\t obj instanceof window.HTMLElement) {\n\t\t /* ! Spec Conformance\n\t\t * (https://html.spec.whatwg.org/multipage/webappapis.html#pluginarray)\n\t\t * WhatWG HTML$4.4.4 - The `blockquote` element - Interface `HTMLQuoteElement`\n\t\t * Test: `Object.prototype.toString.call(document.createElement('blockquote'))``\n\t\t * - IE <=10 === \"[object HTMLBlockElement]\"\n\t\t */\n\t\t if (obj.tagName === 'BLOCKQUOTE') {\n\t\t return 'HTMLQuoteElement';\n\t\t }\n\n\t\t /* ! Spec Conformance\n\t\t * (https://html.spec.whatwg.org/#htmltabledatacellelement)\n\t\t * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableDataCellElement`\n\t\t * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n\t\t * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)\n\t\t * which suggests that browsers should use HTMLTableCellElement for\n\t\t * both TD and TH elements. WhatWG separates these.\n\t\t * Test: Object.prototype.toString.call(document.createElement('td'))\n\t\t * - Chrome === \"[object HTMLTableCellElement]\"\n\t\t * - Firefox === \"[object HTMLTableCellElement]\"\n\t\t * - Safari === \"[object HTMLTableCellElement]\"\n\t\t */\n\t\t if (obj.tagName === 'TD') {\n\t\t return 'HTMLTableDataCellElement';\n\t\t }\n\n\t\t /* ! Spec Conformance\n\t\t * (https://html.spec.whatwg.org/#htmltableheadercellelement)\n\t\t * WhatWG HTML$4.9.9 - The `td` element - Interface `HTMLTableHeaderCellElement`\n\t\t * Note: Most browsers currently adher to the W3C DOM Level 2 spec\n\t\t * (https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82915075)\n\t\t * which suggests that browsers should use HTMLTableCellElement for\n\t\t * both TD and TH elements. WhatWG separates these.\n\t\t * Test: Object.prototype.toString.call(document.createElement('th'))\n\t\t * - Chrome === \"[object HTMLTableCellElement]\"\n\t\t * - Firefox === \"[object HTMLTableCellElement]\"\n\t\t * - Safari === \"[object HTMLTableCellElement]\"\n\t\t */\n\t\t if (obj.tagName === 'TH') {\n\t\t return 'HTMLTableHeaderCellElement';\n\t\t }\n\t\t }\n\t\t }\n\n\t\t /* ! Speed optimisation\n\t\t * Pre:\n\t\t * Float64Array x 625,644 ops/sec ±1.58% (80 runs sampled)\n\t\t * Float32Array x 1,279,852 ops/sec ±2.91% (77 runs sampled)\n\t\t * Uint32Array x 1,178,185 ops/sec ±1.95% (83 runs sampled)\n\t\t * Uint16Array x 1,008,380 ops/sec ±2.25% (80 runs sampled)\n\t\t * Uint8Array x 1,128,040 ops/sec ±2.11% (81 runs sampled)\n\t\t * Int32Array x 1,170,119 ops/sec ±2.88% (80 runs sampled)\n\t\t * Int16Array x 1,176,348 ops/sec ±5.79% (86 runs sampled)\n\t\t * Int8Array x 1,058,707 ops/sec ±4.94% (77 runs sampled)\n\t\t * Uint8ClampedArray x 1,110,633 ops/sec ±4.20% (80 runs sampled)\n\t\t * Post:\n\t\t * Float64Array x 7,105,671 ops/sec ±13.47% (64 runs sampled)\n\t\t * Float32Array x 5,887,912 ops/sec ±1.46% (82 runs sampled)\n\t\t * Uint32Array x 6,491,661 ops/sec ±1.76% (79 runs sampled)\n\t\t * Uint16Array x 6,559,795 ops/sec ±1.67% (82 runs sampled)\n\t\t * Uint8Array x 6,463,966 ops/sec ±1.43% (85 runs sampled)\n\t\t * Int32Array x 5,641,841 ops/sec ±3.49% (81 runs sampled)\n\t\t * Int16Array x 6,583,511 ops/sec ±1.98% (80 runs sampled)\n\t\t * Int8Array x 6,606,078 ops/sec ±1.74% (81 runs sampled)\n\t\t * Uint8ClampedArray x 6,602,224 ops/sec ±1.77% (83 runs sampled)\n\t\t */\n\t\t var stringTag = (symbolToStringTagExists && obj[Symbol.toStringTag]);\n\t\t if (typeof stringTag === 'string') {\n\t\t return stringTag;\n\t\t }\n\n\t\t var objPrototype = Object.getPrototypeOf(obj);\n\t\t /* ! Speed optimisation\n\t\t * Pre:\n\t\t * regex literal x 1,772,385 ops/sec ±1.85% (77 runs sampled)\n\t\t * regex constructor x 2,143,634 ops/sec ±2.46% (78 runs sampled)\n\t\t * Post:\n\t\t * regex literal x 3,928,009 ops/sec ±0.65% (78 runs sampled)\n\t\t * regex constructor x 3,931,108 ops/sec ±0.58% (84 runs sampled)\n\t\t */\n\t\t if (objPrototype === RegExp.prototype) {\n\t\t return 'RegExp';\n\t\t }\n\n\t\t /* ! Speed optimisation\n\t\t * Pre:\n\t\t * date x 2,130,074 ops/sec ±4.42% (68 runs sampled)\n\t\t * Post:\n\t\t * date x 3,953,779 ops/sec ±1.35% (77 runs sampled)\n\t\t */\n\t\t if (objPrototype === Date.prototype) {\n\t\t return 'Date';\n\t\t }\n\n\t\t /* ! Spec Conformance\n\t\t * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-promise.prototype-@@tostringtag)\n\t\t * ES6$25.4.5.4 - Promise.prototype[@@toStringTag] should be \"Promise\":\n\t\t * Test: `Object.prototype.toString.call(Promise.resolve())``\n\t\t * - Chrome <=47 === \"[object Object]\"\n\t\t * - Edge <=20 === \"[object Object]\"\n\t\t * - Firefox 29-Latest === \"[object Promise]\"\n\t\t * - Safari 7.1-Latest === \"[object Promise]\"\n\t\t */\n\t\t if (promiseExists && objPrototype === Promise.prototype) {\n\t\t return 'Promise';\n\t\t }\n\n\t\t /* ! Speed optimisation\n\t\t * Pre:\n\t\t * set x 2,222,186 ops/sec ±1.31% (82 runs sampled)\n\t\t * Post:\n\t\t * set x 4,545,879 ops/sec ±1.13% (83 runs sampled)\n\t\t */\n\t\t if (setExists && objPrototype === Set.prototype) {\n\t\t return 'Set';\n\t\t }\n\n\t\t /* ! Speed optimisation\n\t\t * Pre:\n\t\t * map x 2,396,842 ops/sec ±1.59% (81 runs sampled)\n\t\t * Post:\n\t\t * map x 4,183,945 ops/sec ±6.59% (82 runs sampled)\n\t\t */\n\t\t if (mapExists && objPrototype === Map.prototype) {\n\t\t return 'Map';\n\t\t }\n\n\t\t /* ! Speed optimisation\n\t\t * Pre:\n\t\t * weakset x 1,323,220 ops/sec ±2.17% (76 runs sampled)\n\t\t * Post:\n\t\t * weakset x 4,237,510 ops/sec ±2.01% (77 runs sampled)\n\t\t */\n\t\t if (weakSetExists && objPrototype === WeakSet.prototype) {\n\t\t return 'WeakSet';\n\t\t }\n\n\t\t /* ! Speed optimisation\n\t\t * Pre:\n\t\t * weakmap x 1,500,260 ops/sec ±2.02% (78 runs sampled)\n\t\t * Post:\n\t\t * weakmap x 3,881,384 ops/sec ±1.45% (82 runs sampled)\n\t\t */\n\t\t if (weakMapExists && objPrototype === WeakMap.prototype) {\n\t\t return 'WeakMap';\n\t\t }\n\n\t\t /* ! Spec Conformance\n\t\t * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-dataview.prototype-@@tostringtag)\n\t\t * ES6$24.2.4.21 - DataView.prototype[@@toStringTag] should be \"DataView\":\n\t\t * Test: `Object.prototype.toString.call(new DataView(new ArrayBuffer(1)))``\n\t\t * - Edge <=13 === \"[object Object]\"\n\t\t */\n\t\t if (dataViewExists && objPrototype === DataView.prototype) {\n\t\t return 'DataView';\n\t\t }\n\n\t\t /* ! Spec Conformance\n\t\t * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%mapiteratorprototype%-@@tostringtag)\n\t\t * ES6$23.1.5.2.2 - %MapIteratorPrototype%[@@toStringTag] should be \"Map Iterator\":\n\t\t * Test: `Object.prototype.toString.call(new Map().entries())``\n\t\t * - Edge <=13 === \"[object Object]\"\n\t\t */\n\t\t if (mapExists && objPrototype === mapIteratorPrototype) {\n\t\t return 'Map Iterator';\n\t\t }\n\n\t\t /* ! Spec Conformance\n\t\t * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%setiteratorprototype%-@@tostringtag)\n\t\t * ES6$23.2.5.2.2 - %SetIteratorPrototype%[@@toStringTag] should be \"Set Iterator\":\n\t\t * Test: `Object.prototype.toString.call(new Set().entries())``\n\t\t * - Edge <=13 === \"[object Object]\"\n\t\t */\n\t\t if (setExists && objPrototype === setIteratorPrototype) {\n\t\t return 'Set Iterator';\n\t\t }\n\n\t\t /* ! Spec Conformance\n\t\t * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%arrayiteratorprototype%-@@tostringtag)\n\t\t * ES6$22.1.5.2.2 - %ArrayIteratorPrototype%[@@toStringTag] should be \"Array Iterator\":\n\t\t * Test: `Object.prototype.toString.call([][Symbol.iterator]())``\n\t\t * - Edge <=13 === \"[object Object]\"\n\t\t */\n\t\t if (arrayIteratorExists && objPrototype === arrayIteratorPrototype) {\n\t\t return 'Array Iterator';\n\t\t }\n\n\t\t /* ! Spec Conformance\n\t\t * (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-%stringiteratorprototype%-@@tostringtag)\n\t\t * ES6$21.1.5.2.2 - %StringIteratorPrototype%[@@toStringTag] should be \"String Iterator\":\n\t\t * Test: `Object.prototype.toString.call(''[Symbol.iterator]())``\n\t\t * - Edge <=13 === \"[object Object]\"\n\t\t */\n\t\t if (stringIteratorExists && objPrototype === stringIteratorPrototype) {\n\t\t return 'String Iterator';\n\t\t }\n\n\t\t /* ! Speed optimisation\n\t\t * Pre:\n\t\t * object from null x 2,424,320 ops/sec ±1.67% (76 runs sampled)\n\t\t * Post:\n\t\t * object from null x 5,838,000 ops/sec ±0.99% (84 runs sampled)\n\t\t */\n\t\t if (objPrototype === null) {\n\t\t return 'Object';\n\t\t }\n\n\t\t return Object\n\t\t .prototype\n\t\t .toString\n\t\t .call(obj)\n\t\t .slice(toStringLeftSliceLength, toStringRightSliceLength);\n\t\t}\n\n\t\treturn typeDetect;\n\n\t\t}))); \n\t} (typeDetect$1));\n\treturn typeDetect$1.exports;\n}\n\nvar typeOf;\nvar hasRequiredTypeOf;\n\nfunction requireTypeOf () {\n\tif (hasRequiredTypeOf) return typeOf;\n\th