@jcheesepkg/nanobot 0.8.7 → 0.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/_virtual/_rolldown/runtime.mjs +7 -0
  2. package/dist/agent/tools/flex.test.d.mts +1 -0
  3. package/dist/agent/tools/flex.test.mjs +258 -0
  4. package/dist/agent/tools/flex.test.mjs.map +1 -0
  5. package/dist/channels/line.d.mts +3 -1
  6. package/dist/channels/line.d.mts.map +1 -1
  7. package/dist/channels/line.mjs +56 -6
  8. package/dist/channels/line.mjs.map +1 -1
  9. package/dist/channels/line.test.d.mts +1 -0
  10. package/dist/channels/line.test.mjs +202 -0
  11. package/dist/channels/line.test.mjs.map +1 -0
  12. package/dist/config/schema.d.mts +18 -18
  13. package/dist/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +78 -0
  14. package/dist/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +1 -0
  15. package/dist/node_modules/@vitest/expect/dist/index.mjs +1257 -0
  16. package/dist/node_modules/@vitest/expect/dist/index.mjs.map +1 -0
  17. package/dist/node_modules/@vitest/pretty-format/dist/index.mjs +815 -0
  18. package/dist/node_modules/@vitest/pretty-format/dist/index.mjs.map +1 -0
  19. package/dist/node_modules/@vitest/runner/dist/chunk-tasks.mjs +43 -0
  20. package/dist/node_modules/@vitest/runner/dist/chunk-tasks.mjs.map +1 -0
  21. package/dist/node_modules/@vitest/runner/dist/index.mjs +563 -0
  22. package/dist/node_modules/@vitest/runner/dist/index.mjs.map +1 -0
  23. package/dist/node_modules/@vitest/runner/dist/utils.mjs +3 -0
  24. package/dist/node_modules/@vitest/snapshot/dist/index.mjs +1736 -0
  25. package/dist/node_modules/@vitest/snapshot/dist/index.mjs.map +1 -0
  26. package/dist/node_modules/@vitest/snapshot/node_modules/pathe/dist/shared/pathe.ff20891b.mjs +82 -0
  27. package/dist/node_modules/@vitest/snapshot/node_modules/pathe/dist/shared/pathe.ff20891b.mjs.map +1 -0
  28. package/dist/node_modules/@vitest/spy/dist/index.mjs +139 -0
  29. package/dist/node_modules/@vitest/spy/dist/index.mjs.map +1 -0
  30. package/dist/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.mjs +119 -0
  31. package/dist/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.mjs.map +1 -0
  32. package/dist/node_modules/@vitest/utils/dist/diff.mjs +1227 -0
  33. package/dist/node_modules/@vitest/utils/dist/diff.mjs.map +1 -0
  34. package/dist/node_modules/@vitest/utils/dist/error.mjs +92 -0
  35. package/dist/node_modules/@vitest/utils/dist/error.mjs.map +1 -0
  36. package/dist/node_modules/@vitest/utils/dist/helpers.mjs +113 -0
  37. package/dist/node_modules/@vitest/utils/dist/helpers.mjs.map +1 -0
  38. package/dist/node_modules/@vitest/utils/dist/index.mjs +455 -0
  39. package/dist/node_modules/@vitest/utils/dist/index.mjs.map +1 -0
  40. package/dist/node_modules/@vitest/utils/dist/source-map.mjs +164 -0
  41. package/dist/node_modules/@vitest/utils/dist/source-map.mjs.map +1 -0
  42. package/dist/node_modules/chai/index.mjs +3088 -0
  43. package/dist/node_modules/chai/index.mjs.map +1 -0
  44. package/dist/node_modules/loupe/lib/arguments.mjs +12 -0
  45. package/dist/node_modules/loupe/lib/arguments.mjs.map +1 -0
  46. package/dist/node_modules/loupe/lib/array.mjs +17 -0
  47. package/dist/node_modules/loupe/lib/array.mjs.map +1 -0
  48. package/dist/node_modules/loupe/lib/bigint.mjs +12 -0
  49. package/dist/node_modules/loupe/lib/bigint.mjs.map +1 -0
  50. package/dist/node_modules/loupe/lib/class.mjs +16 -0
  51. package/dist/node_modules/loupe/lib/class.mjs.map +1 -0
  52. package/dist/node_modules/loupe/lib/date.mjs +14 -0
  53. package/dist/node_modules/loupe/lib/date.mjs.map +1 -0
  54. package/dist/node_modules/loupe/lib/error.mjs +35 -0
  55. package/dist/node_modules/loupe/lib/error.mjs.map +1 -0
  56. package/dist/node_modules/loupe/lib/function.mjs +13 -0
  57. package/dist/node_modules/loupe/lib/function.mjs.map +1 -0
  58. package/dist/node_modules/loupe/lib/helpers.mjs +123 -0
  59. package/dist/node_modules/loupe/lib/helpers.mjs.map +1 -0
  60. package/dist/node_modules/loupe/lib/html.mjs +40 -0
  61. package/dist/node_modules/loupe/lib/html.mjs.map +1 -0
  62. package/dist/node_modules/loupe/lib/index.mjs +100 -0
  63. package/dist/node_modules/loupe/lib/index.mjs.map +1 -0
  64. package/dist/node_modules/loupe/lib/map.mjs +26 -0
  65. package/dist/node_modules/loupe/lib/map.mjs.map +1 -0
  66. package/dist/node_modules/loupe/lib/number.mjs +15 -0
  67. package/dist/node_modules/loupe/lib/number.mjs.map +1 -0
  68. package/dist/node_modules/loupe/lib/object.mjs +22 -0
  69. package/dist/node_modules/loupe/lib/object.mjs.map +1 -0
  70. package/dist/node_modules/loupe/lib/promise.mjs +6 -0
  71. package/dist/node_modules/loupe/lib/promise.mjs.map +1 -0
  72. package/dist/node_modules/loupe/lib/regexp.mjs +13 -0
  73. package/dist/node_modules/loupe/lib/regexp.mjs.map +1 -0
  74. package/dist/node_modules/loupe/lib/set.mjs +19 -0
  75. package/dist/node_modules/loupe/lib/set.mjs.map +1 -0
  76. package/dist/node_modules/loupe/lib/string.mjs +26 -0
  77. package/dist/node_modules/loupe/lib/string.mjs.map +1 -0
  78. package/dist/node_modules/loupe/lib/symbol.mjs +9 -0
  79. package/dist/node_modules/loupe/lib/symbol.mjs.map +1 -0
  80. package/dist/node_modules/loupe/lib/typedarray.mjs +31 -0
  81. package/dist/node_modules/loupe/lib/typedarray.mjs.map +1 -0
  82. package/dist/node_modules/magic-string/dist/magic-string.es.mjs +940 -0
  83. package/dist/node_modules/magic-string/dist/magic-string.es.mjs.map +1 -0
  84. package/dist/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.mjs +82 -0
  85. package/dist/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.mjs.map +1 -0
  86. package/dist/node_modules/tinyrainbow/dist/node.mjs +9 -0
  87. package/dist/node_modules/tinyrainbow/dist/node.mjs.map +1 -0
  88. package/dist/node_modules/tinyspy/dist/index.mjs +79 -0
  89. package/dist/node_modules/tinyspy/dist/index.mjs.map +1 -0
  90. package/dist/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.mjs +9 -0
  91. package/dist/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.mjs.map +1 -0
  92. package/dist/node_modules/vitest/dist/chunks/date.W2xKR2qe.mjs +51 -0
  93. package/dist/node_modules/vitest/dist/chunks/date.W2xKR2qe.mjs.map +1 -0
  94. package/dist/node_modules/vitest/dist/chunks/utils.C8RiOc4B.mjs +49 -0
  95. package/dist/node_modules/vitest/dist/chunks/utils.C8RiOc4B.mjs.map +1 -0
  96. package/dist/node_modules/vitest/dist/chunks/vi.DgezovHB.mjs +2425 -0
  97. package/dist/node_modules/vitest/dist/chunks/vi.DgezovHB.mjs.map +1 -0
  98. package/package.json +1 -1
  99. package/skills/skill-creator/SKILL.md +29 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../node_modules/@vitest/snapshot/dist/index.js"],"sourcesContent":["import { resolve as resolve$2 } from 'pathe';\nimport { plugins, format } from '@vitest/pretty-format';\n\nconst comma = ','.charCodeAt(0);\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n return relative + value;\n}\nfunction hasMoreVlq(reader, max) {\n if (reader.pos >= max)\n return false;\n return reader.peek() !== comma;\n}\nclass StringReader {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n\nfunction decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(';');\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol)\n sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n }\n else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n }\n else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted)\n sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n}\nfunction sort(line) {\n line.sort(sortComparator$1);\n}\nfunction sortComparator$1(a, b) {\n return a[0] - b[0];\n}\n\n// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\nvar UrlType;\n(function (UrlType) {\n UrlType[UrlType[\"Empty\"] = 1] = \"Empty\";\n UrlType[UrlType[\"Hash\"] = 2] = \"Hash\";\n UrlType[UrlType[\"Query\"] = 3] = \"Query\";\n UrlType[UrlType[\"RelativePath\"] = 4] = \"RelativePath\";\n UrlType[UrlType[\"AbsolutePath\"] = 5] = \"AbsolutePath\";\n UrlType[UrlType[\"SchemeRelative\"] = 6] = \"SchemeRelative\";\n UrlType[UrlType[\"Absolute\"] = 7] = \"Absolute\";\n})(UrlType || (UrlType = {}));\nfunction isAbsoluteUrl(input) {\n return schemeRegex.test(input);\n}\nfunction isSchemeRelativeUrl(input) {\n return input.startsWith('//');\n}\nfunction isAbsolutePath(input) {\n return input.startsWith('/');\n}\nfunction isFileUrl(input) {\n return input.startsWith('file:');\n}\nfunction isRelative(input) {\n return /^[.?#]/.test(input);\n}\nfunction parseAbsoluteUrl(input) {\n const match = urlRegex.exec(input);\n return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');\n}\nfunction parseFileUrl(input) {\n const match = fileRegex.exec(input);\n const path = match[2];\n return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');\n}\nfunction makeUrl(scheme, user, host, port, path, query, hash) {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\nfunction parseUrl(input) {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n if (isFileUrl(input))\n return parseFileUrl(input);\n if (isAbsoluteUrl(input))\n return parseAbsoluteUrl(input);\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\nfunction stripPathFilename(path) {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..'))\n return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\nfunction mergePaths(url, base) {\n normalizePath(base, base.type);\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n }\n else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url, type) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n // A current directory, which we can always drop.\n if (piece === '.')\n continue;\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n }\n else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nfunction resolve$1(input, base) {\n if (!input && !base)\n return '';\n const url = parseUrl(input);\n let inputType = url.type;\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType)\n inputType = baseType;\n }\n normalizePath(url, inputType);\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n if (!path)\n return queryHash || '.';\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n return path + queryHash;\n }\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n\nfunction resolve(input, base) {\n // The base is always treated as a directory, if it's not empty.\n // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327\n // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401\n if (base && !base.endsWith('/'))\n base += '/';\n return resolve$1(input, base);\n}\n\n/**\n * Removes everything after the last \"/\", but leaves the slash.\n */\nfunction stripFilename(path) {\n if (!path)\n return '';\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nconst COLUMN = 0;\nconst SOURCES_INDEX = 1;\nconst SOURCE_LINE = 2;\nconst SOURCE_COLUMN = 3;\nconst NAMES_INDEX = 4;\n\nfunction maybeSort(mappings, owned) {\n const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);\n if (unsortedIndex === mappings.length)\n return mappings;\n // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If\n // not, we do not want to modify the consumer's input array.\n if (!owned)\n mappings = mappings.slice();\n for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {\n mappings[i] = sortSegments(mappings[i], owned);\n }\n return mappings;\n}\nfunction nextUnsortedSegmentLine(mappings, start) {\n for (let i = start; i < mappings.length; i++) {\n if (!isSorted(mappings[i]))\n return i;\n }\n return mappings.length;\n}\nfunction isSorted(line) {\n for (let j = 1; j < line.length; j++) {\n if (line[j][COLUMN] < line[j - 1][COLUMN]) {\n return false;\n }\n }\n return true;\n}\nfunction sortSegments(line, owned) {\n if (!owned)\n line = line.slice();\n return line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[COLUMN] - b[COLUMN];\n}\n\nlet found = false;\n/**\n * A binary search implementation that returns the index if a match is found.\n * If no match is found, then the left-index (the index associated with the item that comes just\n * before the desired index) is returned. To maintain proper sort order, a splice would happen at\n * the next index:\n *\n * ```js\n * const array = [1, 3];\n * const needle = 2;\n * const index = binarySearch(array, needle, (item, needle) => item - needle);\n *\n * assert.equal(index, 0);\n * array.splice(index + 1, 0, needle);\n * assert.deepEqual(array, [1, 2, 3]);\n * ```\n */\nfunction binarySearch(haystack, needle, low, high) {\n while (low <= high) {\n const mid = low + ((high - low) >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n if (cmp === 0) {\n found = true;\n return mid;\n }\n if (cmp < 0) {\n low = mid + 1;\n }\n else {\n high = mid - 1;\n }\n }\n found = false;\n return low - 1;\n}\nfunction upperBound(haystack, needle, index) {\n for (let i = index + 1; i < haystack.length; index = i++) {\n if (haystack[i][COLUMN] !== needle)\n break;\n }\n return index;\n}\nfunction lowerBound(haystack, needle, index) {\n for (let i = index - 1; i >= 0; index = i--) {\n if (haystack[i][COLUMN] !== needle)\n break;\n }\n return index;\n}\nfunction memoizedState() {\n return {\n lastKey: -1,\n lastNeedle: -1,\n lastIndex: -1,\n };\n}\n/**\n * This overly complicated beast is just to record the last tested line/column and the resulting\n * index, allowing us to skip a few tests if mappings are monotonically increasing.\n */\nfunction memoizedBinarySearch(haystack, needle, state, key) {\n const { lastKey, lastNeedle, lastIndex } = state;\n let low = 0;\n let high = haystack.length - 1;\n if (key === lastKey) {\n if (needle === lastNeedle) {\n found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;\n return lastIndex;\n }\n if (needle >= lastNeedle) {\n // lastIndex may be -1 if the previous needle was not found.\n low = lastIndex === -1 ? 0 : lastIndex;\n }\n else {\n high = lastIndex;\n }\n }\n state.lastKey = key;\n state.lastNeedle = needle;\n return (state.lastIndex = binarySearch(haystack, needle, low, high));\n}\n\nconst LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';\nconst COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';\nconst LEAST_UPPER_BOUND = -1;\nconst GREATEST_LOWER_BOUND = 1;\nclass TraceMap {\n constructor(map, mapUrl) {\n const isString = typeof map === 'string';\n if (!isString && map._decodedMemo)\n return map;\n const parsed = (isString ? JSON.parse(map) : map);\n const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;\n this.version = version;\n this.file = file;\n this.names = names || [];\n this.sourceRoot = sourceRoot;\n this.sources = sources;\n this.sourcesContent = sourcesContent;\n this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || undefined;\n const from = resolve(sourceRoot || '', stripFilename(mapUrl));\n this.resolvedSources = sources.map((s) => resolve(s || '', from));\n const { mappings } = parsed;\n if (typeof mappings === 'string') {\n this._encoded = mappings;\n this._decoded = undefined;\n }\n else {\n this._encoded = undefined;\n this._decoded = maybeSort(mappings, isString);\n }\n this._decodedMemo = memoizedState();\n this._bySources = undefined;\n this._bySourceMemos = undefined;\n }\n}\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\nfunction cast(map) {\n return map;\n}\n/**\n * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.\n */\nfunction decodedMappings(map) {\n var _a;\n return ((_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded)));\n}\n/**\n * A higher-level API to find the source/line/column associated with a generated line/column\n * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in\n * `source-map` library.\n */\nfunction originalPositionFor(map, needle) {\n let { line, column, bias } = needle;\n line--;\n if (line < 0)\n throw new Error(LINE_GTR_ZERO);\n if (column < 0)\n throw new Error(COL_GTR_EQ_ZERO);\n const decoded = decodedMappings(map);\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length)\n return OMapping(null, null, null, null);\n const segments = decoded[line];\n const index = traceSegmentInternal(segments, cast(map)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);\n if (index === -1)\n return OMapping(null, null, null, null);\n const segment = segments[index];\n if (segment.length === 1)\n return OMapping(null, null, null, null);\n const { names, resolvedSources } = map;\n return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);\n}\nfunction OMapping(source, line, column, name) {\n return { source, line, column, name };\n}\nfunction traceSegmentInternal(segments, memo, line, column, bias) {\n let index = memoizedBinarySearch(segments, column, memo, line);\n if (found) {\n index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);\n }\n else if (bias === LEAST_UPPER_BOUND)\n index++;\n if (index === -1 || index === segments.length)\n return -1;\n return index;\n}\n\nfunction notNullish(v) {\n return v != null;\n}\nfunction isPrimitive(value) {\n return value === null || typeof value !== \"function\" && typeof value !== \"object\";\n}\nfunction isObject(item) {\n return item != null && typeof item === \"object\" && !Array.isArray(item);\n}\nfunction getCallLastIndex(code) {\n let charIndex = -1;\n let inString = null;\n let startedBracers = 0;\n let endedBracers = 0;\n let beforeChar = null;\n while (charIndex <= code.length) {\n beforeChar = code[charIndex];\n charIndex++;\n const char = code[charIndex];\n const isCharString = char === '\"' || char === \"'\" || char === \"`\";\n if (isCharString && beforeChar !== \"\\\\\") {\n if (inString === char) {\n inString = null;\n } else if (!inString) {\n inString = char;\n }\n }\n if (!inString) {\n if (char === \"(\") {\n startedBracers++;\n }\n if (char === \")\") {\n endedBracers++;\n }\n }\n if (startedBracers && endedBracers && startedBracers === endedBracers) {\n return charIndex;\n }\n }\n return null;\n}\n\nconst CHROME_IE_STACK_REGEXP = /^\\s*at .*(?:\\S:\\d+|\\(native\\))/m;\nconst SAFARI_NATIVE_CODE_REGEXP = /^(?:eval@)?(?:\\[native code\\])?$/;\nconst stackIgnorePatterns = [\n \"node:internal\",\n /\\/packages\\/\\w+\\/dist\\//,\n /\\/@vitest\\/\\w+\\/dist\\//,\n \"/vitest/dist/\",\n \"/vitest/src/\",\n \"/vite-node/dist/\",\n \"/vite-node/src/\",\n \"/node_modules/chai/\",\n \"/node_modules/tinypool/\",\n \"/node_modules/tinyspy/\",\n // browser related deps\n \"/deps/chunk-\",\n \"/deps/@vitest\",\n \"/deps/loupe\",\n \"/deps/chai\",\n /node:\\w+/,\n /__vitest_test__/,\n /__vitest_browser__/,\n /\\/deps\\/vitest_/\n];\nfunction extractLocation(urlLike) {\n if (!urlLike.includes(\":\")) {\n return [urlLike];\n }\n const regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n const parts = regExp.exec(urlLike.replace(/^\\(|\\)$/g, \"\"));\n if (!parts) {\n return [urlLike];\n }\n let url = parts[1];\n if (url.startsWith(\"async \")) {\n url = url.slice(6);\n }\n if (url.startsWith(\"http:\") || url.startsWith(\"https:\")) {\n const urlObj = new URL(url);\n url = urlObj.pathname;\n }\n if (url.startsWith(\"/@fs/\")) {\n const isWindows = /^\\/@fs\\/[a-zA-Z]:\\//.test(url);\n url = url.slice(isWindows ? 5 : 4);\n }\n return [url, parts[2] || void 0, parts[3] || void 0];\n}\nfunction parseSingleFFOrSafariStack(raw) {\n let line = raw.trim();\n if (SAFARI_NATIVE_CODE_REGEXP.test(line)) {\n return null;\n }\n if (line.includes(\" > eval\")) {\n line = line.replace(\n / line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g,\n \":$1\"\n );\n }\n if (!line.includes(\"@\") && !line.includes(\":\")) {\n return null;\n }\n const functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(@)/;\n const matches = line.match(functionNameRegex);\n const functionName = matches && matches[1] ? matches[1] : void 0;\n const [url, lineNumber, columnNumber] = extractLocation(\n line.replace(functionNameRegex, \"\")\n );\n if (!url || !lineNumber || !columnNumber) {\n return null;\n }\n return {\n file: url,\n method: functionName || \"\",\n line: Number.parseInt(lineNumber),\n column: Number.parseInt(columnNumber)\n };\n}\nfunction parseSingleV8Stack(raw) {\n let line = raw.trim();\n if (!CHROME_IE_STACK_REGEXP.test(line)) {\n return null;\n }\n if (line.includes(\"(eval \")) {\n line = line.replace(/eval code/g, \"eval\").replace(/(\\(eval at [^()]*)|(,.*$)/g, \"\");\n }\n let sanitizedLine = line.replace(/^\\s+/, \"\").replace(/\\(eval code/g, \"(\").replace(/^.*?\\s+/, \"\");\n const location = sanitizedLine.match(/ (\\(.+\\)$)/);\n sanitizedLine = location ? sanitizedLine.replace(location[0], \"\") : sanitizedLine;\n const [url, lineNumber, columnNumber] = extractLocation(\n location ? location[1] : sanitizedLine\n );\n let method = location && sanitizedLine || \"\";\n let file = url && [\"eval\", \"<anonymous>\"].includes(url) ? void 0 : url;\n if (!file || !lineNumber || !columnNumber) {\n return null;\n }\n if (method.startsWith(\"async \")) {\n method = method.slice(6);\n }\n if (file.startsWith(\"file://\")) {\n file = file.slice(7);\n }\n file = resolve$2(file);\n if (method) {\n method = method.replace(/__vite_ssr_import_\\d+__\\./g, \"\");\n }\n return {\n method,\n file,\n line: Number.parseInt(lineNumber),\n column: Number.parseInt(columnNumber)\n };\n}\nfunction parseStacktrace(stack, options = {}) {\n const { ignoreStackEntries = stackIgnorePatterns } = options;\n let stacks = !CHROME_IE_STACK_REGEXP.test(stack) ? parseFFOrSafariStackTrace(stack) : parseV8Stacktrace(stack);\n if (ignoreStackEntries.length) {\n stacks = stacks.filter(\n (stack2) => !ignoreStackEntries.some((p) => stack2.file.match(p))\n );\n }\n return stacks.map((stack2) => {\n var _a;\n if (options.getFileName) {\n stack2.file = options.getFileName(stack2.file);\n }\n const map = (_a = options.getSourceMap) == null ? void 0 : _a.call(options, stack2.file);\n if (!map || typeof map !== \"object\" || !map.version) {\n return stack2;\n }\n const traceMap = new TraceMap(map);\n const { line, column } = originalPositionFor(traceMap, stack2);\n if (line != null && column != null) {\n return { ...stack2, line, column };\n }\n return stack2;\n });\n}\nfunction parseFFOrSafariStackTrace(stack) {\n return stack.split(\"\\n\").map((line) => parseSingleFFOrSafariStack(line)).filter(notNullish);\n}\nfunction parseV8Stacktrace(stack) {\n return stack.split(\"\\n\").map((line) => parseSingleV8Stack(line)).filter(notNullish);\n}\nfunction parseErrorStacktrace(e, options = {}) {\n if (!e || isPrimitive(e)) {\n return [];\n }\n if (e.stacks) {\n return e.stacks;\n }\n const stackStr = e.stack || e.stackStr || \"\";\n let stackFrames = parseStacktrace(stackStr, options);\n if (options.frameFilter) {\n stackFrames = stackFrames.filter(\n (f) => options.frameFilter(e, f) !== false\n );\n }\n e.stacks = stackFrames;\n return stackFrames;\n}\n\nlet getPromiseValue = () => 'Promise{…}';\ntry {\n // @ts-ignore\n const { getPromiseDetails, kPending, kRejected } = process.binding('util');\n if (Array.isArray(getPromiseDetails(Promise.resolve()))) {\n getPromiseValue = (value, options) => {\n const [state, innerValue] = getPromiseDetails(value);\n if (state === kPending) {\n return 'Promise{<pending>}';\n }\n return `Promise${state === kRejected ? '!' : ''}{${options.inspect(innerValue, options)}}`;\n };\n }\n}\ncatch (notNode) {\n /* ignore */\n}\n\n/* !\n * loupe\n * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>\n * MIT Licensed\n */\nlet nodeInspect = false;\ntry {\n // eslint-disable-next-line global-require\n // @ts-ignore\n const nodeUtil = require('util');\n nodeInspect = nodeUtil.inspect ? nodeUtil.inspect.custom : false;\n}\ncatch (noNodeInspect) {\n nodeInspect = false;\n}\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nvar jsTokens_1;\nvar hasRequiredJsTokens;\n\nfunction requireJsTokens () {\n\tif (hasRequiredJsTokens) return jsTokens_1;\n\thasRequiredJsTokens = 1;\n\t// Copyright 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Simon Lydell\n\t// License: MIT.\n\tvar Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace;\n\tRegularExpressionLiteral = /\\/(?![*\\/])(?:\\[(?:(?![\\]\\\\]).|\\\\.)*\\]|(?![\\/\\\\]).|\\\\.)*(\\/[$_\\u200C\\u200D\\p{ID_Continue}]*|\\\\)?/yu;\n\tPunctuator = /--|\\+\\+|=>|\\.{3}|\\??\\.(?!\\d)|(?:&&|\\|\\||\\?\\?|[+\\-%&|^]|\\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\\/(?![\\/*]))=?|[?~,:;[\\](){}]/y;\n\tIdentifier = /(\\x23?)(?=[$_\\p{ID_Start}\\\\])(?:[$_\\u200C\\u200D\\p{ID_Continue}]|\\\\u[\\da-fA-F]{4}|\\\\u\\{[\\da-fA-F]+\\})+/yu;\n\tStringLiteral = /(['\"])(?:(?!\\1)[^\\\\\\n\\r]|\\\\(?:\\r\\n|[^]))*(\\1)?/y;\n\tNumericLiteral = /(?:0[xX][\\da-fA-F](?:_?[\\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\\d)*n|(?:(?:0(?!\\d)|0\\d*[89]\\d*|[1-9](?:_?\\d)*)(?:\\.(?:\\d(?:_?\\d)*)?)?|\\.\\d(?:_?\\d)*)(?:[eE][+-]?\\d(?:_?\\d)*)?|0[0-7]+/y;\n\tTemplate = /[`}](?:[^`\\\\$]|\\\\[^]|\\$(?!\\{))*(`|\\$\\{)?/y;\n\tWhiteSpace = /[\\t\\v\\f\\ufeff\\p{Zs}]+/yu;\n\tLineTerminatorSequence = /\\r?\\n|[\\r\\u2028\\u2029]/y;\n\tMultiLineComment = /\\/\\*(?:[^*]|\\*(?!\\/))*(\\*\\/)?/y;\n\tSingleLineComment = /\\/\\/.*/y;\n\tJSXPunctuator = /[<>.:={}]|\\/(?![\\/*])/y;\n\tJSXIdentifier = /[$_\\p{ID_Start}][$_\\u200C\\u200D\\p{ID_Continue}-]*/yu;\n\tJSXString = /(['\"])(?:(?!\\1)[^])*(\\1)?/y;\n\tJSXText = /[^<>{}]+/y;\n\tTokensPrecedingExpression = /^(?:[\\/+-]|\\.{3}|\\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;\n\tTokensNotPrecedingObjectLiteral = /^(?:=>|[;\\]){}]|else|\\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;\n\tKeywordsWithExpressionAfter = /^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;\n\tKeywordsWithNoLineTerminatorAfter = /^(?:return|throw|yield)$/;\n\tNewline = RegExp(LineTerminatorSequence.source);\n\tjsTokens_1 = function*(input, {jsx = false} = {}) {\n\t\tvar braces, firstCodePoint, isExpression, lastIndex, lastSignificantToken, length, match, mode, nextLastIndex, nextLastSignificantToken, parenNesting, postfixIncDec, punctuator, stack;\n\t\t({length} = input);\n\t\tlastIndex = 0;\n\t\tlastSignificantToken = \"\";\n\t\tstack = [\n\t\t\t{tag: \"JS\"}\n\t\t];\n\t\tbraces = [];\n\t\tparenNesting = 0;\n\t\tpostfixIncDec = false;\n\t\twhile (lastIndex < length) {\n\t\t\tmode = stack[stack.length - 1];\n\t\t\tswitch (mode.tag) {\n\t\t\t\tcase \"JS\":\n\t\t\t\tcase \"JSNonExpressionParen\":\n\t\t\t\tcase \"InterpolationInTemplate\":\n\t\t\t\tcase \"InterpolationInJSX\":\n\t\t\t\t\tif (input[lastIndex] === \"/\" && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) {\n\t\t\t\t\t\tRegularExpressionLiteral.lastIndex = lastIndex;\n\t\t\t\t\t\tif (match = RegularExpressionLiteral.exec(input)) {\n\t\t\t\t\t\t\tlastIndex = RegularExpressionLiteral.lastIndex;\n\t\t\t\t\t\t\tlastSignificantToken = match[0];\n\t\t\t\t\t\t\tpostfixIncDec = true;\n\t\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\t\ttype: \"RegularExpressionLiteral\",\n\t\t\t\t\t\t\t\tvalue: match[0],\n\t\t\t\t\t\t\t\tclosed: match[1] !== void 0 && match[1] !== \"\\\\\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tPunctuator.lastIndex = lastIndex;\n\t\t\t\t\tif (match = Punctuator.exec(input)) {\n\t\t\t\t\t\tpunctuator = match[0];\n\t\t\t\t\t\tnextLastIndex = Punctuator.lastIndex;\n\t\t\t\t\t\tnextLastSignificantToken = punctuator;\n\t\t\t\t\t\tswitch (punctuator) {\n\t\t\t\t\t\t\tcase \"(\":\n\t\t\t\t\t\t\t\tif (lastSignificantToken === \"?NonExpressionParenKeyword\") {\n\t\t\t\t\t\t\t\t\tstack.push({\n\t\t\t\t\t\t\t\t\t\ttag: \"JSNonExpressionParen\",\n\t\t\t\t\t\t\t\t\t\tnesting: parenNesting\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tparenNesting++;\n\t\t\t\t\t\t\t\tpostfixIncDec = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \")\":\n\t\t\t\t\t\t\t\tparenNesting--;\n\t\t\t\t\t\t\t\tpostfixIncDec = true;\n\t\t\t\t\t\t\t\tif (mode.tag === \"JSNonExpressionParen\" && parenNesting === mode.nesting) {\n\t\t\t\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\t\t\t\tnextLastSignificantToken = \"?NonExpressionParenEnd\";\n\t\t\t\t\t\t\t\t\tpostfixIncDec = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"{\":\n\t\t\t\t\t\t\t\tPunctuator.lastIndex = 0;\n\t\t\t\t\t\t\t\tisExpression = !TokensNotPrecedingObjectLiteral.test(lastSignificantToken) && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken));\n\t\t\t\t\t\t\t\tbraces.push(isExpression);\n\t\t\t\t\t\t\t\tpostfixIncDec = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"}\":\n\t\t\t\t\t\t\t\tswitch (mode.tag) {\n\t\t\t\t\t\t\t\t\tcase \"InterpolationInTemplate\":\n\t\t\t\t\t\t\t\t\t\tif (braces.length === mode.nesting) {\n\t\t\t\t\t\t\t\t\t\t\tTemplate.lastIndex = lastIndex;\n\t\t\t\t\t\t\t\t\t\t\tmatch = Template.exec(input);\n\t\t\t\t\t\t\t\t\t\t\tlastIndex = Template.lastIndex;\n\t\t\t\t\t\t\t\t\t\t\tlastSignificantToken = match[0];\n\t\t\t\t\t\t\t\t\t\t\tif (match[1] === \"${\") {\n\t\t\t\t\t\t\t\t\t\t\t\tlastSignificantToken = \"?InterpolationInTemplate\";\n\t\t\t\t\t\t\t\t\t\t\t\tpostfixIncDec = false;\n\t\t\t\t\t\t\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype: \"TemplateMiddle\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: match[0]\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\t\t\t\t\t\t\tpostfixIncDec = true;\n\t\t\t\t\t\t\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype: \"TemplateTail\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: match[0],\n\t\t\t\t\t\t\t\t\t\t\t\t\tclosed: match[1] === \"`\"\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase \"InterpolationInJSX\":\n\t\t\t\t\t\t\t\t\t\tif (braces.length === mode.nesting) {\n\t\t\t\t\t\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\t\t\t\t\t\tlastIndex += 1;\n\t\t\t\t\t\t\t\t\t\t\tlastSignificantToken = \"}\";\n\t\t\t\t\t\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\t\t\t\t\t\ttype: \"JSXPunctuator\",\n\t\t\t\t\t\t\t\t\t\t\t\tvalue: \"}\"\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tpostfixIncDec = braces.pop();\n\t\t\t\t\t\t\t\tnextLastSignificantToken = postfixIncDec ? \"?ExpressionBraceEnd\" : \"}\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"]\":\n\t\t\t\t\t\t\t\tpostfixIncDec = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"++\":\n\t\t\t\t\t\t\tcase \"--\":\n\t\t\t\t\t\t\t\tnextLastSignificantToken = postfixIncDec ? \"?PostfixIncDec\" : \"?UnaryIncDec\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"<\":\n\t\t\t\t\t\t\t\tif (jsx && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) {\n\t\t\t\t\t\t\t\t\tstack.push({tag: \"JSXTag\"});\n\t\t\t\t\t\t\t\t\tlastIndex += 1;\n\t\t\t\t\t\t\t\t\tlastSignificantToken = \"<\";\n\t\t\t\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\t\t\t\ttype: \"JSXPunctuator\",\n\t\t\t\t\t\t\t\t\t\tvalue: punctuator\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tpostfixIncDec = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tpostfixIncDec = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlastIndex = nextLastIndex;\n\t\t\t\t\t\tlastSignificantToken = nextLastSignificantToken;\n\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\ttype: \"Punctuator\",\n\t\t\t\t\t\t\tvalue: punctuator\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tIdentifier.lastIndex = lastIndex;\n\t\t\t\t\tif (match = Identifier.exec(input)) {\n\t\t\t\t\t\tlastIndex = Identifier.lastIndex;\n\t\t\t\t\t\tnextLastSignificantToken = match[0];\n\t\t\t\t\t\tswitch (match[0]) {\n\t\t\t\t\t\t\tcase \"for\":\n\t\t\t\t\t\t\tcase \"if\":\n\t\t\t\t\t\t\tcase \"while\":\n\t\t\t\t\t\t\tcase \"with\":\n\t\t\t\t\t\t\t\tif (lastSignificantToken !== \".\" && lastSignificantToken !== \"?.\") {\n\t\t\t\t\t\t\t\t\tnextLastSignificantToken = \"?NonExpressionParenKeyword\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlastSignificantToken = nextLastSignificantToken;\n\t\t\t\t\t\tpostfixIncDec = !KeywordsWithExpressionAfter.test(match[0]);\n\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\ttype: match[1] === \"#\" ? \"PrivateIdentifier\" : \"IdentifierName\",\n\t\t\t\t\t\t\tvalue: match[0]\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tStringLiteral.lastIndex = lastIndex;\n\t\t\t\t\tif (match = StringLiteral.exec(input)) {\n\t\t\t\t\t\tlastIndex = StringLiteral.lastIndex;\n\t\t\t\t\t\tlastSignificantToken = match[0];\n\t\t\t\t\t\tpostfixIncDec = true;\n\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\ttype: \"StringLiteral\",\n\t\t\t\t\t\t\tvalue: match[0],\n\t\t\t\t\t\t\tclosed: match[2] !== void 0\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tNumericLiteral.lastIndex = lastIndex;\n\t\t\t\t\tif (match = NumericLiteral.exec(input)) {\n\t\t\t\t\t\tlastIndex = NumericLiteral.lastIndex;\n\t\t\t\t\t\tlastSignificantToken = match[0];\n\t\t\t\t\t\tpostfixIncDec = true;\n\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\ttype: \"NumericLiteral\",\n\t\t\t\t\t\t\tvalue: match[0]\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tTemplate.lastIndex = lastIndex;\n\t\t\t\t\tif (match = Template.exec(input)) {\n\t\t\t\t\t\tlastIndex = Template.lastIndex;\n\t\t\t\t\t\tlastSignificantToken = match[0];\n\t\t\t\t\t\tif (match[1] === \"${\") {\n\t\t\t\t\t\t\tlastSignificantToken = \"?InterpolationInTemplate\";\n\t\t\t\t\t\t\tstack.push({\n\t\t\t\t\t\t\t\ttag: \"InterpolationInTemplate\",\n\t\t\t\t\t\t\t\tnesting: braces.length\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tpostfixIncDec = false;\n\t\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\t\ttype: \"TemplateHead\",\n\t\t\t\t\t\t\t\tvalue: match[0]\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpostfixIncDec = true;\n\t\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\t\ttype: \"NoSubstitutionTemplate\",\n\t\t\t\t\t\t\t\tvalue: match[0],\n\t\t\t\t\t\t\t\tclosed: match[1] === \"`\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"JSXTag\":\n\t\t\t\tcase \"JSXTagEnd\":\n\t\t\t\t\tJSXPunctuator.lastIndex = lastIndex;\n\t\t\t\t\tif (match = JSXPunctuator.exec(input)) {\n\t\t\t\t\t\tlastIndex = JSXPunctuator.lastIndex;\n\t\t\t\t\t\tnextLastSignificantToken = match[0];\n\t\t\t\t\t\tswitch (match[0]) {\n\t\t\t\t\t\t\tcase \"<\":\n\t\t\t\t\t\t\t\tstack.push({tag: \"JSXTag\"});\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \">\":\n\t\t\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\t\t\tif (lastSignificantToken === \"/\" || mode.tag === \"JSXTagEnd\") {\n\t\t\t\t\t\t\t\t\tnextLastSignificantToken = \"?JSX\";\n\t\t\t\t\t\t\t\t\tpostfixIncDec = true;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tstack.push({tag: \"JSXChildren\"});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"{\":\n\t\t\t\t\t\t\t\tstack.push({\n\t\t\t\t\t\t\t\t\ttag: \"InterpolationInJSX\",\n\t\t\t\t\t\t\t\t\tnesting: braces.length\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tnextLastSignificantToken = \"?InterpolationInJSX\";\n\t\t\t\t\t\t\t\tpostfixIncDec = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"/\":\n\t\t\t\t\t\t\t\tif (lastSignificantToken === \"<\") {\n\t\t\t\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\t\t\t\tif (stack[stack.length - 1].tag === \"JSXChildren\") {\n\t\t\t\t\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tstack.push({tag: \"JSXTagEnd\"});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlastSignificantToken = nextLastSignificantToken;\n\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\ttype: \"JSXPunctuator\",\n\t\t\t\t\t\t\tvalue: match[0]\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tJSXIdentifier.lastIndex = lastIndex;\n\t\t\t\t\tif (match = JSXIdentifier.exec(input)) {\n\t\t\t\t\t\tlastIndex = JSXIdentifier.lastIndex;\n\t\t\t\t\t\tlastSignificantToken = match[0];\n\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\ttype: \"JSXIdentifier\",\n\t\t\t\t\t\t\tvalue: match[0]\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tJSXString.lastIndex = lastIndex;\n\t\t\t\t\tif (match = JSXString.exec(input)) {\n\t\t\t\t\t\tlastIndex = JSXString.lastIndex;\n\t\t\t\t\t\tlastSignificantToken = match[0];\n\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\ttype: \"JSXString\",\n\t\t\t\t\t\t\tvalue: match[0],\n\t\t\t\t\t\t\tclosed: match[2] !== void 0\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"JSXChildren\":\n\t\t\t\t\tJSXText.lastIndex = lastIndex;\n\t\t\t\t\tif (match = JSXText.exec(input)) {\n\t\t\t\t\t\tlastIndex = JSXText.lastIndex;\n\t\t\t\t\t\tlastSignificantToken = match[0];\n\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\ttype: \"JSXText\",\n\t\t\t\t\t\t\tvalue: match[0]\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (input[lastIndex]) {\n\t\t\t\t\t\tcase \"<\":\n\t\t\t\t\t\t\tstack.push({tag: \"JSXTag\"});\n\t\t\t\t\t\t\tlastIndex++;\n\t\t\t\t\t\t\tlastSignificantToken = \"<\";\n\t\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\t\ttype: \"JSXPunctuator\",\n\t\t\t\t\t\t\t\tvalue: \"<\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tcase \"{\":\n\t\t\t\t\t\t\tstack.push({\n\t\t\t\t\t\t\t\ttag: \"InterpolationInJSX\",\n\t\t\t\t\t\t\t\tnesting: braces.length\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tlastIndex++;\n\t\t\t\t\t\t\tlastSignificantToken = \"?InterpolationInJSX\";\n\t\t\t\t\t\t\tpostfixIncDec = false;\n\t\t\t\t\t\t\tyield ({\n\t\t\t\t\t\t\t\ttype: \"JSXPunctuator\",\n\t\t\t\t\t\t\t\tvalue: \"{\"\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tWhiteSpace.lastIndex = lastIndex;\n\t\t\tif (match = WhiteSpace.exec(input)) {\n\t\t\t\tlastIndex = WhiteSpace.lastIndex;\n\t\t\t\tyield ({\n\t\t\t\t\ttype: \"WhiteSpace\",\n\t\t\t\t\tvalue: match[0]\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tLineTerminatorSequence.lastIndex = lastIndex;\n\t\t\tif (match = LineTerminatorSequence.exec(input)) {\n\t\t\t\tlastIndex = LineTerminatorSequence.lastIndex;\n\t\t\t\tpostfixIncDec = false;\n\t\t\t\tif (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) {\n\t\t\t\t\tlastSignificantToken = \"?NoLineTerminatorHere\";\n\t\t\t\t}\n\t\t\t\tyield ({\n\t\t\t\t\ttype: \"LineTerminatorSequence\",\n\t\t\t\t\tvalue: match[0]\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tMultiLineComment.lastIndex = lastIndex;\n\t\t\tif (match = MultiLineComment.exec(input)) {\n\t\t\t\tlastIndex = MultiLineComment.lastIndex;\n\t\t\t\tif (Newline.test(match[0])) {\n\t\t\t\t\tpostfixIncDec = false;\n\t\t\t\t\tif (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) {\n\t\t\t\t\t\tlastSignificantToken = \"?NoLineTerminatorHere\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tyield ({\n\t\t\t\t\ttype: \"MultiLineComment\",\n\t\t\t\t\tvalue: match[0],\n\t\t\t\t\tclosed: match[1] !== void 0\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSingleLineComment.lastIndex = lastIndex;\n\t\t\tif (match = SingleLineComment.exec(input)) {\n\t\t\t\tlastIndex = SingleLineComment.lastIndex;\n\t\t\t\tpostfixIncDec = false;\n\t\t\t\tyield ({\n\t\t\t\t\ttype: \"SingleLineComment\",\n\t\t\t\t\tvalue: match[0]\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfirstCodePoint = String.fromCodePoint(input.codePointAt(lastIndex));\n\t\t\tlastIndex += firstCodePoint.length;\n\t\t\tlastSignificantToken = firstCodePoint;\n\t\t\tpostfixIncDec = false;\n\t\t\tyield ({\n\t\t\t\ttype: mode.tag.startsWith(\"JSX\") ? \"JSXInvalid\" : \"Invalid\",\n\t\t\t\tvalue: firstCodePoint\n\t\t\t});\n\t\t}\n\t\treturn void 0;\n\t};\n\treturn jsTokens_1;\n}\n\nrequireJsTokens();\n\n// src/index.ts\nvar reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\"\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\"\n ]\n}; new Set(reservedWords.keyword); new Set(reservedWords.strict);\n\n// src/index.ts\nvar f = {\n reset: [0, 0],\n bold: [1, 22, \"\\x1B[22m\\x1B[1m\"],\n dim: [2, 22, \"\\x1B[22m\\x1B[2m\"],\n italic: [3, 23],\n underline: [4, 24],\n inverse: [7, 27],\n hidden: [8, 28],\n strikethrough: [9, 29],\n black: [30, 39],\n red: [31, 39],\n green: [32, 39],\n yellow: [33, 39],\n blue: [34, 39],\n magenta: [35, 39],\n cyan: [36, 39],\n white: [37, 39],\n gray: [90, 39],\n bgBlack: [40, 49],\n bgRed: [41, 49],\n bgGreen: [42, 49],\n bgYellow: [43, 49],\n bgBlue: [44, 49],\n bgMagenta: [45, 49],\n bgCyan: [46, 49],\n bgWhite: [47, 49],\n blackBright: [90, 39],\n redBright: [91, 39],\n greenBright: [92, 39],\n yellowBright: [93, 39],\n blueBright: [94, 39],\n magentaBright: [95, 39],\n cyanBright: [96, 39],\n whiteBright: [97, 39],\n bgBlackBright: [100, 49],\n bgRedBright: [101, 49],\n bgGreenBright: [102, 49],\n bgYellowBright: [103, 49],\n bgBlueBright: [104, 49],\n bgMagentaBright: [105, 49],\n bgCyanBright: [106, 49],\n bgWhiteBright: [107, 49]\n}, h = Object.entries(f);\nfunction a(n) {\n return String(n);\n}\na.open = \"\";\na.close = \"\";\nfunction C(n = !1) {\n let e = typeof process != \"undefined\" ? process : void 0, i = (e == null ? void 0 : e.env) || {}, g = (e == null ? void 0 : e.argv) || [];\n return !(\"NO_COLOR\" in i || g.includes(\"--no-color\")) && (\"FORCE_COLOR\" in i || g.includes(\"--color\") || (e == null ? void 0 : e.platform) === \"win32\" || n && i.TERM !== \"dumb\" || \"CI\" in i) || typeof window != \"undefined\" && !!window.chrome;\n}\nfunction p(n = !1) {\n let e = C(n), i = (r, t, c, o) => {\n let l = \"\", s = 0;\n do\n l += r.substring(s, o) + c, s = o + t.length, o = r.indexOf(t, s);\n while (~o);\n return l + r.substring(s);\n }, g = (r, t, c = r) => {\n let o = (l) => {\n let s = String(l), b = s.indexOf(t, r.length);\n return ~b ? r + i(s, t, c, b) + t : r + s + t;\n };\n return o.open = r, o.close = t, o;\n }, u = {\n isColorSupported: e\n }, d = (r) => `\\x1B[${r}m`;\n for (let [r, t] of h)\n u[r] = e ? g(\n d(t[0]),\n d(t[1]),\n t[2]\n ) : a;\n return u;\n}\n\n// src/browser.ts\np(!1);\n\nconst lineSplitRE = /\\r?\\n/;\nfunction positionToOffset(source, lineNumber, columnNumber) {\n const lines = source.split(lineSplitRE);\n const nl = /\\r\\n/.test(source) ? 2 : 1;\n let start = 0;\n if (lineNumber > lines.length) {\n return source.length;\n }\n for (let i = 0; i < lineNumber - 1; i++) {\n start += lines[i].length + nl;\n }\n return start + columnNumber;\n}\nfunction offsetToLineNumber(source, offset) {\n if (offset > source.length) {\n throw new Error(\n `offset is longer than source length! offset ${offset} > length ${source.length}`\n );\n }\n const lines = source.split(lineSplitRE);\n const nl = /\\r\\n/.test(source) ? 2 : 1;\n let counted = 0;\n let line = 0;\n for (; line < lines.length; line++) {\n const lineLength = lines[line].length + nl;\n if (counted + lineLength >= offset) {\n break;\n }\n counted += lineLength;\n }\n return line + 1;\n}\n\nasync function saveInlineSnapshots(environment, snapshots) {\n const MagicString = (await import('magic-string')).default;\n const files = new Set(snapshots.map((i) => i.file));\n await Promise.all(\n Array.from(files).map(async (file) => {\n const snaps = snapshots.filter((i) => i.file === file);\n const code = await environment.readSnapshotFile(file);\n const s = new MagicString(code);\n for (const snap of snaps) {\n const index = positionToOffset(code, snap.line, snap.column);\n replaceInlineSnap(code, s, index, snap.snapshot);\n }\n const transformed = s.toString();\n if (transformed !== code) {\n await environment.saveSnapshotFile(file, transformed);\n }\n })\n );\n}\nconst startObjectRegex = /(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\\s*\\(\\s*(?:\\/\\*[\\s\\S]*\\*\\/\\s*|\\/\\/.*(?:[\\n\\r\\u2028\\u2029]\\s*|[\\t\\v\\f \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000\\uFEFF]))*\\{/;\nfunction replaceObjectSnap(code, s, index, newSnap) {\n let _code = code.slice(index);\n const startMatch = startObjectRegex.exec(_code);\n if (!startMatch) {\n return false;\n }\n _code = _code.slice(startMatch.index);\n let callEnd = getCallLastIndex(_code);\n if (callEnd === null) {\n return false;\n }\n callEnd += index + startMatch.index;\n const shapeStart = index + startMatch.index + startMatch[0].length;\n const shapeEnd = getObjectShapeEndIndex(code, shapeStart);\n const snap = `, ${prepareSnapString(newSnap, code, index)}`;\n if (shapeEnd === callEnd) {\n s.appendLeft(callEnd, snap);\n } else {\n s.overwrite(shapeEnd, callEnd, snap);\n }\n return true;\n}\nfunction getObjectShapeEndIndex(code, index) {\n let startBraces = 1;\n let endBraces = 0;\n while (startBraces !== endBraces && index < code.length) {\n const s = code[index++];\n if (s === \"{\") {\n startBraces++;\n } else if (s === \"}\") {\n endBraces++;\n }\n }\n return index;\n}\nfunction prepareSnapString(snap, source, index) {\n const lineNumber = offsetToLineNumber(source, index);\n const line = source.split(lineSplitRE)[lineNumber - 1];\n const indent = line.match(/^\\s*/)[0] || \"\";\n const indentNext = indent.includes(\"\t\") ? `${indent}\t` : `${indent} `;\n const lines = snap.trim().replace(/\\\\/g, \"\\\\\\\\\").split(/\\n/g);\n const isOneline = lines.length <= 1;\n const quote = \"`\";\n if (isOneline) {\n return `${quote}${lines.join(\"\\n\").replace(/`/g, \"\\\\`\").replace(/\\$\\{/g, \"\\\\${\")}${quote}`;\n }\n return `${quote}\n${lines.map((i) => i ? indentNext + i : \"\").join(\"\\n\").replace(/`/g, \"\\\\`\").replace(/\\$\\{/g, \"\\\\${\")}\n${indent}${quote}`;\n}\nconst toMatchInlineName = \"toMatchInlineSnapshot\";\nconst toThrowErrorMatchingInlineName = \"toThrowErrorMatchingInlineSnapshot\";\nfunction getCodeStartingAtIndex(code, index) {\n const indexInline = index - toMatchInlineName.length;\n if (code.slice(indexInline, index) === toMatchInlineName) {\n return {\n code: code.slice(indexInline),\n index: indexInline\n };\n }\n const indexThrowInline = index - toThrowErrorMatchingInlineName.length;\n if (code.slice(index - indexThrowInline, index) === toThrowErrorMatchingInlineName) {\n return {\n code: code.slice(index - indexThrowInline),\n index: index - indexThrowInline\n };\n }\n return {\n code: code.slice(index),\n index\n };\n}\nconst startRegex = /(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\\s*\\(\\s*(?:\\/\\*[\\s\\S]*\\*\\/\\s*|\\/\\/.*(?:[\\n\\r\\u2028\\u2029]\\s*|[\\t\\v\\f \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000\\uFEFF]))*[\\w$]*(['\"`)])/;\nfunction replaceInlineSnap(code, s, currentIndex, newSnap) {\n const { code: codeStartingAtIndex, index } = getCodeStartingAtIndex(code, currentIndex);\n const startMatch = startRegex.exec(codeStartingAtIndex);\n const firstKeywordMatch = /toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(\n codeStartingAtIndex\n );\n if (!startMatch || startMatch.index !== (firstKeywordMatch == null ? void 0 : firstKeywordMatch.index)) {\n return replaceObjectSnap(code, s, index, newSnap);\n }\n const quote = startMatch[1];\n const startIndex = index + startMatch.index + startMatch[0].length;\n const snapString = prepareSnapString(newSnap, code, index);\n if (quote === \")\") {\n s.appendRight(startIndex - 1, snapString);\n return true;\n }\n const quoteEndRE = new RegExp(`(?:^|[^\\\\\\\\])${quote}`);\n const endMatch = quoteEndRE.exec(code.slice(startIndex));\n if (!endMatch) {\n return false;\n }\n const endIndex = startIndex + endMatch.index + endMatch[0].length;\n s.overwrite(startIndex - 1, endIndex, snapString);\n return true;\n}\nconst INDENTATION_REGEX = /^([^\\S\\n]*)\\S/m;\nfunction stripSnapshotIndentation(inlineSnapshot) {\n const match = inlineSnapshot.match(INDENTATION_REGEX);\n if (!match || !match[1]) {\n return inlineSnapshot;\n }\n const indentation = match[1];\n const lines = inlineSnapshot.split(/\\n/g);\n if (lines.length <= 2) {\n return inlineSnapshot;\n }\n if (lines[0].trim() !== \"\" || lines[lines.length - 1].trim() !== \"\") {\n return inlineSnapshot;\n }\n for (let i = 1; i < lines.length - 1; i++) {\n if (lines[i] !== \"\") {\n if (lines[i].indexOf(indentation) !== 0) {\n return inlineSnapshot;\n }\n lines[i] = lines[i].substring(indentation.length);\n }\n }\n lines[lines.length - 1] = \"\";\n inlineSnapshot = lines.join(\"\\n\");\n return inlineSnapshot;\n}\n\nasync function saveRawSnapshots(environment, snapshots) {\n await Promise.all(\n snapshots.map(async (snap) => {\n if (!snap.readonly) {\n await environment.saveSnapshotFile(snap.file, snap.snapshot);\n }\n })\n );\n}\n\nvar naturalCompare$1 = {exports: {}};\n\nvar hasRequiredNaturalCompare;\n\nfunction requireNaturalCompare () {\n\tif (hasRequiredNaturalCompare) return naturalCompare$1.exports;\n\thasRequiredNaturalCompare = 1;\n\t/*\n\t * @version 1.4.0\n\t * @date 2015-10-26\n\t * @stability 3 - Stable\n\t * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)\n\t * @license MIT License\n\t */\n\n\n\tvar naturalCompare = function(a, b) {\n\t\tvar i, codeA\n\t\t, codeB = 1\n\t\t, posA = 0\n\t\t, posB = 0\n\t\t, alphabet = String.alphabet;\n\n\t\tfunction getCode(str, pos, code) {\n\t\t\tif (code) {\n\t\t\t\tfor (i = pos; code = getCode(str, i), code < 76 && code > 65;) ++i;\n\t\t\t\treturn +str.slice(pos - 1, i)\n\t\t\t}\n\t\t\tcode = alphabet && alphabet.indexOf(str.charAt(pos));\n\t\t\treturn code > -1 ? code + 76 : ((code = str.charCodeAt(pos) || 0), code < 45 || code > 127) ? code\n\t\t\t\t: code < 46 ? 65 // -\n\t\t\t\t: code < 48 ? code - 1\n\t\t\t\t: code < 58 ? code + 18 // 0-9\n\t\t\t\t: code < 65 ? code - 11\n\t\t\t\t: code < 91 ? code + 11 // A-Z\n\t\t\t\t: code < 97 ? code - 37\n\t\t\t\t: code < 123 ? code + 5 // a-z\n\t\t\t\t: code - 63\n\t\t}\n\n\n\t\tif ((a+=\"\") != (b+=\"\")) for (;codeB;) {\n\t\t\tcodeA = getCode(a, posA++);\n\t\t\tcodeB = getCode(b, posB++);\n\n\t\t\tif (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {\n\t\t\t\tcodeA = getCode(a, posA, posA);\n\t\t\t\tcodeB = getCode(b, posB, posA = i);\n\t\t\t\tposB = i;\n\t\t\t}\n\n\t\t\tif (codeA != codeB) return (codeA < codeB) ? -1 : 1\n\t\t}\n\t\treturn 0\n\t};\n\n\ttry {\n\t\tnaturalCompare$1.exports = naturalCompare;\n\t} catch (e) {\n\t\tString.naturalCompare = naturalCompare;\n\t}\n\treturn naturalCompare$1.exports;\n}\n\nvar naturalCompareExports = requireNaturalCompare();\nvar naturalCompare = /*@__PURE__*/getDefaultExportFromCjs(naturalCompareExports);\n\nconst serialize$1 = (val, config, indentation, depth, refs, printer) => {\n const name = val.getMockName();\n const nameString = name === \"vi.fn()\" ? \"\" : ` ${name}`;\n let callsString = \"\";\n if (val.mock.calls.length !== 0) {\n const indentationNext = indentation + config.indent;\n callsString = ` {${config.spacingOuter}${indentationNext}\"calls\": ${printer(\n val.mock.calls,\n config,\n indentationNext,\n depth,\n refs\n )}${config.min ? \", \" : \",\"}${config.spacingOuter}${indentationNext}\"results\": ${printer(\n val.mock.results,\n config,\n indentationNext,\n depth,\n refs\n )}${config.min ? \"\" : \",\"}${config.spacingOuter}${indentation}}`;\n }\n return `[MockFunction${nameString}]${callsString}`;\n};\nconst test = (val) => val && !!val._isMockFunction;\nconst plugin = { serialize: serialize$1, test };\n\nconst {\n DOMCollection,\n DOMElement,\n Immutable,\n ReactElement,\n ReactTestComponent,\n AsymmetricMatcher\n} = plugins;\nlet PLUGINS = [\n ReactTestComponent,\n ReactElement,\n DOMElement,\n DOMCollection,\n Immutable,\n AsymmetricMatcher,\n plugin\n];\nfunction addSerializer(plugin) {\n PLUGINS = [plugin].concat(PLUGINS);\n}\nfunction getSerializers() {\n return PLUGINS;\n}\n\nfunction testNameToKey(testName, count) {\n return `${testName} ${count}`;\n}\nfunction keyToTestName(key) {\n if (!/ \\d+$/.test(key)) {\n throw new Error(\"Snapshot keys must end with a number.\");\n }\n return key.replace(/ \\d+$/, \"\");\n}\nfunction getSnapshotData(content, options) {\n const update = options.updateSnapshot;\n const data = /* @__PURE__ */ Object.create(null);\n let snapshotContents = \"\";\n let dirty = false;\n if (content != null) {\n try {\n snapshotContents = content;\n const populate = new Function(\"exports\", snapshotContents);\n populate(data);\n } catch {\n }\n }\n const isInvalid = snapshotContents;\n if ((update === \"all\" || update === \"new\") && isInvalid) {\n dirty = true;\n }\n return { data, dirty };\n}\nfunction addExtraLineBreaks(string) {\n return string.includes(\"\\n\") ? `\n${string}\n` : string;\n}\nfunction removeExtraLineBreaks(string) {\n return string.length > 2 && string.startsWith(\"\\n\") && string.endsWith(\"\\n\") ? string.slice(1, -1) : string;\n}\nconst escapeRegex = true;\nconst printFunctionName = false;\nfunction serialize(val, indent = 2, formatOverrides = {}) {\n return normalizeNewlines(\n format(val, {\n escapeRegex,\n indent,\n plugins: getSerializers(),\n printFunctionName,\n ...formatOverrides\n })\n );\n}\nfunction escapeBacktickString(str) {\n return str.replace(/`|\\\\|\\$\\{/g, \"\\\\$&\");\n}\nfunction printBacktickString(str) {\n return `\\`${escapeBacktickString(str)}\\``;\n}\nfunction normalizeNewlines(string) {\n return string.replace(/\\r\\n|\\r/g, \"\\n\");\n}\nasync function saveSnapshotFile(environment, snapshotData, snapshotPath) {\n const snapshots = Object.keys(snapshotData).sort(naturalCompare).map(\n (key) => `exports[${printBacktickString(key)}] = ${printBacktickString(\n normalizeNewlines(snapshotData[key])\n )};`\n );\n const content = `${environment.getHeader()}\n\n${snapshots.join(\"\\n\\n\")}\n`;\n const oldContent = await environment.readSnapshotFile(snapshotPath);\n const skipWriting = oldContent != null && oldContent === content;\n if (skipWriting) {\n return;\n }\n await environment.saveSnapshotFile(snapshotPath, content);\n}\nfunction prepareExpected(expected) {\n function findStartIndent() {\n var _a, _b;\n const matchObject = /^( +)\\}\\s+$/m.exec(expected || \"\");\n const objectIndent = (_a = matchObject == null ? void 0 : matchObject[1]) == null ? void 0 : _a.length;\n if (objectIndent) {\n return objectIndent;\n }\n const matchText = /^\\n( +)\"/.exec(expected || \"\");\n return ((_b = matchText == null ? void 0 : matchText[1]) == null ? void 0 : _b.length) || 0;\n }\n const startIndent = findStartIndent();\n let expectedTrimmed = expected == null ? void 0 : expected.trim();\n if (startIndent) {\n expectedTrimmed = expectedTrimmed == null ? void 0 : expectedTrimmed.replace(new RegExp(`^${\" \".repeat(startIndent)}`, \"gm\"), \"\").replace(/ +\\}$/, \"}\");\n }\n return expectedTrimmed;\n}\nfunction deepMergeArray(target = [], source = []) {\n const mergedOutput = Array.from(target);\n source.forEach((sourceElement, index) => {\n const targetElement = mergedOutput[index];\n if (Array.isArray(target[index])) {\n mergedOutput[index] = deepMergeArray(target[index], sourceElement);\n } else if (isObject(targetElement)) {\n mergedOutput[index] = deepMergeSnapshot(target[index], sourceElement);\n } else {\n mergedOutput[index] = sourceElement;\n }\n });\n return mergedOutput;\n}\nfunction deepMergeSnapshot(target, source) {\n if (isObject(target) && isObject(source)) {\n const mergedOutput = { ...target };\n Object.keys(source).forEach((key) => {\n if (isObject(source[key]) && !source[key].$$typeof) {\n if (!(key in target)) {\n Object.assign(mergedOutput, { [key]: source[key] });\n } else {\n mergedOutput[key] = deepMergeSnapshot(target[key], source[key]);\n }\n } else if (Array.isArray(source[key])) {\n mergedOutput[key] = deepMergeArray(target[key], source[key]);\n } else {\n Object.assign(mergedOutput, { [key]: source[key] });\n }\n });\n return mergedOutput;\n } else if (Array.isArray(target) && Array.isArray(source)) {\n return deepMergeArray(target, source);\n }\n return target;\n}\n\nclass SnapshotState {\n constructor(testFilePath, snapshotPath, snapshotContent, options) {\n this.testFilePath = testFilePath;\n this.snapshotPath = snapshotPath;\n const { data, dirty } = getSnapshotData(snapshotContent, options);\n this._fileExists = snapshotContent != null;\n this._initialData = data;\n this._snapshotData = data;\n this._dirty = dirty;\n this._inlineSnapshots = [];\n this._inlineSnapshotStacks = [];\n this._rawSnapshots = [];\n this._uncheckedKeys = new Set(Object.keys(this._snapshotData));\n this._counters = /* @__PURE__ */ new Map();\n this.expand = options.expand || false;\n this.added = 0;\n this.matched = 0;\n this.unmatched = 0;\n this._updateSnapshot = options.updateSnapshot;\n this.updated = 0;\n this._snapshotFormat = {\n printBasicPrototype: false,\n escapeString: false,\n ...options.snapshotFormat\n };\n this._environment = options.snapshotEnvironment;\n }\n _counters;\n _dirty;\n _updateSnapshot;\n _snapshotData;\n _initialData;\n _inlineSnapshots;\n _inlineSnapshotStacks;\n _rawSnapshots;\n _uncheckedKeys;\n _snapshotFormat;\n _environment;\n _fileExists;\n added;\n expand;\n matched;\n unmatched;\n updated;\n static async create(testFilePath, options) {\n const snapshotPath = await options.snapshotEnvironment.resolvePath(\n testFilePath\n );\n const content = await options.snapshotEnvironment.readSnapshotFile(\n snapshotPath\n );\n return new SnapshotState(testFilePath, snapshotPath, content, options);\n }\n get environment() {\n return this._environment;\n }\n markSnapshotsAsCheckedForTest(testName) {\n this._uncheckedKeys.forEach((uncheckedKey) => {\n if (keyToTestName(uncheckedKey) === testName) {\n this._uncheckedKeys.delete(uncheckedKey);\n }\n });\n }\n _inferInlineSnapshotStack(stacks) {\n const promiseIndex = stacks.findIndex(\n (i) => i.method.match(/__VITEST_(RESOLVES|REJECTS)__/)\n );\n if (promiseIndex !== -1) {\n return stacks[promiseIndex + 3];\n }\n const stackIndex = stacks.findIndex(\n (i) => i.method.includes(\"__INLINE_SNAPSHOT__\")\n );\n return stackIndex !== -1 ? stacks[stackIndex + 2] : null;\n }\n _addSnapshot(key, receivedSerialized, options) {\n this._dirty = true;\n if (options.stack) {\n this._inlineSnapshots.push({\n snapshot: receivedSerialized,\n ...options.stack\n });\n } else if (options.rawSnapshot) {\n this._rawSnapshots.push({\n ...options.rawSnapshot,\n snapshot: receivedSerialized\n });\n } else {\n this._snapshotData[key] = receivedSerialized;\n }\n }\n clear() {\n this._snapshotData = this._initialData;\n this._counters = /* @__PURE__ */ new Map();\n this.added = 0;\n this.matched = 0;\n this.unmatched = 0;\n this.updated = 0;\n this._dirty = false;\n }\n async save() {\n const hasExternalSnapshots = Object.keys(this._snapshotData).length;\n const hasInlineSnapshots = this._inlineSnapshots.length;\n const hasRawSnapshots = this._rawSnapshots.length;\n const isEmpty = !hasExternalSnapshots && !hasInlineSnapshots && !hasRawSnapshots;\n const status = {\n deleted: false,\n saved: false\n };\n if ((this._dirty || this._uncheckedKeys.size) && !isEmpty) {\n if (hasExternalSnapshots) {\n await saveSnapshotFile(\n this._environment,\n this._snapshotData,\n this.snapshotPath\n );\n this._fileExists = true;\n }\n if (hasInlineSnapshots) {\n await saveInlineSnapshots(this._environment, this._inlineSnapshots);\n }\n if (hasRawSnapshots) {\n await saveRawSnapshots(this._environment, this._rawSnapshots);\n }\n status.saved = true;\n } else if (!hasExternalSnapshots && this._fileExists) {\n if (this._updateSnapshot === \"all\") {\n await this._environment.removeSnapshotFile(this.snapshotPath);\n this._fileExists = false;\n }\n status.deleted = true;\n }\n return status;\n }\n getUncheckedCount() {\n return this._uncheckedKeys.size || 0;\n }\n getUncheckedKeys() {\n return Array.from(this._uncheckedKeys);\n }\n removeUncheckedKeys() {\n if (this._updateSnapshot === \"all\" && this._uncheckedKeys.size) {\n this._dirty = true;\n this._uncheckedKeys.forEach((key) => delete this._snapshotData[key]);\n this._uncheckedKeys.clear();\n }\n }\n match({\n testName,\n received,\n key,\n inlineSnapshot,\n isInline,\n error,\n rawSnapshot\n }) {\n var _a, _b;\n this._counters.set(testName, (this._counters.get(testName) || 0) + 1);\n const count = Number(this._counters.get(testName));\n if (!key) {\n key = testNameToKey(testName, count);\n }\n if (!(isInline && this._snapshotData[key] !== void 0)) {\n this._uncheckedKeys.delete(key);\n }\n let receivedSerialized = rawSnapshot && typeof received === \"string\" ? received : serialize(received, void 0, this._snapshotFormat);\n if (!rawSnapshot) {\n receivedSerialized = addExtraLineBreaks(receivedSerialized);\n }\n if (rawSnapshot) {\n if (rawSnapshot.content && rawSnapshot.content.match(/\\r\\n/) && !receivedSerialized.match(/\\r\\n/)) {\n rawSnapshot.content = normalizeNewlines(rawSnapshot.content);\n }\n }\n const expected = isInline ? inlineSnapshot : rawSnapshot ? rawSnapshot.content : this._snapshotData[key];\n const expectedTrimmed = prepareExpected(expected);\n const pass = expectedTrimmed === prepareExpected(receivedSerialized);\n const hasSnapshot = expected !== void 0;\n const snapshotIsPersisted = isInline || this._fileExists || rawSnapshot && rawSnapshot.content != null;\n if (pass && !isInline && !rawSnapshot) {\n this._snapshotData[key] = receivedSerialized;\n }\n let stack;\n if (isInline) {\n const stacks = parseErrorStacktrace(\n error || new Error(\"snapshot\"),\n { ignoreStackEntries: [] }\n );\n const _stack = this._inferInlineSnapshotStack(stacks);\n if (!_stack) {\n throw new Error(\n `@vitest/snapshot: Couldn't infer stack frame for inline snapshot.\n${JSON.stringify(\n stacks\n )}`\n );\n }\n stack = ((_b = (_a = this.environment).processStackTrace) == null ? void 0 : _b.call(_a, _stack)) || _stack;\n stack.column--;\n if (this._inlineSnapshotStacks.some((s) => s.file === stack.file && s.line === stack.line && s.column === stack.column)) {\n this._inlineSnapshots = this._inlineSnapshots.filter((s) => !(s.file === stack.file && s.line === stack.line && s.column === stack.column));\n throw new Error(\"toMatchInlineSnapshot cannot be called multiple times at the same location.\");\n }\n this._inlineSnapshotStacks.push(stack);\n }\n if (hasSnapshot && this._updateSnapshot === \"all\" || (!hasSnapshot || !snapshotIsPersisted) && (this._updateSnapshot === \"new\" || this._updateSnapshot === \"all\")) {\n if (this._updateSnapshot === \"all\") {\n if (!pass) {\n if (hasSnapshot) {\n this.updated++;\n } else {\n this.added++;\n }\n this._addSnapshot(key, receivedSerialized, {\n stack,\n rawSnapshot\n });\n } else {\n this.matched++;\n }\n } else {\n this._addSnapshot(key, receivedSerialized, {\n stack,\n rawSnapshot\n });\n this.added++;\n }\n return {\n actual: \"\",\n count,\n expected: \"\",\n key,\n pass: true\n };\n } else {\n if (!pass) {\n this.unmatched++;\n return {\n actual: removeExtraLineBreaks(receivedSerialized),\n count,\n expected: expectedTrimmed !== void 0 ? removeExtraLineBreaks(expectedTrimmed) : void 0,\n key,\n pass: false\n };\n } else {\n this.matched++;\n return {\n actual: \"\",\n count,\n expected: \"\",\n key,\n pass: true\n };\n }\n }\n }\n async pack() {\n const snapshot = {\n filepath: this.testFilePath,\n added: 0,\n fileDeleted: false,\n matched: 0,\n unchecked: 0,\n uncheckedKeys: [],\n unmatched: 0,\n updated: 0\n };\n const uncheckedCount = this.getUncheckedCount();\n const uncheckedKeys = this.getUncheckedKeys();\n if (uncheckedCount) {\n this.removeUncheckedKeys();\n }\n const status = await this.save();\n snapshot.fileDeleted = status.deleted;\n snapshot.added = this.added;\n snapshot.matched = this.matched;\n snapshot.unmatched = this.unmatched;\n snapshot.updated = this.updated;\n snapshot.unchecked = !status.deleted ? uncheckedCount : 0;\n snapshot.uncheckedKeys = Array.from(uncheckedKeys);\n return snapshot;\n }\n}\n\nfunction createMismatchError(message, expand, actual, expected) {\n const error = new Error(message);\n Object.defineProperty(error, \"actual\", {\n value: actual,\n enumerable: true,\n configurable: true,\n writable: true\n });\n Object.defineProperty(error, \"expected\", {\n value: expected,\n enumerable: true,\n configurable: true,\n writable: true\n });\n Object.defineProperty(error, \"diffOptions\", { value: { expand } });\n return error;\n}\nclass SnapshotClient {\n constructor(options = {}) {\n this.options = options;\n }\n filepath;\n name;\n snapshotState;\n snapshotStateMap = /* @__PURE__ */ new Map();\n async startCurrentRun(filepath, name, options) {\n var _a;\n this.filepath = filepath;\n this.name = name;\n if (((_a = this.snapshotState) == null ? void 0 : _a.testFilePath) !== filepath) {\n await this.finishCurrentRun();\n if (!this.getSnapshotState(filepath)) {\n this.snapshotStateMap.set(\n filepath,\n await SnapshotState.create(filepath, options)\n );\n }\n this.snapshotState = this.getSnapshotState(filepath);\n }\n }\n getSnapshotState(filepath) {\n return this.snapshotStateMap.get(filepath);\n }\n clearTest() {\n this.filepath = void 0;\n this.name = void 0;\n }\n skipTestSnapshots(name) {\n var _a;\n (_a = this.snapshotState) == null ? void 0 : _a.markSnapshotsAsCheckedForTest(name);\n }\n assert(options) {\n var _a, _b, _c, _d;\n const {\n filepath = this.filepath,\n name = this.name,\n message,\n isInline = false,\n properties,\n inlineSnapshot,\n error,\n errorMessage,\n rawSnapshot\n } = options;\n let { received } = options;\n if (!filepath) {\n throw new Error(\"Snapshot cannot be used outside of test\");\n }\n if (typeof properties === \"object\") {\n if (typeof received !== \"object\" || !received) {\n throw new Error(\n \"Received value must be an object when the matcher has properties\"\n );\n }\n try {\n const pass2 = ((_b = (_a = this.options).isEqual) == null ? void 0 : _b.call(_a, received, properties)) ?? false;\n if (!pass2) {\n throw createMismatchError(\n \"Snapshot properties mismatched\",\n (_c = this.snapshotState) == null ? void 0 : _c.expand,\n received,\n properties\n );\n } else {\n received = deepMergeSnapshot(received, properties);\n }\n } catch (err) {\n err.message = errorMessage || \"Snapshot mismatched\";\n throw err;\n }\n }\n const testName = [name, ...message ? [message] : []].join(\" > \");\n const snapshotState = this.getSnapshotState(filepath);\n const { actual, expected, key, pass } = snapshotState.match({\n testName,\n received,\n isInline,\n error,\n inlineSnapshot,\n rawSnapshot\n });\n if (!pass) {\n throw createMismatchError(\n `Snapshot \\`${key || \"unknown\"}\\` mismatched`,\n (_d = this.snapshotState) == null ? void 0 : _d.expand,\n actual == null ? void 0 : actual.trim(),\n expected == null ? void 0 : expected.trim()\n );\n }\n }\n async assertRaw(options) {\n if (!options.rawSnapshot) {\n throw new Error(\"Raw snapshot is required\");\n }\n const { filepath = this.filepath, rawSnapshot } = options;\n if (rawSnapshot.content == null) {\n if (!filepath) {\n throw new Error(\"Snapshot cannot be used outside of test\");\n }\n const snapshotState = this.getSnapshotState(filepath);\n options.filepath || (options.filepath = filepath);\n rawSnapshot.file = await snapshotState.environment.resolveRawPath(\n filepath,\n rawSnapshot.file\n );\n rawSnapshot.content = await snapshotState.environment.readSnapshotFile(rawSnapshot.file) ?? void 0;\n }\n return this.assert(options);\n }\n async finishCurrentRun() {\n if (!this.snapshotState) {\n return null;\n }\n const result = await this.snapshotState.pack();\n this.snapshotState = void 0;\n return result;\n }\n clear() {\n this.snapshotStateMap.clear();\n }\n}\n\nexport { SnapshotClient, SnapshotState, addSerializer, getSerializers, stripSnapshotIndentation };\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAGA,MAAM,QAAQ,IAAI,WAAW,EAAE;AAC/B,MAAM,QAAQ;AACd,MAAM,YAAY,IAAI,WAAW,GAAG;AACpC,MAAM,YAAY,IAAI,WAAW,IAAI;AACrC,KAAK,IAAI,IAAI,GAAG,IAAI,IAAc,KAAK;CACnC,MAAM,IAAI,MAAM,WAAW,EAAE;AAC7B,WAAU,KAAK;AACf,WAAU,KAAK;;AAEnB,SAAS,cAA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AAK,iBAAiB,SAAS;AACrD,WAAQ,aAAa,QAAQ,WAAW;AACxC,eAAY,OAAO,MAAM,cAAc,YAAY,eACjD,UACA,YAAY,KACb;AACD,eAAY,UAAU,MAAM,cAAc,YAAY,iBAAiB,YAAY,KAAK,IAAI,KAAK;;AAEnG,SAAO,KAAK,OAAO,QAAQ;;CAE7B,MAAM,mBAAmB;AACvB,MAAI,CAAC,KAAK,cACR,QAAO;EAET,MAAM,SAAS,MAAM,KAAK,cAAc,MAAM;AAC9C,OAAK,gBAAgB,KAAK;AAC1B,SAAO;;CAET,QAAQ;AACN,OAAK,iBAAiB,OAAO"}
@@ -0,0 +1,82 @@
1
+ //#region node_modules/@vitest/snapshot/node_modules/pathe/dist/shared/pathe.ff20891b.mjs
2
+ const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
3
+ function normalizeWindowsPath(input = "") {
4
+ if (!input) return input;
5
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
6
+ }
7
+ const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
8
+ function cwd() {
9
+ if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/");
10
+ return "/";
11
+ }
12
+ const resolve = function(...arguments_) {
13
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
14
+ let resolvedPath = "";
15
+ let resolvedAbsolute = false;
16
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
17
+ const path = index >= 0 ? arguments_[index] : cwd();
18
+ if (!path || path.length === 0) continue;
19
+ resolvedPath = `${path}/${resolvedPath}`;
20
+ resolvedAbsolute = isAbsolute(path);
21
+ }
22
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
23
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) return `/${resolvedPath}`;
24
+ return resolvedPath.length > 0 ? resolvedPath : ".";
25
+ };
26
+ function normalizeString(path, allowAboveRoot) {
27
+ let res = "";
28
+ let lastSegmentLength = 0;
29
+ let lastSlash = -1;
30
+ let dots = 0;
31
+ let char = null;
32
+ for (let index = 0; index <= path.length; ++index) {
33
+ if (index < path.length) char = path[index];
34
+ else if (char === "/") break;
35
+ else char = "/";
36
+ if (char === "/") {
37
+ if (lastSlash === index - 1 || dots === 1);
38
+ else if (dots === 2) {
39
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
40
+ if (res.length > 2) {
41
+ const lastSlashIndex = res.lastIndexOf("/");
42
+ if (lastSlashIndex === -1) {
43
+ res = "";
44
+ lastSegmentLength = 0;
45
+ } else {
46
+ res = res.slice(0, lastSlashIndex);
47
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
48
+ }
49
+ lastSlash = index;
50
+ dots = 0;
51
+ continue;
52
+ } else if (res.length > 0) {
53
+ res = "";
54
+ lastSegmentLength = 0;
55
+ lastSlash = index;
56
+ dots = 0;
57
+ continue;
58
+ }
59
+ }
60
+ if (allowAboveRoot) {
61
+ res += res.length > 0 ? "/.." : "..";
62
+ lastSegmentLength = 2;
63
+ }
64
+ } else {
65
+ if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
66
+ else res = path.slice(lastSlash + 1, index);
67
+ lastSegmentLength = index - lastSlash - 1;
68
+ }
69
+ lastSlash = index;
70
+ dots = 0;
71
+ } else if (char === "." && dots !== -1) ++dots;
72
+ else dots = -1;
73
+ }
74
+ return res;
75
+ }
76
+ const isAbsolute = function(p) {
77
+ return _IS_ABSOLUTE_RE.test(p);
78
+ };
79
+
80
+ //#endregion
81
+ export { resolve };
82
+ //# sourceMappingURL=pathe.ff20891b.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathe.ff20891b.mjs","names":[],"sources":["../../../../../../../../node_modules/@vitest/snapshot/node_modules/pathe/dist/shared/pathe.ff20891b.mjs"],"sourcesContent":["const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\\//;\nfunction normalizeWindowsPath(input = \"\") {\n if (!input) {\n return input;\n }\n return input.replace(/\\\\/g, \"/\").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());\n}\n\nconst _UNC_REGEX = /^[/\\\\]{2}/;\nconst _IS_ABSOLUTE_RE = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^[A-Za-z]:[/\\\\]/;\nconst _DRIVE_LETTER_RE = /^[A-Za-z]:$/;\nconst _ROOT_FOLDER_RE = /^\\/([A-Za-z]:)?$/;\nconst sep = \"/\";\nconst delimiter = \":\";\nconst normalize = function(path) {\n if (path.length === 0) {\n return \".\";\n }\n path = normalizeWindowsPath(path);\n const isUNCPath = path.match(_UNC_REGEX);\n const isPathAbsolute = isAbsolute(path);\n const trailingSeparator = path[path.length - 1] === \"/\";\n path = normalizeString(path, !isPathAbsolute);\n if (path.length === 0) {\n if (isPathAbsolute) {\n return \"/\";\n }\n return trailingSeparator ? \"./\" : \".\";\n }\n if (trailingSeparator) {\n path += \"/\";\n }\n if (_DRIVE_LETTER_RE.test(path)) {\n path += \"/\";\n }\n if (isUNCPath) {\n if (!isPathAbsolute) {\n return `//./${path}`;\n }\n return `//${path}`;\n }\n return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n};\nconst join = function(...arguments_) {\n if (arguments_.length === 0) {\n return \".\";\n }\n let joined;\n for (const argument of arguments_) {\n if (argument && argument.length > 0) {\n if (joined === void 0) {\n joined = argument;\n } else {\n joined += `/${argument}`;\n }\n }\n }\n if (joined === void 0) {\n return \".\";\n }\n return normalize(joined.replace(/\\/\\/+/g, \"/\"));\n};\nfunction cwd() {\n if (typeof process !== \"undefined\" && typeof process.cwd === \"function\") {\n return process.cwd().replace(/\\\\/g, \"/\");\n }\n return \"/\";\n}\nconst resolve = function(...arguments_) {\n arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));\n let resolvedPath = \"\";\n let resolvedAbsolute = false;\n for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {\n const path = index >= 0 ? arguments_[index] : cwd();\n if (!path || path.length === 0) {\n continue;\n }\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = isAbsolute(path);\n }\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);\n if (resolvedAbsolute && !isAbsolute(resolvedPath)) {\n return `/${resolvedPath}`;\n }\n return resolvedPath.length > 0 ? resolvedPath : \".\";\n};\nfunction normalizeString(path, allowAboveRoot) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let char = null;\n for (let index = 0; index <= path.length; ++index) {\n if (index < path.length) {\n char = path[index];\n } else if (char === \"/\") {\n break;\n } else {\n char = \"/\";\n }\n if (char === \"/\") {\n if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(\"/\");\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n }\n lastSlash = index;\n dots = 0;\n continue;\n } else if (res.length > 0) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = index;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? \"/..\" : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) {\n res += `/${path.slice(lastSlash + 1, index)}`;\n } else {\n res = path.slice(lastSlash + 1, index);\n }\n lastSegmentLength = index - lastSlash - 1;\n }\n lastSlash = index;\n dots = 0;\n } else if (char === \".\" && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\nconst isAbsolute = function(p) {\n return _IS_ABSOLUTE_RE.test(p);\n};\nconst toNamespacedPath = function(p) {\n return normalizeWindowsPath(p);\n};\nconst _EXTNAME_RE = /.(\\.[^./]+)$/;\nconst extname = function(p) {\n const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));\n return match && match[1] || \"\";\n};\nconst relative = function(from, to) {\n const _from = resolve(from).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n const _to = resolve(to).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n if (_to[0][1] === \":\" && _from[0][1] === \":\" && _from[0] !== _to[0]) {\n return _to.join(\"/\");\n }\n const _fromCopy = [..._from];\n for (const segment of _fromCopy) {\n if (_to[0] !== segment) {\n break;\n }\n _from.shift();\n _to.shift();\n }\n return [..._from.map(() => \"..\"), ..._to].join(\"/\");\n};\nconst dirname = function(p) {\n const segments = normalizeWindowsPath(p).replace(/\\/$/, \"\").split(\"/\").slice(0, -1);\n if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {\n segments[0] += \"/\";\n }\n return segments.join(\"/\") || (isAbsolute(p) ? \"/\" : \".\");\n};\nconst format = function(p) {\n const segments = [p.root, p.dir, p.base ?? p.name + p.ext].filter(Boolean);\n return normalizeWindowsPath(\n p.root ? resolve(...segments) : segments.join(\"/\")\n );\n};\nconst basename = function(p, extension) {\n const lastSegment = normalizeWindowsPath(p).split(\"/\").pop();\n return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;\n};\nconst parse = function(p) {\n const root = normalizeWindowsPath(p).split(\"/\").shift() || \"/\";\n const base = basename(p);\n const extension = extname(base);\n return {\n root,\n dir: dirname(p),\n base,\n ext: extension,\n name: base.slice(0, base.length - extension.length)\n };\n};\n\nconst path = {\n __proto__: null,\n basename: basename,\n delimiter: delimiter,\n dirname: dirname,\n extname: extname,\n format: format,\n isAbsolute: isAbsolute,\n join: join,\n normalize: normalize,\n normalizeString: normalizeString,\n parse: parse,\n relative: relative,\n resolve: resolve,\n sep: sep,\n toNamespacedPath: toNamespacedPath\n};\n\nexport { normalize as a, normalizeString as b, relative as c, delimiter as d, extname as e, dirname as f, format as g, basename as h, isAbsolute as i, join as j, parse as k, normalizeWindowsPath as n, path as p, resolve as r, sep as s, toNamespacedPath as t };\n"],"x_google_ignoreList":[0],"mappings":";AAAA,MAAM,yBAAyB;AAC/B,SAAS,qBAAqB,QAAQ,IAAI;AACxC,KAAI,CAAC,MACH,QAAO;AAET,QAAO,MAAM,QAAQ,OAAO,IAAI,CAAC,QAAQ,yBAAyB,MAAM,EAAE,aAAa,CAAC;;AAI1F,MAAM,kBAAkB;AAqDxB,SAAS,MAAM;AACb,KAAI,OAAO,YAAY,eAAe,OAAO,QAAQ,QAAQ,WAC3D,QAAO,QAAQ,KAAK,CAAC,QAAQ,OAAO,IAAI;AAE1C,QAAO;;AAET,MAAM,UAAU,SAAS,GAAG,YAAY;AACtC,cAAa,WAAW,KAAK,aAAa,qBAAqB,SAAS,CAAC;CACzE,IAAI,eAAe;CACnB,IAAI,mBAAmB;AACvB,MAAK,IAAI,QAAQ,WAAW,SAAS,GAAG,SAAS,MAAM,CAAC,kBAAkB,SAAS;EACjF,MAAM,OAAO,SAAS,IAAI,WAAW,SAAS,KAAK;AACnD,MAAI,CAAC,QAAQ,KAAK,WAAW,EAC3B;AAEF,iBAAe,GAAG,KAAK,GAAG;AAC1B,qBAAmB,WAAW,KAAK;;AAErC,gBAAe,gBAAgB,cAAc,CAAC,iBAAiB;AAC/D,KAAI,oBAAoB,CAAC,WAAW,aAAa,CAC/C,QAAO,IAAI;AAEb,QAAO,aAAa,SAAS,IAAI,eAAe;;AAElD,SAAS,gBAAgB,MAAM,gBAAgB;CAC7C,IAAI,MAAM;CACV,IAAI,oBAAoB;CACxB,IAAI,YAAY;CAChB,IAAI,OAAO;CACX,IAAI,OAAO;AACX,MAAK,IAAI,QAAQ,GAAG,SAAS,KAAK,QAAQ,EAAE,OAAO;AACjD,MAAI,QAAQ,KAAK,OACf,QAAO,KAAK;WACH,SAAS,IAClB;MAEA,QAAO;AAET,MAAI,SAAS,KAAK;AAChB,OAAI,cAAc,QAAQ,KAAK,SAAS;YAAc,SAAS,GAAG;AAChE,QAAI,IAAI,SAAS,KAAK,sBAAsB,KAAK,IAAI,IAAI,SAAS,OAAO,OAAO,IAAI,IAAI,SAAS,OAAO,KACtG;SAAI,IAAI,SAAS,GAAG;MAClB,MAAM,iBAAiB,IAAI,YAAY,IAAI;AAC3C,UAAI,mBAAmB,IAAI;AACzB,aAAM;AACN,2BAAoB;aACf;AACL,aAAM,IAAI,MAAM,GAAG,eAAe;AAClC,2BAAoB,IAAI,SAAS,IAAI,IAAI,YAAY,IAAI;;AAE3D,kBAAY;AACZ,aAAO;AACP;gBACS,IAAI,SAAS,GAAG;AACzB,YAAM;AACN,0BAAoB;AACpB,kBAAY;AACZ,aAAO;AACP;;;AAGJ,QAAI,gBAAgB;AAClB,YAAO,IAAI,SAAS,IAAI,QAAQ;AAChC,yBAAoB;;UAEjB;AACL,QAAI,IAAI,SAAS,EACf,QAAO,IAAI,KAAK,MAAM,YAAY,GAAG,MAAM;QAE3C,OAAM,KAAK,MAAM,YAAY,GAAG,MAAM;AAExC,wBAAoB,QAAQ,YAAY;;AAE1C,eAAY;AACZ,UAAO;aACE,SAAS,OAAO,SAAS,GAClC,GAAE;MAEF,QAAO;;AAGX,QAAO;;AAET,MAAM,aAAa,SAAS,GAAG;AAC7B,QAAO,gBAAgB,KAAK,EAAE"}
@@ -0,0 +1,139 @@
1
+ import { C, T } from "../../../tinyspy/dist/index.mjs";
2
+
3
+ //#region node_modules/@vitest/spy/dist/index.js
4
+ const mocks = /* @__PURE__ */ new Set();
5
+ function isMockFunction(fn2) {
6
+ return typeof fn2 === "function" && "_isMockFunction" in fn2 && fn2._isMockFunction;
7
+ }
8
+ function spyOn(obj, method, accessType) {
9
+ const objMethod = accessType ? { [{
10
+ get: "getter",
11
+ set: "setter"
12
+ }[accessType]]: method } : method;
13
+ return enhanceSpy(C(obj, objMethod));
14
+ }
15
+ let callOrder = 0;
16
+ function enhanceSpy(spy) {
17
+ const stub = spy;
18
+ let implementation;
19
+ let instances = [];
20
+ let contexts = [];
21
+ let invocations = [];
22
+ const state = T(spy);
23
+ const mockContext = {
24
+ get calls() {
25
+ return state.calls;
26
+ },
27
+ get contexts() {
28
+ return contexts;
29
+ },
30
+ get instances() {
31
+ return instances;
32
+ },
33
+ get invocationCallOrder() {
34
+ return invocations;
35
+ },
36
+ get results() {
37
+ return state.results.map(([callType, value]) => {
38
+ return {
39
+ type: callType === "error" ? "throw" : "return",
40
+ value
41
+ };
42
+ });
43
+ },
44
+ get settledResults() {
45
+ return state.resolves.map(([callType, value]) => {
46
+ return {
47
+ type: callType === "error" ? "rejected" : "fulfilled",
48
+ value
49
+ };
50
+ });
51
+ },
52
+ get lastCall() {
53
+ return state.calls[state.calls.length - 1];
54
+ }
55
+ };
56
+ let onceImplementations = [];
57
+ let implementationChangedTemporarily = false;
58
+ function mockCall(...args) {
59
+ instances.push(this);
60
+ contexts.push(this);
61
+ invocations.push(++callOrder);
62
+ return (implementationChangedTemporarily ? implementation : onceImplementations.shift() || implementation || state.getOriginal() || (() => {})).apply(this, args);
63
+ }
64
+ let name = stub.name;
65
+ stub.getMockName = () => name || "vi.fn()";
66
+ stub.mockName = (n) => {
67
+ name = n;
68
+ return stub;
69
+ };
70
+ stub.mockClear = () => {
71
+ state.reset();
72
+ instances = [];
73
+ contexts = [];
74
+ invocations = [];
75
+ return stub;
76
+ };
77
+ stub.mockReset = () => {
78
+ stub.mockClear();
79
+ implementation = () => void 0;
80
+ onceImplementations = [];
81
+ return stub;
82
+ };
83
+ stub.mockRestore = () => {
84
+ stub.mockReset();
85
+ state.restore();
86
+ implementation = void 0;
87
+ return stub;
88
+ };
89
+ stub.getMockImplementation = () => implementation;
90
+ stub.mockImplementation = (fn2) => {
91
+ implementation = fn2;
92
+ state.willCall(mockCall);
93
+ return stub;
94
+ };
95
+ stub.mockImplementationOnce = (fn2) => {
96
+ onceImplementations.push(fn2);
97
+ return stub;
98
+ };
99
+ function withImplementation(fn2, cb) {
100
+ const originalImplementation = implementation;
101
+ implementation = fn2;
102
+ state.willCall(mockCall);
103
+ implementationChangedTemporarily = true;
104
+ const reset = () => {
105
+ implementation = originalImplementation;
106
+ implementationChangedTemporarily = false;
107
+ };
108
+ const result = cb();
109
+ if (result instanceof Promise) return result.then(() => {
110
+ reset();
111
+ return stub;
112
+ });
113
+ reset();
114
+ return stub;
115
+ }
116
+ stub.withImplementation = withImplementation;
117
+ stub.mockReturnThis = () => stub.mockImplementation(function() {
118
+ return this;
119
+ });
120
+ stub.mockReturnValue = (val) => stub.mockImplementation(() => val);
121
+ stub.mockReturnValueOnce = (val) => stub.mockImplementationOnce(() => val);
122
+ stub.mockResolvedValue = (val) => stub.mockImplementation(() => Promise.resolve(val));
123
+ stub.mockResolvedValueOnce = (val) => stub.mockImplementationOnce(() => Promise.resolve(val));
124
+ stub.mockRejectedValue = (val) => stub.mockImplementation(() => Promise.reject(val));
125
+ stub.mockRejectedValueOnce = (val) => stub.mockImplementationOnce(() => Promise.reject(val));
126
+ Object.defineProperty(stub, "mock", { get: () => mockContext });
127
+ state.willCall(mockCall);
128
+ mocks.add(stub);
129
+ return stub;
130
+ }
131
+ function fn(implementation) {
132
+ const enhancedSpy = enhanceSpy(C({ spy: implementation || function() {} }, "spy"));
133
+ if (implementation) enhancedSpy.mockImplementation(implementation);
134
+ return enhancedSpy;
135
+ }
136
+
137
+ //#endregion
138
+ export { fn, isMockFunction, mocks, spyOn };
139
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["tinyspy.internalSpyOn","tinyspy.getInternalState"],"sources":["../../../../../node_modules/@vitest/spy/dist/index.js"],"sourcesContent":["import * as tinyspy from 'tinyspy';\n\nconst mocks = /* @__PURE__ */ new Set();\nfunction isMockFunction(fn2) {\n return typeof fn2 === \"function\" && \"_isMockFunction\" in fn2 && fn2._isMockFunction;\n}\nfunction spyOn(obj, method, accessType) {\n const dictionary = {\n get: \"getter\",\n set: \"setter\"\n };\n const objMethod = accessType ? { [dictionary[accessType]]: method } : method;\n const stub = tinyspy.internalSpyOn(obj, objMethod);\n return enhanceSpy(stub);\n}\nlet callOrder = 0;\nfunction enhanceSpy(spy) {\n const stub = spy;\n let implementation;\n let instances = [];\n let contexts = [];\n let invocations = [];\n const state = tinyspy.getInternalState(spy);\n const mockContext = {\n get calls() {\n return state.calls;\n },\n get contexts() {\n return contexts;\n },\n get instances() {\n return instances;\n },\n get invocationCallOrder() {\n return invocations;\n },\n get results() {\n return state.results.map(([callType, value]) => {\n const type = callType === \"error\" ? \"throw\" : \"return\";\n return { type, value };\n });\n },\n get settledResults() {\n return state.resolves.map(([callType, value]) => {\n const type = callType === \"error\" ? \"rejected\" : \"fulfilled\";\n return { type, value };\n });\n },\n get lastCall() {\n return state.calls[state.calls.length - 1];\n }\n };\n let onceImplementations = [];\n let implementationChangedTemporarily = false;\n function mockCall(...args) {\n instances.push(this);\n contexts.push(this);\n invocations.push(++callOrder);\n const impl = implementationChangedTemporarily ? implementation : onceImplementations.shift() || implementation || state.getOriginal() || (() => {\n });\n return impl.apply(this, args);\n }\n let name = stub.name;\n stub.getMockName = () => name || \"vi.fn()\";\n stub.mockName = (n) => {\n name = n;\n return stub;\n };\n stub.mockClear = () => {\n state.reset();\n instances = [];\n contexts = [];\n invocations = [];\n return stub;\n };\n stub.mockReset = () => {\n stub.mockClear();\n implementation = () => void 0;\n onceImplementations = [];\n return stub;\n };\n stub.mockRestore = () => {\n stub.mockReset();\n state.restore();\n implementation = void 0;\n return stub;\n };\n stub.getMockImplementation = () => implementation;\n stub.mockImplementation = (fn2) => {\n implementation = fn2;\n state.willCall(mockCall);\n return stub;\n };\n stub.mockImplementationOnce = (fn2) => {\n onceImplementations.push(fn2);\n return stub;\n };\n function withImplementation(fn2, cb) {\n const originalImplementation = implementation;\n implementation = fn2;\n state.willCall(mockCall);\n implementationChangedTemporarily = true;\n const reset = () => {\n implementation = originalImplementation;\n implementationChangedTemporarily = false;\n };\n const result = cb();\n if (result instanceof Promise) {\n return result.then(() => {\n reset();\n return stub;\n });\n }\n reset();\n return stub;\n }\n stub.withImplementation = withImplementation;\n stub.mockReturnThis = () => stub.mockImplementation(function() {\n return this;\n });\n stub.mockReturnValue = (val) => stub.mockImplementation(() => val);\n stub.mockReturnValueOnce = (val) => stub.mockImplementationOnce(() => val);\n stub.mockResolvedValue = (val) => stub.mockImplementation(() => Promise.resolve(val));\n stub.mockResolvedValueOnce = (val) => stub.mockImplementationOnce(() => Promise.resolve(val));\n stub.mockRejectedValue = (val) => stub.mockImplementation(() => Promise.reject(val));\n stub.mockRejectedValueOnce = (val) => stub.mockImplementationOnce(() => Promise.reject(val));\n Object.defineProperty(stub, \"mock\", {\n get: () => mockContext\n });\n state.willCall(mockCall);\n mocks.add(stub);\n return stub;\n}\nfunction fn(implementation) {\n const enhancedSpy = enhanceSpy(tinyspy.internalSpyOn({\n spy: implementation || function() {\n }\n }, \"spy\"));\n if (implementation) {\n enhancedSpy.mockImplementation(implementation);\n }\n return enhancedSpy;\n}\n\nexport { fn, isMockFunction, mocks, spyOn };\n"],"x_google_ignoreList":[0],"mappings":";;;AAEA,MAAM,wBAAwB,IAAI,KAAK;AACvC,SAAS,eAAe,KAAK;AAC3B,QAAO,OAAO,QAAQ,cAAc,qBAAqB,OAAO,IAAI;;AAEtE,SAAS,MAAM,KAAK,QAAQ,YAAY;CAKtC,MAAM,YAAY,aAAa,GAJZ;EACjB,KAAK;EACL,KAAK;EACN,CAC4C,cAAc,QAAQ,GAAG;AAEtE,QAAO,WADMA,EAAsB,KAAK,UAAU,CAC3B;;AAEzB,IAAI,YAAY;AAChB,SAAS,WAAW,KAAK;CACvB,MAAM,OAAO;CACb,IAAI;CACJ,IAAI,YAAY,EAAE;CAClB,IAAI,WAAW,EAAE;CACjB,IAAI,cAAc,EAAE;CACpB,MAAM,QAAQC,EAAyB,IAAI;CAC3C,MAAM,cAAc;EAClB,IAAI,QAAQ;AACV,UAAO,MAAM;;EAEf,IA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