{
  "assert.js": "// Copyright (C) 2017 Ecma International.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Collection of assertion functions used throughout test262\ndefines: [assert]\n---*/\n\n\nfunction assert(mustBeTrue, message) {\n  if (mustBeTrue === true) {\n    return;\n  }\n\n  if (message === undefined) {\n    message = 'Expected true but got ' + assert._toString(mustBeTrue);\n  }\n  throw new Test262Error(message);\n}\n\nassert._isSameValue = function (a, b) {\n  if (a === b) {\n    // Handle +/-0 vs. -/+0\n    return a !== 0 || 1 / a === 1 / b;\n  }\n\n  // Handle NaN vs. NaN\n  return a !== a && b !== b;\n};\n\nassert.sameValue = function (actual, expected, message) {\n  try {\n    if (assert._isSameValue(actual, expected)) {\n      return;\n    }\n  } catch (error) {\n    throw new Test262Error(message + ' (_isSameValue operation threw) ' + error);\n    return;\n  }\n\n  if (message === undefined) {\n    message = '';\n  } else {\n    message += ' ';\n  }\n\n  message += 'Expected SameValue(«' + assert._toString(actual) + '», «' + assert._toString(expected) + '») to be true';\n\n  throw new Test262Error(message);\n};\n\nassert.notSameValue = function (actual, unexpected, message) {\n  if (!assert._isSameValue(actual, unexpected)) {\n    return;\n  }\n\n  if (message === undefined) {\n    message = '';\n  } else {\n    message += ' ';\n  }\n\n  message += 'Expected SameValue(«' + assert._toString(actual) + '», «' + assert._toString(unexpected) + '») to be false';\n\n  throw new Test262Error(message);\n};\n\nassert.throws = function (expectedErrorConstructor, func, message) {\n  var expectedName, actualName;\n  if (typeof func !== \"function\") {\n    throw new Test262Error('assert.throws requires two arguments: the error constructor ' +\n      'and a function to run');\n    return;\n  }\n  if (message === undefined) {\n    message = '';\n  } else {\n    message += ' ';\n  }\n\n  try {\n    func();\n  } catch (thrown) {\n    if (typeof thrown !== 'object' || thrown === null) {\n      message += 'Thrown value was not an object!';\n      throw new Test262Error(message);\n    } else if (thrown.constructor !== expectedErrorConstructor) {\n      expectedName = expectedErrorConstructor.name;\n      actualName = thrown.constructor.name;\n      if (expectedName === actualName) {\n        message += 'Expected a ' + expectedName + ' but got a different error constructor with the same name';\n      } else {\n        message += 'Expected a ' + expectedName + ' but got a ' + actualName;\n      }\n      throw new Test262Error(message);\n    }\n    return;\n  }\n\n  message += 'Expected a ' + expectedErrorConstructor.name + ' to be thrown but no exception was thrown at all';\n  throw new Test262Error(message);\n};\n\nfunction isPrimitive(value) {\n  return !value || (typeof value !== 'object' && typeof value !== 'function');\n}\n\nassert.compareArray = function (actual, expected, message) {\n  message = message === undefined ? '' : message;\n\n  if (typeof message === 'symbol') {\n    message = message.toString();\n  }\n\n  if (isPrimitive(actual)) {\n    assert(false, `Actual argument [${actual}] shouldn't be primitive. ${message}`);\n  } else if (isPrimitive(expected)) {\n    assert(false, `Expected argument [${expected}] shouldn't be primitive. ${message}`);\n  }\n  var result = compareArray(actual, expected);\n  if (result) return;\n\n  var format = compareArray.format;\n  assert(false, `Actual ${format(actual)} and expected ${format(expected)} should have the same contents. ${message}`);\n};\n\nfunction compareArray(a, b) {\n  if (b.length !== a.length) {\n    return false;\n  }\n  for (var i = 0; i < a.length; i++) {\n    if (!assert._isSameValue(b[i], a[i])) {\n      return false;\n    }\n  }\n  return true;\n}\n\ncompareArray.format = function (arrayLike) {\n  return `[${Array.prototype.map.call(arrayLike, String).join(', ')}]`;\n};\n\nassert._formatIdentityFreeValue = function formatIdentityFreeValue(value) {\n  switch (value === null ? 'null' : typeof value) {\n    case 'string':\n      return typeof JSON !== \"undefined\" ? JSON.stringify(value) : `\"${value}\"`;\n    case 'bigint':\n      return `${value}n`;\n    case 'number':\n      if (value === 0 && 1 / value === -Infinity) return '-0';\n      // falls through\n    case 'boolean':\n    case 'undefined':\n    case 'null':\n      return String(value);\n  }\n};\n\nassert._toString = function (value) {\n  var basic = assert._formatIdentityFreeValue(value);\n  if (basic) return basic;\n  try {\n    return String(value);\n  } catch (err) {\n    if (err.name === 'TypeError') {\n      return Object.prototype.toString.call(value);\n    }\n    throw err;\n  }\n};\n",
  "assertRelativeDateMs.js": "// Copyright (C) 2015 the V8 project authors. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Verify that the given date object's Number representation describes the\n    correct number of milliseconds since the Unix epoch relative to the local\n    time zone (as interpreted at the specified date).\ndefines: [assertRelativeDateMs]\n---*/\n\n/**\n * @param {Date} date\n * @param {Number} expectedMs\n */\nfunction assertRelativeDateMs(date, expectedMs) {\n  var actualMs = date.valueOf();\n  var localOffset = date.getTimezoneOffset() * 60000;\n\n  if (actualMs - localOffset !== expectedMs) {\n    throw new Test262Error(\n      'Expected ' + date + ' to be ' + expectedMs +\n      ' milliseconds from the Unix epoch'\n    );\n  }\n}\n",
  "asyncHelpers.js": "// Copyright (C) 2022 Igalia, S.L. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    A collection of assertion and wrapper functions for testing asynchronous built-ins.\ndefines: [asyncTest, assert.throwsAsync]\n---*/\n\n/**\n * Defines the **sole** asynchronous test of a file.\n * @see {@link ../docs/rfcs/async-helpers.md} for background.\n *\n * @param {Function} testFunc a callback whose returned promise indicates test results\n *   (fulfillment for success, rejection for failure)\n * @returns {void}\n */\nfunction asyncTest(testFunc) {\n  if (!Object.prototype.hasOwnProperty.call(globalThis, \"$DONE\")) {\n    throw new Test262Error(\"asyncTest called without async flag\");\n  }\n  if (typeof testFunc !== \"function\") {\n    $DONE(new Test262Error(\"asyncTest called with non-function argument\"));\n    return;\n  }\n  try {\n    testFunc().then(\n      function () {\n        $DONE();\n      },\n      function (error) {\n        $DONE(error);\n      }\n    );\n  } catch (syncError) {\n    $DONE(syncError);\n  }\n}\n\n/**\n * Asserts that a callback asynchronously throws an instance of a particular\n * error (i.e., returns a promise whose rejection value is an object referencing\n * the constructor).\n *\n * @param {Function} expectedErrorConstructor the expected constructor of the\n *   rejection value\n * @param {Function} func the callback\n * @param {string} [message] the prefix to use for failure messages\n * @returns {Promise<void>} fulfills if the expected error is thrown,\n *   otherwise rejects\n */\nassert.throwsAsync = function (expectedErrorConstructor, func, message) {\n  return new Promise(function (resolve) {\n    var fail = function (detail) {\n      if (message === undefined) {\n        throw new Test262Error(detail);\n      }\n      throw new Test262Error(message + \" \" + detail);\n    };\n    if (typeof expectedErrorConstructor !== \"function\") {\n      fail(\"assert.throwsAsync called with an argument that is not an error constructor\");\n    }\n    if (typeof func !== \"function\") {\n      fail(\"assert.throwsAsync called with an argument that is not a function\");\n    }\n    var expectedName = expectedErrorConstructor.name;\n    var expectation = \"Expected a \" + expectedName + \" to be thrown asynchronously\";\n    var res;\n    try {\n      res = func();\n    } catch (thrown) {\n      fail(expectation + \" but the function threw synchronously\");\n    }\n    if (res === null || typeof res !== \"object\" || typeof res.then !== \"function\") {\n      fail(expectation + \" but result was not a thenable\");\n    }\n    var onResFulfilled, onResRejected;\n    var resSettlementP = new Promise(function (onFulfilled, onRejected) {\n      onResFulfilled = onFulfilled;\n      onResRejected = onRejected;\n    });\n    try {\n      res.then(onResFulfilled, onResRejected)\n    } catch (thrown) {\n      fail(expectation + \" but .then threw synchronously\");\n    }\n    resolve(resSettlementP.then(\n      function () {\n        fail(expectation + \" but no exception was thrown at all\");\n      },\n      function (thrown) {\n        var actualName;\n        if (thrown === null || typeof thrown !== \"object\") {\n          fail(expectation + \" but thrown value was not an object\");\n        } else if (thrown.constructor !== expectedErrorConstructor) {\n          actualName = thrown.constructor.name;\n          if (expectedName === actualName) {\n            fail(expectation +\n              \" but got a different error constructor with the same name\");\n          }\n          fail(expectation + \" but got a \" + actualName);\n        }\n      }\n    ));\n  });\n};\n",
  "atomicsHelper.js": "// Copyright (C) 2017 Mozilla Corporation.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: >\n    Collection of functions used to interact with Atomics.* operations across agent boundaries.\ndefines:\n  - $262.agent.getReportAsync\n  - $262.agent.getReport\n  - $262.agent.safeBroadcastAsync\n  - $262.agent.safeBroadcast\n  - $262.agent.setTimeout\n  - $262.agent.tryYield\n  - $262.agent.trySleep\n---*/\n\n/**\n * @return {String} A report sent from an agent.\n */\n{\n  // This is only necessary because the original\n  // $262.agent.getReport API was insufficient.\n  //\n  // All runtimes currently have their own\n  // $262.agent.getReport which is wrong, so we\n  // will pave over it with a corrected version.\n  //\n  // Binding $262.agent is necessary to prevent\n  // breaking SpiderMonkey's $262.agent.getReport\n  let getReport = $262.agent.getReport.bind($262.agent);\n\n  $262.agent.getReport = function() {\n    var r;\n    while ((r = getReport()) == null) {\n      $262.agent.sleep(1);\n    }\n    return r;\n  };\n\n  if (this.setTimeout === undefined) {\n    (function(that) {\n      that.setTimeout = function(callback, delay) {\n        let p = Promise.resolve();\n        let start = Date.now();\n        let end = start + delay;\n        function check() {\n          if ((end - Date.now()) > 0) {\n            p.then(check);\n          }\n          else {\n            callback();\n          }\n        }\n        p.then(check);\n      }\n    })(this);\n  }\n\n  $262.agent.setTimeout = setTimeout;\n\n  $262.agent.getReportAsync = function() {\n    return new Promise(function(resolve) {\n      (function loop() {\n        let result = getReport();\n        if (!result) {\n          setTimeout(loop, 1000);\n        } else {\n          resolve(result);\n        }\n      })();\n    });\n  };\n}\n\n/**\n *\n * Share a given Int32Array or BigInt64Array to all running agents. Ensure that the\n * provided TypedArray is a \"shared typed array\".\n *\n * NOTE: Migrating all tests to this API is necessary to prevent tests from hanging\n * indefinitely when a SAB is sent to a worker but the code in the worker attempts to\n * create a non-sharable TypedArray (something that is not Int32Array or BigInt64Array).\n * When that scenario occurs, an exception is thrown and the agent worker can no\n * longer communicate with any other threads that control the SAB. If the main\n * thread happens to be spinning in the $262.agent.waitUntil() while loop, it will never\n * meet its termination condition and the test will hang indefinitely.\n *\n * Because we've defined $262.agent.broadcast(SAB) in\n * https://github.com/tc39/test262/blob/HEAD/INTERPRETING.md, there are host implementations\n * that assume compatibility, which must be maintained.\n *\n *\n * $262.agent.safeBroadcast(TA) should not be included in\n * https://github.com/tc39/test262/blob/HEAD/INTERPRETING.md\n *\n *\n * @param {(Int32Array|BigInt64Array)} typedArray An Int32Array or BigInt64Array with a SharedArrayBuffer\n */\n$262.agent.safeBroadcast = function(typedArray) {\n  let Constructor = Object.getPrototypeOf(typedArray).constructor;\n  let temp = new Constructor(\n    new SharedArrayBuffer(Constructor.BYTES_PER_ELEMENT)\n  );\n  try {\n    // This will never actually wait, but that's fine because we only\n    // want to ensure that this typedArray CAN be waited on and is shareable.\n    Atomics.wait(temp, 0, Constructor === Int32Array ? 1 : BigInt(1));\n  } catch (error) {\n    throw new Test262Error(`${Constructor.name} cannot be used as a shared typed array. (${error})`);\n  }\n\n  $262.agent.broadcast(typedArray.buffer);\n};\n\n$262.agent.safeBroadcastAsync = async function(ta, index, expected) {\n  await $262.agent.broadcast(ta.buffer);\n  await $262.agent.waitUntil(ta, index, expected);\n  await $262.agent.tryYield();\n  return await Atomics.load(ta, index);\n};\n\n\n/**\n * With a given Int32Array or BigInt64Array, wait until the expected number of agents have\n * reported themselves by calling:\n *\n *    Atomics.add(typedArray, index, 1);\n *\n * @param {(Int32Array|BigInt64Array)} typedArray An Int32Array or BigInt64Array with a SharedArrayBuffer\n * @param {number} index    The index of which all agents will report.\n * @param {number} expected The number of agents that are expected to report as active.\n */\n$262.agent.waitUntil = function(typedArray, index, expected) {\n\n  var agents = 0;\n  while ((agents = Atomics.load(typedArray, index)) !== expected) {\n    /* nothing */\n  }\n  assert.sameValue(agents, expected, \"Reporting number of 'agents' equals the value of 'expected'\");\n};\n\n/**\n * Timeout values used throughout the Atomics tests. All timeouts are specified in milliseconds.\n *\n * @property {number} yield Used for `$262.agent.tryYield`. Must not be used in other functions.\n * @property {number} small Used when agents will always timeout and `Atomics.wake` is not part\n *                          of the test semantics. Must be larger than `$262.agent.timeouts.yield`.\n * @property {number} long  Used when some agents may timeout and `Atomics.wake` is called on some\n *                          agents. The agents are required to wait and this needs to be observable\n *                          by the main thread.\n * @property {number} huge  Used when `Atomics.wake` is called on all waiting agents. The waiting\n *                          must not timeout. The agents are required to wait and this needs to be\n *                          observable by the main thread. All waiting agents must be woken by the\n *                          main thread.\n *\n * Usage for `$262.agent.timeouts.small`:\n *   const WAIT_INDEX = 0;\n *   const RUNNING = 1;\n *   const TIMEOUT = $262.agent.timeouts.small;\n *   const i32a = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2));\n *\n *   $262.agent.start(`\n *     $262.agent.receiveBroadcast(function(sab) {\n *       const i32a = new Int32Array(sab);\n *       Atomics.add(i32a, ${RUNNING}, 1);\n *\n *       $262.agent.report(Atomics.wait(i32a, ${WAIT_INDEX}, 0, ${TIMEOUT}));\n *\n *       $262.agent.leaving();\n *     });\n *   `);\n *   $262.agent.safeBroadcast(i32a.buffer);\n *\n *   // Wait until the agent was started and then try to yield control to increase\n *   // the likelihood the agent has called `Atomics.wait` and is now waiting.\n *   $262.agent.waitUntil(i32a, RUNNING, 1);\n *   $262.agent.tryYield();\n *\n *   // The agent is expected to time out.\n *   assert.sameValue($262.agent.getReport(), \"timed-out\");\n *\n *\n * Usage for `$262.agent.timeouts.long`:\n *   const WAIT_INDEX = 0;\n *   const RUNNING = 1;\n *   const NUMAGENT = 2;\n *   const TIMEOUT = $262.agent.timeouts.long;\n *   const i32a = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2));\n *\n *   for (let i = 0; i < NUMAGENT; i++) {\n *     $262.agent.start(`\n *       $262.agent.receiveBroadcast(function(sab) {\n *         const i32a = new Int32Array(sab);\n *         Atomics.add(i32a, ${RUNNING}, 1);\n *\n *         $262.agent.report(Atomics.wait(i32a, ${WAIT_INDEX}, 0, ${TIMEOUT}));\n *\n *         $262.agent.leaving();\n *       });\n *     `);\n *   }\n *   $262.agent.safeBroadcast(i32a.buffer);\n *\n *   // Wait until the agents were started and then try to yield control to increase\n *   // the likelihood the agents have called `Atomics.wait` and are now waiting.\n *   $262.agent.waitUntil(i32a, RUNNING, NUMAGENT);\n *   $262.agent.tryYield();\n *\n *   // Wake exactly one agent.\n *   assert.sameValue(Atomics.wake(i32a, WAIT_INDEX, 1), 1);\n *\n *   // When it doesn't matter how many agents were woken at once, a while loop\n *   // can be used to make the test more resilient against intermittent failures\n *   // in case even though `tryYield` was called, the agents haven't started to\n *   // wait.\n *   //\n *   // // Repeat until exactly one agent was woken.\n *   // var woken = 0;\n *   // while ((woken = Atomics.wake(i32a, WAIT_INDEX, 1)) !== 0) ;\n *   // assert.sameValue(woken, 1);\n *\n *   // One agent was woken and the other one timed out.\n *   const reports = [$262.agent.getReport(), $262.agent.getReport()];\n *   assert(reports.includes(\"ok\"));\n *   assert(reports.includes(\"timed-out\"));\n *\n *\n * Usage for `$262.agent.timeouts.huge`:\n *   const WAIT_INDEX = 0;\n *   const RUNNING = 1;\n *   const NUMAGENT = 2;\n *   const TIMEOUT = $262.agent.timeouts.huge;\n *   const i32a = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2));\n *\n *   for (let i = 0; i < NUMAGENT; i++) {\n *     $262.agent.start(`\n *       $262.agent.receiveBroadcast(function(sab) {\n *         const i32a = new Int32Array(sab);\n *         Atomics.add(i32a, ${RUNNING}, 1);\n *\n *         $262.agent.report(Atomics.wait(i32a, ${WAIT_INDEX}, 0, ${TIMEOUT}));\n *\n *         $262.agent.leaving();\n *       });\n *     `);\n *   }\n *   $262.agent.safeBroadcast(i32a.buffer);\n *\n *   // Wait until the agents were started and then try to yield control to increase\n *   // the likelihood the agents have called `Atomics.wait` and are now waiting.\n *   $262.agent.waitUntil(i32a, RUNNING, NUMAGENT);\n *   $262.agent.tryYield();\n *\n *   // Wake all agents.\n *   assert.sameValue(Atomics.wake(i32a, WAIT_INDEX), NUMAGENT);\n *\n *   // When it doesn't matter how many agents were woken at once, a while loop\n *   // can be used to make the test more resilient against intermittent failures\n *   // in case even though `tryYield` was called, the agents haven't started to\n *   // wait.\n *   //\n *   // // Repeat until all agents were woken.\n *   // for (var wokenCount = 0; wokenCount < NUMAGENT; ) {\n *   //   var woken = 0;\n *   //   while ((woken = Atomics.wake(i32a, WAIT_INDEX)) !== 0) ;\n *   //   // Maybe perform an action on the woken agents here.\n *   //   wokenCount += woken;\n *   // }\n *\n *   // All agents were woken and none timeout.\n *   for (var i = 0; i < NUMAGENT; i++) {\n *     assert($262.agent.getReport(), \"ok\");\n *   }\n */\n$262.agent.timeouts = {\n  yield: 100,\n  small: 200,\n  long: 1000,\n  huge: 10000,\n};\n\n/**\n * Try to yield control to the agent threads.\n *\n * Usage:\n *   const VALUE = 0;\n *   const RUNNING = 1;\n *   const i32a = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 2));\n *\n *   $262.agent.start(`\n *     $262.agent.receiveBroadcast(function(sab) {\n *       const i32a = new Int32Array(sab);\n *       Atomics.add(i32a, ${RUNNING}, 1);\n *\n *       Atomics.store(i32a, ${VALUE}, 1);\n *\n *       $262.agent.leaving();\n *     });\n *   `);\n *   $262.agent.safeBroadcast(i32a.buffer);\n *\n *   // Wait until agent was started and then try to yield control.\n *   $262.agent.waitUntil(i32a, RUNNING, 1);\n *   $262.agent.tryYield();\n *\n *   // Note: This result is not guaranteed, but should hold in practice most of the time.\n *   assert.sameValue(Atomics.load(i32a, VALUE), 1);\n *\n * The default implementation simply waits for `$262.agent.timeouts.yield` milliseconds.\n */\n$262.agent.tryYield = function() {\n  $262.agent.sleep($262.agent.timeouts.yield);\n};\n\n/**\n * Try to sleep the current agent for the given amount of milliseconds. It is acceptable,\n * but not encouraged, to ignore this sleep request and directly continue execution.\n *\n * The default implementation calls `$262.agent.sleep(ms)`.\n *\n * @param {number} ms Time to sleep in milliseconds.\n */\n$262.agent.trySleep = function(ms) {\n  $262.agent.sleep(ms);\n};\n",
  "byteConversionValues.js": "// Copyright (C) 2016 the V8 project authors. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Provide a list for original and expected values for different byte\n    conversions.\n    This helper is mostly used on tests for TypedArray and DataView, and each\n    array from the expected values must match the original values array on every\n    index containing its original value.\ndefines: [byteConversionValues]\n---*/\nvar byteConversionValues = {\n  values: [\n    127,         // 2 ** 7 - 1\n    128,         // 2 ** 7\n    32767,       // 2 ** 15 - 1\n    32768,       // 2 ** 15\n    2147483647,  // 2 ** 31 - 1\n    2147483648,  // 2 ** 31\n    255,         // 2 ** 8 - 1\n    256,         // 2 ** 8\n    65535,       // 2 ** 16 - 1\n    65536,       // 2 ** 16\n    4294967295,  // 2 ** 32 - 1\n    4294967296,  // 2 ** 32\n    9007199254740991, // 2 ** 53 - 1\n    9007199254740992, // 2 ** 53\n    1.1,\n    0.1,\n    0.5,\n    0.50000001,\n    0.6,\n    0.7,\n    undefined,\n    -1,\n    -0,\n    -0.1,\n    -1.1,\n    NaN,\n    -127,        // - ( 2 ** 7 - 1 )\n    -128,        // - ( 2 ** 7 )\n    -32767,      // - ( 2 ** 15 - 1 )\n    -32768,      // - ( 2 ** 15 )\n    -2147483647, // - ( 2 ** 31 - 1 )\n    -2147483648, // - ( 2 ** 31 )\n    -255,        // - ( 2 ** 8 - 1 )\n    -256,        // - ( 2 ** 8 )\n    -65535,      // - ( 2 ** 16 - 1 )\n    -65536,      // - ( 2 ** 16 )\n    -4294967295, // - ( 2 ** 32 - 1 )\n    -4294967296, // - ( 2 ** 32 )\n    Infinity,\n    -Infinity,\n    0,\n    2049,                         // an integer which rounds down under ties-to-even when cast to float16\n    2051,                         // an integer which rounds up under ties-to-even when cast to float16\n    0.00006103515625,             // smallest normal float16\n    0.00006097555160522461,       // largest subnormal float16\n    5.960464477539063e-8,         // smallest float16\n    2.9802322387695312e-8,        // largest double which rounds to 0 when cast to float16\n    2.980232238769532e-8,         // smallest double which does not round to 0 when cast to float16\n    8.940696716308594e-8,         // a double which rounds up to a subnormal under ties-to-even when cast to float16\n    1.4901161193847656e-7,        // a double which rounds down to a subnormal under ties-to-even when cast to float16\n    1.490116119384766e-7,         // the next double above the one on the previous line one\n    65504,                        // max finite float16\n    65520,                        // smallest double which rounds to infinity when cast to float16\n    65519.99999999999,            // largest double which does not round to infinity when cast to float16\n    0.000061005353927612305,      // smallest double which rounds to a non-subnormal when cast to float16\n    0.0000610053539276123         // largest double which rounds to a subnormal when cast to float16\n  ],\n\n  expected: {\n    Int8: [\n      127,  // 127\n      -128, // 128\n      -1,   // 32767\n      0,    // 32768\n      -1,   // 2147483647\n      0,    // 2147483648\n      -1,   // 255\n      0,    // 256\n      -1,   // 65535\n      0,    // 65536\n      -1,   // 4294967295\n      0,    // 4294967296\n      -1,   // 9007199254740991\n      0,    // 9007199254740992\n      1,    // 1.1\n      0,    // 0.1\n      0,    // 0.5\n      0,    // 0.50000001,\n      0,    // 0.6\n      0,    // 0.7\n      0,    // undefined\n      -1,   // -1\n      0,    // -0\n      0,    // -0.1\n      -1,   // -1.1\n      0,    // NaN\n      -127, // -127\n      -128, // -128\n      1,    // -32767\n      0,    // -32768\n      1,    // -2147483647\n      0,    // -2147483648\n      1,    // -255\n      0,    // -256\n      1,    // -65535\n      0,    // -65536\n      1,    // -4294967295\n      0,    // -4294967296\n      0,    // Infinity\n      0,    // -Infinity\n      0,    // 0\n      1,    // 2049\n      3,    // 2051\n      0,    // 0.00006103515625\n      0,    // 0.00006097555160522461\n      0,    // 5.960464477539063e-8\n      0,    // 2.9802322387695312e-8\n      0,    // 2.980232238769532e-8\n      0,    // 8.940696716308594e-8\n      0,    // 1.4901161193847656e-7\n      0,    // 1.490116119384766e-7\n      -32,  // 65504\n      -16,  // 65520\n      -17,  // 65519.99999999999\n      0,    // 0.000061005353927612305\n      0     // 0.0000610053539276123\n    ],\n    Uint8: [\n      127, // 127\n      128, // 128\n      255, // 32767\n      0,   // 32768\n      255, // 2147483647\n      0,   // 2147483648\n      255, // 255\n      0,   // 256\n      255, // 65535\n      0,   // 65536\n      255, // 4294967295\n      0,   // 4294967296\n      255, // 9007199254740991\n      0,   // 9007199254740992\n      1,   // 1.1\n      0,   // 0.1\n      0,   // 0.5\n      0,   // 0.50000001,\n      0,   // 0.6\n      0,   // 0.7\n      0,   // undefined\n      255, // -1\n      0,   // -0\n      0,   // -0.1\n      255, // -1.1\n      0,   // NaN\n      129, // -127\n      128, // -128\n      1,   // -32767\n      0,   // -32768\n      1,   // -2147483647\n      0,   // -2147483648\n      1,   // -255\n      0,   // -256\n      1,   // -65535\n      0,   // -65536\n      1,   // -4294967295\n      0,   // -4294967296\n      0,   // Infinity\n      0,   // -Infinity\n      0,   // 0\n      1,   // 2049\n      3,   // 2051\n      0,   // 0.00006103515625\n      0,   // 0.00006097555160522461\n      0,   // 5.960464477539063e-8\n      0,   // 2.9802322387695312e-8\n      0,   // 2.980232238769532e-8\n      0,   // 8.940696716308594e-8\n      0,   // 1.4901161193847656e-7\n      0,   // 1.490116119384766e-7\n      224, // 65504\n      240, // 65520\n      239, // 65519.99999999999\n      0,   // 0.000061005353927612305\n      0    // 0.0000610053539276123\n    ],\n    Uint8Clamped: [\n      127, // 127\n      128, // 128\n      255, // 32767\n      255, // 32768\n      255, // 2147483647\n      255, // 2147483648\n      255, // 255\n      255, // 256\n      255, // 65535\n      255, // 65536\n      255, // 4294967295\n      255, // 4294967296\n      255, // 9007199254740991\n      255, // 9007199254740992\n      1,   // 1.1,\n      0,   // 0.1\n      0,   // 0.5\n      1,   // 0.50000001,\n      1,   // 0.6\n      1,   // 0.7\n      0,   // undefined\n      0,   // -1\n      0,   // -0\n      0,   // -0.1\n      0,   // -1.1\n      0,   // NaN\n      0,   // -127\n      0,   // -128\n      0,   // -32767\n      0,   // -32768\n      0,   // -2147483647\n      0,   // -2147483648\n      0,   // -255\n      0,   // -256\n      0,   // -65535\n      0,   // -65536\n      0,   // -4294967295\n      0,   // -4294967296\n      255, // Infinity\n      0,   // -Infinity\n      0,   // 0\n      255, // 2049\n      255, // 2051\n      0,   // 0.00006103515625\n      0,   // 0.00006097555160522461\n      0,   // 5.960464477539063e-8\n      0,   // 2.9802322387695312e-8\n      0,   // 2.980232238769532e-8\n      0,   // 8.940696716308594e-8\n      0,   // 1.4901161193847656e-7\n      0,   // 1.490116119384766e-7\n      255, // 65504\n      255, // 65520\n      255, // 65519.99999999999\n      0,   // 0.000061005353927612305\n      0    // 0.0000610053539276123\n    ],\n    Int16: [\n      127,    // 127\n      128,    // 128\n      32767,  // 32767\n      -32768, // 32768\n      -1,     // 2147483647\n      0,      // 2147483648\n      255,    // 255\n      256,    // 256\n      -1,     // 65535\n      0,      // 65536\n      -1,     // 4294967295\n      0,      // 4294967296\n      -1,     // 9007199254740991\n      0,      // 9007199254740992\n      1,      // 1.1\n      0,      // 0.1\n      0,      // 0.5\n      0,      // 0.50000001,\n      0,      // 0.6\n      0,      // 0.7\n      0,      // undefined\n      -1,     // -1\n      0,      // -0\n      0,      // -0.1\n      -1,     // -1.1\n      0,      // NaN\n      -127,   // -127\n      -128,   // -128\n      -32767, // -32767\n      -32768, // -32768\n      1,      // -2147483647\n      0,      // -2147483648\n      -255,   // -255\n      -256,   // -256\n      1,      // -65535\n      0,      // -65536\n      1,      // -4294967295\n      0,      // -4294967296\n      0,      // Infinity\n      0,      // -Infinity\n      0,      // 0\n      2049,   // 2049\n      2051,   // 2051\n      0,      // 0.00006103515625\n      0,      // 0.00006097555160522461\n      0,      // 5.960464477539063e-8\n      0,      // 2.9802322387695312e-8\n      0,      // 2.980232238769532e-8\n      0,      // 8.940696716308594e-8\n      0,      // 1.4901161193847656e-7\n      0,      // 1.490116119384766e-7\n      -32,    // 65504\n      -16,    // 65520\n      -17,    // 65519.99999999999\n      0,      // 0.000061005353927612305\n      0       // 0.0000610053539276123\n    ],\n    Uint16: [\n      127,   // 127\n      128,   // 128\n      32767, // 32767\n      32768, // 32768\n      65535, // 2147483647\n      0,     // 2147483648\n      255,   // 255\n      256,   // 256\n      65535, // 65535\n      0,     // 65536\n      65535, // 4294967295\n      0,     // 4294967296\n      65535, // 9007199254740991\n      0,     // 9007199254740992\n      1,     // 1.1\n      0,     // 0.1\n      0,     // 0.5\n      0,     // 0.50000001,\n      0,     // 0.6\n      0,     // 0.7\n      0,     // undefined\n      65535, // -1\n      0,     // -0\n      0,     // -0.1\n      65535, // -1.1\n      0,     // NaN\n      65409, // -127\n      65408, // -128\n      32769, // -32767\n      32768, // -32768\n      1,     // -2147483647\n      0,     // -2147483648\n      65281, // -255\n      65280, // -256\n      1,     // -65535\n      0,     // -65536\n      1,     // -4294967295\n      0,     // -4294967296\n      0,     // Infinity\n      0,     // -Infinity\n      0,     // 0\n      2049,  // 2049\n      2051,  // 2051\n      0,     // 0.00006103515625\n      0,     // 0.00006097555160522461\n      0,     // 5.960464477539063e-8\n      0,     // 2.9802322387695312e-8\n      0,     // 2.980232238769532e-8\n      0,     // 8.940696716308594e-8\n      0,     // 1.4901161193847656e-7\n      0,     // 1.490116119384766e-7\n      65504, // 65504\n      65520, // 65520\n      65519, // 65519.99999999999\n      0,     // 0.000061005353927612305\n      0      // 0.0000610053539276123\n    ],\n    Int32: [\n      127,         // 127\n      128,         // 128\n      32767,       // 32767\n      32768,       // 32768\n      2147483647,  // 2147483647\n      -2147483648, // 2147483648\n      255,         // 255\n      256,         // 256\n      65535,       // 65535\n      65536,       // 65536\n      -1,          // 4294967295\n      0,           // 4294967296\n      -1,          // 9007199254740991\n      0,           // 9007199254740992\n      1,           // 1.1\n      0,           // 0.1\n      0,           // 0.5\n      0,           // 0.50000001,\n      0,           // 0.6\n      0,           // 0.7\n      0,           // undefined\n      -1,          // -1\n      0,           // -0\n      0,           // -0.1\n      -1,          // -1.1\n      0,           // NaN\n      -127,        // -127\n      -128,        // -128\n      -32767,      // -32767\n      -32768,      // -32768\n      -2147483647, // -2147483647\n      -2147483648, // -2147483648\n      -255,        // -255\n      -256,        // -256\n      -65535,      // -65535\n      -65536,      // -65536\n      1,           // -4294967295\n      0,           // -4294967296\n      0,           // Infinity\n      0,           // -Infinity\n      0,           // 0\n      2049,        // 2049\n      2051,        // 2051\n      0,           // 0.00006103515625\n      0,           // 0.00006097555160522461\n      0,           // 5.960464477539063e-8\n      0,           // 2.9802322387695312e-8\n      0,           // 2.980232238769532e-8\n      0,           // 8.940696716308594e-8\n      0,           // 1.4901161193847656e-7\n      0,           // 1.490116119384766e-7\n      65504,       // 65504\n      65520,       // 65520\n      65519,       // 65519.99999999999\n      0,           // 0.000061005353927612305\n      0            // 0.0000610053539276123\n    ],\n    Uint32: [\n      127,        // 127\n      128,        // 128\n      32767,      // 32767\n      32768,      // 32768\n      2147483647, // 2147483647\n      2147483648, // 2147483648\n      255,        // 255\n      256,        // 256\n      65535,      // 65535\n      65536,      // 65536\n      4294967295, // 4294967295\n      0,          // 4294967296\n      4294967295, // 9007199254740991\n      0,          // 9007199254740992\n      1,          // 1.1\n      0,          // 0.1\n      0,          // 0.5\n      0,          // 0.50000001,\n      0,          // 0.6\n      0,          // 0.7\n      0,          // undefined\n      4294967295, // -1\n      0,          // -0\n      0,          // -0.1\n      4294967295, // -1.1\n      0,          // NaN\n      4294967169, // -127\n      4294967168, // -128\n      4294934529, // -32767\n      4294934528, // -32768\n      2147483649, // -2147483647\n      2147483648, // -2147483648\n      4294967041, // -255\n      4294967040, // -256\n      4294901761, // -65535\n      4294901760, // -65536\n      1,          // -4294967295\n      0,          // -4294967296\n      0,          // Infinity\n      0,          // -Infinity\n      0,          // 0\n      2049,       // 2049\n      2051,       // 2051\n      0,          // 0.00006103515625\n      0,          // 0.00006097555160522461\n      0,          // 5.960464477539063e-8\n      0,          // 2.9802322387695312e-8\n      0,          // 2.980232238769532e-8\n      0,          // 8.940696716308594e-8\n      0,          // 1.4901161193847656e-7\n      0,          // 1.490116119384766e-7\n      65504,      // 65504\n      65520,      // 65520\n      65519,      // 65519.99999999999\n      0,          // 0.000061005353927612305\n      0           // 0.0000610053539276123\n    ],\n    Float16: [\n      127,                    // 127\n      128,                    // 128\n      32768,                  // 32767\n      32768,                  // 32768\n      Infinity,               // 2147483647\n      Infinity,               // 2147483648\n      255,                    // 255\n      256,                    // 256\n      Infinity,               // 65535\n      Infinity,               // 65536\n      Infinity,               // 4294967295\n      Infinity,               // 4294967296\n      Infinity,               // 9007199254740991\n      Infinity,               // 9007199254740992\n      1.099609375,            // 1.1\n      0.0999755859375,        // 0.1\n      0.5,                    // 0.5\n      0.5,                    // 0.50000001,\n      0.60009765625,          // 0.6\n      0.7001953125,           // 0.7\n      NaN,                    // undefined\n      -1,                     // -1\n      -0,                     // -0\n      -0.0999755859375,       // -0.1\n      -1.099609375,           // -1.1\n      NaN,                    // NaN\n      -127,                   // -127\n      -128,                   // -128\n      -32768,                 // -32767\n      -32768,                 // -32768\n      -Infinity,              // -2147483647\n      -Infinity,              // -2147483648\n      -255,                   // -255\n      -256,                   // -256\n      -Infinity,              // -65535\n      -Infinity,              // -65536\n      -Infinity,              // -4294967295\n      -Infinity,              // -4294967296\n      Infinity,               // Infinity\n      -Infinity,              // -Infinity\n      0,                      // 0\n      2048,                   // 2049\n      2052,                   // 2051\n      0.00006103515625,       // 0.00006103515625\n      0.00006097555160522461, // 0.00006097555160522461\n      5.960464477539063e-8,   // 5.960464477539063e-8\n      0,                      // 2.9802322387695312e-8\n      5.960464477539063e-8,   // 2.980232238769532e-8\n      1.1920928955078125e-7,  // 8.940696716308594e-8\n      1.1920928955078125e-7,  // 1.4901161193847656e-7\n      1.7881393432617188e-7,  // 1.490116119384766e-7\n      65504,                  // 65504\n      Infinity,               // 65520\n      65504,                  // 65519.99999999999\n      0.00006103515625,       // 0.000061005353927612305\n      0.00006097555160522461  // 0.0000610053539276123\n    ],\n    Float32: [\n      127,                     // 127\n      128,                     // 128\n      32767,                   // 32767\n      32768,                   // 32768\n      2147483648,              // 2147483647\n      2147483648,              // 2147483648\n      255,                     // 255\n      256,                     // 256\n      65535,                   // 65535\n      65536,                   // 65536\n      4294967296,              // 4294967295\n      4294967296,              // 4294967296\n      9007199254740992,        // 9007199254740991\n      9007199254740992,        // 9007199254740992\n      1.100000023841858,       // 1.1\n      0.10000000149011612,     // 0.1\n      0.5,                     // 0.5\n      0.5,                     // 0.50000001,\n      0.6000000238418579,      // 0.6\n      0.699999988079071,       // 0.7\n      NaN,                     // undefined\n      -1,                      // -1\n      -0,                      // -0\n      -0.10000000149011612,    // -0.1\n      -1.100000023841858,      // -1.1\n      NaN,                     // NaN\n      -127,                    // -127\n      -128,                    // -128\n      -32767,                  // -32767\n      -32768,                  // -32768\n      -2147483648,             // -2147483647\n      -2147483648,             // -2147483648\n      -255,                    // -255\n      -256,                    // -256\n      -65535,                  // -65535\n      -65536,                  // -65536\n      -4294967296,             // -4294967295\n      -4294967296,             // -4294967296\n      Infinity,                // Infinity\n      -Infinity,               // -Infinity\n      0,                       // 0\n      2049,                    // 2049\n      2051,                    // 2051\n      0.00006103515625,        // 0.00006103515625\n      0.00006097555160522461,  // 0.00006097555160522461\n      5.960464477539063e-8,    // 5.960464477539063e-8\n      2.9802322387695312e-8,   // 2.9802322387695312e-8\n      2.9802322387695312e-8,   // 2.980232238769532e-8\n      8.940696716308594e-8,    // 8.940696716308594e-8\n      1.4901161193847656e-7,   // 1.4901161193847656e-7\n      1.4901161193847656e-7,   // 1.490116119384766e-7\n      65504,                   // 65504\n      65520,                   // 65520\n      65520,                   // 65519.99999999999\n      0.000061005353927612305, // 0.000061005353927612305\n      0.000061005353927612305  // 0.0000610053539276123\n    ],\n    Float64: [\n      127,         // 127\n      128,         // 128\n      32767,       // 32767\n      32768,       // 32768\n      2147483647,  // 2147483647\n      2147483648,  // 2147483648\n      255,         // 255\n      256,         // 256\n      65535,       // 65535\n      65536,       // 65536\n      4294967295,  // 4294967295\n      4294967296,  // 4294967296\n      9007199254740991, // 9007199254740991\n      9007199254740992, // 9007199254740992\n      1.1,         // 1.1\n      0.1,         // 0.1\n      0.5,         // 0.5\n      0.50000001,  // 0.50000001,\n      0.6,         // 0.6\n      0.7,         // 0.7\n      NaN,         // undefined\n      -1,          // -1\n      -0,          // -0\n      -0.1,        // -0.1\n      -1.1,        // -1.1\n      NaN,         // NaN\n      -127,        // -127\n      -128,        // -128\n      -32767,      // -32767\n      -32768,      // -32768\n      -2147483647, // -2147483647\n      -2147483648, // -2147483648\n      -255,        // -255\n      -256,        // -256\n      -65535,      // -65535\n      -65536,      // -65536\n      -4294967295, // -4294967295\n      -4294967296, // -4294967296\n      Infinity,    // Infinity\n      -Infinity,   // -Infinity\n      0,           // 0\n      2049,                    // 2049\n      2051,                    // 2051\n      0.00006103515625,        // 0.00006103515625\n      0.00006097555160522461,  // 0.00006097555160522461\n      5.960464477539063e-8,    // 5.960464477539063e-8\n      2.9802322387695312e-8,   // 2.9802322387695312e-8\n      2.980232238769532e-8,    // 2.980232238769532e-8\n      8.940696716308594e-8,    // 8.940696716308594e-8\n      1.4901161193847656e-7,   // 1.4901161193847656e-7\n      1.490116119384766e-7,    // 1.490116119384766e-7\n      65504,                   // 65504\n      65520,                   // 65520\n      65519.99999999999,       // 65519.99999999999\n      0.000061005353927612305, // 0.000061005353927612305\n      0.0000610053539276123    // 0.0000610053539276123\n    ]\n  }\n};\n",
  "compareArray.js": "// Copyright (C) 2017 Ecma International.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Deprecated now that compareArray is defined in assert.js.\ndefines: [compareArray]\n---*/\n",
  "compareIterator.js": "// Copyright (C) 2018 Peter Wong.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: Compare the values of an iterator with an array of expected values\ndefines: [assert.compareIterator]\n---*/\n\n// Example:\n//\n//    function* numbers() {\n//      yield 1;\n//      yield 2;\n//      yield 3;\n//    }\n//\n//    assert.compareIterator(numbers(), [\n//      v => assert.sameValue(v, 1),\n//      v => assert.sameValue(v, 2),\n//      v => assert.sameValue(v, 3),\n//    ]);\n//\nassert.compareIterator = function(iter, validators, message) {\n  message = message || '';\n\n  var i, result;\n  for (i = 0; i < validators.length; i++) {\n    result = iter.next();\n    assert(!result.done, 'Expected ' + i + ' values(s). Instead iterator only produced ' + (i - 1) + ' value(s). ' + message);\n    validators[i](result.value);\n  }\n\n  result = iter.next();\n  assert(result.done, 'Expected only ' + i + ' values(s). Instead iterator produced more. ' + message);\n  assert.sameValue(result.value, undefined, 'Expected value of `undefined` when iterator completes. ' + message);\n}\n",
  "dateConstants.js": "// Copyright (C) 2009 the Sputnik authors.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Collection of date-centric values\ndefines:\n  - date_1899_end\n  - date_1900_start\n  - date_1969_end\n  - date_1970_start\n  - date_1999_end\n  - date_2000_start\n  - date_2099_end\n  - date_2100_start\n  - start_of_time\n  - end_of_time\n---*/\n\nvar date_1899_end = -2208988800001;\nvar date_1900_start = -2208988800000;\nvar date_1969_end = -1;\nvar date_1970_start = 0;\nvar date_1999_end = 946684799999;\nvar date_2000_start = 946684800000;\nvar date_2099_end = 4102444799999;\nvar date_2100_start = 4102444800000;\n\nvar start_of_time = -8.64e15;\nvar end_of_time = 8.64e15;\n",
  "decimalToHexString.js": "// Copyright (C) 2017 André Bargull. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Collection of functions used to assert the correctness of various encoding operations.\ndefines: [decimalToHexString, decimalToPercentHexString]\n---*/\n\nfunction decimalToHexString(n) {\n  var hex = \"0123456789ABCDEF\";\n  n >>>= 0;\n  var s = \"\";\n  while (n) {\n    s = hex[n & 0xf] + s;\n    n >>>= 4;\n  }\n  while (s.length < 4) {\n    s = \"0\" + s;\n  }\n  return s;\n}\n\nfunction decimalToPercentHexString(n) {\n  var hex = \"0123456789ABCDEF\";\n  return \"%\" + hex[(n >> 4) & 0xf] + hex[n & 0xf];\n}\n",
  "deepEqual.js": "// Copyright 2019 Ron Buckton. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: >\n  Compare two values structurally\ndefines: [assert.deepEqual]\n---*/\n\nassert.deepEqual = function(actual, expected, message) {\n  var format = assert.deepEqual.format;\n  var mustBeTrue = assert.deepEqual._compare(actual, expected);\n\n  // format can be slow when `actual` or `expected` are large objects, like for\n  // example the global object, so only call it when the assertion will fail.\n  if (mustBeTrue !== true) {\n    message = `Expected ${format(actual)} to be structurally equal to ${format(expected)}. ${(message || '')}`;\n  }\n\n  assert(mustBeTrue, message);\n};\n\n(function() {\nlet getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nlet join = arr => arr.join(', ');\nfunction stringFromTemplate(strings, subs) {\n  let parts = strings.map((str, i) => `${i === 0 ? '' : subs[i - 1]}${str}`);\n  return parts.join('');\n}\nfunction escapeKey(key) {\n  if (typeof key === 'symbol') return `[${String(key)}]`;\n  if (/^[a-zA-Z0-9_$]+$/.test(key)) return key;\n  return assert._formatIdentityFreeValue(key);\n}\n\nassert.deepEqual.format = function(value, seen) {\n  let basic = assert._formatIdentityFreeValue(value);\n  if (basic) return basic;\n  switch (value === null ? 'null' : typeof value) {\n    case 'string':\n    case 'bigint':\n    case 'number':\n    case 'boolean':\n    case 'undefined':\n    case 'null':\n      assert(false, 'values without identity should use basic formatting');\n      break;\n    case 'symbol':\n    case 'function':\n    case 'object':\n      break;\n    default:\n      return typeof value;\n  }\n\n  if (!seen) {\n    seen = {\n      counter: 0,\n      map: new Map()\n    };\n  }\n  let usage = seen.map.get(value);\n  if (usage) {\n    usage.used = true;\n    return `ref #${usage.id}`;\n  }\n  usage = { id: ++seen.counter, used: false };\n  seen.map.set(value, usage);\n\n  // Properly communicating multiple references requires deferred rendering of\n  // all identity-bearing values until the outermost format call finishes,\n  // because the current value can also in appear in a not-yet-visited part of\n  // the object graph (which, when visited, will update the usage object).\n  //\n  // To preserve readability of the desired output formatting, we accomplish\n  // this deferral using tagged template literals.\n  // Evaluation closes over the usage object and returns a function that accepts\n  // \"mapper\" arguments for rendering the corresponding substitution values and\n  // returns an object with only a toString method which will itself be invoked\n  // when trying to use the result as a string in assert.deepEqual.\n  //\n  // For convenience, any absent mapper is presumed to be `String`, and the\n  // function itself has a toString method that self-invokes with no mappers\n  // (allowing returning the function directly when every mapper is `String`).\n  function lazyResult(strings, ...subs) {\n    function acceptMappers(...mappers) {\n      function toString() {\n        let renderings = subs.map((sub, i) => (mappers[i] || String)(sub));\n        let rendered = stringFromTemplate(strings, renderings);\n        if (usage.used) rendered += ` as #${usage.id}`;\n        return rendered;\n      }\n\n      return { toString };\n    }\n\n    acceptMappers.toString = () => String(acceptMappers());\n    return acceptMappers;\n  }\n\n  let format = assert.deepEqual.format;\n  function lazyString(strings, ...subs) {\n    return { toString: () => stringFromTemplate(strings, subs) };\n  }\n\n  if (typeof value === 'function') {\n    return lazyResult`function${value.name ? ` ${String(value.name)}` : ''}`;\n  }\n  if (typeof value !== 'object') {\n    // probably a symbol\n    return lazyResult`${value}`;\n  }\n  if (Array.isArray ? Array.isArray(value) : value instanceof Array) {\n    return lazyResult`[${value.map(value => format(value, seen))}]`(join);\n  }\n  if (value instanceof Date) {\n    return lazyResult`Date(${format(value.toISOString(), seen)})`;\n  }\n  if (value instanceof Error) {\n    return lazyResult`error ${value.name || 'Error'}(${format(value.message, seen)})`;\n  }\n  if (value instanceof RegExp) {\n    return lazyResult`${value}`;\n  }\n  if (typeof Map !== \"undefined\" && value instanceof Map) {\n    let contents = Array.from(value).map(pair => lazyString`${format(pair[0], seen)} => ${format(pair[1], seen)}`);\n    return lazyResult`Map {${contents}}`(join);\n  }\n  if (typeof Set !== \"undefined\" && value instanceof Set) {\n    let contents = Array.from(value).map(value => format(value, seen));\n    return lazyResult`Set {${contents}}`(join);\n  }\n\n  let tag = Symbol.toStringTag && Symbol.toStringTag in value\n    ? value[Symbol.toStringTag]\n    : Object.getPrototypeOf(value) === null ? '[Object: null prototype]' : 'Object';\n  let keys = Reflect.ownKeys(value).filter(key => getOwnPropertyDescriptor(value, key).enumerable);\n  let contents = keys.map(key => lazyString`${escapeKey(key)}: ${format(value[key], seen)}`);\n  return lazyResult`${tag ? `${tag} ` : ''}{${contents}}`(String, join);\n};\n})();\n\nassert.deepEqual._compare = (function () {\n  var EQUAL = 1;\n  var NOT_EQUAL = -1;\n  var UNKNOWN = 0;\n\n  function deepEqual(a, b) {\n    return compareEquality(a, b) === EQUAL;\n  }\n\n  function compareEquality(a, b, cache) {\n    return compareIf(a, b, isOptional, compareOptionality)\n      || compareIf(a, b, isPrimitiveEquatable, comparePrimitiveEquality)\n      || compareIf(a, b, isObjectEquatable, compareObjectEquality, cache)\n      || NOT_EQUAL;\n  }\n\n  function compareIf(a, b, test, compare, cache) {\n    return !test(a)\n      ? !test(b) ? UNKNOWN : NOT_EQUAL\n      : !test(b) ? NOT_EQUAL : cacheComparison(a, b, compare, cache);\n  }\n\n  function tryCompareStrictEquality(a, b) {\n    return a === b ? EQUAL : UNKNOWN;\n  }\n\n  function tryCompareTypeOfEquality(a, b) {\n    return typeof a !== typeof b ? NOT_EQUAL : UNKNOWN;\n  }\n\n  function tryCompareToStringTagEquality(a, b) {\n    var aTag = Symbol.toStringTag in a ? a[Symbol.toStringTag] : undefined;\n    var bTag = Symbol.toStringTag in b ? b[Symbol.toStringTag] : undefined;\n    return aTag !== bTag ? NOT_EQUAL : UNKNOWN;\n  }\n\n  function isOptional(value) {\n    return value === undefined\n      || value === null;\n  }\n\n  function compareOptionality(a, b) {\n    return tryCompareStrictEquality(a, b)\n      || NOT_EQUAL;\n  }\n\n  function isPrimitiveEquatable(value) {\n    switch (typeof value) {\n      case 'string':\n      case 'number':\n      case 'bigint':\n      case 'boolean':\n      case 'symbol':\n        return true;\n      default:\n        return isBoxed(value);\n    }\n  }\n\n  function comparePrimitiveEquality(a, b) {\n    if (isBoxed(a)) a = a.valueOf();\n    if (isBoxed(b)) b = b.valueOf();\n    return tryCompareStrictEquality(a, b)\n      || tryCompareTypeOfEquality(a, b)\n      || compareIf(a, b, isNaNEquatable, compareNaNEquality)\n      || NOT_EQUAL;\n  }\n\n  function isNaNEquatable(value) {\n    return typeof value === 'number';\n  }\n\n  function compareNaNEquality(a, b) {\n    return isNaN(a) && isNaN(b) ? EQUAL : NOT_EQUAL;\n  }\n\n  function isObjectEquatable(value) {\n    return typeof value === 'object' || typeof value === 'function';\n  }\n\n  function compareObjectEquality(a, b, cache) {\n    if (!cache) cache = new Map();\n    return getCache(cache, a, b)\n      || setCache(cache, a, b, EQUAL) // consider equal for now\n      || cacheComparison(a, b, tryCompareStrictEquality, cache)\n      || cacheComparison(a, b, tryCompareToStringTagEquality, cache)\n      || compareIf(a, b, isValueOfEquatable, compareValueOfEquality)\n      || compareIf(a, b, isToStringEquatable, compareToStringEquality)\n      || compareIf(a, b, isArrayLikeEquatable, compareArrayLikeEquality, cache)\n      || compareIf(a, b, isStructurallyEquatable, compareStructuralEquality, cache)\n      || compareIf(a, b, isIterableEquatable, compareIterableEquality, cache)\n      || cacheComparison(a, b, fail, cache);\n  }\n\n  function isBoxed(value) {\n    return value instanceof String\n      || value instanceof Number\n      || value instanceof Boolean\n      || typeof Symbol === 'function' && value instanceof Symbol\n      || typeof BigInt === 'function' && value instanceof BigInt;\n  }\n\n  function isValueOfEquatable(value) {\n    return value instanceof Date;\n  }\n\n  function compareValueOfEquality(a, b) {\n    return compareIf(a.valueOf(), b.valueOf(), isPrimitiveEquatable, comparePrimitiveEquality)\n      || NOT_EQUAL;\n  }\n\n  function isToStringEquatable(value) {\n    return value instanceof RegExp;\n  }\n\n  function compareToStringEquality(a, b) {\n    return compareIf(a.toString(), b.toString(), isPrimitiveEquatable, comparePrimitiveEquality)\n      || NOT_EQUAL;\n  }\n\n  function isArrayLikeEquatable(value) {\n    return (Array.isArray ? Array.isArray(value) : value instanceof Array)\n      || (typeof Uint8Array === 'function' && value instanceof Uint8Array)\n      || (typeof Uint8ClampedArray === 'function' && value instanceof Uint8ClampedArray)\n      || (typeof Uint16Array === 'function' && value instanceof Uint16Array)\n      || (typeof Uint32Array === 'function' && value instanceof Uint32Array)\n      || (typeof Int8Array === 'function' && value instanceof Int8Array)\n      || (typeof Int16Array === 'function' && value instanceof Int16Array)\n      || (typeof Int32Array === 'function' && value instanceof Int32Array)\n      || (typeof Float32Array === 'function' && value instanceof Float32Array)\n      || (typeof Float64Array === 'function' && value instanceof Float64Array)\n      || (typeof BigUint64Array === 'function' && value instanceof BigUint64Array)\n      || (typeof BigInt64Array === 'function' && value instanceof BigInt64Array);\n  }\n\n  function compareArrayLikeEquality(a, b, cache) {\n    if (a.length !== b.length) return NOT_EQUAL;\n    for (var i = 0; i < a.length; i++) {\n      if (compareEquality(a[i], b[i], cache) === NOT_EQUAL) {\n        return NOT_EQUAL;\n      }\n    }\n    return EQUAL;\n  }\n\n  function isStructurallyEquatable(value) {\n    return !(typeof Promise === 'function' && value instanceof Promise // only comparable by reference\n      || typeof WeakMap === 'function' && value instanceof WeakMap // only comparable by reference\n      || typeof WeakSet === 'function' && value instanceof WeakSet // only comparable by reference\n      || typeof Map === 'function' && value instanceof Map // comparable via @@iterator\n      || typeof Set === 'function' && value instanceof Set); // comparable via @@iterator\n  }\n\n  function compareStructuralEquality(a, b, cache) {\n    var aKeys = [];\n    for (var key in a) aKeys.push(key);\n\n    var bKeys = [];\n    for (var key in b) bKeys.push(key);\n\n    if (aKeys.length !== bKeys.length) {\n      return NOT_EQUAL;\n    }\n\n    aKeys.sort();\n    bKeys.sort();\n\n    for (var i = 0; i < aKeys.length; i++) {\n      var aKey = aKeys[i];\n      var bKey = bKeys[i];\n      if (compareEquality(aKey, bKey, cache) === NOT_EQUAL) {\n        return NOT_EQUAL;\n      }\n      if (compareEquality(a[aKey], b[bKey], cache) === NOT_EQUAL) {\n        return NOT_EQUAL;\n      }\n    }\n\n    return compareIf(a, b, isIterableEquatable, compareIterableEquality, cache)\n      || EQUAL;\n  }\n\n  function isIterableEquatable(value) {\n    return typeof Symbol === 'function'\n      && typeof value[Symbol.iterator] === 'function';\n  }\n\n  function compareIteratorEquality(a, b, cache) {\n    if (typeof Map === 'function' && a instanceof Map && b instanceof Map ||\n      typeof Set === 'function' && a instanceof Set && b instanceof Set) {\n      if (a.size !== b.size) return NOT_EQUAL; // exit early if we detect a difference in size\n    }\n\n    var ar, br;\n    while (true) {\n      ar = a.next();\n      br = b.next();\n      if (ar.done) {\n        if (br.done) return EQUAL;\n        if (b.return) b.return();\n        return NOT_EQUAL;\n      }\n      if (br.done) {\n        if (a.return) a.return();\n        return NOT_EQUAL;\n      }\n      if (compareEquality(ar.value, br.value, cache) === NOT_EQUAL) {\n        if (a.return) a.return();\n        if (b.return) b.return();\n        return NOT_EQUAL;\n      }\n    }\n  }\n\n  function compareIterableEquality(a, b, cache) {\n    return compareIteratorEquality(a[Symbol.iterator](), b[Symbol.iterator](), cache);\n  }\n\n  function cacheComparison(a, b, compare, cache) {\n    var result = compare(a, b, cache);\n    if (cache && (result === EQUAL || result === NOT_EQUAL)) {\n      setCache(cache, a, b, /** @type {EQUAL | NOT_EQUAL} */(result));\n    }\n    return result;\n  }\n\n  function fail() {\n    return NOT_EQUAL;\n  }\n\n  function setCache(cache, left, right, result) {\n    var otherCache;\n\n    otherCache = cache.get(left);\n    if (!otherCache) cache.set(left, otherCache = new Map());\n    otherCache.set(right, result);\n\n    otherCache = cache.get(right);\n    if (!otherCache) cache.set(right, otherCache = new Map());\n    otherCache.set(left, result);\n  }\n\n  function getCache(cache, left, right) {\n    var otherCache;\n    var result;\n\n    otherCache = cache.get(left);\n    result = otherCache && otherCache.get(right);\n    if (result) return result;\n\n    otherCache = cache.get(right);\n    result = otherCache && otherCache.get(left);\n    if (result) return result;\n\n    return UNKNOWN;\n  }\n\n  return deepEqual;\n})();\n",
  "detachArrayBuffer.js": "// Copyright (C) 2016 the V8 project authors.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    A function used in the process of asserting correctness of TypedArray objects.\n\n    $262.detachArrayBuffer is defined by a host.\ndefines: [$DETACHBUFFER]\n---*/\n\nfunction $DETACHBUFFER(buffer) {\n  if (!$262 || typeof $262.detachArrayBuffer !== \"function\") {\n    throw new Test262Error(\"No method available to detach an ArrayBuffer\");\n  }\n  $262.detachArrayBuffer(buffer);\n}\n",
  "doneprintHandle.js": "// Copyright (C) 2017 Ecma International.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\ndefines: [$DONE]\n---*/\n\nfunction __consolePrintHandle__(msg) {\n  print(msg);\n}\n\nfunction $DONE(error) {\n  if (error) {\n    if(typeof error === 'object' && error !== null && 'name' in error) {\n      __consolePrintHandle__('Test262:AsyncTestFailure:' + error.name + ': ' + error.message);\n    } else {\n      __consolePrintHandle__('Test262:AsyncTestFailure:Test262Error: ' + String(error));\n    }\n  } else {\n    __consolePrintHandle__('Test262:AsyncTestComplete');\n  }\n}\n",
  "fnGlobalObject.js": "// Copyright (C) 2017 Ecma International.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Produce a reliable global object\ndefines: [fnGlobalObject]\n---*/\n\nvar __globalObject = Function(\"return this;\")();\nfunction fnGlobalObject() {\n  return __globalObject;\n}\n",
  "isConstructor.js": "// Copyright (C) 2017 André Bargull. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n\n/*---\ndescription: |\n    Test if a given function is a constructor function.\ndefines: [isConstructor]\nfeatures: [Reflect.construct]\n---*/\n\nfunction isConstructor(f) {\n    if (typeof f !== \"function\") {\n      throw new Test262Error(\"isConstructor invoked with a non-function value\");\n    }\n\n    try {\n        Reflect.construct(function(){}, [], f);\n    } catch (e) {\n        return false;\n    }\n    return true;\n}\n",
  "iteratorZipUtils.js": "// Copyright (C) 2025 André Bargull.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Utility functions for testing Iterator.prototype.zip and Iterator.prototype.zipKeyed. Requires inclusion of propertyHelper.js.\ndefines:\n  - forEachSequenceCombination\n  - forEachSequenceCombinationKeyed\n  - assertZipped\n  - assertZippedKeyed\n  - assertIteratorResult\n  - assertIsPackedArray\n---*/\n\n// Assert |result| is an object created by CreateIteratorResultObject.\nfunction assertIteratorResult(result, value, done, label) {\n  assert.sameValue(\n    Object.getPrototypeOf(result),\n    Object.prototype,\n    label + \": [[Prototype]] of iterator result is Object.prototype\"\n  );\n\n  assert(Object.isExtensible(result), label + \": iterator result is extensible\");\n\n  var ownKeys = Reflect.ownKeys(result);\n  assert.compareArray(ownKeys, [\"value\", \"done\"], label + \": iterator result properties\");\n\n  verifyProperty(result, \"value\", {\n    value: value,\n    writable: true,\n    enumerable: true,\n    configurable: true,\n  });\n\n  verifyProperty(result, \"done\", {\n    value: done,\n    writable: true,\n    enumerable: true,\n    configurable: true,\n  });\n}\n\n// Assert |array| is a packed array with default property attributes.\nfunction assertIsPackedArray(array, label) {\n  assert(Array.isArray(array), label + \": array is an array exotic object\");\n\n  assert.sameValue(\n    Object.getPrototypeOf(array),\n    Array.prototype,\n    label + \": [[Prototype]] of array is Array.prototype\"\n  );\n\n  assert(Object.isExtensible(array), label + \": array is extensible\");\n\n  // Ensure \"length\" property has its default property attributes.\n  verifyProperty(array, \"length\", {\n    writable: true,\n    enumerable: false,\n    configurable: false,\n  });\n\n  // Ensure no holes and all elements have the default property attributes.\n  for (var i = 0; i < array.length; i++) {\n    verifyProperty(array, i, {\n      writable: true,\n      enumerable: true,\n      configurable: true,\n    });\n  }\n}\n\n// Assert |array| is an extensible null-prototype object with default property attributes.\nfunction _assertIsNullProtoMutableObject(object, label) {\n  assert.sameValue(\n    Object.getPrototypeOf(object),\n    null,\n    label + \": [[Prototype]] of object is null\"\n  );\n\n  assert(Object.isExtensible(object), label + \": object is extensible\");\n\n  // Ensure all properties have the default property attributes.\n  var keys = Object.getOwnPropertyNames(object);\n  for (var i = 0; i < keys.length; i++) {\n    verifyProperty(object, keys[i], {\n      writable: true,\n      enumerable: true,\n      configurable: true,\n    });\n  }\n}\n\n// Assert that the `zipped` iterator yields the first `count` outputs of Iterator.zip.\n// Assumes `inputs` is an array of arrays, each with length >= `count`.\n// Advances `zipped` by `count` steps.\nfunction assertZipped(zipped, inputs, count, label) {\n  // Last returned elements array.\n  var last = null;\n\n  for (var i = 0; i < count; i++) {\n    var itemLabel = label + \", step \" + i;\n\n    var result = zipped.next();\n    var value = result.value;\n\n    // Test IteratorResult structure.\n    assertIteratorResult(result, value, false, itemLabel);\n\n    // Ensure value is a new array.\n    assert.notSameValue(value, last, itemLabel + \": returns a new array\");\n    last = value;\n\n    // Ensure all array elements have the expected value.\n    var expected = inputs.map(function (array) {\n      return array[i];\n    });\n    assert.compareArray(value, expected, itemLabel + \": values\");\n\n    // Ensure value is a packed array with default data properties.\n    assertIsPackedArray(value, itemLabel);\n  }\n}\n\n// Assert that the `zipped` iterator yields the first `count` outputs of Iterator.zipKeyed.\n// Assumes `inputs` is an object whose values are arrays, each with length >= `count`.\n// Advances `zipped` by `count` steps.\nfunction assertZippedKeyed(zipped, inputs, count, label) {\n  // Last returned elements array.\n  var last = null;\n\n  var expectedKeys = Object.keys(inputs);\n\n  for (var i = 0; i < count; i++) {\n    var itemLabel = label + \", step \" + i;\n\n    var result = zipped.next();\n    var value = result.value;\n\n    // Test IteratorResult structure.\n    assertIteratorResult(result, value, false, itemLabel);\n\n    // Ensure resulting object is a new object.\n    assert.notSameValue(value, last, itemLabel + \": returns a new object\");\n    last = value;\n\n    // Ensure resulting object has the expected keys and values.\n    assert.compareArray(Reflect.ownKeys(value), expectedKeys, itemLabel + \": result object keys\");\n\n    var expectedValues = Object.values(inputs).map(function (array) {\n      return array[i];\n    });\n    assert.compareArray(Object.values(value), expectedValues, itemLabel + \": result object values\");\n\n    // Ensure resulting object is a null-prototype mutable object with default data properties.\n    _assertIsNullProtoMutableObject(value, itemLabel);\n  }\n}\n\nfunction forEachSequenceCombinationKeyed(callback) {\n  return forEachSequenceCombination(function(inputs, inputsLabel, min, max) {\n    var object = {};\n    for (var i = 0; i < inputs.length; ++i) {\n      object[\"prop_\" + i] = inputs[i];\n    }\n    inputsLabel = \"inputs = \" + JSON.stringify(object);\n    callback(object, inputsLabel, min, max);\n  });\n}\n\nfunction forEachSequenceCombination(callback) {\n  function test(inputs) {\n    if (inputs.length === 0) {\n      callback(inputs, \"inputs = []\", 0, 0);\n      return;\n    }\n\n    var lengths = inputs.map(function(array) {\n      return array.length;\n    });\n\n    var min = Math.min.apply(null, lengths);\n    var max = Math.max.apply(null, lengths);\n\n    var inputsLabel = \"inputs = \" + JSON.stringify(inputs);\n\n    callback(inputs, inputsLabel, min, max);\n  }\n\n  // Yield all prefixes of the string |s|.\n  function* prefixes(s) {\n    for (var i = 0; i <= s.length; ++i) {\n      yield s.slice(0, i);\n    }\n  }\n\n  // Zip an empty iterable.\n  test([]);\n\n  // Zip a single iterator.\n  for (var prefix of prefixes(\"abcd\")) {\n    test([prefix.split(\"\")]);\n  }\n\n  // Zip two iterators.\n  for (var prefix1 of prefixes(\"abcd\")) {\n    for (var prefix2 of prefixes(\"efgh\")) {\n      test([prefix1.split(\"\"), prefix2.split(\"\")]);\n    }\n  }\n\n  // Zip three iterators.\n  for (var prefix1 of prefixes(\"abcd\")) {\n    for (var prefix2 of prefixes(\"efgh\")) {\n      for (var prefix3 of prefixes(\"ijkl\")) {\n        test([prefix1.split(\"\"), prefix2.split(\"\"), prefix3.split(\"\")]);\n      }\n    }\n  }\n}\n",
  "nans.js": "// Copyright (C) 2016 the V8 project authors.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    A collection of NaN values produced from expressions that have been observed\n    to create distinct bit representations on various platforms. These provide a\n    weak basis for assertions regarding the consistent canonicalization of NaN\n    values in Array buffers.\ndefines: [NaNs]\n---*/\n\nvar NaNs = [\n  NaN,\n  Number.NaN,\n  NaN * 0,\n  0/0,\n  Infinity/Infinity,\n  -(0/0),\n  Math.pow(-1, 0.5),\n  -Math.pow(-1, 0.5),\n  Number(\"Not-a-Number\"),\n];\n",
  "nativeFunctionMatcher.js": "// Copyright (C) 2016 Michael Ficarra.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: Assert _NativeFunction_ Syntax\ninfo: |\n    NativeFunction :\n      function _NativeFunctionAccessor_ opt _IdentifierName_ opt ( _FormalParameters_ ) { [ native code ] }\n    NativeFunctionAccessor :\n      get\n      set\ndefines:\n  - assertToStringOrNativeFunction\n  - assertNativeFunction\n  - validateNativeFunctionSource\n---*/\n\nconst validateNativeFunctionSource = function(source) {\n  // These regexes should be kept up to date with Unicode using `regexpu-core`.\n  // `/\\p{ID_Start}/u`\n  const UnicodeIDStart = /(?:[A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7BF\\uA7C2-\\uA7CA\\uA7F5-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF2D-\\uDF4A\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD23\\uDE80-\\uDEA9\\uDEB0\\uDEB1\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF45\\uDFB0-\\uDFC4\\uDFE0-\\uDFF6]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD44\\uDD47\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC5F-\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDEB8\\uDF00-\\uDF1A]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82C[\\uDC00-\\uDD1E\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD838[\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD4E\\uDEC0-\\uDEEB]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43\\uDD4B]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDEDD\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A])/;\n  // `/\\p{ID_Continue}/u`\n  const UnicodeIDContinue = /(?:[0-9A-Z_a-z\\xAA\\xB5\\xB7\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u07FD\\u0800-\\u082D\\u0840-\\u085B\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u08D3-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u09FC\\u09FE\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0AF9-\\u0AFF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58-\\u0C5A\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C80-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D00-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D54-\\u0D57\\u0D5F-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D81-\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1878\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1ABF\\u1AC0\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CD0-\\u1CD2\\u1CD4-\\u1CFA\\u1D00-\\u1DF9\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7BF\\uA7C2-\\uA7CA\\uA7F5-\\uA827\\uA82C\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDDFD\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDEE0\\uDF00-\\uDF1F\\uDF2D-\\uDF4A\\uDF50-\\uDF7A\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCA0-\\uDCA9\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE38-\\uDE3A\\uDE3F\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE6\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD27\\uDD30-\\uDD39\\uDE80-\\uDEA9\\uDEAB\\uDEAC\\uDEB0\\uDEB1\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF50\\uDFB0-\\uDFC4\\uDFE0-\\uDFF6]|\\uD804[\\uDC00-\\uDC46\\uDC66-\\uDC6F\\uDC7F-\\uDCBA\\uDCD0-\\uDCE8\\uDCF0-\\uDCF9\\uDD00-\\uDD34\\uDD36-\\uDD3F\\uDD44-\\uDD47\\uDD50-\\uDD73\\uDD76\\uDD80-\\uDDC4\\uDDC9-\\uDDCC\\uDDCE-\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE37\\uDE3E\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEEA\\uDEF0-\\uDEF9\\uDF00-\\uDF03\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3B-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF50\\uDF57\\uDF5D-\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC00-\\uDC4A\\uDC50-\\uDC59\\uDC5E-\\uDC61\\uDC80-\\uDCC5\\uDCC7\\uDCD0-\\uDCD9\\uDD80-\\uDDB5\\uDDB8-\\uDDC0\\uDDD8-\\uDDDD\\uDE00-\\uDE40\\uDE44\\uDE50-\\uDE59\\uDE80-\\uDEB8\\uDEC0-\\uDEC9\\uDF00-\\uDF1A\\uDF1D-\\uDF2B\\uDF30-\\uDF39]|\\uD806[\\uDC00-\\uDC3A\\uDCA0-\\uDCE9\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD35\\uDD37\\uDD38\\uDD3B-\\uDD43\\uDD50-\\uDD59\\uDDA0-\\uDDA7\\uDDAA-\\uDDD7\\uDDDA-\\uDDE1\\uDDE3\\uDDE4\\uDE00-\\uDE3E\\uDE47\\uDE50-\\uDE99\\uDE9D\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC36\\uDC38-\\uDC40\\uDC50-\\uDC59\\uDC72-\\uDC8F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD47\\uDD50-\\uDD59\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD8E\\uDD90\\uDD91\\uDD93-\\uDD98\\uDDA0-\\uDDA9\\uDEE0-\\uDEF6\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF4F-\\uDF87\\uDF8F-\\uDF9F\\uDFE0\\uDFE1\\uDFE3\\uDFE4\\uDFF0\\uDFF1]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82C[\\uDC00-\\uDD1E\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A\\uDD00-\\uDD2C\\uDD30-\\uDD3D\\uDD40-\\uDD49\\uDD4E\\uDEC0-\\uDEF9]|\\uD83A[\\uDC00-\\uDCC4\\uDCD0-\\uDCD6\\uDD00-\\uDD4B\\uDD50-\\uDD59]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD83E[\\uDFF0-\\uDFF9]|\\uD869[\\uDC00-\\uDEDD\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A]|\\uDB40[\\uDD00-\\uDDEF])/;\n  // `/\\p{Space_Separator}/u`\n  const UnicodeSpaceSeparator = /[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/;\n\n  const isNewline = (c) => /[\\u000A\\u000D\\u2028\\u2029]/.test(c);\n  const isWhitespace = (c) => /[\\u0009\\u000B\\u000C\\u0020\\u00A0\\uFEFF]/.test(c) || UnicodeSpaceSeparator.test(c);\n\n  let pos = 0;\n\n  const eatWhitespace = () => {\n    while (pos < source.length) {\n      const c = source[pos];\n      if (isWhitespace(c) || isNewline(c)) {\n        pos += 1;\n        continue;\n      }\n\n      if (c === '/') {\n        if (source[pos + 1] === '/') {\n          while (pos < source.length) {\n            if (isNewline(source[pos])) {\n              break;\n            }\n            pos += 1;\n          }\n          continue;\n        }\n        if (source[pos + 1] === '*') {\n          const end = source.indexOf('*/', pos);\n          if (end === -1) {\n            throw new SyntaxError();\n          }\n          pos = end + '*/'.length;\n          continue;\n        }\n      }\n\n      break;\n    }\n  };\n\n  const getIdentifier = () => {\n    eatWhitespace();\n\n    const start = pos;\n    let end = pos;\n    switch (source[end]) {\n      case '_':\n      case '$':\n        end += 1;\n        break;\n      default:\n        if (UnicodeIDStart.test(source[end])) {\n          end += 1;\n          break;\n        }\n        return null;\n    }\n    while (end < source.length) {\n      const c = source[end];\n      switch (c) {\n        case '_':\n        case '$':\n          end += 1;\n          break;\n        default:\n          if (UnicodeIDContinue.test(c)) {\n            end += 1;\n            break;\n          }\n          return source.slice(start, end);\n      }\n    }\n    return source.slice(start, end);\n  };\n\n  const test = (s) => {\n    eatWhitespace();\n\n    if (/\\w/.test(s)) {\n      return getIdentifier() === s;\n    }\n    return source.slice(pos, pos + s.length) === s;\n  };\n\n  const eat = (s) => {\n    if (test(s)) {\n      pos += s.length;\n      return true;\n    }\n    return false;\n  };\n\n  const eatIdentifier = () => {\n    const n = getIdentifier();\n    if (n !== null) {\n      pos += n.length;\n      return true;\n    }\n    return false;\n  };\n\n  const expect = (s) => {\n    if (!eat(s)) {\n      throw new SyntaxError();\n    }\n  };\n\n  const eatString = () => {\n    if (source[pos] === '\\'' || source[pos] === '\"') {\n      const match = source[pos];\n      pos += 1;\n      while (pos < source.length) {\n        if (source[pos] === match && source[pos - 1] !== '\\\\') {\n          return;\n        }\n        if (isNewline(source[pos])) {\n          throw new SyntaxError();\n        }\n        pos += 1;\n      }\n      throw new SyntaxError();\n    }\n  };\n\n  // \"Stumble\" through source text until matching character is found.\n  // Assumes ECMAScript syntax keeps `[]` and `()` balanced.\n  const stumbleUntil = (c) => {\n    const match = {\n      ']': '[',\n      ')': '(',\n    }[c];\n    let nesting = 1;\n    while (pos < source.length) {\n      eatWhitespace();\n      eatString(); // Strings may contain unbalanced characters.\n      if (source[pos] === match) {\n        nesting += 1;\n      } else if (source[pos] === c) {\n        nesting -= 1;\n      }\n      pos += 1;\n      if (nesting === 0) {\n        return;\n      }\n    }\n    throw new SyntaxError();\n  };\n\n  // function\n  expect('function');\n\n  // NativeFunctionAccessor\n  eat('get') || eat('set');\n\n  // PropertyName\n  if (!eatIdentifier() && eat('[')) {\n    stumbleUntil(']');\n  }\n\n  // ( FormalParameters )\n  expect('(');\n  stumbleUntil(')');\n\n  // {\n  expect('{');\n\n  // [native code]\n  expect('[');\n  expect('native');\n  expect('code');\n  expect(']');\n\n  // }\n  expect('}');\n\n  eatWhitespace();\n  if (pos !== source.length) {\n    throw new SyntaxError();\n  }\n};\n\nconst assertToStringOrNativeFunction = function(fn, expected) {\n  const actual = \"\" + fn;\n  try {\n    assert.sameValue(actual, expected);\n  } catch (unused) {\n    assertNativeFunction(fn, expected);\n  }\n};\n\nconst assertNativeFunction = function(fn, special) {\n  const actual = \"\" + fn;\n  try {\n    validateNativeFunctionSource(actual);\n  } catch (unused) {\n    throw new Test262Error('Conforms to NativeFunction Syntax: ' + JSON.stringify(actual) + (special ? ' (' + special + ')' : ''));\n  }\n};\n",
  "promiseHelper.js": "// Copyright (C) 2017 Ecma International.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Check that an array contains a numeric sequence starting at 1\n    and incrementing by 1 for each entry in the array. Used by\n    Promise tests to assert the order of execution in deep Promise\n    resolution pipelines.\ndefines: [checkSequence, checkSettledPromises]\n---*/\n\nfunction checkSequence(arr, message) {\n  arr.forEach(function(e, i) {\n    if (e !== (i+1)) {\n      throw new Test262Error((message ? message : \"Steps in unexpected sequence:\") +\n             \" '\" + arr.join(',') + \"'\");\n    }\n  });\n\n  return true;\n}\n\nfunction checkSettledPromises(settleds, expected, message) {\n  const prefix = message ? `${message}: ` : '';\n\n  assert.sameValue(Array.isArray(settleds), true, `${prefix}Settled values is an array`);\n\n  assert.sameValue(\n    settleds.length,\n    expected.length,\n    `${prefix}The settled values has a different length than expected`\n  );\n\n  settleds.forEach((settled, i) => {\n    assert.sameValue(\n      Object.prototype.hasOwnProperty.call(settled, 'status'),\n      true,\n      `${prefix}The settled value has a property status`\n    );\n\n    assert.sameValue(settled.status, expected[i].status, `${prefix}status for item ${i}`);\n\n    if (settled.status === 'fulfilled') {\n      assert.sameValue(\n        Object.prototype.hasOwnProperty.call(settled, 'value'),\n        true,\n        `${prefix}The fulfilled promise has a property named value`\n      );\n\n      assert.sameValue(\n        Object.prototype.hasOwnProperty.call(settled, 'reason'),\n        false,\n        `${prefix}The fulfilled promise has no property named reason`\n      );\n\n      assert.sameValue(settled.value, expected[i].value, `${prefix}value for item ${i}`);\n    } else {\n      assert.sameValue(settled.status, 'rejected', `${prefix}Valid statuses are only fulfilled or rejected`);\n\n      assert.sameValue(\n        Object.prototype.hasOwnProperty.call(settled, 'value'),\n        false,\n        `${prefix}The fulfilled promise has no property named value`\n      );\n\n      assert.sameValue(\n        Object.prototype.hasOwnProperty.call(settled, 'reason'),\n        true,\n        `${prefix}The fulfilled promise has a property named reason`\n      );\n\n      assert.sameValue(settled.reason, expected[i].reason, `${prefix}Reason value for item ${i}`);\n    }\n  });\n}\n",
  "propertyHelper.js": "// Copyright (C) 2017 Ecma International.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Collection of functions used to safely verify the correctness of\n    property descriptors.\ndefines:\n  - verifyProperty\n  - verifyCallableProperty\n  - verifyEqualTo # deprecated\n  - verifyWritable # deprecated\n  - verifyNotWritable # deprecated\n  - verifyEnumerable # deprecated\n  - verifyNotEnumerable # deprecated\n  - verifyConfigurable # deprecated\n  - verifyNotConfigurable # deprecated\n  - verifyPrimordialProperty\n  - verifyPrimordialCallableProperty\n---*/\n\n// @ts-check\n\n// Capture primordial functions and receiver-uncurried primordial methods that\n// are used in verification but might be destroyed *by* that process itself.\nvar __isArray = Array.isArray;\nvar __defineProperty = Object.defineProperty;\nvar __getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar __getOwnPropertyNames = Object.getOwnPropertyNames;\nvar __join = Function.prototype.call.bind(Array.prototype.join);\nvar __push = Function.prototype.call.bind(Array.prototype.push);\nvar __hasOwnProperty = Function.prototype.call.bind(Object.prototype.hasOwnProperty);\nvar __propertyIsEnumerable = Function.prototype.call.bind(Object.prototype.propertyIsEnumerable);\nvar nonIndexNumericPropertyName = Math.pow(2, 32) - 1;\n\n/**\n * @param {object} obj\n * @param {string|symbol} name\n * @param {PropertyDescriptor|undefined} desc\n * @param {object} [options]\n * @param {boolean} [options.restore] revert mutations from verifying writable/configurable\n */\nfunction verifyProperty(obj, name, desc, options) {\n  assert(\n    arguments.length > 2,\n    'verifyProperty should receive at least 3 arguments: obj, name, and descriptor'\n  );\n\n  var originalDesc = __getOwnPropertyDescriptor(obj, name);\n  var nameStr = String(name);\n\n  // Allows checking for undefined descriptor if it's explicitly given.\n  if (desc === undefined) {\n    assert.sameValue(\n      originalDesc,\n      undefined,\n      \"obj['\" + nameStr + \"'] descriptor should be undefined\"\n    );\n\n    // desc and originalDesc are both undefined, problem solved;\n    return true;\n  }\n\n  assert(\n    __hasOwnProperty(obj, name),\n    \"obj should have an own property \" + nameStr\n  );\n\n  assert.notSameValue(\n    desc,\n    null,\n    \"The desc argument should be an object or undefined, null\"\n  );\n\n  assert.sameValue(\n    typeof desc,\n    \"object\",\n    \"The desc argument should be an object or undefined, \" + String(desc)\n  );\n\n  var names = __getOwnPropertyNames(desc);\n  for (var i = 0; i < names.length; i++) {\n    assert(\n      names[i] === \"value\" ||\n        names[i] === \"writable\" ||\n        names[i] === \"enumerable\" ||\n        names[i] === \"configurable\" ||\n        names[i] === \"get\" ||\n        names[i] === \"set\",\n      \"Invalid descriptor field: \" + names[i],\n    );\n  }\n\n  var failures = [];\n\n  if (__hasOwnProperty(desc, 'value')) {\n    if (!isSameValue(desc.value, originalDesc.value)) {\n      __push(failures, \"obj['\" + nameStr + \"'] descriptor value should be \" + desc.value);\n    }\n    if (!isSameValue(desc.value, obj[name])) {\n      __push(failures, \"obj['\" + nameStr + \"'] value should be \" + desc.value);\n    }\n  }\n\n  if (__hasOwnProperty(desc, 'enumerable') && desc.enumerable !== undefined) {\n    if (desc.enumerable !== originalDesc.enumerable ||\n        desc.enumerable !== isEnumerable(obj, name)) {\n      __push(failures, \"obj['\" + nameStr + \"'] descriptor should \" + (desc.enumerable ? '' : 'not ') + \"be enumerable\");\n    }\n  }\n\n  // Operations past this point are potentially destructive!\n\n  if (__hasOwnProperty(desc, 'writable') && desc.writable !== undefined) {\n    if (desc.writable !== originalDesc.writable ||\n        desc.writable !== isWritable(obj, name)) {\n      __push(failures, \"obj['\" + nameStr + \"'] descriptor should \" + (desc.writable ? '' : 'not ') + \"be writable\");\n    }\n  }\n\n  if (__hasOwnProperty(desc, 'configurable') && desc.configurable !== undefined) {\n    if (desc.configurable !== originalDesc.configurable ||\n        desc.configurable !== isConfigurable(obj, name)) {\n      __push(failures, \"obj['\" + nameStr + \"'] descriptor should \" + (desc.configurable ? '' : 'not ') + \"be configurable\");\n    }\n  }\n\n  if (failures.length) {\n    assert(false, __join(failures, '; '));\n  }\n\n  if (options && options.restore) {\n    __defineProperty(obj, name, originalDesc);\n  }\n\n  return true;\n}\n\nfunction isConfigurable(obj, name) {\n  try {\n    delete obj[name];\n  } catch (e) {\n    if (!(e instanceof TypeError)) {\n      throw new Test262Error(\"Expected TypeError, got \" + e);\n    }\n  }\n  return !__hasOwnProperty(obj, name);\n}\n\nfunction isEnumerable(obj, name) {\n  var stringCheck = false;\n\n  if (typeof name === \"string\") {\n    for (var x in obj) {\n      if (x === name) {\n        stringCheck = true;\n        break;\n      }\n    }\n  } else {\n    // skip it if name is not string, works for Symbol names.\n    stringCheck = true;\n  }\n\n  return stringCheck && __hasOwnProperty(obj, name) && __propertyIsEnumerable(obj, name);\n}\n\nfunction isSameValue(a, b) {\n  if (a === 0 && b === 0) return 1 / a === 1 / b;\n  if (a !== a && b !== b) return true;\n\n  return a === b;\n}\n\nfunction isWritable(obj, name, verifyProp, value) {\n  var unlikelyValue = __isArray(obj) && name === \"length\" ?\n    nonIndexNumericPropertyName :\n    \"unlikelyValue\";\n  var newValue = value || unlikelyValue;\n  var hadValue = __hasOwnProperty(obj, name);\n  var oldValue = obj[name];\n  var writeSucceeded;\n\n  if (arguments.length < 4 && newValue === oldValue) {\n    newValue = newValue + \"2\";\n  }\n\n  try {\n    obj[name] = newValue;\n  } catch (e) {\n    if (!(e instanceof TypeError)) {\n      throw new Test262Error(\"Expected TypeError, got \" + e);\n    }\n  }\n\n  writeSucceeded = isSameValue(obj[verifyProp || name], newValue);\n\n  // Revert the change only if it was successful (in other cases, reverting\n  // is unnecessary and may trigger exceptions for certain property\n  // configurations)\n  if (writeSucceeded) {\n    if (hadValue) {\n      obj[name] = oldValue;\n    } else {\n      delete obj[name];\n    }\n  }\n\n  return writeSucceeded;\n}\n\n/**\n * Verify that there is a function of specified name, length, and containing\n * descriptor associated with `obj[name]` and following the conventions for\n * built-in objects.\n *\n * @param {object} obj\n * @param {string|symbol} name\n * @param {string} [functionName] defaults to name for strings, `[${name.description}]` for symbols\n * @param {number} functionLength\n * @param {PropertyDescriptor} [desc] defaults to data property conventions (writable, non-enumerable, configurable)\n * @param {object} [options]\n * @param {boolean} [options.restore] revert mutations from verifying writable/configurable\n */\nfunction verifyCallableProperty(obj, name, functionName, functionLength, desc, options) {\n  var value = obj[name];\n\n  assert.sameValue(typeof value, \"function\",\n    \"obj['\" + String(name) + \"'] descriptor should be a function\");\n\n  // Every other data property described in clauses 19 through 28 and in\n  // Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false,\n  // [[Configurable]]: true } unless otherwise specified.\n  // https://tc39.es/ecma262/multipage/ecmascript-standard-built-in-objects.html\n  if (desc === undefined) {\n    desc = {\n      writable: true,\n      enumerable: false,\n      configurable: true,\n      value: value\n    };\n  } else if (!__hasOwnProperty(desc, \"value\") && !__hasOwnProperty(desc, \"get\")) {\n    desc.value = value;\n  }\n\n  verifyProperty(obj, name, desc, options);\n\n  if (functionName === undefined) {\n    if (typeof name === \"symbol\") {\n      functionName = \"[\" + name.description + \"]\";\n    } else {\n      functionName = name;\n    }\n  }\n  // Unless otherwise specified, the \"name\" property of a built-in function\n  // object has the attributes { [[Writable]]: false, [[Enumerable]]: false,\n  // [[Configurable]]: true }.\n  // https://tc39.es/ecma262/multipage/ecmascript-standard-built-in-objects.html#sec-ecmascript-standard-built-in-objects\n  // https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-setfunctionname\n  verifyProperty(value, \"name\", {\n    value: functionName,\n    writable: false,\n    enumerable: false,\n    configurable: desc.configurable\n  }, options);\n\n  // Unless otherwise specified, the \"length\" property of a built-in function\n  // object has the attributes { [[Writable]]: false, [[Enumerable]]: false,\n  // [[Configurable]]: true }.\n  // https://tc39.es/ecma262/multipage/ecmascript-standard-built-in-objects.html#sec-ecmascript-standard-built-in-objects\n  // https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-setfunctionlength\n  verifyProperty(value, \"length\", {\n    value: functionLength,\n    writable: false,\n    enumerable: false,\n    configurable: desc.configurable\n  }, options);\n}\n\n/**\n * Deprecated; please use `verifyProperty` in new tests.\n */\nfunction verifyEqualTo(obj, name, value) {\n  if (!isSameValue(obj[name], value)) {\n    throw new Test262Error(\"Expected obj[\" + String(name) + \"] to equal \" + value +\n           \", actually \" + obj[name]);\n  }\n}\n\n/**\n * Deprecated; please use `verifyProperty` in new tests.\n */\nfunction verifyWritable(obj, name, verifyProp, value) {\n  if (!verifyProp) {\n    assert(__getOwnPropertyDescriptor(obj, name).writable,\n         \"Expected obj[\" + String(name) + \"] to have writable:true.\");\n  }\n  if (!isWritable(obj, name, verifyProp, value)) {\n    throw new Test262Error(\"Expected obj[\" + String(name) + \"] to be writable, but was not.\");\n  }\n}\n\n/**\n * Deprecated; please use `verifyProperty` in new tests.\n */\nfunction verifyNotWritable(obj, name, verifyProp, value) {\n  if (!verifyProp) {\n    assert(!__getOwnPropertyDescriptor(obj, name).writable,\n         \"Expected obj[\" + String(name) + \"] to have writable:false.\");\n  }\n  if (isWritable(obj, name, verifyProp)) {\n    throw new Test262Error(\"Expected obj[\" + String(name) + \"] NOT to be writable, but was.\");\n  }\n}\n\n/**\n * Deprecated; please use `verifyProperty` in new tests.\n */\nfunction verifyEnumerable(obj, name) {\n  assert(__getOwnPropertyDescriptor(obj, name).enumerable,\n       \"Expected obj[\" + String(name) + \"] to have enumerable:true.\");\n  if (!isEnumerable(obj, name)) {\n    throw new Test262Error(\"Expected obj[\" + String(name) + \"] to be enumerable, but was not.\");\n  }\n}\n\n/**\n * Deprecated; please use `verifyProperty` in new tests.\n */\nfunction verifyNotEnumerable(obj, name) {\n  assert(!__getOwnPropertyDescriptor(obj, name).enumerable,\n       \"Expected obj[\" + String(name) + \"] to have enumerable:false.\");\n  if (isEnumerable(obj, name)) {\n    throw new Test262Error(\"Expected obj[\" + String(name) + \"] NOT to be enumerable, but was.\");\n  }\n}\n\n/**\n * Deprecated; please use `verifyProperty` in new tests.\n */\nfunction verifyConfigurable(obj, name) {\n  assert(__getOwnPropertyDescriptor(obj, name).configurable,\n       \"Expected obj[\" + String(name) + \"] to have configurable:true.\");\n  if (!isConfigurable(obj, name)) {\n    throw new Test262Error(\"Expected obj[\" + String(name) + \"] to be configurable, but was not.\");\n  }\n}\n\n/**\n * Deprecated; please use `verifyProperty` in new tests.\n */\nfunction verifyNotConfigurable(obj, name) {\n  assert(!__getOwnPropertyDescriptor(obj, name).configurable,\n       \"Expected obj[\" + String(name) + \"] to have configurable:false.\");\n  if (isConfigurable(obj, name)) {\n    throw new Test262Error(\"Expected obj[\" + String(name) + \"] NOT to be configurable, but was.\");\n  }\n}\n\n/**\n * Use this function to verify the properties of a primordial object.\n * For non-primordial objects, use verifyProperty.\n * See: https://github.com/tc39/how-we-work/blob/main/terminology.md#primordial\n */\nvar verifyPrimordialProperty = verifyProperty;\n\n/**\n * Use this function to verify the primordial function-valued properties.\n * For non-primordial functions, use verifyCallableProperty.\n * See: https://github.com/tc39/how-we-work/blob/main/terminology.md#primordial\n */\nvar verifyPrimordialCallableProperty = verifyCallableProperty;\n",
  "proxyTrapsHelper.js": "// Copyright (C) 2016 Jordan Harband.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Used to assert the correctness of object behavior in the presence\n    and context of Proxy objects.\ndefines: [allowProxyTraps]\n---*/\n\nfunction allowProxyTraps(overrides) {\n  function throwTest262Error(msg) {\n    return function () { throw new Test262Error(msg); };\n  }\n  if (!overrides) { overrides = {}; }\n  return {\n    getPrototypeOf: overrides.getPrototypeOf || throwTest262Error('[[GetPrototypeOf]] trap called'),\n    setPrototypeOf: overrides.setPrototypeOf || throwTest262Error('[[SetPrototypeOf]] trap called'),\n    isExtensible: overrides.isExtensible || throwTest262Error('[[IsExtensible]] trap called'),\n    preventExtensions: overrides.preventExtensions || throwTest262Error('[[PreventExtensions]] trap called'),\n    getOwnPropertyDescriptor: overrides.getOwnPropertyDescriptor || throwTest262Error('[[GetOwnProperty]] trap called'),\n    has: overrides.has || throwTest262Error('[[HasProperty]] trap called'),\n    get: overrides.get || throwTest262Error('[[Get]] trap called'),\n    set: overrides.set || throwTest262Error('[[Set]] trap called'),\n    deleteProperty: overrides.deleteProperty || throwTest262Error('[[Delete]] trap called'),\n    defineProperty: overrides.defineProperty || throwTest262Error('[[DefineOwnProperty]] trap called'),\n    enumerate: throwTest262Error('[[Enumerate]] trap called: this trap has been removed'),\n    ownKeys: overrides.ownKeys || throwTest262Error('[[OwnPropertyKeys]] trap called'),\n    apply: overrides.apply || throwTest262Error('[[Call]] trap called'),\n    construct: overrides.construct || throwTest262Error('[[Construct]] trap called')\n  };\n}\n",
  "regExpUtils.js": "// Copyright (C) 2017 Mathias Bynens.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Collection of functions used to assert the correctness of RegExp objects.\ndefines: [buildString, testPropertyEscapes, testPropertyOfStrings, testExtendedCharacterClass, matchValidator]\n---*/\n\nfunction buildString(args) {\n  // Use member expressions rather than destructuring `args` for improved\n  // compatibility with engines that only implement assignment patterns\n  // partially or not at all.\n  const loneCodePoints = args.loneCodePoints;\n  const ranges = args.ranges;\n  const CHUNK_SIZE = 10000;\n  let result = String.fromCodePoint.apply(null, loneCodePoints);\n  for (let i = 0; i < ranges.length; i++) {\n    let range = ranges[i];\n    let start = range[0];\n    let end = range[1];\n    let codePoints = [];\n    for (let length = 0, codePoint = start; codePoint <= end; codePoint++) {\n      codePoints[length++] = codePoint;\n      if (length === CHUNK_SIZE) {\n        result += String.fromCodePoint.apply(null, codePoints);\n        codePoints.length = length = 0;\n      }\n    }\n    result += String.fromCodePoint.apply(null, codePoints);\n  }\n  return result;\n}\n\nfunction printCodePoint(codePoint) {\n  const hex = codePoint\n    .toString(16)\n    .toUpperCase()\n    .padStart(6, \"0\");\n  return `U+${hex}`;\n}\n\nfunction printStringCodePoints(string) {\n  const buf = [];\n  for (let symbol of string) {\n    let formatted = printCodePoint(symbol.codePointAt(0));\n    buf.push(formatted);\n  }\n  return buf.join(' ');\n}\n\nfunction testPropertyEscapes(regExp, string, expression) {\n  if (!regExp.test(string)) {\n    for (let symbol of string) {\n      let formatted = printCodePoint(symbol.codePointAt(0));\n      assert(\n        regExp.test(symbol),\n        `\\`${ expression }\\` should match ${ formatted } (\\`${ symbol }\\`)`\n      );\n    }\n  }\n}\n\nfunction testPropertyOfStrings(args) {\n  // Use member expressions rather than destructuring `args` for improved\n  // compatibility with engines that only implement assignment patterns\n  // partially or not at all.\n  const regExp = args.regExp;\n  const expression = args.expression;\n  const matchStrings = args.matchStrings;\n  const nonMatchStrings = args.nonMatchStrings;\n  const allStrings = matchStrings.join('');\n  if (!regExp.test(allStrings)) {\n    for (let string of matchStrings) {\n      assert(\n        regExp.test(string),\n        `\\`${ expression }\\` should match ${ string } (${ printStringCodePoints(string) })`\n      );\n    }\n  }\n\n  if (!nonMatchStrings) return;\n\n  const allNonMatchStrings = nonMatchStrings.join('');\n  if (regExp.test(allNonMatchStrings)) {\n    for (let string of nonMatchStrings) {\n      assert(\n        !regExp.test(string),\n        `\\`${ expression }\\` should not match ${ string } (${ printStringCodePoints(string) })`\n      );\n    }\n  }\n}\n\n// The exact same logic can be used to test extended character classes\n// as enabled through the RegExp `v` flag. This is useful to test not\n// just standalone properties of strings, but also string literals, and\n// set operations.\nconst testExtendedCharacterClass = testPropertyOfStrings;\n\n// Returns a function that validates a RegExp match result.\n//\n// Example:\n//\n//    var validate = matchValidator(['b'], 1, 'abc');\n//    validate(/b/.exec('abc'));\n//\nfunction matchValidator(expectedEntries, expectedIndex, expectedInput) {\n  return function(match) {\n    assert.compareArray(match, expectedEntries, 'Match entries');\n    assert.sameValue(match.index, expectedIndex, 'Match index');\n    assert.sameValue(match.input, expectedInput, 'Match input');\n  }\n}\n",
  "resizableArrayBufferUtils.js": "// Copyright 2023 the V8 project authors. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n\n/*---\ndescription: |\n    Collection of helper constants and functions for testing resizable array buffers.\ndefines:\n  - floatCtors\n  - ctors\n  - MyBigInt64Array\n  - CreateResizableArrayBuffer\n  - MayNeedBigInt\n  - Convert\n  - ToNumbers\n  - CreateRabForTest\n  - CollectValuesAndResize\n  - TestIterationAndResize\nfeatures: [BigInt]\n---*/\n// Helper to create subclasses without bombing out when `class` isn't supported\nfunction subClass(type) {\n  try {\n    return new Function('return class My' + type + ' extends ' + type + ' {}')();\n  } catch (e) {}\n}\n\nconst MyUint8Array = subClass('Uint8Array');\nconst MyFloat32Array = subClass('Float32Array');\nconst MyBigInt64Array = subClass('BigInt64Array');\n\nconst builtinCtors = [\n  Uint8Array,\n  Int8Array,\n  Uint16Array,\n  Int16Array,\n  Uint32Array,\n  Int32Array,\n  Float32Array,\n  Float64Array,\n  Uint8ClampedArray,\n];\n\n// Big(U)int64Array and Float16Array are newer features adding them above unconditionally\n// would cause implementations lacking it to fail every test which uses it.\nif (typeof Float16Array !== 'undefined') {\n  builtinCtors.push(Float16Array);\n}\n\nif (typeof BigUint64Array !== 'undefined') {\n  builtinCtors.push(BigUint64Array);\n}\n\nif (typeof BigInt64Array !== 'undefined') {\n  builtinCtors.push(BigInt64Array);\n}\n\nconst floatCtors = [\n  Float32Array,\n  Float64Array,\n  MyFloat32Array\n];\n\nif (typeof Float16Array !== 'undefined') {\n  floatCtors.push(Float16Array);\n}\n\nconst ctors = builtinCtors.concat(MyUint8Array, MyFloat32Array);\n\nif (typeof MyBigInt64Array !== 'undefined') {\n    ctors.push(MyBigInt64Array);\n}\n\nfunction CreateResizableArrayBuffer(byteLength, maxByteLength) {\n  return new ArrayBuffer(byteLength, { maxByteLength: maxByteLength });\n}\n\nfunction Convert(item) {\n  if (typeof item == 'bigint') {\n    return Number(item);\n  }\n  return item;\n}\n\nfunction ToNumbers(array) {\n  let result = [];\n  for (let i = 0; i < array.length; i++) {\n    let item = array[i];\n    result.push(Convert(item));\n  }\n  return result;\n}\n\nfunction MayNeedBigInt(ta, n) {\n  assert.sameValue(typeof n, 'number');\n  if ((BigInt64Array !== 'undefined' && ta instanceof BigInt64Array)\n      || (BigUint64Array !== 'undefined' && ta instanceof BigUint64Array)) {\n    return BigInt(n);\n  }\n  return n;\n}\n\nfunction CreateRabForTest(ctor) {\n  const rab = CreateResizableArrayBuffer(4 * ctor.BYTES_PER_ELEMENT, 8 * ctor.BYTES_PER_ELEMENT);\n  // Write some data into the array.\n  const taWrite = new ctor(rab);\n  for (let i = 0; i < 4; ++i) {\n    taWrite[i] = MayNeedBigInt(taWrite, 2 * i);\n  }\n  return rab;\n}\n\nfunction CollectValuesAndResize(n, values, rab, resizeAfter, resizeTo) {\n  if (typeof n == 'bigint') {\n    values.push(Number(n));\n  } else {\n    values.push(n);\n  }\n  if (values.length == resizeAfter) {\n    rab.resize(resizeTo);\n  }\n  return true;\n}\n\nfunction TestIterationAndResize(iterable, expected, rab, resizeAfter, newByteLength) {\n  let values = [];\n  let resized = false;\n  var arrayValues = false;\n\n  for (let value of iterable) {\n    if (Array.isArray(value)) {\n      arrayValues = true;\n      values.push([\n        value[0],\n        Number(value[1])\n      ]);\n    } else {\n      values.push(Number(value));\n    }\n    if (!resized && values.length == resizeAfter) {\n      rab.resize(newByteLength);\n      resized = true;\n    }\n  }\n  if (!arrayValues) {\n      assert.compareArray([].concat(values), expected, \"TestIterationAndResize: list of iterated values\");\n  } else {\n    for (let i = 0; i < expected.length; i++) {\n      assert.compareArray(values[i], expected[i], \"TestIterationAndResize: list of iterated lists of values\");\n    }\n  }\n  assert(resized, \"TestIterationAndResize: resize condition should have been hit\");\n}\n",
  "sta.js": "// Copyright (c) 2012 Ecma International.  All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Provides both:\n\n    - An error class to avoid false positives when testing for thrown exceptions\n    - A function to explicitly throw an exception using the Test262Error class\ndefines: [Test262Error, $DONOTEVALUATE]\n---*/\n\n\nclass Test262Error extends Error {}\n\nTest262Error.prototype.toString = function () {\n  return \"Test262Error: \" + this.message;\n};\n\nTest262Error.thrower = function (message) {\n  throw new Test262Error(message);\n};\n\nfunction $DONOTEVALUATE() {\n  throw \"Test262: This statement should not be evaluated.\";\n}\n",
  "tcoHelper.js": "// Copyright (C) 2016 the V8 project authors. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    This defines the number of consecutive recursive function calls that must be\n    made in order to prove that stack frames are properly destroyed according to\n    ES2015 tail call optimization semantics.\ndefines: [$MAX_ITERATIONS]\n---*/\n\n\n\n\nvar $MAX_ITERATIONS = 100000;\n",
  "temporalHelpers.js": "// Copyright (C) 2021 Igalia, S.L. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    This defines helper objects and functions for testing Temporal.\ndefines: [TemporalHelpers]\nfeatures: [Symbol.species, Symbol.iterator, Temporal]\n---*/\n\nconst ASCII_IDENTIFIER = /^[$_a-zA-Z][$_a-zA-Z0-9]*$/u;\n\nfunction formatPropertyName(propertyKey, objectName = \"\") {\n  switch (typeof propertyKey) {\n    case \"symbol\":\n      if (Symbol.keyFor(propertyKey) !== undefined) {\n        return `${objectName}[Symbol.for('${Symbol.keyFor(propertyKey)}')]`;\n      } else if (propertyKey.description.startsWith(\"Symbol.\")) {\n        return `${objectName}[${propertyKey.description}]`;\n      } else {\n        return `${objectName}[Symbol('${propertyKey.description}')]`;\n      }\n    case \"string\":\n      if (propertyKey !== String(Number(propertyKey))) {\n        if (ASCII_IDENTIFIER.test(propertyKey)) {\n          return objectName ? `${objectName}.${propertyKey}` : propertyKey;\n        }\n        return `${objectName}['${propertyKey.replace(/'/g, \"\\\\'\")}']`;\n      }\n      // fall through\n    default:\n      // integer or string integer-index\n      return `${objectName}[${propertyKey}]`;\n  }\n}\n\nconst SKIP_SYMBOL = Symbol(\"Skip\");\n\nvar TemporalHelpers = {\n  /*\n   * Codes and maximum lengths of months in the ISO 8601 calendar.\n   */\n  ISOMonths: [\n    { month: 1, monthCode: \"M01\", daysInMonth: 31 },\n    { month: 2, monthCode: \"M02\", daysInMonth: 29 },\n    { month: 3, monthCode: \"M03\", daysInMonth: 31 },\n    { month: 4, monthCode: \"M04\", daysInMonth: 30 },\n    { month: 5, monthCode: \"M05\", daysInMonth: 31 },\n    { month: 6, monthCode: \"M06\", daysInMonth: 30 },\n    { month: 7, monthCode: \"M07\", daysInMonth: 31 },\n    { month: 8, monthCode: \"M08\", daysInMonth: 31 },\n    { month: 9, monthCode: \"M09\", daysInMonth: 30 },\n    { month: 10, monthCode: \"M10\", daysInMonth: 31 },\n    { month: 11, monthCode: \"M11\", daysInMonth: 30 },\n    { month: 12, monthCode: \"M12\", daysInMonth: 31 }\n  ],\n\n  /*\n   * List of known calendar eras and their possible aliases.\n   *\n   * https://tc39.es/proposal-intl-era-monthcode/#table-eras\n   */\n  CalendarEras: {\n    buddhist: [\n      { era: \"be\" },\n    ],\n    coptic: [\n      { era: \"am\" },\n    ],\n    ethiopic: [\n      { era: \"aa\" },\n      { era: \"am\" },\n    ],\n    ethioaa: [\n      { era: \"aa\" },\n    ],\n    gregory: [\n      { era: \"bce\", aliases: [\"bc\"] },\n      { era: \"ce\", aliases: [\"ad\"] },\n    ],\n    hebrew: [\n      { era: \"am\" },\n    ],\n    indian: [\n      { era: \"shaka\" },\n    ],\n    \"islamic-civil\": [\n      { era: \"bh\" },\n      { era: \"ah\" },\n    ],\n    \"islamic-tbla\": [\n      { era: \"bh\" },\n      { era: \"ah\" },\n    ],\n    \"islamic-umalqura\": [\n      { era: \"bh\" },\n      { era: \"ah\" },\n    ],\n    japanese: [\n      { era: \"bce\", aliases: [\"bc\"] },\n      { era: \"ce\", aliases: [\"ad\"] },\n      { era: \"heisei\" },\n      { era: \"meiji\" },\n      { era: \"reiwa\" },\n      { era: \"showa\" },\n      { era: \"taisho\" },\n    ],\n    persian: [\n      { era: \"ap\" },\n    ],\n    roc: [\n      { era: \"roc\" },\n      { era: \"broc\" },\n    ],\n  },\n\n  /*\n   * Return the canonical era code.\n   */\n  canonicalizeCalendarEra(calendarId, eraName) {\n    assert.sameValue(typeof calendarId, \"string\", \"calendar must be string in canonicalizeCalendarEra\");\n\n    if (!Object.prototype.hasOwnProperty.call(TemporalHelpers.CalendarEras, calendarId)) {\n      assert.sameValue(eraName, undefined);\n      return undefined;\n    }\n\n    assert.sameValue(typeof eraName, \"string\", \"eraName must be string or undefined in canonicalizeCalendarEra\");\n\n    for (let {era, aliases = []} of TemporalHelpers.CalendarEras[calendarId]) {\n      if (era === eraName || aliases.includes(eraName)) {\n        return era;\n      }\n    }\n    throw new Test262Error(`Unsupported era name: ${eraName}`);\n  },\n\n  /*\n   * assertDuration(duration, years, ...,  nanoseconds[, description]):\n   *\n   * Shorthand for asserting that each field of a Temporal.Duration is equal to\n   * an expected value.\n   */\n  assertDuration(duration, years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds, description = \"\") {\n    const prefix = description ? `${description}: ` : \"\";\n    assert(duration instanceof Temporal.Duration, `${prefix}instanceof`);\n    assert.sameValue(duration.years, years, `${prefix}years result:`);\n    assert.sameValue(duration.months, months, `${prefix}months result:`);\n    assert.sameValue(duration.weeks, weeks, `${prefix}weeks result:`);\n    assert.sameValue(duration.days, days, `${prefix}days result:`);\n    assert.sameValue(duration.hours, hours, `${prefix}hours result:`);\n    assert.sameValue(duration.minutes, minutes, `${prefix}minutes result:`);\n    assert.sameValue(duration.seconds, seconds, `${prefix}seconds result:`);\n    assert.sameValue(duration.milliseconds, milliseconds, `${prefix}milliseconds result:`);\n    assert.sameValue(duration.microseconds, microseconds, `${prefix}microseconds result:`);\n    assert.sameValue(duration.nanoseconds, nanoseconds, `${prefix}nanoseconds result`);\n  },\n\n  /*\n   * assertDateDuration(duration, years, months, weeks, days, [, description]):\n   *\n   * Shorthand for asserting that each date field of a Temporal.Duration is\n   * equal to an expected value.\n   */\n  assertDateDuration(duration, years, months, weeks, days, description = \"\") {\n    const prefix = description ? `${description}: ` : \"\";\n    assert(duration instanceof Temporal.Duration, `${prefix}instanceof`);\n    assert.sameValue(duration.years, years, `${prefix}years result:`);\n    assert.sameValue(duration.months, months, `${prefix}months result:`);\n    assert.sameValue(duration.weeks, weeks, `${prefix}weeks result:`);\n    assert.sameValue(duration.days, days, `${prefix}days result:`);\n    assert.sameValue(duration.hours, 0, `${prefix}hours result should be zero:`);\n    assert.sameValue(duration.minutes, 0, `${prefix}minutes result should be zero:`);\n    assert.sameValue(duration.seconds, 0, `${prefix}seconds result should be zero:`);\n    assert.sameValue(duration.milliseconds, 0, `${prefix}milliseconds result should be zero:`);\n    assert.sameValue(duration.microseconds, 0, `${prefix}microseconds result should be zero:`);\n    assert.sameValue(duration.nanoseconds, 0, `${prefix}nanoseconds result should be zero:`);\n  },\n\n  /*\n   * assertDurationsEqual(actual, expected[, description]):\n   *\n   * Shorthand for asserting that each field of a Temporal.Duration is equal to\n   * the corresponding field in another Temporal.Duration.\n   */\n  assertDurationsEqual(actual, expected, description = \"\") {\n    const prefix = description ? `${description}: ` : \"\";\n    assert(expected instanceof Temporal.Duration, `${prefix}expected value should be a Temporal.Duration`);\n    TemporalHelpers.assertDuration(actual, expected.years, expected.months, expected.weeks, expected.days, expected.hours, expected.minutes, expected.seconds, expected.milliseconds, expected.microseconds, expected.nanoseconds, description);\n  },\n\n  /*\n   * assertInstantsEqual(actual, expected[, description]):\n   *\n   * Shorthand for asserting that two Temporal.Instants are of the correct type\n   * and equal according to their equals() methods.\n   */\n  assertInstantsEqual(actual, expected, description = \"\") {\n    const prefix = description ? `${description}: ` : \"\";\n    assert(expected instanceof Temporal.Instant, `${prefix}expected value should be a Temporal.Instant`);\n    assert(actual instanceof Temporal.Instant, `${prefix}instanceof`);\n    assert(actual.equals(expected), `${prefix}equals method`);\n  },\n\n  /*\n   * assertPlainDate(date, year, ..., nanosecond[, description[, era, eraYear]]):\n   *\n   * Shorthand for asserting that each field of a Temporal.PlainDate is equal to\n   * an expected value. (Except the `calendar` property, since callers may want\n   * to assert either object equality with an object they put in there, or the\n   * value of date.calendarId.)\n   */\n  assertPlainDate(date, year, month, monthCode, day, description = \"\", era = undefined, eraYear = undefined) {\n    const prefix = description ? `${description}: ` : \"\";\n    assert(date instanceof Temporal.PlainDate, `${prefix}instanceof`);\n    assert.sameValue(\n      TemporalHelpers.canonicalizeCalendarEra(date.calendarId, date.era),\n      TemporalHelpers.canonicalizeCalendarEra(date.calendarId, era),\n      `${prefix}era result:`\n    );\n    assert.sameValue(date.eraYear, eraYear, `${prefix}eraYear result:`);\n    assert.sameValue(date.year, year, `${prefix}year result:`);\n    assert.sameValue(date.month, month, `${prefix}month result:`);\n    assert.sameValue(date.monthCode, monthCode, `${prefix}monthCode result:`);\n    assert.sameValue(date.day, day, `${prefix}day result:`);\n  },\n\n  /*\n   * assertPlainDateTime(datetime, year, ..., nanosecond[, description[, era, eraYear]]):\n   *\n   * Shorthand for asserting that each field of a Temporal.PlainDateTime is\n   * equal to an expected value. (Except the `calendar` property, since callers\n   * may want to assert either object equality with an object they put in there,\n   * or the value of datetime.calendarId.)\n   */\n  assertPlainDateTime(datetime, year, month, monthCode, day, hour, minute, second, millisecond, microsecond, nanosecond, description = \"\", era = undefined, eraYear = undefined) {\n    const prefix = description ? `${description}: ` : \"\";\n    assert(datetime instanceof Temporal.PlainDateTime, `${prefix}instanceof`);\n    assert.sameValue(\n      TemporalHelpers.canonicalizeCalendarEra(datetime.calendarId, datetime.era),\n      TemporalHelpers.canonicalizeCalendarEra(datetime.calendarId, era),\n      `${prefix}era result:`\n    );\n    assert.sameValue(datetime.eraYear, eraYear, `${prefix}eraYear result:`);\n    assert.sameValue(datetime.year, year, `${prefix}year result:`);\n    assert.sameValue(datetime.month, month, `${prefix}month result:`);\n    assert.sameValue(datetime.monthCode, monthCode, `${prefix}monthCode result:`);\n    assert.sameValue(datetime.day, day, `${prefix}day result:`);\n    assert.sameValue(datetime.hour, hour, `${prefix}hour result:`);\n    assert.sameValue(datetime.minute, minute, `${prefix}minute result:`);\n    assert.sameValue(datetime.second, second, `${prefix}second result:`);\n    assert.sameValue(datetime.millisecond, millisecond, `${prefix}millisecond result:`);\n    assert.sameValue(datetime.microsecond, microsecond, `${prefix}microsecond result:`);\n    assert.sameValue(datetime.nanosecond, nanosecond, `${prefix}nanosecond result:`);\n  },\n\n  /*\n   * assertPlainDatesEqual(actual, expected[, description]):\n   *\n   * Shorthand for asserting that two Temporal.PlainDates are of the correct\n   * type, equal according to their equals() methods, and additionally that\n   * their calendar internal slots are the same value.\n   */\n  assertPlainDatesEqual(actual, expected, description = \"\") {\n    const prefix = description ? `${description}: ` : \"\";\n    assert(expected instanceof Temporal.PlainDate, `${prefix}expected value should be a Temporal.PlainDate`);\n    assert(actual instanceof Temporal.PlainDate, `${prefix}instanceof`);\n    assert(actual.equals(expected), `${prefix}equals method`);\n    assert.sameValue(\n      actual.calendarId,\n      expected.calendarId,\n      `${prefix}calendar same value:`\n    );\n  },\n\n  /*\n   * assertPlainDateTimesEqual(actual, expected[, description]):\n   *\n   * Shorthand for asserting that two Temporal.PlainDateTimes are of the correct\n   * type, equal according to their equals() methods, and additionally that\n   * their calendar internal slots are the same value.\n   */\n  assertPlainDateTimesEqual(actual, expected, description = \"\") {\n    const prefix = description ? `${description}: ` : \"\";\n    assert(expected instanceof Temporal.PlainDateTime, `${prefix}expected value should be a Temporal.PlainDateTime`);\n    assert(actual instanceof Temporal.PlainDateTime, `${prefix}instanceof`);\n    assert(actual.equals(expected), `${prefix}equals method`);\n    assert.sameValue(\n      actual.calendarId,\n      expected.calendarId,\n      `${prefix}calendar same value:`\n    );\n  },\n\n  /*\n   * assertPlainMonthDay(monthDay, monthCode, day[, description [, referenceISOYear]]):\n   *\n   * Shorthand for asserting that each field of a Temporal.PlainMonthDay is\n   * equal to an expected value. (Except the `calendar` property, since callers\n   * may want to assert either object equality with an object they put in there,\n   * or the value of monthDay.calendarId().)\n   */\n  assertPlainMonthDay(monthDay, monthCode, day, description = \"\", referenceISOYear = 1972) {\n    const prefix = description ? `${description}: ` : \"\";\n    assert(monthDay instanceof Temporal.PlainMonthDay, `${prefix}instanceof`);\n    assert.sameValue(monthDay.monthCode, monthCode, `${prefix}monthCode result:`);\n    assert.sameValue(monthDay.day, day, `${prefix}day result:`);\n    const isoYear = Number(monthDay.toString({ calendarName: \"always\" }).split(\"-\")[0]);\n    assert.sameValue(isoYear, referenceISOYear, `${prefix}referenceISOYear result:`);\n  },\n\n  /*\n   * assertPlainTime(time, hour, ..., nanosecond[, description]):\n   *\n   * Shorthand for asserting that each field of a Temporal.PlainTime is equal to\n   * an expected value.\n   */\n  assertPlainTime(time, hour, minute, second, millisecond, microsecond, nanosecond, description = \"\") {\n    const prefix = description ? `${description}: ` : \"\";\n    assert(time instanceof Temporal.PlainTime, `${prefix}instanceof`);\n    assert.sameValue(time.hour, hour, `${prefix}hour result:`);\n    assert.sameValue(time.minute, minute, `${prefix}minute result:`);\n    assert.sameValue(time.second, second, `${prefix}second result:`);\n    assert.sameValue(time.millisecond, millisecond, `${prefix}millisecond result:`);\n    assert.sameValue(time.microsecond, microsecond, `${prefix}microsecond result:`);\n    assert.sameValue(time.nanosecond, nanosecond, `${prefix}nanosecond result:`);\n  },\n\n  /*\n   * assertPlainTimesEqual(actual, expected[, description]):\n   *\n   * Shorthand for asserting that two Temporal.PlainTimes are of the correct\n   * type and equal according to their equals() methods.\n   */\n  assertPlainTimesEqual(actual, expected, description = \"\") {\n    const prefix = description ? `${description}: ` : \"\";\n    assert(expected instanceof Temporal.PlainTime, `${prefix}expected value should be a Temporal.PlainTime`);\n    assert(actual instanceof Temporal.PlainTime, `${prefix}instanceof`);\n    assert(actual.equals(expected), `${prefix}equals method`);\n  },\n\n  /*\n   * assertPlainYearMonth(yearMonth, year, month, monthCode[, description[, era, eraYear, referenceISODay]]):\n   *\n   * Shorthand for asserting that each field of a Temporal.PlainYearMonth is\n   * equal to an expected value. (Except the `calendar` property, since callers\n   * may want to assert either object equality with an object they put in there,\n   * or the value of yearMonth.calendarId.)\n   *\n   * Pass null as the referenceISODay if you don't want to give it explicitly.\n   * In that case, the expected referenceISODay will be computed using PlainDate\n   * and only verified for consistency, not for equality with a specific value.\n   */\n  assertPlainYearMonth(yearMonth, year, month, monthCode, description = \"\", era = undefined, eraYear = undefined, referenceISODay = 1) {\n    const prefix = description ? `${description}: ` : \"\";\n    assert(typeof referenceISODay === \"number\" || referenceISODay === null,\n      `TemporalHelpers.assertPlainYearMonth() referenceISODay argument should be a number or null, not ${referenceISODay}`);\n    assert(yearMonth instanceof Temporal.PlainYearMonth, `${prefix}instanceof`);\n    assert.sameValue(\n      TemporalHelpers.canonicalizeCalendarEra(yearMonth.calendarId, yearMonth.era),\n      TemporalHelpers.canonicalizeCalendarEra(yearMonth.calendarId, era),\n      `${prefix}era result:`\n    );\n    assert.sameValue(yearMonth.eraYear, eraYear, `${prefix}eraYear result:`);\n    assert.sameValue(yearMonth.year, year, `${prefix}year result:`);\n    assert.sameValue(yearMonth.month, month, `${prefix}month result:`);\n    assert.sameValue(yearMonth.monthCode, monthCode, `${prefix}monthCode result:`);\n    const isoDay = Number(yearMonth.toString({ calendarName: \"always\" }).slice(1).split(\"-\")[2].slice(0, 2));\n    const expectedISODay = referenceISODay ?? yearMonth.toPlainDate({ day: 1 }).withCalendar(\"iso8601\").day;\n    assert.sameValue(isoDay, expectedISODay, `${prefix}referenceISODay result:`);\n  },\n\n  /*\n   * assertZonedDateTimesEqual(actual, expected[, description]):\n   *\n   * Shorthand for asserting that two Temporal.ZonedDateTimes are of the correct\n   * type, equal according to their equals() methods, and additionally that\n   * their time zones and calendar internal slots are the same value.\n   */\n  assertZonedDateTimesEqual(actual, expected, description = \"\") {\n    const prefix = description ? `${description}: ` : \"\";\n    assert(expected instanceof Temporal.ZonedDateTime, `${prefix}expected value should be a Temporal.ZonedDateTime`);\n    assert(actual instanceof Temporal.ZonedDateTime, `${prefix}instanceof`);\n    assert(actual.equals(expected), `${prefix}equals method`);\n    assert.sameValue(actual.timeZoneId, expected.timeZoneId, `${prefix}time zone same value:`);\n    assert.sameValue(\n      actual.calendarId,\n      expected.calendarId,\n      `${prefix}calendar same value:`\n    );\n  },\n\n  /*\n   * assertUnreachable(description):\n   *\n   * Helper for asserting that code is not executed.\n   */\n  assertUnreachable(description) {\n    let message = \"This code should not be executed\";\n    if (description) {\n      message = `${message}: ${description}`;\n    }\n    throw new Test262Error(message);\n  },\n\n  /*\n   * checkPlainDateTimeConversionFastPath(func):\n   *\n   * ToTemporalDate and ToTemporalTime should both, if given a\n   * Temporal.PlainDateTime instance, convert to the desired type by reading the\n   * PlainDateTime's internal slots, rather than calling any getters.\n   *\n   * func(datetime) is the actual operation to test, that must\n   * internally call the abstract operation ToTemporalDate or ToTemporalTime.\n   * It is passed a Temporal.PlainDateTime instance.\n   */\n  checkPlainDateTimeConversionFastPath(func, message = \"checkPlainDateTimeConversionFastPath\") {\n    const actual = [];\n    const expected = [];\n\n    const calendar = \"iso8601\";\n    const datetime = new Temporal.PlainDateTime(2000, 5, 2, 12, 34, 56, 987, 654, 321, calendar);\n    const prototypeDescrs = Object.getOwnPropertyDescriptors(Temporal.PlainDateTime.prototype);\n    [\"year\", \"month\", \"monthCode\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\", \"microsecond\", \"nanosecond\"].forEach((property) => {\n      Object.defineProperty(datetime, property, {\n        get() {\n          actual.push(`get ${formatPropertyName(property)}`);\n          const value = prototypeDescrs[property].get.call(this);\n          return {\n            toString() {\n              actual.push(`toString ${formatPropertyName(property)}`);\n              return value.toString();\n            },\n            valueOf() {\n              actual.push(`valueOf ${formatPropertyName(property)}`);\n              return value;\n            },\n          };\n        },\n      });\n    });\n    Object.defineProperty(datetime, \"calendar\", {\n      get() {\n        actual.push(\"get calendar\");\n        return calendar;\n      },\n    });\n\n    func(datetime);\n    assert.compareArray(actual, expected, `${message}: property getters not called`);\n  },\n\n  /*\n   * Check that an options bag that accepts units written in the singular form,\n   * also accepts the same units written in the plural form.\n   * func(unit) should call the method with the appropriate options bag\n   * containing unit as a value. This will be called twice for each element of\n   * validSingularUnits, once with singular and once with plural, and the\n   * results of each pair should be the same (whether a Temporal object or a\n   * primitive value.)\n   */\n  checkPluralUnitsAccepted(func, validSingularUnits) {\n    const plurals = {\n      year: \"years\",\n      month: \"months\",\n      week: \"weeks\",\n      day: \"days\",\n      hour: \"hours\",\n      minute: \"minutes\",\n      second: \"seconds\",\n      millisecond: \"milliseconds\",\n      microsecond: \"microseconds\",\n      nanosecond: \"nanoseconds\",\n    };\n\n    validSingularUnits.forEach((unit) => {\n      const singularValue = func(unit);\n      const pluralValue = func(plurals[unit]);\n      const desc = `Plural ${plurals[unit]} produces the same result as singular ${unit}`;\n      if (singularValue instanceof Temporal.Duration) {\n        TemporalHelpers.assertDurationsEqual(pluralValue, singularValue, desc);\n      } else if (singularValue instanceof Temporal.Instant) {\n        TemporalHelpers.assertInstantsEqual(pluralValue, singularValue, desc);\n      } else if (singularValue instanceof Temporal.PlainDateTime) {\n        TemporalHelpers.assertPlainDateTimesEqual(pluralValue, singularValue, desc);\n      } else if (singularValue instanceof Temporal.PlainTime) {\n        TemporalHelpers.assertPlainTimesEqual(pluralValue, singularValue, desc);\n      } else if (singularValue instanceof Temporal.ZonedDateTime) {\n        TemporalHelpers.assertZonedDateTimesEqual(pluralValue, singularValue, desc);\n      } else {\n        assert.sameValue(pluralValue, singularValue);\n      }\n    });\n  },\n\n  /*\n   * checkRoundingIncrementOptionWrongType(checkFunc, assertTrueResultFunc, assertObjectResultFunc):\n   *\n   * Checks the type handling of the roundingIncrement option.\n   * checkFunc(roundingIncrement) is a function which takes the value of\n   * roundingIncrement to test, and calls the method under test with it,\n   * returning the result. assertTrueResultFunc(result, description) should\n   * assert that result is the expected result with roundingIncrement: true, and\n   * assertObjectResultFunc(result, description) should assert that result is\n   * the expected result with roundingIncrement being an object with a valueOf()\n   * method.\n   */\n  checkRoundingIncrementOptionWrongType(checkFunc, assertTrueResultFunc, assertObjectResultFunc) {\n    // null converts to 0, which is out of range\n    assert.throws(RangeError, () => checkFunc(null), \"null\");\n    // Booleans convert to either 0 or 1, and 1 is allowed\n    const trueResult = checkFunc(true);\n    assertTrueResultFunc(trueResult, \"true\");\n    assert.throws(RangeError, () => checkFunc(false), \"false\");\n    // Symbols and BigInts cannot convert to numbers\n    assert.throws(TypeError, () => checkFunc(Symbol()), \"symbol\");\n    assert.throws(TypeError, () => checkFunc(2n), \"bigint\");\n\n    // Objects prefer their valueOf() methods when converting to a number\n    assert.throws(RangeError, () => checkFunc({}), \"plain object\");\n\n    const expected = [\n      \"get roundingIncrement.valueOf\",\n      \"call roundingIncrement.valueOf\",\n    ];\n    const actual = [];\n    const observer = TemporalHelpers.toPrimitiveObserver(actual, 2, \"roundingIncrement\");\n    const objectResult = checkFunc(observer);\n    assertObjectResultFunc(objectResult, \"object with valueOf\");\n    assert.compareArray(actual, expected, \"order of operations\");\n  },\n\n  /*\n   * checkStringOptionWrongType(propertyName, value, checkFunc, assertFunc):\n   *\n   * Checks the type handling of a string option, of which there are several in\n   * Temporal.\n   * propertyName is the name of the option, and value is the value that\n   * assertFunc should expect it to have.\n   * checkFunc(value) is a function which takes the value of the option to test,\n   * and calls the method under test with it, returning the result.\n   * assertFunc(result, description) should assert that result is the expected\n   * result with the option value being an object with a toString() method\n   * which returns the given value.\n   */\n  checkStringOptionWrongType(propertyName, value, checkFunc, assertFunc) {\n    // null converts to the string \"null\", which is an invalid string value\n    assert.throws(RangeError, () => checkFunc(null), \"null\");\n    // Booleans convert to the strings \"true\" or \"false\", which are invalid\n    assert.throws(RangeError, () => checkFunc(true), \"true\");\n    assert.throws(RangeError, () => checkFunc(false), \"false\");\n    // Symbols cannot convert to strings\n    assert.throws(TypeError, () => checkFunc(Symbol()), \"symbol\");\n    // Numbers convert to strings which are invalid\n    assert.throws(RangeError, () => checkFunc(2), \"number\");\n    // BigInts convert to strings which are invalid\n    assert.throws(RangeError, () => checkFunc(2n), \"bigint\");\n\n    // Objects prefer their toString() methods when converting to a string\n    assert.throws(RangeError, () => checkFunc({}), \"plain object\");\n\n    const expected = [\n      `get ${propertyName}.toString`,\n      `call ${propertyName}.toString`,\n    ];\n    const actual = [];\n    const observer = TemporalHelpers.toPrimitiveObserver(actual, value, propertyName);\n    const result = checkFunc(observer);\n    assertFunc(result, \"object with toString\");\n    assert.compareArray(actual, expected, \"order of operations\");\n  },\n\n  /*\n   * checkSubclassingIgnored(construct, constructArgs, method, methodArgs,\n   *   resultAssertions):\n   *\n   * Methods of Temporal classes that return a new instance of the same class,\n   * must not take the constructor of a subclass into account, nor the @@species\n   * property. This helper runs tests to ensure this.\n   *\n   * construct(...constructArgs) must yield a valid instance of the Temporal\n   * class. instance[method](...methodArgs) is the method call under test, which\n   * must also yield a valid instance of the same Temporal class, not a\n   * subclass. See below for the individual tests that this runs.\n   * resultAssertions() is a function that performs additional assertions on the\n   * instance returned by the method under test.\n   */\n  checkSubclassingIgnored(...args) {\n    this.checkSubclassConstructorNotObject(...args);\n    this.checkSubclassConstructorUndefined(...args);\n    this.checkSubclassConstructorThrows(...args);\n    this.checkSubclassConstructorNotCalled(...args);\n    this.checkSubclassSpeciesInvalidResult(...args);\n    this.checkSubclassSpeciesNotAConstructor(...args);\n    this.checkSubclassSpeciesNull(...args);\n    this.checkSubclassSpeciesUndefined(...args);\n    this.checkSubclassSpeciesThrows(...args);\n  },\n\n  /*\n   * Checks that replacing the 'constructor' property of the instance with\n   * various primitive values does not affect the returned new instance.\n   */\n  checkSubclassConstructorNotObject(construct, constructArgs, method, methodArgs, resultAssertions) {\n    function check(value, description) {\n      const instance = new construct(...constructArgs);\n      instance.constructor = value;\n      const result = instance[method](...methodArgs);\n      assert.sameValue(Object.getPrototypeOf(result), construct.prototype, description);\n      resultAssertions(result);\n    }\n\n    check(null, \"null\");\n    check(true, \"true\");\n    check(\"test\", \"string\");\n    check(Symbol(), \"Symbol\");\n    check(7, \"number\");\n    check(7n, \"bigint\");\n  },\n\n  /*\n   * Checks that replacing the 'constructor' property of the subclass with\n   * undefined does not affect the returned new instance.\n   */\n  checkSubclassConstructorUndefined(construct, constructArgs, method, methodArgs, resultAssertions) {\n    let called = 0;\n\n    class MySubclass extends construct {\n      constructor() {\n        ++called;\n        super(...constructArgs);\n      }\n    }\n\n    const instance = new MySubclass();\n    assert.sameValue(called, 1);\n\n    MySubclass.prototype.constructor = undefined;\n\n    const result = instance[method](...methodArgs);\n    assert.sameValue(called, 1);\n    assert.sameValue(Object.getPrototypeOf(result), construct.prototype);\n    resultAssertions(result);\n  },\n\n  /*\n   * Checks that making the 'constructor' property of the instance throw when\n   * called does not affect the returned new instance.\n   */\n  checkSubclassConstructorThrows(construct, constructArgs, method, methodArgs, resultAssertions) {\n    function CustomError() {}\n    const instance = new construct(...constructArgs);\n    Object.defineProperty(instance, \"constructor\", {\n      get() {\n        throw new CustomError();\n      }\n    });\n    const result = instance[method](...methodArgs);\n    assert.sameValue(Object.getPrototypeOf(result), construct.prototype);\n    resultAssertions(result);\n  },\n\n  /*\n   * Checks that when subclassing, the subclass constructor is not called by\n   * the method under test.\n   */\n  checkSubclassConstructorNotCalled(construct, constructArgs, method, methodArgs, resultAssertions) {\n    let called = 0;\n\n    class MySubclass extends construct {\n      constructor() {\n        ++called;\n        super(...constructArgs);\n      }\n    }\n\n    const instance = new MySubclass();\n    assert.sameValue(called, 1);\n\n    const result = instance[method](...methodArgs);\n    assert.sameValue(called, 1);\n    assert.sameValue(Object.getPrototypeOf(result), construct.prototype);\n    resultAssertions(result);\n  },\n\n  /*\n   * Check that the constructor's @@species property is ignored when it's a\n   * constructor that returns a non-object value.\n   */\n  checkSubclassSpeciesInvalidResult(construct, constructArgs, method, methodArgs, resultAssertions) {\n    function check(value, description) {\n      const instance = new construct(...constructArgs);\n      instance.constructor = {\n        [Symbol.species]: function() {\n          return value;\n        },\n      };\n      const result = instance[method](...methodArgs);\n      assert.sameValue(Object.getPrototypeOf(result), construct.prototype, description);\n      resultAssertions(result);\n    }\n\n    check(undefined, \"undefined\");\n    check(null, \"null\");\n    check(true, \"true\");\n    check(\"test\", \"string\");\n    check(Symbol(), \"Symbol\");\n    check(7, \"number\");\n    check(7n, \"bigint\");\n    check({}, \"plain object\");\n  },\n\n  /*\n   * Check that the constructor's @@species property is ignored when it's not a\n   * constructor.\n   */\n  checkSubclassSpeciesNotAConstructor(construct, constructArgs, method, methodArgs, resultAssertions) {\n    function check(value, description) {\n      const instance = new construct(...constructArgs);\n      instance.constructor = {\n        [Symbol.species]: value,\n      };\n      const result = instance[method](...methodArgs);\n      assert.sameValue(Object.getPrototypeOf(result), construct.prototype, description);\n      resultAssertions(result);\n    }\n\n    check(true, \"true\");\n    check(\"test\", \"string\");\n    check(Symbol(), \"Symbol\");\n    check(7, \"number\");\n    check(7n, \"bigint\");\n    check({}, \"plain object\");\n  },\n\n  /*\n   * Check that the constructor's @@species property is ignored when it's null.\n   */\n  checkSubclassSpeciesNull(construct, constructArgs, method, methodArgs, resultAssertions) {\n    let called = 0;\n\n    class MySubclass extends construct {\n      constructor() {\n        ++called;\n        super(...constructArgs);\n      }\n    }\n\n    const instance = new MySubclass();\n    assert.sameValue(called, 1);\n\n    MySubclass.prototype.constructor = {\n      [Symbol.species]: null,\n    };\n\n    const result = instance[method](...methodArgs);\n    assert.sameValue(called, 1);\n    assert.sameValue(Object.getPrototypeOf(result), construct.prototype);\n    resultAssertions(result);\n  },\n\n  /*\n   * Check that the constructor's @@species property is ignored when it's\n   * undefined.\n   */\n  checkSubclassSpeciesUndefined(construct, constructArgs, method, methodArgs, resultAssertions) {\n    let called = 0;\n\n    class MySubclass extends construct {\n      constructor() {\n        ++called;\n        super(...constructArgs);\n      }\n    }\n\n    const instance = new MySubclass();\n    assert.sameValue(called, 1);\n\n    MySubclass.prototype.constructor = {\n      [Symbol.species]: undefined,\n    };\n\n    const result = instance[method](...methodArgs);\n    assert.sameValue(called, 1);\n    assert.sameValue(Object.getPrototypeOf(result), construct.prototype);\n    resultAssertions(result);\n  },\n\n  /*\n   * Check that the constructor's @@species property is ignored when it throws,\n   * i.e. it is not called at all.\n   */\n  checkSubclassSpeciesThrows(construct, constructArgs, method, methodArgs, resultAssertions) {\n    function CustomError() {}\n\n    const instance = new construct(...constructArgs);\n    instance.constructor = {\n      get [Symbol.species]() {\n        throw new CustomError();\n      },\n    };\n\n    const result = instance[method](...methodArgs);\n    assert.sameValue(Object.getPrototypeOf(result), construct.prototype);\n  },\n\n  /*\n   * checkSubclassingIgnoredStatic(construct, method, methodArgs, resultAssertions):\n   *\n   * Static methods of Temporal classes that return a new instance of the class,\n   * must not use the this-value as a constructor. This helper runs tests to\n   * ensure this.\n   *\n   * construct[method](...methodArgs) is the static method call under test, and\n   * must yield a valid instance of the Temporal class, not a subclass. See\n   * below for the individual tests that this runs.\n   * resultAssertions() is a function that performs additional assertions on the\n   * instance returned by the method under test.\n   */\n  checkSubclassingIgnoredStatic(...args) {\n    this.checkStaticInvalidReceiver(...args);\n    this.checkStaticReceiverNotCalled(...args);\n    this.checkThisValueNotCalled(...args);\n  },\n\n  /*\n   * Check that calling the static method with a receiver that's not callable,\n   * still calls the intrinsic constructor.\n   */\n  checkStaticInvalidReceiver(construct, method, methodArgs, resultAssertions) {\n    function check(value, description) {\n      const result = construct[method].apply(value, methodArgs);\n      assert.sameValue(Object.getPrototypeOf(result), construct.prototype);\n      resultAssertions(result);\n    }\n\n    check(undefined, \"undefined\");\n    check(null, \"null\");\n    check(true, \"true\");\n    check(\"test\", \"string\");\n    check(Symbol(), \"symbol\");\n    check(7, \"number\");\n    check(7n, \"bigint\");\n    check({}, \"Non-callable object\");\n  },\n\n  /*\n   * Check that calling the static method with a receiver that returns a value\n   * that's not callable, still calls the intrinsic constructor.\n   */\n  checkStaticReceiverNotCalled(construct, method, methodArgs, resultAssertions) {\n    function check(value, description) {\n      const receiver = function () {\n        return value;\n      };\n      const result = construct[method].apply(receiver, methodArgs);\n      assert.sameValue(Object.getPrototypeOf(result), construct.prototype);\n      resultAssertions(result);\n    }\n\n    check(undefined, \"undefined\");\n    check(null, \"null\");\n    check(true, \"true\");\n    check(\"test\", \"string\");\n    check(Symbol(), \"symbol\");\n    check(7, \"number\");\n    check(7n, \"bigint\");\n    check({}, \"Non-callable object\");\n  },\n\n  /*\n   * Check that the receiver isn't called.\n   */\n  checkThisValueNotCalled(construct, method, methodArgs, resultAssertions) {\n    let called = false;\n\n    class MySubclass extends construct {\n      constructor(...args) {\n        called = true;\n        super(...args);\n      }\n    }\n\n    const result = MySubclass[method](...methodArgs);\n    assert.sameValue(called, false);\n    assert.sameValue(Object.getPrototypeOf(result), construct.prototype);\n    resultAssertions(result);\n  },\n\n  /*\n   * Check that any calendar-carrying Temporal object has its [[Calendar]]\n   * internal slot read by ToTemporalCalendar, and does not fetch the calendar\n   * by calling getters.\n   */\n  checkToTemporalCalendarFastPath(func) {\n    const plainDate = new Temporal.PlainDate(2000, 5, 2, \"iso8601\");\n    const plainDateTime = new Temporal.PlainDateTime(2000, 5, 2, 12, 34, 56, 987, 654, 321, \"iso8601\");\n    const plainMonthDay = new Temporal.PlainMonthDay(5, 2, \"iso8601\");\n    const plainYearMonth = new Temporal.PlainYearMonth(2000, 5, \"iso8601\");\n    const zonedDateTime = new Temporal.ZonedDateTime(1_000_000_000_000_000_000n, \"UTC\", \"iso8601\");\n\n    [plainDate, plainDateTime, plainMonthDay, plainYearMonth, zonedDateTime].forEach((temporalObject) => {\n      Object.defineProperty(temporalObject, \"calendar\", {\n        get() {\n          throw new Test262Error(\"should not get 'calendar' property\");\n        },\n      });\n      Object.defineProperty(temporalObject, \"calendarId\", {\n        get() {\n          throw new Test262Error(\"should not get 'calendarId' property\");\n        },\n      });\n\n      func(temporalObject);\n    });\n  },\n\n  checkToTemporalInstantFastPath(func) {\n    const actual = [];\n    const expected = [];\n\n    const datetime = new Temporal.ZonedDateTime(1_000_000_000_987_654_321n, \"UTC\");\n    Object.defineProperty(datetime, \"toString\", {\n      get() {\n        actual.push(\"get toString\");\n        return function (options) {\n          actual.push(\"call toString\");\n          return Temporal.ZonedDateTime.prototype.toString.call(this, options);\n        };\n      },\n    });\n\n    func(datetime);\n    assert.compareArray(actual, expected, \"toString not called\");\n  },\n\n  checkToTemporalPlainDateTimeFastPath(func) {\n    const actual = [];\n    const expected = [];\n\n    const date = new Temporal.PlainDate(2000, 5, 2, \"iso8601\");\n    const prototypeDescrs = Object.getOwnPropertyDescriptors(Temporal.PlainDate.prototype);\n    [\"year\", \"month\", \"monthCode\", \"day\"].forEach((property) => {\n      Object.defineProperty(date, property, {\n        get() {\n          actual.push(`get ${formatPropertyName(property)}`);\n          const value = prototypeDescrs[property].get.call(this);\n          return TemporalHelpers.toPrimitiveObserver(actual, value, property);\n        },\n      });\n    });\n    [\"hour\", \"minute\", \"second\", \"millisecond\", \"microsecond\", \"nanosecond\"].forEach((property) => {\n      Object.defineProperty(date, property, {\n        get() {\n          actual.push(`get ${formatPropertyName(property)}`);\n          return undefined;\n        },\n      });\n    });\n    Object.defineProperty(date, \"calendar\", {\n      get() {\n        actual.push(\"get calendar\");\n        return \"iso8601\";\n      },\n    });\n\n    func(date);\n    assert.compareArray(actual, expected, \"property getters not called\");\n  },\n\n  /*\n   * observeProperty(calls, object, propertyName, value):\n   *\n   * Defines an own property @object.@propertyName with value @value, that\n   * will log any calls to its accessors to the array @calls.\n   */\n  observeProperty(calls, object, propertyName, value, objectName = \"\") {\n    Object.defineProperty(object, propertyName, {\n      get() {\n        calls.push(`get ${formatPropertyName(propertyName, objectName)}`);\n        return value;\n      },\n      set() {\n        calls.push(`set ${formatPropertyName(propertyName, objectName)}`);\n      }\n    });\n  },\n\n  /*\n   * observeMethod(calls, object, propertyName, value):\n   *\n   * Defines an own property @object.@propertyName with value @value, that\n   * will log any calls of @value to the array @calls.\n   */\n  observeMethod(calls, object, propertyName, objectName = \"\") {\n    const method = object[propertyName];\n    object[propertyName] = function () {\n      calls.push(`call ${formatPropertyName(propertyName, objectName)}`);\n      return method.apply(object, arguments);\n    };\n  },\n\n  /*\n   * Used for substituteMethod to indicate default behavior instead of a\n   * substituted value\n   */\n  SUBSTITUTE_SKIP: SKIP_SYMBOL,\n\n  /*\n   * substituteMethod(object, propertyName, values):\n   *\n   * Defines an own property @object.@propertyName that will, for each\n   * subsequent call to the method previously defined as\n   * @object.@propertyName:\n   *  - Call the method, if no more values remain\n   *  - Call the method, if the value in @values for the corresponding call\n   *    is SUBSTITUTE_SKIP\n   *  - Otherwise, return the corresponding value in @value\n   */\n  substituteMethod(object, propertyName, values) {\n    let calls = 0;\n    const method = object[propertyName];\n    object[propertyName] = function () {\n      if (calls >= values.length) {\n        return method.apply(object, arguments);\n      } else if (values[calls] === SKIP_SYMBOL) {\n        calls++;\n        return method.apply(object, arguments);\n      } else {\n        return values[calls++];\n      }\n    };\n  },\n\n  /*\n   * propertyBagObserver():\n   * Returns an object that behaves like the given propertyBag but tracks Get\n   * and Has operations on any of its properties, by appending messages to an\n   * array. If the value of a property in propertyBag is a primitive, the value\n   * of the returned object's property will additionally be a\n   * TemporalHelpers.toPrimitiveObserver that will track calls to its toString\n   * and valueOf methods in the same array. This is for the purpose of testing\n   * order of operations that are observable from user code. objectName is used\n   * in the log.\n   * If skipToPrimitive is given, it must be an array of property keys. Those\n   * properties will not have a TemporalHelpers.toPrimitiveObserver returned,\n   * and instead just be returned directly.\n   */\n  propertyBagObserver(calls, propertyBag, objectName, skipToPrimitive) {\n    return new Proxy(propertyBag, {\n      ownKeys(target) {\n        calls.push(`ownKeys ${objectName}`);\n        return Reflect.ownKeys(target);\n      },\n      getOwnPropertyDescriptor(target, key) {\n        calls.push(`getOwnPropertyDescriptor ${formatPropertyName(key, objectName)}`);\n        return Reflect.getOwnPropertyDescriptor(target, key);\n      },\n      get(target, key, receiver) {\n        calls.push(`get ${formatPropertyName(key, objectName)}`);\n        const result = Reflect.get(target, key, receiver);\n        if (result === undefined) {\n          return undefined;\n        }\n        if ((result !== null && typeof result === \"object\") || typeof result === \"function\") {\n          return result;\n        }\n        if (skipToPrimitive && skipToPrimitive.indexOf(key) >= 0) {\n          return result;\n        }\n        return TemporalHelpers.toPrimitiveObserver(calls, result, `${formatPropertyName(key, objectName)}`);\n      },\n      has(target, key) {\n        calls.push(`has ${formatPropertyName(key, objectName)}`);\n        return Reflect.has(target, key);\n      },\n    });\n  },\n\n  /*\n   * Returns an object that will append logs of any Gets or Calls of its valueOf\n   * or toString properties to the array calls. Both valueOf and toString will\n   * return the actual primitiveValue. propertyName is used in the log.\n   */\n  toPrimitiveObserver(calls, primitiveValue, propertyName) {\n    return {\n      get valueOf() {\n        calls.push(`get ${propertyName}.valueOf`);\n        return function () {\n          calls.push(`call ${propertyName}.valueOf`);\n          return primitiveValue;\n        };\n      },\n      get toString() {\n        calls.push(`get ${propertyName}.toString`);\n        return function () {\n          calls.push(`call ${propertyName}.toString`);\n          if (primitiveValue === undefined) return undefined;\n          return primitiveValue.toString();\n        };\n      },\n    };\n  },\n\n  /*\n   * An object containing further methods that return arrays of ISO strings, for\n   * testing parsers.\n   */\n  ISO: {\n    /*\n     * PlainMonthDay strings that are not valid.\n     */\n    plainMonthDayStringsInvalid() {\n      return [\n        \"11-18junk\",\n        \"11-18[u-ca=gregory]\",\n        \"11-18[u-ca=hebrew]\",\n        \"11-18[U-CA=iso8601]\",\n        \"11-18[u-CA=iso8601]\",\n        \"11-18[FOO=bar]\",\n        \"-999999-01-01[u-ca=gregory]\",\n        \"-999999-01-01[u-ca=chinese]\",\n        \"+999999-01-01[u-ca=gregory]\",\n        \"+999999-01-01[u-ca=chinese]\",\n      ];\n    },\n\n    /*\n     * PlainMonthDay strings that are valid and that should produce October 1st.\n     */\n    plainMonthDayStringsValid() {\n      return [\n        \"10-01\",\n        \"1001\",\n        \"1965-10-01\",\n        \"1976-10-01T152330.1+00:00\",\n        \"19761001T15:23:30.1+00:00\",\n        \"1976-10-01T15:23:30.1+0000\",\n        \"1976-10-01T152330.1+0000\",\n        \"19761001T15:23:30.1+0000\",\n        \"19761001T152330.1+00:00\",\n        \"19761001T152330.1+0000\",\n        \"+001976-10-01T152330.1+00:00\",\n        \"+0019761001T15:23:30.1+00:00\",\n        \"+001976-10-01T15:23:30.1+0000\",\n        \"+001976-10-01T152330.1+0000\",\n        \"+0019761001T15:23:30.1+0000\",\n        \"+0019761001T152330.1+00:00\",\n        \"+0019761001T152330.1+0000\",\n        \"1976-10-01T15:23:00\",\n        \"1976-10-01T15:23\",\n        \"1976-10-01T15\",\n        \"1976-10-01\",\n        \"--10-01\",\n        \"--1001\",\n        \"-999999-10-01\",\n        \"-999999-10-01[u-ca=iso8601]\",\n        \"+999999-10-01\",\n        \"+999999-10-01[u-ca=iso8601]\",\n      ];\n    },\n\n    /*\n     * PlainTime strings that may be mistaken for PlainMonthDay or\n     * PlainYearMonth strings, and so require a time designator.\n     */\n    plainTimeStringsAmbiguous() {\n      const ambiguousStrings = [\n        \"2021-12\",  // ambiguity between YYYY-MM and HHMM-UU\n        \"2021-12[-12:00]\",  // ditto, TZ does not disambiguate\n        \"1214\",     // ambiguity between MMDD and HHMM\n        \"0229\",     //   ditto, including MMDD that doesn't occur every year\n        \"1130\",     //   ditto, including DD that doesn't occur in every month\n        \"12-14\",    // ambiguity between MM-DD and HH-UU\n        \"12-14[-14:00]\",  // ditto, TZ does not disambiguate\n        \"202112\",   // ambiguity between YYYYMM and HHMMSS\n        \"202112[UTC]\",  // ditto, TZ does not disambiguate\n      ];\n      // Adding a calendar annotation to one of these strings must not cause\n      // disambiguation in favour of time.\n      const stringsWithCalendar = ambiguousStrings.map((s) => s + \"[u-ca=iso8601]\");\n      return ambiguousStrings.concat(stringsWithCalendar);\n    },\n\n    /*\n     * PlainTime strings that are of similar form to PlainMonthDay and\n     * PlainYearMonth strings, but are not ambiguous due to components that\n     * aren't valid as months or days.\n     */\n    plainTimeStringsUnambiguous() {\n      return [\n        \"2021-13\",          // 13 is not a month\n        \"202113\",           //   ditto\n        \"2021-13[-13:00]\",  //   ditto\n        \"202113[-13:00]\",   //   ditto\n        \"0000-00\",          // 0 is not a month\n        \"000000\",           //   ditto\n        \"0000-00[UTC]\",     //   ditto\n        \"000000[UTC]\",      //   ditto\n        \"1314\",             // 13 is not a month\n        \"13-14\",            //   ditto\n        \"1232\",             // 32 is not a day\n        \"0230\",             // 30 is not a day in February\n        \"0631\",             // 31 is not a day in June\n        \"0000\",             // 0 is neither a month nor a day\n        \"00-00\",            //   ditto\n      ];\n    },\n\n    /*\n     * PlainYearMonth-like strings that are not valid.\n     */\n    plainYearMonthStringsInvalid() {\n      return [\n        \"2020-13\",\n        \"1976-11[u-ca=gregory]\",\n        \"1976-11[u-ca=hebrew]\",\n        \"1976-11[U-CA=iso8601]\",\n        \"1976-11[u-CA=iso8601]\",\n        \"1976-11[FOO=bar]\",\n        \"+999999-01\",\n        \"-999999-01\",\n      ];\n    },\n\n    /*\n     * PlainYearMonth-like strings that are valid and should produce November\n     * 1976 in the ISO 8601 calendar.\n     */\n    plainYearMonthStringsValid() {\n      return [\n        \"1976-11\",\n        \"1976-11-10\",\n        \"1976-11-01T09:00:00+00:00\",\n        \"1976-11-01T00:00:00+05:00\",\n        \"197611\",\n        \"+00197611\",\n        \"1976-11-18T15:23:30.1-02:00\",\n        \"1976-11-18T152330.1+00:00\",\n        \"19761118T15:23:30.1+00:00\",\n        \"1976-11-18T15:23:30.1+0000\",\n        \"1976-11-18T152330.1+0000\",\n        \"19761118T15:23:30.1+0000\",\n        \"19761118T152330.1+00:00\",\n        \"19761118T152330.1+0000\",\n        \"+001976-11-18T152330.1+00:00\",\n        \"+0019761118T15:23:30.1+00:00\",\n        \"+001976-11-18T15:23:30.1+0000\",\n        \"+001976-11-18T152330.1+0000\",\n        \"+0019761118T15:23:30.1+0000\",\n        \"+0019761118T152330.1+00:00\",\n        \"+0019761118T152330.1+0000\",\n        \"1976-11-18T15:23\",\n        \"1976-11-18T15\",\n        \"1976-11-18\",\n      ];\n    },\n\n    /*\n     * PlainYearMonth-like strings that are valid and should produce November of\n     * the ISO year -9999.\n     */\n    plainYearMonthStringsValidNegativeYear() {\n      return [\n        \"-009999-11\",\n      ];\n    },\n  }\n};\n",
  "testAtomics.js": "// Copyright (C) 2017 Mozilla Corporation. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Collection of functions used to assert the correctness of SharedArrayBuffer objects.\ndefines:\n  - testWithAtomicsOutOfBoundsIndices\n  - testWithAtomicsInBoundsIndices\n  - testWithAtomicsNonViewValues\n---*/\n\n\n/**\n * Calls the provided function for a each bad index that should throw a\n * RangeError when passed to an Atomics method on a SAB-backed view where\n * index 125 is out of range.\n *\n * @param f - the function to call for each bad index.\n */\nfunction testWithAtomicsOutOfBoundsIndices(f) {\n  var bad_indices = [\n    function(view) { return -1; },\n    function(view) { return view.length; },\n    function(view) { return view.length * 2; },\n    function(view) { return Number.POSITIVE_INFINITY; },\n    function(view) { return Number.NEGATIVE_INFINITY; },\n    function(view) { return { valueOf: function() { return 125; } }; },\n    function(view) { return { toString: function() { return '125'; }, valueOf: false }; }, // non-callable valueOf triggers invocation of toString\n  ];\n\n  for (var i = 0; i < bad_indices.length; ++i) {\n    var IdxGen = bad_indices[i];\n    try {\n      f(IdxGen);\n    } catch (e) {\n      e.message += ' (Testing with index gen ' + IdxGen + '.)';\n      throw e;\n    }\n  }\n}\n\n/**\n * Calls the provided function for each good index that should not throw when\n * passed to an Atomics method on a SAB-backed view.\n *\n * The view must have length greater than zero.\n *\n * @param f - the function to call for each good index.\n */\nfunction testWithAtomicsInBoundsIndices(f) {\n  // Most of these are eventually coerced to +0 by ToIndex.\n  var good_indices = [\n    function(view) { return 0/-1; },\n    function(view) { return '-0'; },\n    function(view) { return undefined; },\n    function(view) { return NaN; },\n    function(view) { return 0.5; },\n    function(view) { return '0.5'; },\n    function(view) { return -0.9; },\n    function(view) { return { password: 'qumquat' }; },\n    function(view) { return view.length - 1; },\n    function(view) { return { valueOf: function() { return 0; } }; },\n    function(view) { return { toString: function() { return '0'; }, valueOf: false }; }, // non-callable valueOf triggers invocation of toString\n  ];\n\n  for (var i = 0; i < good_indices.length; ++i) {\n    var IdxGen = good_indices[i];\n    try {\n      f(IdxGen);\n    } catch (e) {\n      e.message += ' (Testing with index gen ' + IdxGen + '.)';\n      throw e;\n    }\n  }\n}\n\n/**\n * Calls the provided function for each value that should throw a TypeError\n * when passed to an Atomics method as a view.\n *\n * @param f - the function to call for each non-view value.\n */\n\nfunction testWithAtomicsNonViewValues(f) {\n  var values = [\n    null,\n    undefined,\n    true,\n    false,\n    new Boolean(true),\n    10,\n    3.14,\n    new Number(4),\n    'Hi there',\n    new Date,\n    /a*utomaton/g,\n    { password: 'qumquat' },\n    new DataView(new ArrayBuffer(10)),\n    new ArrayBuffer(128),\n    new SharedArrayBuffer(128),\n    new Error('Ouch'),\n    [1,1,2,3,5,8],\n    function(x) { return -x; },\n    Symbol('halleluja'),\n    // TODO: Proxy?\n    Object,\n    Int32Array,\n    Date,\n    Math,\n    Atomics\n  ];\n\n  for (var i = 0; i < values.length; ++i) {\n    var nonView = values[i];\n    try {\n      f(nonView);\n    } catch (e) {\n      e.message += ' (Testing with non-view value ' + nonView + '.)';\n      throw e;\n    }\n  }\n}\n\n",
  "testIntl.js": "// Copyright (C) 2011 2012 Norbert Lindenberg. All rights reserved.\n// Copyright (C) 2012 2013 Mozilla Corporation. All rights reserved.\n// Copyright (C) 2020 Apple Inc. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    This file contains shared functions for the tests in the conformance test\n    suite for the ECMAScript Internationalization API.\nauthor: Norbert Lindenberg\ndefines:\n  - testWithIntlConstructors\n  - taintDataProperty\n  - taintMethod\n  - taintProperties\n  - taintArray\n  - getLocaleSupportInfo\n  - getInvalidLanguageTags\n  - isCanonicalizedStructurallyValidLanguageTag\n  - getInvalidLocaleArguments\n  - testOption\n  - testForUnwantedRegExpChanges\n  - allCalendars\n  - allCollations\n  - allNumberingSystems\n  - isValidNumberingSystem\n  - numberingSystemDigits\n  - allSimpleSanctionedUnits\n  - testNumberFormat\n  - getDateTimeComponents\n  - getDateTimeComponentValues\n  - isCanonicalizedStructurallyValidTimeZoneName\n  - partitionDurationFormatPattern\n  - formatDurationFormatPattern\n---*/\n/**\n */\n\n\n/**\n * @description Calls the provided function for every service constructor in\n * the Intl object.\n * @param {Function} f the function to call for each service constructor in\n *   the Intl object.\n *   @param {Function} Constructor the constructor object to test with.\n */\nfunction testWithIntlConstructors(f) {\n  var constructors = [\"Collator\", \"NumberFormat\", \"DateTimeFormat\"];\n\n  // Optionally supported Intl constructors.\n  // NB: Intl.Locale isn't an Intl service constructor!\n  // Intl.DisplayNames cannot be called without type in options.\n  [\"PluralRules\", \"RelativeTimeFormat\", \"ListFormat\"].forEach(function(constructor) {\n    if (typeof Intl[constructor] === \"function\") {\n      constructors[constructors.length] = constructor;\n    }\n  });\n\n  constructors.forEach(function (constructor) {\n    var Constructor = Intl[constructor];\n    try {\n      f(Constructor);\n    } catch (e) {\n      e.message += \" (Testing with \" + constructor + \".)\";\n      throw e;\n    }\n  });\n}\n\n\n/**\n * Taints a named data property of the given object by installing\n * a setter that throws an exception.\n * @param {object} obj the object whose data property to taint\n * @param {string} property the property to taint\n */\nfunction taintDataProperty(obj, property) {\n  Object.defineProperty(obj, property, {\n    set: function(value) {\n      throw new Test262Error(\"Client code can adversely affect behavior: setter for \" + property + \".\");\n    },\n    enumerable: false,\n    configurable: true\n  });\n}\n\n\n/**\n * Taints a named method of the given object by replacing it with a function\n * that throws an exception.\n * @param {object} obj the object whose method to taint\n * @param {string} property the name of the method to taint\n */\nfunction taintMethod(obj, property) {\n  Object.defineProperty(obj, property, {\n    value: function() {\n      throw new Test262Error(\"Client code can adversely affect behavior: method \" + property + \".\");\n    },\n    writable: true,\n    enumerable: false,\n    configurable: true\n  });\n}\n\n\n/**\n * Taints the given properties (and similarly named properties) by installing\n * setters on Object.prototype that throw exceptions.\n * @param {Array} properties an array of property names to taint\n */\nfunction taintProperties(properties) {\n  properties.forEach(function (property) {\n    var adaptedProperties = [property, \"__\" + property, \"_\" + property, property + \"_\", property + \"__\"];\n    adaptedProperties.forEach(function (property) {\n      taintDataProperty(Object.prototype, property);\n    });\n  });\n}\n\n\n/**\n * Taints the Array object by creating a setter for the property \"0\" and\n * replacing some key methods with functions that throw exceptions.\n */\nfunction taintArray() {\n  taintDataProperty(Array.prototype, \"0\");\n  taintMethod(Array.prototype, \"indexOf\");\n  taintMethod(Array.prototype, \"join\");\n  taintMethod(Array.prototype, \"push\");\n  taintMethod(Array.prototype, \"slice\");\n  taintMethod(Array.prototype, \"sort\");\n}\n\n\n/**\n * Gets locale support info for the given constructor object, which must be one\n * of Intl constructors.\n * @param {object} Constructor the constructor for which to get locale support info\n * @param {object} options the options while calling the constructor\n * @return {object} locale support info with the following properties:\n *   supported: array of fully supported language tags\n *   byFallback: array of language tags that are supported through fallbacks\n *   unsupported: array of unsupported language tags\n */\nfunction getLocaleSupportInfo(Constructor, options) {\n  var languages = [\"zh\", \"es\", \"en\", \"hi\", \"ur\", \"ar\", \"ja\", \"pa\"];\n  var scripts = [\"Latn\", \"Hans\", \"Deva\", \"Arab\", \"Jpan\", \"Hant\", \"Guru\"];\n  var countries = [\"CN\", \"IN\", \"US\", \"PK\", \"JP\", \"TW\", \"HK\", \"SG\", \"419\"];\n\n  var allTags = [];\n  var i, j, k;\n  var language, script, country;\n  for (i = 0; i < languages.length; i++) {\n    language = languages[i];\n    allTags.push(language);\n    for (j = 0; j < scripts.length; j++) {\n      script = scripts[j];\n      allTags.push(language + \"-\" + script);\n      for (k = 0; k < countries.length; k++) {\n        country = countries[k];\n        allTags.push(language + \"-\" + script + \"-\" + country);\n      }\n    }\n    for (k = 0; k < countries.length; k++) {\n      country = countries[k];\n      allTags.push(language + \"-\" + country);\n    }\n  }\n\n  var supported = [];\n  var byFallback = [];\n  var unsupported = [];\n  for (i = 0; i < allTags.length; i++) {\n    var request = allTags[i];\n    var result = new Constructor([request], options).resolvedOptions().locale;\n    if (request === result) {\n      supported.push(request);\n    } else if (request.indexOf(result) === 0) {\n      byFallback.push(request);\n    } else {\n      unsupported.push(request);\n    }\n  }\n\n  return {\n    supported: supported,\n    byFallback: byFallback,\n    unsupported: unsupported\n  };\n}\n\n\n/**\n * Returns an array of strings for which IsStructurallyValidLanguageTag() returns false\n */\nfunction getInvalidLanguageTags() {\n  var invalidLanguageTags = [\n    \"\", // empty tag\n    \"i\", // singleton alone\n    \"x\", // private use without subtag\n    \"u\", // extension singleton in first place\n    \"419\", // region code in first place\n    \"u-nu-latn-cu-bob\", // extension sequence without language\n    \"hans-cmn-cn\", // \"hans\" could theoretically be a 4-letter language code,\n                   // but those can't be followed by extlang codes.\n    \"cmn-hans-cn-u-u\", // duplicate singleton\n    \"cmn-hans-cn-t-u-ca-u\", // duplicate singleton\n    \"de-gregory-gregory\", // duplicate variant\n    \"*\", // language range\n    \"de-*\", // language range\n    \"中文\", // non-ASCII letters\n    \"en-ß\", // non-ASCII letters\n    \"ıd\", // non-ASCII letters\n    \"es-Latn-latn\", // two scripts\n    \"pl-PL-pl\", // two regions\n    \"u-ca-gregory\", // extension in first place\n    \"de-1996-1996\", // duplicate numeric variant\n    \"pt-u-ca-gregory-u-nu-latn\", // duplicate singleton subtag\n\n    // Invalid tags starting with: https://github.com/tc39/ecma402/pull/289\n    \"no-nyn\", // regular grandfathered in BCP47, but invalid in UTS35\n    \"i-klingon\", // irregular grandfathered in BCP47, but invalid in UTS35\n    \"zh-hak-CN\", // language with extlang in BCP47, but invalid in UTS35\n    \"sgn-ils\", // language with extlang in BCP47, but invalid in UTS35\n    \"x-foo\", // privateuse-only in BCP47, but invalid in UTS35\n    \"x-en-US-12345\", // more privateuse-only variants.\n    \"x-12345-12345-en-US\",\n    \"x-en-US-12345-12345\",\n    \"x-en-u-foo\",\n    \"x-en-u-foo-u-bar\",\n    \"x-u-foo\",\n\n    // underscores in different parts of the language tag\n    \"de_DE\",\n    \"DE_de\",\n    \"cmn_Hans\",\n    \"cmn-hans_cn\",\n    \"es_419\",\n    \"es-419-u-nu-latn-cu_bob\",\n    \"i_klingon\",\n    \"cmn-hans-cn-t-ca-u-ca-x_t-u\",\n    \"enochian_enochian\",\n    \"de-gregory_u-ca-gregory\",\n\n    \"en\\u0000\", // null-terminator sequence\n    \" en\", // leading whitespace\n    \"en \", // trailing whitespace\n    \"it-IT-Latn\", // country before script tag\n    \"de-u\", // incomplete Unicode extension sequences\n    \"de-u-\",\n    \"de-u-ca-\",\n    \"de-u-ca-gregory-\",\n    \"si-x\", // incomplete private-use tags\n    \"x-\",\n    \"x-y-\",\n  ];\n\n  // make sure the data above is correct\n  for (var i = 0; i < invalidLanguageTags.length; ++i) {\n    var invalidTag = invalidLanguageTags[i];\n    assert(\n      !isCanonicalizedStructurallyValidLanguageTag(invalidTag),\n      \"Test data \\\"\" + invalidTag + \"\\\" is a canonicalized and structurally valid language tag.\"\n    );\n  }\n\n  return invalidLanguageTags;\n}\n\n\n/**\n * @description Tests whether locale is a String value representing a\n * structurally valid and canonicalized BCP 47 language tag, as defined in\n * sections 6.2.2 and 6.2.3 of the ECMAScript Internationalization API\n * Specification.\n * @param {String} locale the string to be tested.\n * @result {Boolean} whether the test succeeded.\n */\nfunction isCanonicalizedStructurallyValidLanguageTag(locale) {\n\n  /**\n   * Regular expression defining Unicode BCP 47 Locale Identifiers.\n   *\n   * Spec: https://unicode.org/reports/tr35/#Unicode_locale_identifier\n   */\n  var alpha = \"[a-z]\",\n    digit = \"[0-9]\",\n    alphanum = \"[a-z0-9]\",\n    variant = \"(\" + alphanum + \"{5,8}|(?:\" + digit + alphanum + \"{3}))\",\n    region = \"(\" + alpha + \"{2}|\" + digit + \"{3})\",\n    script = \"(\" + alpha + \"{4})\",\n    language = \"(\" + alpha + \"{2,3}|\" + alpha + \"{5,8})\",\n    privateuse = \"(x(-[a-z0-9]{1,8})+)\",\n    singleton = \"(\" + digit + \"|[a-wy-z])\",\n    attribute= \"(\" + alphanum + \"{3,8})\",\n    keyword = \"(\" + alphanum + alpha + \"(-\" + alphanum + \"{3,8})*)\",\n    unicode_locale_extensions = \"(u((-\" + keyword + \")+|((-\" + attribute + \")+(-\" + keyword + \")*)))\",\n    tlang = \"(\" + language + \"(-\" + script + \")?(-\" + region + \")?(-\" + variant + \")*)\",\n    tfield = \"(\" + alpha + digit + \"(-\" + alphanum + \"{3,8})+)\",\n    transformed_extensions = \"(t((-\" + tlang + \"(-\" + tfield + \")*)|(-\" + tfield + \")+))\",\n    other_singleton = \"(\" + digit + \"|[a-sv-wy-z])\",\n    other_extensions = \"(\" + other_singleton + \"(-\" + alphanum + \"{2,8})+)\",\n    extension = \"(\" + unicode_locale_extensions + \"|\" + transformed_extensions + \"|\" + other_extensions + \")\",\n    locale_id = language + \"(-\" + script + \")?(-\" + region + \")?(-\" + variant + \")*(-\" + extension + \")*(-\" + privateuse + \")?\",\n    languageTag = \"^(\" + locale_id + \")$\",\n    languageTagRE = new RegExp(languageTag, \"i\");\n\n  var duplicateSingleton = \"-\" + singleton + \"-(.*-)?\\\\1(?!\" + alphanum + \")\",\n    duplicateSingletonRE = new RegExp(duplicateSingleton, \"i\"),\n    duplicateVariant = \"(\" + alphanum + \"{2,8}-)+\" + variant + \"-(\" + alphanum + \"{2,8}-)*\\\\2(?!\" + alphanum + \")\",\n    duplicateVariantRE = new RegExp(duplicateVariant, \"i\");\n\n  var transformKeyRE = new RegExp(\"^\" + alpha + digit + \"$\", \"i\");\n\n  /**\n   * Verifies that the given string is a well-formed Unicode BCP 47 Locale Identifier\n   * with no duplicate variant or singleton subtags.\n   *\n   * Spec: ECMAScript Internationalization API Specification, draft, 6.2.2.\n   */\n  function isStructurallyValidLanguageTag(locale) {\n    if (!languageTagRE.test(locale)) {\n      return false;\n    }\n    locale = locale.split(/-x-/)[0];\n    return !duplicateSingletonRE.test(locale) && !duplicateVariantRE.test(locale);\n  }\n\n\n  /**\n   * Mappings from complete tags to preferred values.\n   *\n   * Spec: http://unicode.org/reports/tr35/#Identifiers\n   * Version: CLDR, version 36.1\n   */\n  var __tagMappings = {\n    // property names must be in lower case; values in canonical form\n\n    \"art-lojban\": \"jbo\",\n    \"cel-gaulish\": \"xtg\",\n    \"zh-guoyu\": \"zh\",\n    \"zh-hakka\": \"hak\",\n    \"zh-xiang\": \"hsn\",\n  };\n\n\n  /**\n   * Mappings from language subtags to preferred values.\n   *\n   * Spec: http://unicode.org/reports/tr35/#Identifiers\n   * Version: CLDR, version 36.1\n   */\n  var __languageMappings = {\n    // property names and values must be in canonical case\n\n    \"aam\": \"aas\",\n    \"aar\": \"aa\",\n    \"abk\": \"ab\",\n    \"adp\": \"dz\",\n    \"afr\": \"af\",\n    \"aju\": \"jrb\",\n    \"aka\": \"ak\",\n    \"alb\": \"sq\",\n    \"als\": \"sq\",\n    \"amh\": \"am\",\n    \"ara\": \"ar\",\n    \"arb\": \"ar\",\n    \"arg\": \"an\",\n    \"arm\": \"hy\",\n    \"asd\": \"snz\",\n    \"asm\": \"as\",\n    \"aue\": \"ktz\",\n    \"ava\": \"av\",\n    \"ave\": \"ae\",\n    \"aym\": \"ay\",\n    \"ayr\": \"ay\",\n    \"ayx\": \"nun\",\n    \"aze\": \"az\",\n    \"azj\": \"az\",\n    \"bak\": \"ba\",\n    \"bam\": \"bm\",\n    \"baq\": \"eu\",\n    \"bcc\": \"bal\",\n    \"bcl\": \"bik\",\n    \"bel\": \"be\",\n    \"ben\": \"bn\",\n    \"bgm\": \"bcg\",\n    \"bh\": \"bho\",\n    \"bih\": \"bho\",\n    \"bis\": \"bi\",\n    \"bjd\": \"drl\",\n    \"bod\": \"bo\",\n    \"bos\": \"bs\",\n    \"bre\": \"br\",\n    \"bul\": \"bg\",\n    \"bur\": \"my\",\n    \"bxk\": \"luy\",\n    \"bxr\": \"bua\",\n    \"cat\": \"ca\",\n    \"ccq\": \"rki\",\n    \"ces\": \"cs\",\n    \"cha\": \"ch\",\n    \"che\": \"ce\",\n    \"chi\": \"zh\",\n    \"chu\": \"cu\",\n    \"chv\": \"cv\",\n    \"cjr\": \"mom\",\n    \"cka\": \"cmr\",\n    \"cld\": \"syr\",\n    \"cmk\": \"xch\",\n    \"cmn\": \"zh\",\n    \"cor\": \"kw\",\n    \"cos\": \"co\",\n    \"coy\": \"pij\",\n    \"cqu\": \"quh\",\n    \"cre\": \"cr\",\n    \"cwd\": \"cr\",\n    \"cym\": \"cy\",\n    \"cze\": \"cs\",\n    \"dan\": \"da\",\n    \"deu\": \"de\",\n    \"dgo\": \"doi\",\n    \"dhd\": \"mwr\",\n    \"dik\": \"din\",\n    \"diq\": \"zza\",\n    \"dit\": \"dif\",\n    \"div\": \"dv\",\n    \"drh\": \"mn\",\n    \"dut\": \"nl\",\n    \"dzo\": \"dz\",\n    \"ekk\": \"et\",\n    \"ell\": \"el\",\n    \"emk\": \"man\",\n    \"eng\": \"en\",\n    \"epo\": \"eo\",\n    \"esk\": \"ik\",\n    \"est\": \"et\",\n    \"eus\": \"eu\",\n    \"ewe\": \"ee\",\n    \"fao\": \"fo\",\n    \"fas\": \"fa\",\n    \"fat\": \"ak\",\n    \"fij\": \"fj\",\n    \"fin\": \"fi\",\n    \"fra\": \"fr\",\n    \"fre\": \"fr\",\n    \"fry\": \"fy\",\n    \"fuc\": \"ff\",\n    \"ful\": \"ff\",\n    \"gav\": \"dev\",\n    \"gaz\": \"om\",\n    \"gbo\": \"grb\",\n    \"geo\": \"ka\",\n    \"ger\": \"de\",\n    \"gfx\": \"vaj\",\n    \"ggn\": \"gvr\",\n    \"gla\": \"gd\",\n    \"gle\": \"ga\",\n    \"glg\": \"gl\",\n    \"glv\": \"gv\",\n    \"gno\": \"gon\",\n    \"gre\": \"el\",\n    \"grn\": \"gn\",\n    \"gti\": \"nyc\",\n    \"gug\": \"gn\",\n    \"guj\": \"gu\",\n    \"guv\": \"duz\",\n    \"gya\": \"gba\",\n    \"hat\": \"ht\",\n    \"hau\": \"ha\",\n    \"hdn\": \"hai\",\n    \"hea\": \"hmn\",\n    \"heb\": \"he\",\n    \"her\": \"hz\",\n    \"him\": \"srx\",\n    \"hin\": \"hi\",\n    \"hmo\": \"ho\",\n    \"hrr\": \"jal\",\n    \"hrv\": \"hr\",\n    \"hun\": \"hu\",\n    \"hye\": \"hy\",\n    \"ibi\": \"opa\",\n    \"ibo\": \"ig\",\n    \"ice\": \"is\",\n    \"ido\": \"io\",\n    \"iii\": \"ii\",\n    \"ike\": \"iu\",\n    \"iku\": \"iu\",\n    \"ile\": \"ie\",\n    \"ilw\": \"gal\",\n    \"in\": \"id\",\n    \"ina\": \"ia\",\n    \"ind\": \"id\",\n    \"ipk\": \"ik\",\n    \"isl\": \"is\",\n    \"ita\": \"it\",\n    \"iw\": \"he\",\n    \"jav\": \"jv\",\n    \"jeg\": \"oyb\",\n    \"ji\": \"yi\",\n    \"jpn\": \"ja\",\n    \"jw\": \"jv\",\n    \"kal\": \"kl\",\n    \"kan\": \"kn\",\n    \"kas\": \"ks\",\n    \"kat\": \"ka\",\n    \"kau\": \"kr\",\n    \"kaz\": \"kk\",\n    \"kgc\": \"tdf\",\n    \"kgh\": \"kml\",\n    \"khk\": \"mn\",\n    \"khm\": \"km\",\n    \"kik\": \"ki\",\n    \"kin\": \"rw\",\n    \"kir\": \"ky\",\n    \"kmr\": \"ku\",\n    \"knc\": \"kr\",\n    \"kng\": \"kg\",\n    \"knn\": \"kok\",\n    \"koj\": \"kwv\",\n    \"kom\": \"kv\",\n    \"kon\": \"kg\",\n    \"kor\": \"ko\",\n    \"kpv\": \"kv\",\n    \"krm\": \"bmf\",\n    \"ktr\": \"dtp\",\n    \"kua\": \"kj\",\n    \"kur\": \"ku\",\n    \"kvs\": \"gdj\",\n    \"kwq\": \"yam\",\n    \"kxe\": \"tvd\",\n    \"kzj\": \"dtp\",\n    \"kzt\": \"dtp\",\n    \"lao\": \"lo\",\n    \"lat\": \"la\",\n    \"lav\": \"lv\",\n    \"lbk\": \"bnc\",\n    \"lii\": \"raq\",\n    \"lim\": \"li\",\n    \"lin\": \"ln\",\n    \"lit\": \"lt\",\n    \"llo\": \"ngt\",\n    \"lmm\": \"rmx\",\n    \"ltz\": \"lb\",\n    \"lub\": \"lu\",\n    \"lug\": \"lg\",\n    \"lvs\": \"lv\",\n    \"mac\": \"mk\",\n    \"mah\": \"mh\",\n    \"mal\": \"ml\",\n    \"mao\": \"mi\",\n    \"mar\": \"mr\",\n    \"may\": \"ms\",\n    \"meg\": \"cir\",\n    \"mhr\": \"chm\",\n    \"mkd\": \"mk\",\n    \"mlg\": \"mg\",\n    \"mlt\": \"mt\",\n    \"mnk\": \"man\",\n    \"mo\": \"ro\",\n    \"mol\": \"ro\",\n    \"mon\": \"mn\",\n    \"mri\": \"mi\",\n    \"msa\": \"ms\",\n    \"mst\": \"mry\",\n    \"mup\": \"raj\",\n    \"mwj\": \"vaj\",\n    \"mya\": \"my\",\n    \"myd\": \"aog\",\n    \"myt\": \"mry\",\n    \"nad\": \"xny\",\n    \"nau\": \"na\",\n    \"nav\": \"nv\",\n    \"nbl\": \"nr\",\n    \"ncp\": \"kdz\",\n    \"nde\": \"nd\",\n    \"ndo\": \"ng\",\n    \"nep\": \"ne\",\n    \"nld\": \"nl\",\n    \"nno\": \"nn\",\n    \"nns\": \"nbr\",\n    \"nnx\": \"ngv\",\n    \"no\": \"nb\",\n    \"nob\": \"nb\",\n    \"nor\": \"nb\",\n    \"npi\": \"ne\",\n    \"nts\": \"pij\",\n    \"nya\": \"ny\",\n    \"oci\": \"oc\",\n    \"ojg\": \"oj\",\n    \"oji\": \"oj\",\n    \"ori\": \"or\",\n    \"orm\": \"om\",\n    \"ory\": \"or\",\n    \"oss\": \"os\",\n    \"oun\": \"vaj\",\n    \"pan\": \"pa\",\n    \"pbu\": \"ps\",\n    \"pcr\": \"adx\",\n    \"per\": \"fa\",\n    \"pes\": \"fa\",\n    \"pli\": \"pi\",\n    \"plt\": \"mg\",\n    \"pmc\": \"huw\",\n    \"pmu\": \"phr\",\n    \"pnb\": \"lah\",\n    \"pol\": \"pl\",\n    \"por\": \"pt\",\n    \"ppa\": \"bfy\",\n    \"ppr\": \"lcq\",\n    \"pry\": \"prt\",\n    \"pus\": \"ps\",\n    \"puz\": \"pub\",\n    \"que\": \"qu\",\n    \"quz\": \"qu\",\n    \"rmy\": \"rom\",\n    \"roh\": \"rm\",\n    \"ron\": \"ro\",\n    \"rum\": \"ro\",\n    \"run\": \"rn\",\n    \"rus\": \"ru\",\n    \"sag\": \"sg\",\n    \"san\": \"sa\",\n    \"sca\": \"hle\",\n    \"scc\": \"sr\",\n    \"scr\": \"hr\",\n    \"sin\": \"si\",\n    \"skk\": \"oyb\",\n    \"slk\": \"sk\",\n    \"slo\": \"sk\",\n    \"slv\": \"sl\",\n    \"sme\": \"se\",\n    \"smo\": \"sm\",\n    \"sna\": \"sn\",\n    \"snd\": \"sd\",\n    \"som\": \"so\",\n    \"sot\": \"st\",\n    \"spa\": \"es\",\n    \"spy\": \"kln\",\n    \"sqi\": \"sq\",\n    \"src\": \"sc\",\n    \"srd\": \"sc\",\n    \"srp\": \"sr\",\n    \"ssw\": \"ss\",\n    \"sun\": \"su\",\n    \"swa\": \"sw\",\n    \"swe\": \"sv\",\n    \"swh\": \"sw\",\n    \"tah\": \"ty\",\n    \"tam\": \"ta\",\n    \"tat\": \"tt\",\n    \"tdu\": \"dtp\",\n    \"tel\": \"te\",\n    \"tgk\": \"tg\",\n    \"tgl\": \"fil\",\n    \"tha\": \"th\",\n    \"thc\": \"tpo\",\n    \"thx\": \"oyb\",\n    \"tib\": \"bo\",\n    \"tie\": \"ras\",\n    \"tir\": \"ti\",\n    \"tkk\": \"twm\",\n    \"tl\": \"fil\",\n    \"tlw\": \"weo\",\n    \"tmp\": \"tyj\",\n    \"tne\": \"kak\",\n    \"ton\": \"to\",\n    \"tsf\": \"taj\",\n    \"tsn\": \"tn\",\n    \"tso\": \"ts\",\n    \"ttq\": \"tmh\",\n    \"tuk\": \"tk\",\n    \"tur\": \"tr\",\n    \"tw\": \"ak\",\n    \"twi\": \"ak\",\n    \"uig\": \"ug\",\n    \"ukr\": \"uk\",\n    \"umu\": \"del\",\n    \"uok\": \"ema\",\n    \"urd\": \"ur\",\n    \"uzb\": \"uz\",\n    \"uzn\": \"uz\",\n    \"ven\": \"ve\",\n    \"vie\": \"vi\",\n    \"vol\": \"vo\",\n    \"wel\": \"cy\",\n    \"wln\": \"wa\",\n    \"wol\": \"wo\",\n    \"xba\": \"cax\",\n    \"xho\": \"xh\",\n    \"xia\": \"acn\",\n    \"xkh\": \"waw\",\n    \"xpe\": \"kpe\",\n    \"xsj\": \"suj\",\n    \"xsl\": \"den\",\n    \"ybd\": \"rki\",\n    \"ydd\": \"yi\",\n    \"yid\": \"yi\",\n    \"yma\": \"lrr\",\n    \"ymt\": \"mtm\",\n    \"yor\": \"yo\",\n    \"yos\": \"zom\",\n    \"yuu\": \"yug\",\n    \"zai\": \"zap\",\n    \"zha\": \"za\",\n    \"zho\": \"zh\",\n    \"zsm\": \"ms\",\n    \"zul\": \"zu\",\n    \"zyb\": \"za\",\n  };\n\n\n  /**\n   * Mappings from region subtags to preferred values.\n   *\n   * Spec: http://unicode.org/reports/tr35/#Identifiers\n   * Version: CLDR, version 36.1\n   */\n  var __regionMappings = {\n    // property names and values must be in canonical case\n\n    \"004\": \"AF\",\n    \"008\": \"AL\",\n    \"010\": \"AQ\",\n    \"012\": \"DZ\",\n    \"016\": \"AS\",\n    \"020\": \"AD\",\n    \"024\": \"AO\",\n    \"028\": \"AG\",\n    \"031\": \"AZ\",\n    \"032\": \"AR\",\n    \"036\": \"AU\",\n    \"040\": \"AT\",\n    \"044\": \"BS\",\n    \"048\": \"BH\",\n    \"050\": \"BD\",\n    \"051\": \"AM\",\n    \"052\": \"BB\",\n    \"056\": \"BE\",\n    \"060\": \"BM\",\n    \"062\": \"034\",\n    \"064\": \"BT\",\n    \"068\": \"BO\",\n    \"070\": \"BA\",\n    \"072\": \"BW\",\n    \"074\": \"BV\",\n    \"076\": \"BR\",\n    \"084\": \"BZ\",\n    \"086\": \"IO\",\n    \"090\": \"SB\",\n    \"092\": \"VG\",\n    \"096\": \"BN\",\n    \"100\": \"BG\",\n    \"104\": \"MM\",\n    \"108\": \"BI\",\n    \"112\": \"BY\",\n    \"116\": \"KH\",\n    \"120\": \"CM\",\n    \"124\": \"CA\",\n    \"132\": \"CV\",\n    \"136\": \"KY\",\n    \"140\": \"CF\",\n    \"144\": \"LK\",\n    \"148\": \"TD\",\n    \"152\": \"CL\",\n    \"156\": \"CN\",\n    \"158\": \"TW\",\n    \"162\": \"CX\",\n    \"166\": \"CC\",\n    \"170\": \"CO\",\n    \"174\": \"KM\",\n    \"175\": \"YT\",\n    \"178\": \"CG\",\n    \"180\": \"CD\",\n    \"184\": \"CK\",\n    \"188\": \"CR\",\n    \"191\": \"HR\",\n    \"192\": \"CU\",\n    \"196\": \"CY\",\n    \"203\": \"CZ\",\n    \"204\": \"BJ\",\n    \"208\": \"DK\",\n    \"212\": \"DM\",\n    \"214\": \"DO\",\n    \"218\": \"EC\",\n    \"222\": \"SV\",\n    \"226\": \"GQ\",\n    \"230\": \"ET\",\n    \"231\": \"ET\",\n    \"232\": \"ER\",\n    \"233\": \"EE\",\n    \"234\": \"FO\",\n    \"238\": \"FK\",\n    \"239\": \"GS\",\n    \"242\": \"FJ\",\n    \"246\": \"FI\",\n    \"248\": \"AX\",\n    \"249\": \"FR\",\n    \"250\": \"FR\",\n    \"254\": \"GF\",\n    \"258\": \"PF\",\n    \"260\": \"TF\",\n    \"262\": \"DJ\",\n    \"266\": \"GA\",\n    \"268\": \"GE\",\n    \"270\": \"GM\",\n    \"275\": \"PS\",\n    \"276\": \"DE\",\n    \"278\": \"DE\",\n    \"280\": \"DE\",\n    \"288\": \"GH\",\n    \"292\": \"GI\",\n    \"296\": \"KI\",\n    \"300\": \"GR\",\n    \"304\": \"GL\",\n    \"308\": \"GD\",\n    \"312\": \"GP\",\n    \"316\": \"GU\",\n    \"320\": \"GT\",\n    \"324\": \"GN\",\n    \"328\": \"GY\",\n    \"332\": \"HT\",\n    \"334\": \"HM\",\n    \"336\": \"VA\",\n    \"340\": \"HN\",\n    \"344\": \"HK\",\n    \"348\": \"HU\",\n    \"352\": \"IS\",\n    \"356\": \"IN\",\n    \"360\": \"ID\",\n    \"364\": \"IR\",\n    \"368\": \"IQ\",\n    \"372\": \"IE\",\n    \"376\": \"IL\",\n    \"380\": \"IT\",\n    \"384\": \"CI\",\n    \"388\": \"JM\",\n    \"392\": \"JP\",\n    \"398\": \"KZ\",\n    \"400\": \"JO\",\n    \"404\": \"KE\",\n    \"408\": \"KP\",\n    \"410\": \"KR\",\n    \"414\": \"KW\",\n    \"417\": \"KG\",\n    \"418\": \"LA\",\n    \"422\": \"LB\",\n    \"426\": \"LS\",\n    \"428\": \"LV\",\n    \"430\": \"LR\",\n    \"434\": \"LY\",\n    \"438\": \"LI\",\n    \"440\": \"LT\",\n    \"442\": \"LU\",\n    \"446\": \"MO\",\n    \"450\": \"MG\",\n    \"454\": \"MW\",\n    \"458\": \"MY\",\n    \"462\": \"MV\",\n    \"466\": \"ML\",\n    \"470\": \"MT\",\n    \"474\": \"MQ\",\n    \"478\": \"MR\",\n    \"480\": \"MU\",\n    \"484\": \"MX\",\n    \"492\": \"MC\",\n    \"496\": \"MN\",\n    \"498\": \"MD\",\n    \"499\": \"ME\",\n    \"500\": \"MS\",\n    \"504\": \"MA\",\n    \"508\": \"MZ\",\n    \"512\": \"OM\",\n    \"516\": \"NA\",\n    \"520\": \"NR\",\n    \"524\": \"NP\",\n    \"528\": \"NL\",\n    \"531\": \"CW\",\n    \"533\": \"AW\",\n    \"534\": \"SX\",\n    \"535\": \"BQ\",\n    \"540\": \"NC\",\n    \"548\": \"VU\",\n    \"554\": \"NZ\",\n    \"558\": \"NI\",\n    \"562\": \"NE\",\n    \"566\": \"NG\",\n    \"570\": \"NU\",\n    \"574\": \"NF\",\n    \"578\": \"NO\",\n    \"580\": \"MP\",\n    \"581\": \"UM\",\n    \"583\": \"FM\",\n    \"584\": \"MH\",\n    \"585\": \"PW\",\n    \"586\": \"PK\",\n    \"591\": \"PA\",\n    \"598\": \"PG\",\n    \"600\": \"PY\",\n    \"604\": \"PE\",\n    \"608\": \"PH\",\n    \"612\": \"PN\",\n    \"616\": \"PL\",\n    \"620\": \"PT\",\n    \"624\": \"GW\",\n    \"626\": \"TL\",\n    \"630\": \"PR\",\n    \"634\": \"QA\",\n    \"638\": \"RE\",\n    \"642\": \"RO\",\n    \"643\": \"RU\",\n    \"646\": \"RW\",\n    \"652\": \"BL\",\n    \"654\": \"SH\",\n    \"659\": \"KN\",\n    \"660\": \"AI\",\n    \"662\": \"LC\",\n    \"663\": \"MF\",\n    \"666\": \"PM\",\n    \"670\": \"VC\",\n    \"674\": \"SM\",\n    \"678\": \"ST\",\n    \"682\": \"SA\",\n    \"686\": \"SN\",\n    \"688\": \"RS\",\n    \"690\": \"SC\",\n    \"694\": \"SL\",\n    \"702\": \"SG\",\n    \"703\": \"SK\",\n    \"704\": \"VN\",\n    \"705\": \"SI\",\n    \"706\": \"SO\",\n    \"710\": \"ZA\",\n    \"716\": \"ZW\",\n    \"720\": \"YE\",\n    \"724\": \"ES\",\n    \"728\": \"SS\",\n    \"729\": \"SD\",\n    \"732\": \"EH\",\n    \"736\": \"SD\",\n    \"740\": \"SR\",\n    \"744\": \"SJ\",\n    \"748\": \"SZ\",\n    \"752\": \"SE\",\n    \"756\": \"CH\",\n    \"760\": \"SY\",\n    \"762\": \"TJ\",\n    \"764\": \"TH\",\n    \"768\": \"TG\",\n    \"772\": \"TK\",\n    \"776\": \"TO\",\n    \"780\": \"TT\",\n    \"784\": \"AE\",\n    \"788\": \"TN\",\n    \"792\": \"TR\",\n    \"795\": \"TM\",\n    \"796\": \"TC\",\n    \"798\": \"TV\",\n    \"800\": \"UG\",\n    \"804\": \"UA\",\n    \"807\": \"MK\",\n    \"818\": \"EG\",\n    \"826\": \"GB\",\n    \"830\": \"JE\",\n    \"831\": \"GG\",\n    \"832\": \"JE\",\n    \"833\": \"IM\",\n    \"834\": \"TZ\",\n    \"840\": \"US\",\n    \"850\": \"VI\",\n    \"854\": \"BF\",\n    \"858\": \"UY\",\n    \"860\": \"UZ\",\n    \"862\": \"VE\",\n    \"876\": \"WF\",\n    \"882\": \"WS\",\n    \"886\": \"YE\",\n    \"887\": \"YE\",\n    \"891\": \"RS\",\n    \"894\": \"ZM\",\n    \"958\": \"AA\",\n    \"959\": \"QM\",\n    \"960\": \"QN\",\n    \"962\": \"QP\",\n    \"963\": \"QQ\",\n    \"964\": \"QR\",\n    \"965\": \"QS\",\n    \"966\": \"QT\",\n    \"967\": \"EU\",\n    \"968\": \"QV\",\n    \"969\": \"QW\",\n    \"970\": \"QX\",\n    \"971\": \"QY\",\n    \"972\": \"QZ\",\n    \"973\": \"XA\",\n    \"974\": \"XB\",\n    \"975\": \"XC\",\n    \"976\": \"XD\",\n    \"977\": \"XE\",\n    \"978\": \"XF\",\n    \"979\": \"XG\",\n    \"980\": \"XH\",\n    \"981\": \"XI\",\n    \"982\": \"XJ\",\n    \"983\": \"XK\",\n    \"984\": \"XL\",\n    \"985\": \"XM\",\n    \"986\": \"XN\",\n    \"987\": \"XO\",\n    \"988\": \"XP\",\n    \"989\": \"XQ\",\n    \"990\": \"XR\",\n    \"991\": \"XS\",\n    \"992\": \"XT\",\n    \"993\": \"XU\",\n    \"994\": \"XV\",\n    \"995\": \"XW\",\n    \"996\": \"XX\",\n    \"997\": \"XY\",\n    \"998\": \"XZ\",\n    \"999\": \"ZZ\",\n    \"BU\": \"MM\",\n    \"CS\": \"RS\",\n    \"CT\": \"KI\",\n    \"DD\": \"DE\",\n    \"DY\": \"BJ\",\n    \"FQ\": \"AQ\",\n    \"FX\": \"FR\",\n    \"HV\": \"BF\",\n    \"JT\": \"UM\",\n    \"MI\": \"UM\",\n    \"NH\": \"VU\",\n    \"NQ\": \"AQ\",\n    \"PU\": \"UM\",\n    \"PZ\": \"PA\",\n    \"QU\": \"EU\",\n    \"RH\": \"ZW\",\n    \"TP\": \"TL\",\n    \"UK\": \"GB\",\n    \"VD\": \"VN\",\n    \"WK\": \"UM\",\n    \"YD\": \"YE\",\n    \"YU\": \"RS\",\n    \"ZR\": \"CD\",\n  };\n\n\n  /**\n   * Complex mappings from language subtags to preferred values.\n   *\n   * Spec: http://unicode.org/reports/tr35/#Identifiers\n   * Version: CLDR, version 36.1\n   */\n  var __complexLanguageMappings = {\n    // property names and values must be in canonical case\n\n    \"cnr\": {language: \"sr\", region: \"ME\"},\n    \"drw\": {language: \"fa\", region: \"AF\"},\n    \"hbs\": {language: \"sr\", script: \"Latn\"},\n    \"prs\": {language: \"fa\", region: \"AF\"},\n    \"sh\": {language: \"sr\", script: \"Latn\"},\n    \"swc\": {language: \"sw\", region: \"CD\"},\n    \"tnf\": {language: \"fa\", region: \"AF\"},\n  };\n\n\n  /**\n   * Complex mappings from region subtags to preferred values.\n   *\n   * Spec: http://unicode.org/reports/tr35/#Identifiers\n   * Version: CLDR, version 36.1\n   */\n  var __complexRegionMappings = {\n    // property names and values must be in canonical case\n\n    \"172\": {\n      default: \"RU\",\n      \"ab\": \"GE\",\n      \"az\": \"AZ\",\n      \"be\": \"BY\",\n      \"crh\": \"UA\",\n      \"gag\": \"MD\",\n      \"got\": \"UA\",\n      \"hy\": \"AM\",\n      \"ji\": \"UA\",\n      \"ka\": \"GE\",\n      \"kaa\": \"UZ\",\n      \"kk\": \"KZ\",\n      \"ku-Yezi\": \"GE\",\n      \"ky\": \"KG\",\n      \"os\": \"GE\",\n      \"rue\": \"UA\",\n      \"sog\": \"UZ\",\n      \"tg\": \"TJ\",\n      \"tk\": \"TM\",\n      \"tkr\": \"AZ\",\n      \"tly\": \"AZ\",\n      \"ttt\": \"AZ\",\n      \"ug-Cyrl\": \"KZ\",\n      \"uk\": \"UA\",\n      \"und-Armn\": \"AM\",\n      \"und-Chrs\": \"UZ\",\n      \"und-Geor\": \"GE\",\n      \"und-Goth\": \"UA\",\n      \"und-Sogd\": \"UZ\",\n      \"und-Sogo\": \"UZ\",\n      \"und-Yezi\": \"GE\",\n      \"uz\": \"UZ\",\n      \"xco\": \"UZ\",\n      \"xmf\": \"GE\",\n    },\n    \"200\": {\n      default: \"CZ\",\n      \"sk\": \"SK\",\n    },\n    \"530\": {\n      default: \"CW\",\n      \"vic\": \"SX\",\n    },\n    \"532\": {\n      default: \"CW\",\n      \"vic\": \"SX\",\n    },\n    \"536\": {\n      default: \"SA\",\n      \"akk\": \"IQ\",\n      \"ckb\": \"IQ\",\n      \"ku-Arab\": \"IQ\",\n      \"mis\": \"IQ\",\n      \"syr\": \"IQ\",\n      \"und-Hatr\": \"IQ\",\n      \"und-Syrc\": \"IQ\",\n      \"und-Xsux\": \"IQ\",\n    },\n    \"582\": {\n      default: \"FM\",\n      \"mh\": \"MH\",\n      \"pau\": \"PW\",\n    },\n    \"810\": {\n      default: \"RU\",\n      \"ab\": \"GE\",\n      \"az\": \"AZ\",\n      \"be\": \"BY\",\n      \"crh\": \"UA\",\n      \"et\": \"EE\",\n      \"gag\": \"MD\",\n      \"got\": \"UA\",\n      \"hy\": \"AM\",\n      \"ji\": \"UA\",\n      \"ka\": \"GE\",\n      \"kaa\": \"UZ\",\n      \"kk\": \"KZ\",\n      \"ku-Yezi\": \"GE\",\n      \"ky\": \"KG\",\n      \"lt\": \"LT\",\n      \"ltg\": \"LV\",\n      \"lv\": \"LV\",\n      \"os\": \"GE\",\n      \"rue\": \"UA\",\n      \"sgs\": \"LT\",\n      \"sog\": \"UZ\",\n      \"tg\": \"TJ\",\n      \"tk\": \"TM\",\n      \"tkr\": \"AZ\",\n      \"tly\": \"AZ\",\n      \"ttt\": \"AZ\",\n      \"ug-Cyrl\": \"KZ\",\n      \"uk\": \"UA\",\n      \"und-Armn\": \"AM\",\n      \"und-Chrs\": \"UZ\",\n      \"und-Geor\": \"GE\",\n      \"und-Goth\": \"UA\",\n      \"und-Sogd\": \"UZ\",\n      \"und-Sogo\": \"UZ\",\n      \"und-Yezi\": \"GE\",\n      \"uz\": \"UZ\",\n      \"vro\": \"EE\",\n      \"xco\": \"UZ\",\n      \"xmf\": \"GE\",\n    },\n    \"890\": {\n      default: \"RS\",\n      \"bs\": \"BA\",\n      \"hr\": \"HR\",\n      \"mk\": \"MK\",\n      \"sl\": \"SI\",\n    },\n    \"AN\": {\n      default: \"CW\",\n      \"vic\": \"SX\",\n    },\n    \"NT\": {\n      default: \"SA\",\n      \"akk\": \"IQ\",\n      \"ckb\": \"IQ\",\n      \"ku-Arab\": \"IQ\",\n      \"mis\": \"IQ\",\n      \"syr\": \"IQ\",\n      \"und-Hatr\": \"IQ\",\n      \"und-Syrc\": \"IQ\",\n      \"und-Xsux\": \"IQ\",\n    },\n    \"PC\": {\n      default: \"FM\",\n      \"mh\": \"MH\",\n      \"pau\": \"PW\",\n    },\n    \"SU\": {\n      default: \"RU\",\n      \"ab\": \"GE\",\n      \"az\": \"AZ\",\n      \"be\": \"BY\",\n      \"crh\": \"UA\",\n      \"et\": \"EE\",\n      \"gag\": \"MD\",\n      \"got\": \"UA\",\n      \"hy\": \"AM\",\n      \"ji\": \"UA\",\n      \"ka\": \"GE\",\n      \"kaa\": \"UZ\",\n      \"kk\": \"KZ\",\n      \"ku-Yezi\": \"GE\",\n      \"ky\": \"KG\",\n      \"lt\": \"LT\",\n      \"ltg\": \"LV\",\n      \"lv\": \"LV\",\n      \"os\": \"GE\",\n      \"rue\": \"UA\",\n      \"sgs\": \"LT\",\n      \"sog\": \"UZ\",\n      \"tg\": \"TJ\",\n      \"tk\": \"TM\",\n      \"tkr\": \"AZ\",\n      \"tly\": \"AZ\",\n      \"ttt\": \"AZ\",\n      \"ug-Cyrl\": \"KZ\",\n      \"uk\": \"UA\",\n      \"und-Armn\": \"AM\",\n      \"und-Chrs\": \"UZ\",\n      \"und-Geor\": \"GE\",\n      \"und-Goth\": \"UA\",\n      \"und-Sogd\": \"UZ\",\n      \"und-Sogo\": \"UZ\",\n      \"und-Yezi\": \"GE\",\n      \"uz\": \"UZ\",\n      \"vro\": \"EE\",\n      \"xco\": \"UZ\",\n      \"xmf\": \"GE\",\n    },\n  };\n\n\n  /**\n   * Mappings from variant subtags to preferred values.\n   *\n   * Spec: http://unicode.org/reports/tr35/#Identifiers\n   * Version: CLDR, version 36.1\n   */\n  var __variantMappings = {\n    // property names and values must be in canonical case\n\n    \"aaland\": {type: \"region\", replacement: \"AX\"},\n    \"arevela\": {type: \"language\", replacement: \"hy\"},\n    \"arevmda\": {type: \"language\", replacement: \"hyw\"},\n    \"heploc\": {type: \"variant\", replacement: \"alalc97\"},\n    \"polytoni\": {type: \"variant\", replacement: \"polyton\"},\n  };\n\n\n  /**\n   * Mappings from Unicode extension subtags to preferred values.\n   *\n   * Spec: http://unicode.org/reports/tr35/#Identifiers\n   * Version: CLDR, version 36.1\n   */\n  var __unicodeMappings = {\n    // property names and values must be in canonical case\n\n    \"ca\": {\n      \"ethiopic-amete-alem\": \"ethioaa\",\n      \"islamicc\": \"islamic-civil\",\n    },\n    \"kb\": {\n      \"yes\": \"true\",\n    },\n    \"kc\": {\n      \"yes\": \"true\",\n    },\n    \"kh\": {\n      \"yes\": \"true\",\n    },\n    \"kk\": {\n      \"yes\": \"true\",\n    },\n    \"kn\": {\n      \"yes\": \"true\",\n    },\n    \"ks\": {\n      \"primary\": \"level1\",\n      \"tertiary\": \"level3\",\n    },\n    \"ms\": {\n      \"imperial\": \"uksystem\",\n    },\n    \"rg\": {\n      \"cn11\": \"cnbj\",\n      \"cn12\": \"cntj\",\n      \"cn13\": \"cnhe\",\n      \"cn14\": \"cnsx\",\n      \"cn15\": \"cnmn\",\n      \"cn21\": \"cnln\",\n      \"cn22\": \"cnjl\",\n      \"cn23\": \"cnhl\",\n      \"cn31\": \"cnsh\",\n      \"cn32\": \"cnjs\",\n      \"cn33\": \"cnzj\",\n      \"cn34\": \"cnah\",\n      \"cn35\": \"cnfj\",\n      \"cn36\": \"cnjx\",\n      \"cn37\": \"cnsd\",\n      \"cn41\": \"cnha\",\n      \"cn42\": \"cnhb\",\n      \"cn43\": \"cnhn\",\n      \"cn44\": \"cngd\",\n      \"cn45\": \"cngx\",\n      \"cn46\": \"cnhi\",\n      \"cn50\": \"cncq\",\n      \"cn51\": \"cnsc\",\n      \"cn52\": \"cngz\",\n      \"cn53\": \"cnyn\",\n      \"cn54\": \"cnxz\",\n      \"cn61\": \"cnsn\",\n      \"cn62\": \"cngs\",\n      \"cn63\": \"cnqh\",\n      \"cn64\": \"cnnx\",\n      \"cn65\": \"cnxj\",\n      \"cz10a\": \"cz110\",\n      \"cz10b\": \"cz111\",\n      \"cz10c\": \"cz112\",\n      \"cz10d\": \"cz113\",\n      \"cz10e\": \"cz114\",\n      \"cz10f\": \"cz115\",\n      \"cz611\": \"cz663\",\n      \"cz612\": \"cz632\",\n      \"cz613\": \"cz633\",\n      \"cz614\": \"cz634\",\n      \"cz615\": \"cz635\",\n      \"cz621\": \"cz641\",\n      \"cz622\": \"cz642\",\n      \"cz623\": \"cz643\",\n      \"cz624\": \"cz644\",\n      \"cz626\": \"cz646\",\n      \"cz627\": \"cz647\",\n      \"czjc\": \"cz31\",\n      \"czjm\": \"cz64\",\n      \"czka\": \"cz41\",\n      \"czkr\": \"cz52\",\n      \"czli\": \"cz51\",\n      \"czmo\": \"cz80\",\n      \"czol\": \"cz71\",\n      \"czpa\": \"cz53\",\n      \"czpl\": \"cz32\",\n      \"czpr\": \"cz10\",\n      \"czst\": \"cz20\",\n      \"czus\": \"cz42\",\n      \"czvy\": \"cz63\",\n      \"czzl\": \"cz72\",\n      \"fra\": \"frges\",\n      \"frb\": \"frnaq\",\n      \"frc\": \"frara\",\n      \"frd\": \"frbfc\",\n      \"fre\": \"frbre\",\n      \"frf\": \"frcvl\",\n      \"frg\": \"frges\",\n      \"frh\": \"frcor\",\n      \"fri\": \"frbfc\",\n      \"frj\": \"fridf\",\n      \"frk\": \"frocc\",\n      \"frl\": \"frnaq\",\n      \"frm\": \"frges\",\n      \"frn\": \"frocc\",\n      \"fro\": \"frhdf\",\n      \"frp\": \"frnor\",\n      \"frq\": \"frnor\",\n      \"frr\": \"frpdl\",\n      \"frs\": \"frhdf\",\n      \"frt\": \"frnaq\",\n      \"fru\": \"frpac\",\n      \"frv\": \"frara\",\n      \"laxn\": \"laxs\",\n      \"lud\": \"lucl\",\n      \"lug\": \"luec\",\n      \"lul\": \"luca\",\n      \"mrnkc\": \"mr13\",\n      \"no23\": \"no50\",\n      \"nzn\": \"nzauk\",\n      \"nzs\": \"nzcan\",\n      \"omba\": \"ombj\",\n      \"omsh\": \"omsj\",\n      \"plds\": \"pl02\",\n      \"plkp\": \"pl04\",\n      \"pllb\": \"pl08\",\n      \"plld\": \"pl10\",\n      \"pllu\": \"pl06\",\n      \"plma\": \"pl12\",\n      \"plmz\": \"pl14\",\n      \"plop\": \"pl16\",\n      \"plpd\": \"pl20\",\n      \"plpk\": \"pl18\",\n      \"plpm\": \"pl22\",\n      \"plsk\": \"pl26\",\n      \"plsl\": \"pl24\",\n      \"plwn\": \"pl28\",\n      \"plwp\": \"pl30\",\n      \"plzp\": \"pl32\",\n      \"tteto\": \"tttob\",\n      \"ttrcm\": \"ttmrc\",\n      \"ttwto\": \"tttob\",\n      \"twkhq\": \"twkhh\",\n      \"twtnq\": \"twtnn\",\n      \"twtpq\": \"twnwt\",\n      \"twtxq\": \"twtxg\",\n    },\n    \"sd\": {\n      \"cn11\": \"cnbj\",\n      \"cn12\": \"cntj\",\n      \"cn13\": \"cnhe\",\n      \"cn14\": \"cnsx\",\n      \"cn15\": \"cnmn\",\n      \"cn21\": \"cnln\",\n      \"cn22\": \"cnjl\",\n      \"cn23\": \"cnhl\",\n      \"cn31\": \"cnsh\",\n      \"cn32\": \"cnjs\",\n      \"cn33\": \"cnzj\",\n      \"cn34\": \"cnah\",\n      \"cn35\": \"cnfj\",\n      \"cn36\": \"cnjx\",\n      \"cn37\": \"cnsd\",\n      \"cn41\": \"cnha\",\n      \"cn42\": \"cnhb\",\n      \"cn43\": \"cnhn\",\n      \"cn44\": \"cngd\",\n      \"cn45\": \"cngx\",\n      \"cn46\": \"cnhi\",\n      \"cn50\": \"cncq\",\n      \"cn51\": \"cnsc\",\n      \"cn52\": \"cngz\",\n      \"cn53\": \"cnyn\",\n      \"cn54\": \"cnxz\",\n      \"cn61\": \"cnsn\",\n      \"cn62\": \"cngs\",\n      \"cn63\": \"cnqh\",\n      \"cn64\": \"cnnx\",\n      \"cn65\": \"cnxj\",\n      \"cz10a\": \"cz110\",\n      \"cz10b\": \"cz111\",\n      \"cz10c\": \"cz112\",\n      \"cz10d\": \"cz113\",\n      \"cz10e\": \"cz114\",\n      \"cz10f\": \"cz115\",\n      \"cz611\": \"cz663\",\n      \"cz612\": \"cz632\",\n      \"cz613\": \"cz633\",\n      \"cz614\": \"cz634\",\n      \"cz615\": \"cz635\",\n      \"cz621\": \"cz641\",\n      \"cz622\": \"cz642\",\n      \"cz623\": \"cz643\",\n      \"cz624\": \"cz644\",\n      \"cz626\": \"cz646\",\n      \"cz627\": \"cz647\",\n      \"czjc\": \"cz31\",\n      \"czjm\": \"cz64\",\n      \"czka\": \"cz41\",\n      \"czkr\": \"cz52\",\n      \"czli\": \"cz51\",\n      \"czmo\": \"cz80\",\n      \"czol\": \"cz71\",\n      \"czpa\": \"cz53\",\n      \"czpl\": \"cz32\",\n      \"czpr\": \"cz10\",\n      \"czst\": \"cz20\",\n      \"czus\": \"cz42\",\n      \"czvy\": \"cz63\",\n      \"czzl\": \"cz72\",\n      \"fra\": \"frges\",\n      \"frb\": \"frnaq\",\n      \"frc\": \"frara\",\n      \"frd\": \"frbfc\",\n      \"fre\": \"frbre\",\n      \"frf\": \"frcvl\",\n      \"frg\": \"frges\",\n      \"frh\": \"frcor\",\n      \"fri\": \"frbfc\",\n      \"frj\": \"fridf\",\n      \"frk\": \"frocc\",\n      \"frl\": \"frnaq\",\n      \"frm\": \"frges\",\n      \"frn\": \"frocc\",\n      \"fro\": \"frhdf\",\n      \"frp\": \"frnor\",\n      \"frq\": \"frnor\",\n      \"frr\": \"frpdl\",\n      \"frs\": \"frhdf\",\n      \"frt\": \"frnaq\",\n      \"fru\": \"frpac\",\n      \"frv\": \"frara\",\n      \"laxn\": \"laxs\",\n      \"lud\": \"lucl\",\n      \"lug\": \"luec\",\n      \"lul\": \"luca\",\n      \"mrnkc\": \"mr13\",\n      \"no23\": \"no50\",\n      \"nzn\": \"nzauk\",\n      \"nzs\": \"nzcan\",\n      \"omba\": \"ombj\",\n      \"omsh\": \"omsj\",\n      \"plds\": \"pl02\",\n      \"plkp\": \"pl04\",\n      \"pllb\": \"pl08\",\n      \"plld\": \"pl10\",\n      \"pllu\": \"pl06\",\n      \"plma\": \"pl12\",\n      \"plmz\": \"pl14\",\n      \"plop\": \"pl16\",\n      \"plpd\": \"pl20\",\n      \"plpk\": \"pl18\",\n      \"plpm\": \"pl22\",\n      \"plsk\": \"pl26\",\n      \"plsl\": \"pl24\",\n      \"plwn\": \"pl28\",\n      \"plwp\": \"pl30\",\n      \"plzp\": \"pl32\",\n      \"tteto\": \"tttob\",\n      \"ttrcm\": \"ttmrc\",\n      \"ttwto\": \"tttob\",\n      \"twkhq\": \"twkhh\",\n      \"twtnq\": \"twtnn\",\n      \"twtpq\": \"twnwt\",\n      \"twtxq\": \"twtxg\",\n    },\n    \"tz\": {\n      \"aqams\": \"nzakl\",\n      \"cnckg\": \"cnsha\",\n      \"cnhrb\": \"cnsha\",\n      \"cnkhg\": \"cnurc\",\n      \"cuba\": \"cuhav\",\n      \"egypt\": \"egcai\",\n      \"eire\": \"iedub\",\n      \"est\": \"utcw05\",\n      \"gmt0\": \"gmt\",\n      \"hongkong\": \"hkhkg\",\n      \"hst\": \"utcw10\",\n      \"iceland\": \"isrey\",\n      \"iran\": \"irthr\",\n      \"israel\": \"jeruslm\",\n      \"jamaica\": \"jmkin\",\n      \"japan\": \"jptyo\",\n      \"libya\": \"lytip\",\n      \"mst\": \"utcw07\",\n      \"navajo\": \"usden\",\n      \"poland\": \"plwaw\",\n      \"portugal\": \"ptlis\",\n      \"prc\": \"cnsha\",\n      \"roc\": \"twtpe\",\n      \"rok\": \"krsel\",\n      \"turkey\": \"trist\",\n      \"uct\": \"utc\",\n      \"usnavajo\": \"usden\",\n      \"zulu\": \"utc\",\n    },\n  };\n\n\n  /**\n   * Mappings from Unicode extension subtags to preferred values.\n   *\n   * Spec: http://unicode.org/reports/tr35/#Identifiers\n   * Version: CLDR, version 36.1\n   */\n  var __transformMappings = {\n    // property names and values must be in canonical case\n\n    \"d0\": {\n      \"name\": \"charname\",\n    },\n    \"m0\": {\n      \"names\": \"prprname\",\n    },\n  };\n\n  /**\n   * Canonicalizes the given well-formed BCP 47 language tag, including regularized case of subtags.\n   *\n   * Spec: ECMAScript Internationalization API Specification, draft, 6.2.3.\n   * Spec: RFC 5646, section 4.5.\n   */\n  function canonicalizeLanguageTag(locale) {\n\n    // start with lower case for easier processing, and because most subtags will need to be lower case anyway\n    locale = locale.toLowerCase();\n\n    // handle mappings for complete tags\n    if (__tagMappings.hasOwnProperty(locale)) {\n      return __tagMappings[locale];\n    }\n\n    var subtags = locale.split(\"-\");\n    var i = 0;\n\n    // handle standard part: all subtags before first variant or singleton subtag\n    var language;\n    var script;\n    var region;\n    while (i < subtags.length) {\n      var subtag = subtags[i];\n      if (i === 0) {\n        language = subtag;\n      } else if (subtag.length === 2 || subtag.length === 3) {\n        region = subtag.toUpperCase();\n      } else if (subtag.length === 4 && !(\"0\" <= subtag[0] && subtag[0] <= \"9\")) {\n        script = subtag[0].toUpperCase() + subtag.substring(1).toLowerCase();\n      } else {\n        break;\n      }\n      i++;\n    }\n\n    if (__languageMappings.hasOwnProperty(language)) {\n      language = __languageMappings[language];\n    } else if (__complexLanguageMappings.hasOwnProperty(language)) {\n      var mapping = __complexLanguageMappings[language];\n\n      language = mapping.language;\n      if (script === undefined && mapping.hasOwnProperty(\"script\")) {\n        script = mapping.script;\n      }\n      if (region === undefined && mapping.hasOwnProperty(\"region\")) {\n        region = mapping.region;\n      }\n    }\n\n    if (region !== undefined) {\n      if (__regionMappings.hasOwnProperty(region)) {\n        region = __regionMappings[region];\n      } else if (__complexRegionMappings.hasOwnProperty(region)) {\n        var mapping = __complexRegionMappings[region];\n\n        var mappingKey = language;\n        if (script !== undefined) {\n          mappingKey += \"-\" + script;\n        }\n\n        if (mapping.hasOwnProperty(mappingKey)) {\n          region = mapping[mappingKey];\n        } else {\n          region = mapping.default;\n        }\n      }\n    }\n\n    // handle variants\n    var variants = [];\n    while (i < subtags.length && subtags[i].length > 1) {\n      var variant = subtags[i];\n\n      if (__variantMappings.hasOwnProperty(variant)) {\n        var mapping = __variantMappings[variant];\n        switch (mapping.type) {\n          case \"language\":\n            language = mapping.replacement;\n            break;\n\n          case \"region\":\n            region = mapping.replacement;\n            break;\n\n          case \"variant\":\n            variants.push(mapping.replacement);\n            break;\n\n          default:\n            throw new Error(\"illegal variant mapping type\");\n        }\n      } else {\n        variants.push(variant);\n      }\n\n      i += 1;\n    }\n    variants.sort();\n\n    // handle extensions\n    var extensions = [];\n    while (i < subtags.length && subtags[i] !== \"x\") {\n      var extensionStart = i;\n      i++;\n      while (i < subtags.length && subtags[i].length > 1) {\n        i++;\n      }\n\n      var extension;\n      var extensionKey = subtags[extensionStart];\n      if (extensionKey === \"u\") {\n        var j = extensionStart + 1;\n\n        // skip over leading attributes\n        while (j < i && subtags[j].length > 2) {\n          j++;\n        }\n\n        extension = subtags.slice(extensionStart, j).join(\"-\");\n\n        while (j < i) {\n          var keyStart = j;\n          j++;\n\n          while (j < i && subtags[j].length > 2) {\n            j++;\n          }\n\n          var key = subtags[keyStart];\n          var value = subtags.slice(keyStart + 1, j).join(\"-\");\n\n          if (__unicodeMappings.hasOwnProperty(key)) {\n            var mapping = __unicodeMappings[key];\n            if (mapping.hasOwnProperty(value)) {\n              value = mapping[value];\n            }\n          }\n\n          extension += \"-\" + key;\n          if (value !== \"\" && value !== \"true\") {\n            extension += \"-\" + value;\n          }\n        }\n      } else if (extensionKey === \"t\") {\n        var j = extensionStart + 1;\n\n        while (j < i && !transformKeyRE.test(subtags[j])) {\n          j++;\n        }\n\n        extension = \"t\";\n\n        var transformLanguage = subtags.slice(extensionStart + 1, j).join(\"-\");\n        if (transformLanguage !== \"\") {\n          extension += \"-\" + canonicalizeLanguageTag(transformLanguage).toLowerCase();\n        }\n\n        while (j < i) {\n          var keyStart = j;\n          j++;\n\n          while (j < i && subtags[j].length > 2) {\n            j++;\n          }\n\n          var key = subtags[keyStart];\n          var value = subtags.slice(keyStart + 1, j).join(\"-\");\n\n          if (__transformMappings.hasOwnProperty(key)) {\n            var mapping = __transformMappings[key];\n            if (mapping.hasOwnProperty(value)) {\n              value = mapping[value];\n            }\n          }\n\n          extension += \"-\" + key + \"-\" + value;\n        }\n      } else {\n        extension = subtags.slice(extensionStart, i).join(\"-\");\n      }\n\n      extensions.push(extension);\n    }\n    extensions.sort();\n\n    // handle private use\n    var privateUse;\n    if (i < subtags.length) {\n      privateUse = subtags.slice(i).join(\"-\");\n    }\n\n    // put everything back together\n    var canonical = language;\n    if (script !== undefined) {\n      canonical += \"-\" + script;\n    }\n    if (region !== undefined) {\n      canonical += \"-\" + region;\n    }\n    if (variants.length > 0) {\n      canonical += \"-\" + variants.join(\"-\");\n    }\n    if (extensions.length > 0) {\n      canonical += \"-\" + extensions.join(\"-\");\n    }\n    if (privateUse !== undefined) {\n      if (canonical.length > 0) {\n        canonical += \"-\" + privateUse;\n      } else {\n        canonical = privateUse;\n      }\n    }\n\n    return canonical;\n  }\n\n  return typeof locale === \"string\" && isStructurallyValidLanguageTag(locale) &&\n      canonicalizeLanguageTag(locale) === locale;\n}\n\n\n/**\n * Returns an array of error cases handled by CanonicalizeLocaleList().\n */\nfunction getInvalidLocaleArguments() {\n  function CustomError() {}\n\n  var topLevelErrors = [\n    // fails ToObject\n    [null, TypeError],\n\n    // fails Get\n    [{ get length() { throw new CustomError(); } }, CustomError],\n\n    // fail ToLength\n    [{ length: Symbol.toPrimitive }, TypeError],\n    [{ length: { get [Symbol.toPrimitive]() { throw new CustomError(); } } }, CustomError],\n    [{ length: { [Symbol.toPrimitive]() { throw new CustomError(); } } }, CustomError],\n    [{ length: { get valueOf() { throw new CustomError(); } } }, CustomError],\n    [{ length: { valueOf() { throw new CustomError(); } } }, CustomError],\n    [{ length: { get toString() { throw new CustomError(); } } }, CustomError],\n    [{ length: { toString() { throw new CustomError(); } } }, CustomError],\n\n    // fail type check\n    [[undefined], TypeError],\n    [[null], TypeError],\n    [[true], TypeError],\n    [[Symbol.toPrimitive], TypeError],\n    [[1], TypeError],\n    [[0.1], TypeError],\n    [[NaN], TypeError],\n  ];\n\n  var invalidLanguageTags = [\n    \"\", // empty tag\n    \"i\", // singleton alone\n    \"x\", // private use without subtag\n    \"u\", // extension singleton in first place\n    \"419\", // region code in first place\n    \"u-nu-latn-cu-bob\", // extension sequence without language\n    \"hans-cmn-cn\", // \"hans\" could theoretically be a 4-letter language code,\n                   // but those can't be followed by extlang codes.\n    \"abcdefghi\", // overlong language\n    \"cmn-hans-cn-u-u\", // duplicate singleton\n    \"cmn-hans-cn-t-u-ca-u\", // duplicate singleton\n    \"de-gregory-gregory\", // duplicate variant\n    \"*\", // language range\n    \"de-*\", // language range\n    \"中文\", // non-ASCII letters\n    \"en-ß\", // non-ASCII letters\n    \"ıd\" // non-ASCII letters\n  ];\n\n  return topLevelErrors.concat(\n    invalidLanguageTags.map(tag => [tag, RangeError]),\n    invalidLanguageTags.map(tag => [[tag], RangeError]),\n    invalidLanguageTags.map(tag => [[\"en\", tag], RangeError]),\n  )\n}\n\n/**\n * Tests whether the named options property is correctly handled by the given constructor.\n * @param {object} Constructor the constructor to test.\n * @param {string} property the name of the options property to test.\n * @param {string} type the type that values of the property are expected to have\n * @param {Array} [values] an array of allowed values for the property. Not needed for boolean.\n * @param {any} fallback the fallback value that the property assumes if not provided.\n * @param {object} testOptions additional options:\n *   @param {boolean} isOptional whether support for this property is optional for implementations.\n *   @param {boolean} noReturn whether the resulting value of the property is not returned.\n *   @param {boolean} isILD whether the resulting value of the property is implementation and locale dependent.\n *   @param {object} extra additional option to pass along, properties are value -> {option: value}.\n */\nfunction testOption(Constructor, property, type, values, fallback, testOptions) {\n  var isOptional = testOptions !== undefined && testOptions.isOptional === true;\n  var noReturn = testOptions !== undefined && testOptions.noReturn === true;\n  var isILD = testOptions !== undefined && testOptions.isILD === true;\n\n  function addExtraOptions(options, value, testOptions) {\n    if (testOptions !== undefined && testOptions.extra !== undefined) {\n      var extra;\n      if (value !== undefined && testOptions.extra[value] !== undefined) {\n        extra = testOptions.extra[value];\n      } else if (testOptions.extra.any !== undefined) {\n        extra = testOptions.extra.any;\n      }\n      if (extra !== undefined) {\n        Object.getOwnPropertyNames(extra).forEach(function (prop) {\n          options[prop] = extra[prop];\n        });\n      }\n    }\n  }\n\n  var testValues, options, obj, expected, actual, error;\n\n  // test that the specified values are accepted. Also add values that convert to specified values.\n  if (type === \"boolean\") {\n    if (values === undefined) {\n      values = [true, false];\n    }\n    testValues = values.slice(0);\n    testValues.push(888);\n    testValues.push(0);\n  } else if (type === \"string\") {\n    testValues = values.slice(0);\n    testValues.push({toString: function () { return values[0]; }});\n  }\n  testValues.forEach(function (value) {\n    options = {};\n    options[property] = value;\n    addExtraOptions(options, value, testOptions);\n    obj = new Constructor(undefined, options);\n    if (noReturn) {\n      if (obj.resolvedOptions().hasOwnProperty(property)) {\n        throw new Test262Error(\"Option property \" + property + \" is returned, but shouldn't be.\");\n      }\n    } else {\n      actual = obj.resolvedOptions()[property];\n      if (isILD) {\n        if (actual !== undefined && values.indexOf(actual) === -1) {\n          throw new Test262Error(\"Invalid value \" + actual + \" returned for property \" + property + \".\");\n        }\n      } else {\n        if (type === \"boolean\") {\n          expected = Boolean(value);\n        } else if (type === \"string\") {\n          expected = String(value);\n        }\n        if (actual !== expected && !(isOptional && actual === undefined)) {\n          throw new Test262Error(\"Option value \" + value + \" for property \" + property +\n            \" was not accepted; got \" + actual + \" instead.\");\n        }\n      }\n    }\n  });\n\n  // test that invalid values are rejected\n  if (type === \"string\") {\n    var invalidValues = [\"invalidValue\", -1, null];\n    // assume that we won't have values in caseless scripts\n    if (values[0].toUpperCase() !== values[0]) {\n      invalidValues.push(values[0].toUpperCase());\n    } else {\n      invalidValues.push(values[0].toLowerCase());\n    }\n    invalidValues.forEach(function (value) {\n      options = {};\n      options[property] = value;\n      addExtraOptions(options, value, testOptions);\n      error = undefined;\n      try {\n        obj = new Constructor(undefined, options);\n      } catch (e) {\n        error = e;\n      }\n      if (error === undefined) {\n        throw new Test262Error(\"Invalid option value \" + value + \" for property \" + property + \" was not rejected.\");\n      } else if (error.name !== \"RangeError\") {\n        throw new Test262Error(\"Invalid option value \" + value + \" for property \" + property + \" was rejected with wrong error \" + error.name + \".\");\n      }\n    });\n  }\n\n  // test that fallback value or another valid value is used if no options value is provided\n  if (!noReturn) {\n    options = {};\n    addExtraOptions(options, undefined, testOptions);\n    obj = new Constructor(undefined, options);\n    actual = obj.resolvedOptions()[property];\n    if (!(isOptional && actual === undefined)) {\n      if (fallback !== undefined) {\n        if (actual !== fallback) {\n          throw new Test262Error(\"Option fallback value \" + fallback + \" for property \" + property +\n            \" was not used; got \" + actual + \" instead.\");\n        }\n      } else {\n        if (values.indexOf(actual) === -1 && !(isILD && actual === undefined)) {\n          throw new Test262Error(\"Invalid value \" + actual + \" returned for property \" + property + \".\");\n        }\n      }\n    }\n  }\n}\n\n\n/**\n * Properties of the RegExp constructor that may be affected by use of regular\n * expressions, and the default values of these properties. Properties are from\n * https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Deprecated_and_obsolete_features#RegExp_Properties\n */\nvar regExpProperties = [\"$1\", \"$2\", \"$3\", \"$4\", \"$5\", \"$6\", \"$7\", \"$8\", \"$9\",\n  \"$_\", \"$*\", \"$&\", \"$+\", \"$`\", \"$'\",\n  \"input\", \"lastMatch\", \"lastParen\", \"leftContext\", \"rightContext\"\n];\n\nvar regExpPropertiesDefaultValues = (function () {\n  var values = Object.create(null);\n  (/(?:)/).test(\"\");\n  regExpProperties.forEach(function (property) {\n    values[property] = RegExp[property];\n  });\n  return values;\n}());\n\n\n/**\n * Tests that executing the provided function (which may use regular expressions\n * in its implementation) does not create or modify unwanted properties on the\n * RegExp constructor.\n */\nfunction testForUnwantedRegExpChanges(testFunc) {\n  (/(?:)/).test(\"\");\n  testFunc();\n  regExpProperties.forEach(function (property) {\n    if (RegExp[property] !== regExpPropertiesDefaultValues[property]) {\n      throw new Test262Error(\"RegExp has unexpected property \" + property + \" with value \" +\n        RegExp[property] + \".\");\n    }\n  });\n}\n\n\n/**\n * Returns an array of all known calendars.\n */\nfunction allCalendars() {\n  // source: CLDR file common/bcp47/number.xml; version CLDR 39.\n  // https://github.com/unicode-org/cldr/blob/master/common/bcp47/calendar.xml\n  return [\n    \"buddhist\",\n    \"chinese\",\n    \"coptic\",\n    \"dangi\",\n    \"ethioaa\",\n    \"ethiopic\",\n    \"gregory\",\n    \"hebrew\",\n    \"indian\",\n    \"islamic\",\n    \"islamic-umalqura\",\n    \"islamic-tbla\",\n    \"islamic-civil\",\n    \"islamic-rgsa\",\n    \"iso8601\",\n    \"japanese\",\n    \"persian\",\n    \"roc\",\n  ];\n}\n\n\n/**\n * Returns an array of all known collations.\n */\nfunction allCollations() {\n  // source: CLDR file common/bcp47/collation.xml; version CLDR 39.\n  // https://github.com/unicode-org/cldr/blob/master/common/bcp47/collation.xml\n  return [\n    \"big5han\",\n    \"compat\",\n    \"dict\",\n    \"direct\",\n    \"ducet\",\n    \"emoji\",\n    \"eor\",\n    \"gb2312\",\n    \"phonebk\",\n    \"phonetic\",\n    \"pinyin\",\n    \"reformed\",\n    \"search\",\n    \"searchjl\",\n    \"standard\",\n    \"stroke\",\n    \"trad\",\n    \"unihan\",\n    \"zhuyin\",\n  ];\n}\n\n\n/**\n * Returns an array of all known numbering systems.\n */\nfunction allNumberingSystems() {\n  // source: CLDR file common/bcp47/number.xml; version CLDR 48 & new in Unicode 17.0\n  // https://github.com/unicode-org/cldr/blob/master/common/bcp47/number.xml\n  return [\n    \"adlm\",\n    \"ahom\",\n    \"arab\",\n    \"arabext\",\n    \"armn\",\n    \"armnlow\",\n    \"bali\",\n    \"beng\",\n    \"bhks\",\n    \"brah\",\n    \"cakm\",\n    \"cham\",\n    \"cyrl\",\n    \"deva\",\n    \"diak\",\n    \"ethi\",\n    \"finance\",\n    \"fullwide\",\n    \"gara\",\n    \"geor\",\n    \"gong\",\n    \"gonm\",\n    \"grek\",\n    \"greklow\",\n    \"gujr\",\n    \"gukh\",\n    \"guru\",\n    \"hanidays\",\n    \"hanidec\",\n    \"hans\",\n    \"hansfin\",\n    \"hant\",\n    \"hantfin\",\n    \"hebr\",\n    \"hmng\",\n    \"hmnp\",\n    \"java\",\n    \"jpan\",\n    \"jpanfin\",\n    \"jpanyear\",\n    \"kali\",\n    \"kawi\",\n    \"khmr\",\n    \"knda\",\n    \"krai\",\n    \"lana\",\n    \"lanatham\",\n    \"laoo\",\n    \"latn\",\n    \"lepc\",\n    \"limb\",\n    \"mathbold\",\n    \"mathdbl\",\n    \"mathmono\",\n    \"mathsanb\",\n    \"mathsans\",\n    \"mlym\",\n    \"modi\",\n    \"mong\",\n    \"mroo\",\n    \"mtei\",\n    \"mymr\",\n    \"mymrepka\",\n    \"mymrpao\",\n    \"mymrshan\",\n    \"mymrtlng\",\n    \"nagm\",\n    \"native\",\n    \"newa\",\n    \"nkoo\",\n    \"olck\",\n    \"onao\",\n    \"orya\",\n    \"osma\",\n    \"outlined\",\n    \"rohg\",\n    \"roman\",\n    \"romanlow\",\n    \"saur\",\n    \"segment\",\n    \"shrd\",\n    \"sind\",\n    \"sinh\",\n    \"sora\",\n    \"sund\",\n    \"sunu\",\n    \"takr\",\n    \"talu\",\n    \"taml\",\n    \"tamldec\",\n    \"tnsa\",\n    \"telu\",\n    \"thai\",\n    \"tirh\",\n    \"tibt\",\n    \"tols\",\n    \"traditio\",\n    \"vaii\",\n    \"wara\",\n    \"wcho\",\n  ];\n}\n\n\n/**\n * Tests whether name is a valid BCP 47 numbering system name\n * and not excluded from use in the ECMAScript Internationalization API.\n * @param {string} name the name to be tested.\n * @return {boolean} whether name is a valid BCP 47 numbering system name and\n *   allowed for use in the ECMAScript Internationalization API.\n */\n\nfunction isValidNumberingSystem(name) {\n\n  var numberingSystems = allNumberingSystems();\n\n  var excluded = [\n    \"finance\",\n    \"native\",\n    \"traditio\"\n  ];\n\n\n  return numberingSystems.indexOf(name) !== -1 && excluded.indexOf(name) === -1;\n}\n\n\n/**\n * Provides the digits of numbering systems with simple digit mappings,\n * as specified in <https://tc39.es/ecma402/#table-numbering-system-digits>.\n */\n\nvar numberingSystemDigits = {\n  adlm: \"𞥐𞥑𞥒𞥓𞥔𞥕𞥖𞥗𞥘𞥙\",\n  ahom: \"𑜰𑜱𑜲𑜳𑜴𑜵𑜶𑜷𑜸𑜹\",\n  arab: \"٠١٢٣٤٥٦٧٨٩\",\n  arabext: \"۰۱۲۳۴۵۶۷۸۹\",\n  bali: \"\\u1B50\\u1B51\\u1B52\\u1B53\\u1B54\\u1B55\\u1B56\\u1B57\\u1B58\\u1B59\",\n  beng: \"০১২৩৪৫৬৭৮৯\",\n  bhks: \"𑱐𑱑𑱒𑱓𑱔𑱕𑱖𑱗𑱘𑱙\",\n  brah: \"𑁦𑁧𑁨𑁩𑁪𑁫𑁬𑁭𑁮𑁯\",\n  cakm: \"𑄶𑄷𑄸𑄹𑄺𑄻𑄼𑄽𑄾𑄿\",\n  cham: \"꩐꩑꩒꩓꩔꩕꩖꩗꩘꩙\",\n  deva: \"०१२३४५६७८९\",\n  diak: \"𑥐𑥑𑥒𑥓𑥔𑥕𑥖𑥗𑥘𑥙\",\n  fullwide: \"０１２３４５６７８９\",\n  gara: \"\\u{10D40}\\u{10D41}\\u{10D42}\\u{10D43}\\u{10D44}\\u{10D45}\\u{10D46}\\u{10D47}\\u{10D48}\\u{10D49}\",\n  gong: \"𑶠𑶡𑶢𑶣𑶤𑶥𑶦𑶧𑶨𑶩\",\n  gonm: \"𑵐𑵑𑵒𑵓𑵔𑵕𑵖𑵗𑵘𑵙\",\n  gujr: \"૦૧૨૩૪૫૬૭૮૯\",\n  gukh: \"\\u{16130}\\u{16131}\\u{16132}\\u{16133}\\u{16134}\\u{16135}\\u{16136}\\u{16137}\\u{16138}\\u{16139}\",\n  guru: \"੦੧੨੩੪੫੬੭੮੯\",\n  hanidec: \"〇一二三四五六七八九\",\n  hmng: \"𖭐𖭑𖭒𖭓𖭔𖭕𖭖𖭗𖭘𖭙\",\n  hmnp: \"𞅀𞅁𞅂𞅃𞅄𞅅𞅆𞅇𞅈𞅉\",\n  java: \"꧐꧑꧒꧓꧔꧕꧖꧗꧘꧙\",\n  kali: \"꤀꤁꤂꤃꤄꤅꤆꤇꤈꤉\",\n  kawi: \"\\u{11F50}\\u{11F51}\\u{11F52}\\u{11F53}\\u{11F54}\\u{11F55}\\u{11F56}\\u{11F57}\\u{11F58}\\u{11F59}\",\n  khmr: \"០១២៣៤៥៦៧៨៩\",\n  knda: \"೦೧೨೩೪೫೬೭೮೯\",\n  krai: \"\\u{16D70}\\u{16D71}\\u{16D72}\\u{16D73}\\u{16D74}\\u{16D75}\\u{16D76}\\u{16D77}\\u{16D78}\\u{16D79}\",\n  lana: \"᪀᪁᪂᪃᪄᪅᪆᪇᪈᪉\",\n  lanatham: \"᪐᪑᪒᪓᪔᪕᪖᪗᪘᪙\",\n  laoo: \"໐໑໒໓໔໕໖໗໘໙\",\n  latn: \"0123456789\",\n  lepc: \"᱀᱁᱂᱃᱄᱅᱆᱇᱈᱉\",\n  limb: \"\\u1946\\u1947\\u1948\\u1949\\u194A\\u194B\\u194C\\u194D\\u194E\\u194F\",\n  mathbold: \"𝟎𝟏𝟐𝟑𝟒𝟓𝟔𝟕𝟖𝟗\",\n  mathdbl: \"𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡\",\n  mathmono: \"𝟶𝟷𝟸𝟹𝟺𝟻𝟼𝟽𝟾𝟿\",\n  mathsanb: \"𝟬𝟭𝟮𝟯𝟰𝟱𝟲𝟳𝟴𝟵\",\n  mathsans: \"𝟢𝟣𝟤𝟥𝟦𝟧𝟨𝟩𝟪𝟫\",\n  mlym: \"൦൧൨൩൪൫൬൭൮൯\",\n  modi: \"𑙐𑙑𑙒𑙓𑙔𑙕𑙖𑙗𑙘𑙙\",\n  mong: \"᠐᠑᠒᠓᠔᠕᠖᠗᠘᠙\",\n  mroo: \"𖩠𖩡𖩢𖩣𖩤𖩥𖩦𖩧𖩨𖩩\",\n  mtei: \"꯰꯱꯲꯳꯴꯵꯶꯷꯸꯹\",\n  mymr: \"၀၁၂၃၄၅၆၇၈၉\",\n  mymrepka: \"\\u{116DA}\\u{116DB}\\u{116DC}\\u{116DD}\\u{116DE}\\u{116DF}\\u{116E0}\\u{116E1}\\u{116E2}\\u{116E3}\",\n  mymrpao: \"\\u{116D0}\\u{116D1}\\u{116D2}\\u{116D3}\\u{116D4}\\u{116D5}\\u{116D6}\\u{116D7}\\u{116D8}\\u{116D9}\",\n  mymrshan: \"႐႑႒႓႔႕႖႗႘႙\",\n  mymrtlng: \"꧰꧱꧲꧳꧴꧵꧶꧷꧸꧹\",\n  nagm: \"\\u{1E4F0}\\u{1E4F1}\\u{1E4F2}\\u{1E4F3}\\u{1E4F4}\\u{1E4F5}\\u{1E4F6}\\u{1E4F7}\\u{1E4F8}\\u{1E4F9}\",\n  newa: \"𑑐𑑑𑑒𑑓𑑔𑑕𑑖𑑗𑑘𑑙\",\n  nkoo: \"߀߁߂߃߄߅߆߇߈߉\",\n  olck: \"᱐᱑᱒᱓᱔᱕᱖᱗᱘᱙\",\n  onao: \"\\u{1E5F1}\\u{1E5F2}\\u{1E5F3}\\u{1E5F4}\\u{1E5F5}\\u{1E5F6}\\u{1E5F7}\\u{1E5F8}\\u{1E5F9}\\u{1E5FA}\",\n  orya: \"୦୧୨୩୪୫୬୭୮୯\",\n  osma: \"𐒠𐒡𐒢𐒣𐒤𐒥𐒦𐒧𐒨𐒩\",\n  outlined: \"\\u{1CCF0}\\u{1CCF1}\\u{1CCF2}\\u{1CCF3}\\u{1CCF4}\\u{1CCF5}\\u{1CCF6}\\u{1CCF7}\\u{1CCF8}\\u{1CCF9}\",\n  rohg: \"𐴰𐴱𐴲𐴳𐴴𐴵𐴶𐴷𐴸𐴹\",\n  saur: \"꣐꣑꣒꣓꣔꣕꣖꣗꣘꣙\",\n  segment: \"🯰🯱🯲🯳🯴🯵🯶🯷🯸🯹\",\n  shrd: \"𑇐𑇑𑇒𑇓𑇔𑇕𑇖𑇗𑇘𑇙\",\n  sind: \"𑋰𑋱𑋲𑋳𑋴𑋵𑋶𑋷𑋸𑋹\",\n  sinh: \"෦෧෨෩෪෫෬෭෮෯\",\n  sora: \"𑃰𑃱𑃲𑃳𑃴𑃵𑃶𑃷𑃸𑃹\",\n  sund: \"᮰᮱᮲᮳᮴᮵᮶᮷᮸᮹\",\n  sunu: \"\\u{11BF0}\\u{11BF1}\\u{11BF2}\\u{11BF3}\\u{11BF4}\\u{11BF5}\\u{11BF6}\\u{11BF7}\\u{11BF8}\\u{11BF9}\",\n  takr: \"𑛀𑛁𑛂𑛃𑛄𑛅𑛆𑛇𑛈𑛉\",\n  talu: \"᧐᧑᧒᧓᧔᧕᧖᧗᧘᧙\",\n  tamldec: \"௦௧௨௩௪௫௬௭௮௯\",\n  telu: \"౦౧౨౩౪౫౬౭౮౯\",\n  thai: \"๐๑๒๓๔๕๖๗๘๙\",\n  tibt: \"༠༡༢༣༤༥༦༧༨༩\",\n  tirh: \"𑓐𑓑𑓒𑓓𑓔𑓕𑓖𑓗𑓘𑓙\",\n  tnsa: \"\\u{16AC0}\\u{16AC1}\\u{16AC2}\\u{16AC3}\\u{16AC4}\\u{16AC5}\\u{16AC6}\\u{16AC7}\\u{16AC8}\\u{16AC9}\",\n  tols: \"\\u{11DE0}\\u{11DE1}\\u{11DE2}\\u{11DE3}\\u{11DE4}\\u{11DE5}\\u{11DE6}\\u{11DE7}\\u{11DE8}\\u{11DE9}\",\n  vaii: \"꘠꘡꘢꘣꘤꘥꘦꘧꘨꘩\",\n  wara: \"𑣠𑣡𑣢𑣣𑣤𑣥𑣦𑣧𑣨𑣩\",\n  wcho: \"𞋰𞋱𞋲𞋳𞋴𞋵𞋶𞋷𞋸𞋹\",\n};\n\n\n/**\n * Returns an array of all simple, sanctioned unit identifiers.\n */\nfunction allSimpleSanctionedUnits() {\n  // https://tc39.es/ecma402/#table-sanctioned-simple-unit-identifiers\n  return [\n    \"acre\",\n    \"bit\",\n    \"byte\",\n    \"celsius\",\n    \"centimeter\",\n    \"day\",\n    \"degree\",\n    \"fahrenheit\",\n    \"fluid-ounce\",\n    \"foot\",\n    \"gallon\",\n    \"gigabit\",\n    \"gigabyte\",\n    \"gram\",\n    \"hectare\",\n    \"hour\",\n    \"inch\",\n    \"kilobit\",\n    \"kilobyte\",\n    \"kilogram\",\n    \"kilometer\",\n    \"liter\",\n    \"megabit\",\n    \"megabyte\",\n    \"meter\",\n    \"microsecond\",\n    \"mile\",\n    \"mile-scandinavian\",\n    \"milliliter\",\n    \"millimeter\",\n    \"millisecond\",\n    \"minute\",\n    \"month\",\n    \"nanosecond\",\n    \"ounce\",\n    \"percent\",\n    \"petabyte\",\n    \"pound\",\n    \"second\",\n    \"stone\",\n    \"terabit\",\n    \"terabyte\",\n    \"week\",\n    \"yard\",\n    \"year\",\n  ];\n}\n\n\n/**\n * Tests that number formatting is handled correctly. The function checks that the\n * digit sequences in formatted output are as specified, converted to the\n * selected numbering system, and embedded in consistent localized patterns.\n * @param {Array} locales the locales to be tested.\n * @param {Array} numberingSystems the numbering systems to be tested.\n * @param {Object} options the options to pass to Intl.NumberFormat. Options\n *   must include {useGrouping: false}, and must cause 1.1 to be formatted\n *   pre- and post-decimal digits.\n * @param {Object} testData maps input data (in ES5 9.3.1 format) to expected output strings\n *   in unlocalized format with Western digits.\n */\n\nfunction testNumberFormat(locales, numberingSystems, options, testData) {\n  locales.forEach(function (locale) {\n    numberingSystems.forEach(function (numbering) {\n      var digits = numberingSystemDigits[numbering];\n      var format = new Intl.NumberFormat([locale + \"-u-nu-\" + numbering], options);\n\n      function getPatternParts(positive) {\n        var n = positive ? 1.1 : -1.1;\n        var formatted = format.format(n);\n        var oneoneRE = \"([^\" + digits + \"]*)[\" + digits + \"]+([^\" + digits + \"]+)[\" + digits + \"]+([^\" + digits + \"]*)\";\n        var match = formatted.match(new RegExp(oneoneRE));\n        if (match === null) {\n          throw new Test262Error(\"Unexpected formatted \" + n + \" for \" +\n            format.resolvedOptions().locale + \" and options \" +\n            JSON.stringify(options) + \": \" + formatted);\n        }\n        return match;\n      }\n\n      function toNumbering(raw) {\n        return raw.replace(/[0-9]/g, function (digit) {\n          return digits[digit.charCodeAt(0) - \"0\".charCodeAt(0)];\n        });\n      }\n\n      function buildExpected(raw, patternParts) {\n        var period = raw.indexOf(\".\");\n        if (period === -1) {\n          return patternParts[1] + toNumbering(raw) + patternParts[3];\n        } else {\n          return patternParts[1] +\n            toNumbering(raw.substring(0, period)) +\n            patternParts[2] +\n            toNumbering(raw.substring(period + 1)) +\n            patternParts[3];\n        }\n      }\n\n      if (format.resolvedOptions().numberingSystem === numbering) {\n        // figure out prefixes, infixes, suffixes for positive and negative values\n        var posPatternParts = getPatternParts(true);\n        var negPatternParts = getPatternParts(false);\n\n        Object.getOwnPropertyNames(testData).forEach(function (input) {\n          var rawExpected = testData[input];\n          var patternParts;\n          if (rawExpected[0] === \"-\") {\n            patternParts = negPatternParts;\n            rawExpected = rawExpected.substring(1);\n          } else {\n            patternParts = posPatternParts;\n          }\n          var expected = buildExpected(rawExpected, patternParts);\n          var actual = format.format(input);\n          if (actual !== expected) {\n            throw new Test262Error(\"Formatted value for \" + input + \", \" +\n            format.resolvedOptions().locale + \" and options \" +\n            JSON.stringify(options) + \" is \" + actual + \"; expected \" + expected + \".\");\n          }\n        });\n      }\n    });\n  });\n}\n\n\n/**\n * Return the components of date-time formats.\n * @return {Array} an array with all date-time components.\n */\n\nfunction getDateTimeComponents() {\n  return [\"weekday\", \"era\", \"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"timeZoneName\"];\n}\n\n\n/**\n * Return the valid values for the given date-time component, as specified\n * by the table in section 12.1.1.\n * @param {string} component a date-time component.\n * @return {Array} an array with the valid values for the component.\n */\n\nfunction getDateTimeComponentValues(component) {\n\n  var components = {\n    weekday: [\"narrow\", \"short\", \"long\"],\n    era: [\"narrow\", \"short\", \"long\"],\n    year: [\"2-digit\", \"numeric\"],\n    month: [\"2-digit\", \"numeric\", \"narrow\", \"short\", \"long\"],\n    day: [\"2-digit\", \"numeric\"],\n    hour: [\"2-digit\", \"numeric\"],\n    minute: [\"2-digit\", \"numeric\"],\n    second: [\"2-digit\", \"numeric\"],\n    timeZoneName: [\"short\", \"long\"]\n  };\n\n  var result = components[component];\n  if (result === undefined) {\n    throw new Test262Error(\"Internal error: No values defined for date-time component \" + component + \".\");\n  }\n  return result;\n}\n\n\n/**\n * @description Tests whether timeZone is a String value representing a\n * structurally valid and canonicalized time zone name, as defined in\n * sections 6.4.1 and 6.4.2 of the ECMAScript Internationalization API\n * Specification.\n * @param {String} timeZone the string to be tested.\n * @result {Boolean} whether the test succeeded.\n */\n\nfunction isCanonicalizedStructurallyValidTimeZoneName(timeZone) {\n  /**\n   * Regular expression defining IANA Time Zone names.\n   *\n   * Spec: IANA Time Zone Database, Theory file\n   */\n  var fileNameComponent = \"(?:[A-Za-z_]|\\\\.(?!\\\\.?(?:/|$)))[A-Za-z.\\\\-_]{0,13}\";\n  var fileName = fileNameComponent + \"(?:/\" + fileNameComponent + \")*\";\n  var etcName = \"(?:Etc/)?GMT[+-]\\\\d{1,2}\";\n  var systemVName = \"SystemV/[A-Z]{3}\\\\d{1,2}(?:[A-Z]{3})?\";\n  var legacyName = etcName + \"|\" + systemVName + \"|CST6CDT|EST5EDT|MST7MDT|PST8PDT|NZ\";\n  var zoneNamePattern = new RegExp(\"^(?:\" + fileName + \"|\" + legacyName + \")$\");\n\n  if (typeof timeZone !== \"string\") {\n    return false;\n  }\n  // 6.4.2 CanonicalizeTimeZoneName (timeZone), step 3\n  if (timeZone === \"UTC\") {\n    return true;\n  }\n  // 6.4.2 CanonicalizeTimeZoneName (timeZone), step 3\n  if (timeZone === \"Etc/UTC\" || timeZone === \"Etc/GMT\") {\n    return false;\n  }\n  return zoneNamePattern.test(timeZone);\n}\n\n\n/**\n * @description Simplified PartitionDurationFormatPattern implementation which\n * only supports the \"en\" locale.\n * @param {Object} durationFormat the duration format object\n * @param {Object} duration the duration record\n * @result {Array} an array with formatted duration parts\n */\n\nfunction partitionDurationFormatPattern(durationFormat, duration) {\n  function durationToFractional(duration, exponent) {\n    let {\n      seconds = 0,\n      milliseconds = 0,\n      microseconds = 0,\n      nanoseconds = 0,\n    } = duration;\n\n    // Directly return the duration amount when no sub-seconds are present.\n    switch (exponent) {\n      case 9: {\n        if (milliseconds === 0 && microseconds === 0 && nanoseconds === 0) {\n          return seconds;\n        }\n        break;\n      }\n      case 6: {\n        if (microseconds === 0 && nanoseconds === 0) {\n          return milliseconds;\n        }\n        break;\n      }\n      case 3: {\n        if (nanoseconds === 0) {\n          return microseconds;\n        }\n        break;\n      }\n    }\n\n    // Otherwise compute the overall amount of nanoseconds using BigInt to avoid\n    // loss of precision.\n    let ns = BigInt(nanoseconds);\n    switch (exponent) {\n      case 9:\n        ns += BigInt(seconds) * 1_000_000_000n;\n        // fallthrough\n      case 6:\n        ns += BigInt(milliseconds) * 1_000_000n;\n        // fallthrough\n      case 3:\n        ns += BigInt(microseconds) * 1_000n;\n        // fallthrough\n    }\n\n    let e = BigInt(10 ** exponent);\n\n    // Split the nanoseconds amount into an integer and its fractional part.\n    let q = ns / e;\n    let r = ns % e;\n\n    // Pad fractional part, without any leading negative sign, to |exponent| digits.\n    if (r < 0) {\n      r = -r;\n    }\n    r = String(r).padStart(exponent, \"0\");\n\n    // Return the result as a decimal string.\n    return `${q}.${r}`;\n  }\n\n  const units = [\n    \"years\",\n    \"months\",\n    \"weeks\",\n    \"days\",\n    \"hours\",\n    \"minutes\",\n    \"seconds\",\n    \"milliseconds\",\n    \"microseconds\",\n    \"nanoseconds\",\n  ];\n\n  let options = durationFormat.resolvedOptions();\n\n  // Only \"en\" is supported.\n  const locale = \"en\";\n  const numberingSystem = \"latn\";\n  const timeSeparator = \":\";\n\n  let result = [];\n  let needSeparator = false;\n  let displayNegativeSign = true;\n\n  for (let unit of units) {\n    // Absent units default to zero.\n    let value = duration[unit] ?? 0;\n\n    let style = options[unit];\n    let display = options[unit + \"Display\"];\n\n    // NumberFormat requires singular unit names.\n    let numberFormatUnit = unit.slice(0, -1);\n\n    // Compute the matching NumberFormat options.\n    let nfOpts = Object.create(null);\n\n    // Numeric seconds and sub-seconds are combined into a single value.\n    let done = false;\n    if (unit === \"seconds\" || unit === \"milliseconds\" || unit === \"microseconds\") {\n      let nextStyle = options[units[units.indexOf(unit) + 1]];\n      if (nextStyle === \"numeric\") {\n        if (unit === \"seconds\") {\n          value = durationToFractional(duration, 9);\n        } else if (unit === \"milliseconds\") {\n          value = durationToFractional(duration, 6);\n        } else {\n          value = durationToFractional(duration, 3);\n        }\n\n        nfOpts.maximumFractionDigits = options.fractionalDigits ?? 9;\n        nfOpts.minimumFractionDigits = options.fractionalDigits ?? 0;\n        nfOpts.roundingMode = \"trunc\";\n\n        done = true;\n      }\n    }\n\n    // Display zero numeric minutes when seconds will be displayed.\n    let displayRequired = false;\n    if (unit === \"minutes\" && needSeparator) {\n      displayRequired = options.secondsDisplay === \"always\" ||\n                        (duration.seconds ?? 0) !== 0 ||\n                        (duration.milliseconds ?? 0) !== 0 ||\n                        (duration.microseconds ?? 0) !== 0 ||\n                        (duration.nanoseconds ?? 0) !== 0;\n    }\n\n    // \"auto\" display omits zero units.\n    if (value !== 0 || display !== \"auto\" || displayRequired) {\n      // Display only the first negative value.\n      if (displayNegativeSign) {\n        displayNegativeSign = false;\n\n        // Set to negative zero to ensure the sign is displayed.\n        if (value === 0) {\n          let negative = units.some(unit => (duration[unit] ?? 0) < 0);\n          if (negative) {\n            value = -0;\n          }\n        }\n      } else {\n        nfOpts.signDisplay = \"never\";\n      }\n\n      nfOpts.numberingSystem = options.numberingSystem;\n\n      // If the value is formatted as a 2-digit numeric value.\n      if (style === \"2-digit\") {\n        nfOpts.minimumIntegerDigits = 2;\n      }\n\n      // If the value is formatted as a standalone unit.\n      if (style !== \"numeric\" && style !== \"2-digit\") {\n        nfOpts.style = \"unit\";\n        nfOpts.unit = numberFormatUnit;\n        nfOpts.unitDisplay = style;\n      } else {\n        nfOpts.useGrouping = false;\n      }\n\n      let nf = new Intl.NumberFormat(locale, nfOpts);\n\n      let list;\n      if (!needSeparator) {\n        list = [];\n      } else {\n        list = result[result.length - 1];\n\n        // Prepend the time separator before the formatted number.\n        list.push({\n          type: \"literal\",\n          value: timeSeparator,\n        });\n      }\n\n      // Format the numeric value.\n      let parts = nf.formatToParts(value);\n\n      // Add |numberFormatUnit| to the formatted number.\n      for (let {value, type} of parts) {\n        list.push({type, value, unit: numberFormatUnit});\n      }\n\n      if (!needSeparator) {\n        // Prepend the separator before the next numeric unit.\n        if (style === \"2-digit\" || style === \"numeric\") {\n          needSeparator = true;\n        }\n\n        // Append the formatted number to |result|.\n        result.push(list);\n      }\n    }\n\n    if (done) {\n      break;\n    }\n  }\n\n  let listStyle = options.style;\n  if (listStyle === \"digital\") {\n    listStyle = \"short\";\n  }\n\n  let lf = new Intl.ListFormat(locale, {\n    type: \"unit\",\n    style: listStyle,\n  });\n\n  // Collect all formatted units into a list of strings.\n  let strings = [];\n  for (let parts of result) {\n    let string = \"\";\n    for (let {value} of parts) {\n      string += value;\n    }\n    strings.push(string);\n  }\n\n  // Format the list of strings and compute the overall result.\n  let flattened = [];\n  for (let {type, value} of lf.formatToParts(strings)) {\n    if (type === \"element\") {\n      flattened.push(...result.shift());\n    } else {\n      flattened.push({type, value});\n    }\n  }\n  return flattened;\n}\n\n\n/**\n * @description Return the formatted string from partitionDurationFormatPattern.\n * @param {Object} durationFormat the duration format object\n * @param {Object} duration the duration record\n * @result {String} a string containing the formatted duration\n */\n\nfunction formatDurationFormatPattern(durationFormat, duration) {\n  let parts = partitionDurationFormatPattern(durationFormat, duration);\n  return parts.reduce((acc, e) => acc + e.value, \"\");\n}\n",
  "testTypedArray.js": "// Copyright (C) 2015 André Bargull. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Collection of functions used to assert the correctness of TypedArray objects.\ndefines:\n  - floatArrayConstructors\n  - nonClampedIntArrayConstructors\n  - intArrayConstructors\n  - typedArrayConstructors\n  - TypedArray\n  - testWithAllTypedArrayConstructors\n  - testWithTypedArrayConstructors\n  - testWithBigIntTypedArrayConstructors\n  - nonAtomicsFriendlyTypedArrayConstructors\n  - testWithAtomicsFriendlyTypedArrayConstructors\n  - testWithNonAtomicsFriendlyTypedArrayConstructors\n  - testTypedArrayConversions\n---*/\n\nvar floatArrayConstructors = [\n  Float64Array,\n  Float32Array\n];\n\nvar nonClampedIntArrayConstructors = [\n  Int32Array,\n  Int16Array,\n  Int8Array,\n  Uint32Array,\n  Uint16Array,\n  Uint8Array\n];\n\nvar intArrayConstructors = nonClampedIntArrayConstructors.concat([Uint8ClampedArray]);\n\n// Float16Array is a newer feature\n// adding it to this list unconditionally would cause implementations lacking it to fail every test which uses it\nif (typeof Float16Array !== \"undefined\") {\n  floatArrayConstructors.push(Float16Array);\n}\n\nvar bigIntArrayConstructors = [];\nif (typeof BigInt64Array !== \"undefined\") {\n  bigIntArrayConstructors.push(BigInt64Array);\n}\nif (typeof BigUint64Array !== \"undefined\") {\n  bigIntArrayConstructors.push(BigUint64Array);\n}\n\n/**\n * Array containing every non-bigint typed array constructor.\n */\nvar typedArrayConstructors = floatArrayConstructors.concat(intArrayConstructors);\n\n/**\n * Array containing every typed array constructor, including those with bigint values.\n */\nvar allTypedArrayConstructors = typedArrayConstructors.concat(bigIntArrayConstructors);\n\n/**\n * The %TypedArray% intrinsic constructor function.\n */\nvar TypedArray = Object.getPrototypeOf(Int8Array);\n\nfunction isPrimitive(val) {\n  return !val || (typeof val !== \"object\" && typeof val !== \"function\");\n}\n\nfunction makePassthrough(TA, primitiveOrIterable) {\n  return primitiveOrIterable;\n}\n\nfunction makeArray(TA, primitiveOrIterable) {\n  if (isPrimitive(primitiveOrIterable)) {\n    var n = Number(primitiveOrIterable);\n    // Only values between 0 and 2**53 - 1 inclusive can get mapped into TA contents.\n    if (!(n >= 0 && n < 9007199254740992)) return primitiveOrIterable;\n    return Array.from({ length: n }, function() { return \"0\"; });\n  }\n  return Array.from(primitiveOrIterable);\n}\n\nfunction makeArrayLike(TA, primitiveOrIterable) {\n  var arr = makeArray(TA, primitiveOrIterable);\n  if (isPrimitive(arr)) return arr;\n  var obj = { length: arr.length };\n  for (var i = 0; i < obj.length; i++) obj[i] = arr[i];\n  return obj;\n}\n\nvar makeIterable;\nif (typeof Symbol !== \"undefined\" && Symbol.iterator) {\n  makeIterable = function makeIterable(TA, primitiveOrIterable) {\n    var src = makeArray(TA, primitiveOrIterable);\n    if (isPrimitive(src)) return src;\n    var obj = {};\n    obj[Symbol.iterator] = function() { return src[Symbol.iterator](); };\n    return obj;\n  };\n}\n\nfunction makeArrayBuffer(TA, primitiveOrIterable) {\n  var arr = makeArray(TA, primitiveOrIterable);\n  if (isPrimitive(arr)) return arr;\n  return new TA(arr).buffer;\n}\n\nvar makeResizableArrayBuffer, makeGrownArrayBuffer, makeShrunkArrayBuffer;\nif (ArrayBuffer.prototype.resize) {\n  var copyIntoArrayBuffer = function(destBuffer, srcBuffer) {\n    var destView = new Uint8Array(destBuffer);\n    var srcView = new Uint8Array(srcBuffer);\n    for (var i = 0; i < srcView.length; i++) destView[i] = srcView[i];\n    return destBuffer;\n  };\n\n  makeResizableArrayBuffer = function makeResizableArrayBuffer(TA, primitiveOrIterable) {\n    if (isPrimitive(primitiveOrIterable)) {\n      var n = Number(primitiveOrIterable) * TA.BYTES_PER_ELEMENT;\n      if (!(n >= 0 && n < 9007199254740992)) return primitiveOrIterable;\n      return new ArrayBuffer(n, { maxByteLength: n * 2 });\n    }\n    var fixed = makeArrayBuffer(TA, primitiveOrIterable);\n    var byteLength = fixed.byteLength;\n    var resizable = new ArrayBuffer(byteLength, { maxByteLength: byteLength * 2 });\n    return copyIntoArrayBuffer(resizable, fixed);\n  };\n\n  makeGrownArrayBuffer = function makeGrownArrayBuffer(TA, primitiveOrIterable) {\n    if (isPrimitive(primitiveOrIterable)) {\n      var n = Number(primitiveOrIterable) * TA.BYTES_PER_ELEMENT;\n      if (!(n >= 0 && n < 9007199254740992)) return primitiveOrIterable;\n      var grown = new ArrayBuffer(Math.floor(n / 2), { maxByteLength: n });\n      grown.resize(n);\n    }\n    var fixed = makeArrayBuffer(TA, primitiveOrIterable);\n    var byteLength = fixed.byteLength;\n    var grown = new ArrayBuffer(Math.floor(byteLength / 2), { maxByteLength: byteLength });\n    grown.resize(byteLength);\n    return copyIntoArrayBuffer(grown, fixed);\n  };\n\n  makeShrunkArrayBuffer = function makeShrunkArrayBuffer(TA, primitiveOrIterable) {\n    if (isPrimitive(primitiveOrIterable)) {\n      var n = Number(primitiveOrIterable) * TA.BYTES_PER_ELEMENT;\n      if (!(n >= 0 && n < 9007199254740992)) return primitiveOrIterable;\n      var shrunk = new ArrayBuffer(n * 2, { maxByteLength: n * 2 });\n      shrunk.resize(n);\n    }\n    var fixed = makeArrayBuffer(TA, primitiveOrIterable);\n    var byteLength = fixed.byteLength;\n    var shrunk = new ArrayBuffer(byteLength * 2, { maxByteLength: byteLength * 2 });\n    copyIntoArrayBuffer(shrunk, fixed);\n    shrunk.resize(byteLength);\n    return shrunk;\n  };\n}\n\nvar typedArrayCtorArgFactories = [makePassthrough, makeArray, makeArrayLike];\nif (makeIterable) typedArrayCtorArgFactories.push(makeIterable);\ntypedArrayCtorArgFactories.push(makeArrayBuffer);\nif (makeResizableArrayBuffer) typedArrayCtorArgFactories.push(makeResizableArrayBuffer);\nif (makeGrownArrayBuffer) typedArrayCtorArgFactories.push(makeGrownArrayBuffer);\nif (makeShrunkArrayBuffer) typedArrayCtorArgFactories.push(makeShrunkArrayBuffer);\n\n/**\n * @typedef {\"passthrough\" | \"arraylike\" | \"iterable\" | \"arraybuffer\" | \"resizable\"} typedArrayArgFactoryFeature\n */\n\n/**\n * A predicate for testing whether a TypedArray argument factory from this file\n * matches any of the provided features.\n *\n * @param {Function} argFactory\n * @param {typedArrayArgFactoryFeature[]} features\n * @returns {boolean}\n */\nfunction ctorArgFactoryMatchesSome(argFactory, features) {\n  for (var i = 0; i < features.length; ++i) {\n    switch (features[i]) {\n      case \"passthrough\":\n        if (argFactory === makePassthrough) return true;\n        break;\n      case \"arraylike\":\n        if (argFactory === makeArray || argFactory === makeArrayLike) return true;\n        break;\n      case \"iterable\":\n        if (argFactory === makeIterable) return true;\n        break;\n      case \"arraybuffer\":\n        if (\n          argFactory === makeArrayBuffer ||\n          argFactory === makeResizableArrayBuffer ||\n          argFactory === makeGrownArrayBuffer ||\n          argFactory === makeShrunkArrayBuffer\n        ) {\n          return true;\n        }\n        break;\n      case \"resizable\":\n        if (\n          argFactory === makeResizableArrayBuffer ||\n          argFactory === makeGrownArrayBuffer ||\n          argFactory === makeShrunkArrayBuffer\n        ) {\n          return true;\n        }\n        break;\n      default:\n        throw Test262Error(\"unknown feature: \" + features[i]);\n    }\n  }\n  return false;\n}\n\n/**\n * Callback for testing a typed array constructor.\n *\n * @callback typedArrayConstructorCallback\n * @param {Function} TypedArrayConstructor the constructor object to test with\n * @param {Function} [TypedArrayConstructorArgFactory] a function for making\n *   a TypedArrayConstructor argument from a primitive (usually a number) or\n *   iterable (usually an array)\n */\n\n/**\n * Calls the provided function with (typedArrayCtor, typedArrayCtorArgFactory)\n * pairs, where typedArrayCtor is Uint8Array/Int8Array/BigInt64Array/etc. and\n * typedArrayCtorArgFactory is a function for mapping a primitive (usually a\n * number) or iterable (usually an array) into a value suitable as the first\n * argument of typedArrayCtor (an Array, arraylike, iterable, or ArrayBuffer).\n *\n * @param {typedArrayConstructorCallback} f - the function to call\n * @param {Array} [constructors] - an explicit list of TypedArray constructors\n * @param {typedArrayArgFactoryFeature[]} [includeArgFactories] - for selecting\n *   initial constructor argument factory functions, rather than starting with\n *   all argument factories\n * @param {typedArrayArgFactoryFeature[]} [excludeArgFactories] - for excluding\n *   constructor argument factory functions, after an initial selection\n */\nfunction testWithAllTypedArrayConstructors(f, constructors, includeArgFactories, excludeArgFactories) {\n  var ctors = constructors || allTypedArrayConstructors;\n  var ctorArgFactories = typedArrayCtorArgFactories;\n  if (includeArgFactories) {\n    ctorArgFactories = [];\n    for (var i = 0; i < typedArrayCtorArgFactories.length; ++i) {\n      if (ctorArgFactoryMatchesSome(typedArrayCtorArgFactories[i], includeArgFactories)) {\n        ctorArgFactories.push(typedArrayCtorArgFactories[i]);\n      }\n    }\n  }\n  if (excludeArgFactories) {\n    ctorArgFactories = ctorArgFactories.slice();\n    for (var i = ctorArgFactories.length - 1; i >= 0; --i) {\n      if (ctorArgFactoryMatchesSome(ctorArgFactories[i], excludeArgFactories)) {\n        ctorArgFactories.splice(i, 1);\n      }\n    }\n  }\n  if (ctorArgFactories.length === 0) {\n    throw Test262Error(\"no arg factories match include \" + includeArgFactories + \" and exclude \" + excludeArgFactories);\n  }\n  for (var k = 0; k < ctorArgFactories.length; ++k) {\n    var argFactory = ctorArgFactories[k];\n    for (var i = 0; i < ctors.length; ++i) {\n      var constructor = ctors[i];\n      var boundArgFactory = argFactory.bind(undefined, constructor);\n      try {\n        f(constructor, boundArgFactory);\n      } catch (e) {\n        e.message += \" (Testing with \" + constructor.name + \" and \" + argFactory.name + \".)\";\n        throw e;\n      }\n    }\n  }\n}\n\n/**\n * Calls the provided function with (typedArrayCtor, typedArrayCtorArgFactory)\n * pairs, where typedArrayCtor is Uint8Array/Int8Array/BigInt64Array/etc. and\n * typedArrayCtorArgFactory is a function for mapping a primitive (usually a\n * number) or iterable (usually an array) into a value suitable as the first\n * argument of typedArrayCtor (an Array, arraylike, iterable, or ArrayBuffer).\n *\n * typedArrayCtor will not be BigInt64Array or BigUint64Array unless one or both\n * of those are explicitly provided.\n *\n * @param {typedArrayConstructorCallback} f - the function to call\n * @param {Array} [constructors] - an explicit list of TypedArray constructors\n * @param {typedArrayArgFactoryFeature[]} [includeArgFactories] - for selecting\n *   initial constructor argument factory functions, rather than starting with\n *   all argument factories\n * @param {typedArrayArgFactoryFeature[]} [excludeArgFactories] - for excluding\n *   constructor argument factory functions, after an initial selection\n */\nfunction testWithTypedArrayConstructors(f, constructors, includeArgFactories, excludeArgFactories) {\n  var ctors = constructors || typedArrayConstructors;\n  testWithAllTypedArrayConstructors(f, ctors, includeArgFactories, excludeArgFactories);\n}\n\n/**\n * Calls the provided function for every BigInt typed array constructor.\n *\n * @param {typedArrayConstructorCallback} f - the function to call\n * @param {Array} [constructors] - an explicit list of TypedArray constructors\n * @param {typedArrayArgFactoryFeature[]} [includeArgFactories] - for selecting\n *   initial constructor argument factory functions, rather than starting with\n *   all argument factories\n * @param {typedArrayArgFactoryFeature[]} [excludeArgFactories] - for excluding\n *   constructor argument factory functions, after an initial selection\n */\nfunction testWithBigIntTypedArrayConstructors(f, constructors, includeArgFactories, excludeArgFactories) {\n  var ctors = constructors || [BigInt64Array, BigUint64Array];\n  testWithAllTypedArrayConstructors(f, ctors, includeArgFactories, excludeArgFactories);\n}\n\nvar nonAtomicsFriendlyTypedArrayConstructors = floatArrayConstructors.concat([Uint8ClampedArray]);\n/**\n * Calls the provided function for every non-\"Atomics Friendly\" typed array constructor.\n *\n * @param {typedArrayConstructorCallback} f - the function to call for each typed array constructor.\n * @param {Array} selected - An optional Array with filtered typed arrays\n */\nfunction testWithNonAtomicsFriendlyTypedArrayConstructors(f) {\n  testWithTypedArrayConstructors(f, nonAtomicsFriendlyTypedArrayConstructors);\n}\n\n/**\n * Calls the provided function for every \"Atomics Friendly\" typed array constructor.\n *\n * @param {typedArrayConstructorCallback} f - the function to call for each typed array constructor.\n * @param {Array} selected - An optional Array with filtered typed arrays\n */\nfunction testWithAtomicsFriendlyTypedArrayConstructors(f) {\n  testWithTypedArrayConstructors(f, [\n    Int32Array,\n    Int16Array,\n    Int8Array,\n    Uint32Array,\n    Uint16Array,\n    Uint8Array,\n  ]);\n}\n\n/**\n * Helper for conversion operations on TypedArrays, the expected values\n * properties are indexed in order to match the respective value for each\n * TypedArray constructor\n * @param  {Function} fn - the function to call for each constructor and value.\n *                         will be called with the constructor, value, expected\n *                         value, and a initial value that can be used to avoid\n *                         a false positive with an equivalent expected value.\n */\nfunction testTypedArrayConversions(byteConversionValues, fn) {\n  var values = byteConversionValues.values;\n  var expected = byteConversionValues.expected;\n\n  testWithTypedArrayConstructors(function(TA) {\n    var name = TA.name.slice(0, -5);\n\n    return values.forEach(function(value, index) {\n      var exp = expected[name][index];\n      var initial = 0;\n      if (exp === 0) {\n        initial = 1;\n      }\n      fn(TA, value, exp, initial);\n    });\n  });\n}\n\n/**\n * Checks if the given argument is one of the float-based TypedArray constructors.\n *\n * @param {constructor} ctor - the value to check\n * @returns {boolean}\n */\nfunction isFloatTypedArrayConstructor(arg) {\n  return floatArrayConstructors.indexOf(arg) !== -1;\n}\n\n/**\n * Determines the precision of the given float-based TypedArray constructor.\n *\n * @param {constructor} ctor - the value to check\n * @returns {string} \"half\", \"single\", or \"double\" for Float16Array, Float32Array, and Float64Array respectively.\n */\nfunction floatTypedArrayConstructorPrecision(FA) {\n  if (typeof Float16Array !== \"undefined\" && FA === Float16Array) {\n    return \"half\";\n  } else if (FA === Float32Array) {\n    return \"single\";\n  } else if (FA === Float64Array) {\n    return \"double\";\n  } else {\n    throw new Error(\"Malformed test - floatTypedArrayConstructorPrecision called with non-float TypedArray\");\n  }\n}\n",
  "typeCoercion.js": "// Copyright (C) 2017 Josh Wolfe. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    Functions to help generate test cases for testing type coercion abstract\n    operations like ToNumber.\ndefines:\n  - testCoercibleToIndexZero\n  - testCoercibleToIndexOne\n  - testCoercibleToIndexFromIndex\n  - testCoercibleToIntegerZero\n  - testCoercibleToIntegerOne\n  - testCoercibleToNumberZero\n  - testCoercibleToNumberNan\n  - testCoercibleToNumberOne\n  - testCoercibleToIntegerFromInteger\n  - testPrimitiveWrappers\n  - testCoercibleToPrimitiveWithMethod\n  - testNotCoercibleToIndex\n  - testNotCoercibleToInteger\n  - testNotCoercibleToNumber\n  - testNotCoercibleToPrimitive\n  - testCoercibleToString\n  - testNotCoercibleToString\n  - testCoercibleToBooleanTrue\n  - testCoercibleToBooleanFalse\n  - testCoercibleToBigIntZero\n  - testCoercibleToBigIntOne\n  - testCoercibleToBigIntFromBigInt\n  - testNotCoercibleToBigInt\n---*/\n\nfunction testCoercibleToIndexZero(test) {\n  testCoercibleToIntegerZero(test);\n}\n\nfunction testCoercibleToIndexOne(test) {\n  testCoercibleToIntegerOne(test);\n}\n\nfunction testCoercibleToIndexFromIndex(nominalIndex, test) {\n  assert(Number.isInteger(nominalIndex));\n  assert(0 <= nominalIndex && nominalIndex <= 2**53 - 1);\n  testCoercibleToIntegerFromInteger(nominalIndex, test);\n}\n\nfunction testCoercibleToIntegerZero(test) {\n  testCoercibleToNumberZero(test);\n\n  testCoercibleToIntegerFromInteger(0, test);\n\n  // NaN -> +0\n  testCoercibleToNumberNan(test);\n\n  // When toString() returns a string that parses to NaN:\n  test({});\n  test([]);\n}\n\nfunction testCoercibleToIntegerOne(test) {\n  testCoercibleToNumberOne(test);\n\n  testCoercibleToIntegerFromInteger(1, test);\n\n  // When toString() returns \"1\"\n  test([1]);\n  test([\"1\"]);\n}\n\nfunction testCoercibleToNumberZero(test) {\n  function testPrimitiveValue(value) {\n    test(value);\n    // ToPrimitive\n    testPrimitiveWrappers(value, \"number\", test);\n  }\n\n  testPrimitiveValue(null);\n  testPrimitiveValue(false);\n  testPrimitiveValue(0);\n  testPrimitiveValue(\"0\");\n}\n\nfunction testCoercibleToNumberNan(test) {\n  function testPrimitiveValue(value) {\n    test(value);\n    // ToPrimitive\n    testPrimitiveWrappers(value, \"number\", test);\n  }\n\n  testPrimitiveValue(undefined);\n  testPrimitiveValue(NaN);\n  testPrimitiveValue(\"\");\n  testPrimitiveValue(\"foo\");\n  testPrimitiveValue(\"true\");\n}\n\nfunction testCoercibleToNumberOne(test) {\n  function testPrimitiveValue(value) {\n    test(value);\n    // ToPrimitive\n    testPrimitiveWrappers(value, \"number\", test);\n  }\n\n  testPrimitiveValue(true);\n  testPrimitiveValue(1);\n  testPrimitiveValue(\"1\");\n}\n\nfunction testCoercibleToIntegerFromInteger(nominalInteger, test) {\n  assert(Number.isInteger(nominalInteger));\n\n  function testPrimitiveValue(value) {\n    test(value);\n    // ToPrimitive\n    testPrimitiveWrappers(value, \"number\", test);\n\n    // Non-primitive values that coerce to the nominal integer:\n    // toString() returns a string that parsers to a primitive value.\n    test([value]);\n  }\n\n  function testPrimitiveNumber(number) {\n    testPrimitiveValue(number);\n    // ToNumber: String -> Number\n    testPrimitiveValue(number.toString());\n  }\n\n  testPrimitiveNumber(nominalInteger);\n\n  // ToInteger: floor(abs(number))\n  if (nominalInteger >= 0) {\n    testPrimitiveNumber(nominalInteger + 0.9);\n  }\n  if (nominalInteger <= 0) {\n    testPrimitiveNumber(nominalInteger - 0.9);\n  }\n}\n\nfunction testPrimitiveWrappers(primitiveValue, hint, test) {\n  if (primitiveValue != null) {\n    // null and undefined result in {} rather than a proper wrapper,\n    // so skip this case for those values.\n    test(Object(primitiveValue));\n  }\n\n  testCoercibleToPrimitiveWithMethod(hint, function() {\n    return primitiveValue;\n  }, test);\n}\n\nfunction testCoercibleToPrimitiveWithMethod(hint, method, test) {\n  var supportsToPrimitive = typeof Symbol !== \"undefined\" && !!Symbol.toPrimitive;\n\n  var methodNames;\n  if (hint === \"number\") {\n    methodNames = [\"valueOf\", \"toString\"];\n  } else if (hint === \"string\") {\n    methodNames = [\"toString\", \"valueOf\"];\n  } else {\n    throw new Test262Error();\n  }\n  // precedence order\n  if (supportsToPrimitive) {\n    test({\n      [Symbol.toPrimitive]: method,\n      [methodNames[0]]: function() { throw new Test262Error(); },\n      [methodNames[1]]: function() { throw new Test262Error(); },\n    });\n  }\n  test({\n    [methodNames[0]]: method,\n    [methodNames[1]]: function() { throw new Test262Error(); },\n  });\n  if (hint === \"number\") {\n    // The default valueOf returns an object, which is unsuitable.\n    // The default toString returns a String, which is suitable.\n    // Therefore this test only works for valueOf falling back to toString.\n    test({\n      // this is toString:\n      [methodNames[1]]: method,\n    });\n  }\n\n  // GetMethod: if func is undefined or null, return undefined.\n  if (supportsToPrimitive) {\n    test({\n      [Symbol.toPrimitive]: undefined,\n      [methodNames[0]]: method,\n      [methodNames[1]]: method,\n    });\n    test({\n      [Symbol.toPrimitive]: null,\n      [methodNames[0]]: method,\n      [methodNames[1]]: method,\n    });\n  }\n\n  // if methodNames[0] is not callable, fallback to methodNames[1]\n  test({\n    [methodNames[0]]: null,\n    [methodNames[1]]: method,\n  });\n  test({\n    [methodNames[0]]: 1,\n    [methodNames[1]]: method,\n  });\n  test({\n    [methodNames[0]]: {},\n    [methodNames[1]]: method,\n  });\n\n  // if methodNames[0] returns an object, fallback to methodNames[1]\n  test({\n    [methodNames[0]]: function() { return {}; },\n    [methodNames[1]]: method,\n  });\n  test({\n    [methodNames[0]]: function() { return Object(1); },\n    [methodNames[1]]: method,\n  });\n}\n\nfunction testNotCoercibleToIndex(test) {\n  function testPrimitiveValue(value) {\n    test(RangeError, value);\n    // ToPrimitive\n    testPrimitiveWrappers(value, \"number\", function(value) {\n      test(RangeError, value);\n    });\n  }\n\n  // Let integerIndex be ? ToInteger(value).\n  testNotCoercibleToInteger(test);\n\n  // If integerIndex < 0, throw a RangeError exception.\n  testPrimitiveValue(-1);\n  testPrimitiveValue(-2.5);\n  testPrimitiveValue(\"-2.5\");\n  testPrimitiveValue(-Infinity);\n\n  // Let index be ! ToLength(integerIndex).\n  // If SameValueZero(integerIndex, index) is false, throw a RangeError exception.\n  testPrimitiveValue(2 ** 53);\n  testPrimitiveValue(Infinity);\n}\n\nfunction testNotCoercibleToInteger(test) {\n  // ToInteger only throws from ToNumber.\n  testNotCoercibleToNumber(test);\n}\n\nfunction testNotCoercibleToNumber(test) {\n  function testPrimitiveValue(value) {\n    test(TypeError, value);\n    // ToPrimitive\n    testPrimitiveWrappers(value, \"number\", function(value) {\n      test(TypeError, value);\n    });\n  }\n\n  // ToNumber: Symbol -> TypeError\n  if (typeof Symbol !== \"undefined\") {\n    testPrimitiveValue(Symbol(\"1\"));\n  }\n\n  if (typeof BigInt !== \"undefined\") {\n    // ToNumber: BigInt -> TypeError\n    testPrimitiveValue(BigInt(0));\n  }\n\n  // ToPrimitive\n  testNotCoercibleToPrimitive(\"number\", test);\n}\n\nfunction testNotCoercibleToPrimitive(hint, test) {\n  var supportsToPrimitive = typeof Symbol !== \"undefined\" && !!Symbol.toPrimitive;\n\n  function MyError() {}\n\n  // ToPrimitive: input[@@toPrimitive] is not callable (and non-null)\n  if (supportsToPrimitive) {\n    test(TypeError, {[Symbol.toPrimitive]: 1});\n    test(TypeError, {[Symbol.toPrimitive]: {}});\n\n    // ToPrimitive: input[@@toPrimitive] returns object\n    test(TypeError, {[Symbol.toPrimitive]: function() { return Object(1); }});\n    test(TypeError, {[Symbol.toPrimitive]: function() { return {}; }});\n\n    // ToPrimitive: input[@@toPrimitive] throws\n    test(MyError, {[Symbol.toPrimitive]: function() { throw new MyError(); }});\n  }\n\n  // OrdinaryToPrimitive: method throws\n  testCoercibleToPrimitiveWithMethod(hint, function() {\n    throw new MyError();\n  }, function(value) {\n    test(MyError, value);\n  });\n\n  // OrdinaryToPrimitive: both methods are unsuitable\n  function testUnsuitableMethod(method) {\n    test(TypeError, {valueOf:method, toString:method});\n  }\n  // not callable:\n  testUnsuitableMethod(null);\n  testUnsuitableMethod(1);\n  testUnsuitableMethod({});\n  // returns object:\n  testUnsuitableMethod(function() { return Object(1); });\n  testUnsuitableMethod(function() { return {}; });\n}\n\nfunction testCoercibleToString(test) {\n  function testPrimitiveValue(value, expectedString) {\n    test(value, expectedString);\n    // ToPrimitive\n    testPrimitiveWrappers(value, \"string\", function(value) {\n      test(value, expectedString);\n    });\n  }\n\n  testPrimitiveValue(undefined, \"undefined\");\n  testPrimitiveValue(null, \"null\");\n  testPrimitiveValue(true, \"true\");\n  testPrimitiveValue(false, \"false\");\n  testPrimitiveValue(0, \"0\");\n  testPrimitiveValue(-0, \"0\");\n  testPrimitiveValue(Infinity, \"Infinity\");\n  testPrimitiveValue(-Infinity, \"-Infinity\");\n  testPrimitiveValue(123.456, \"123.456\");\n  testPrimitiveValue(-123.456, \"-123.456\");\n  testPrimitiveValue(\"\", \"\");\n  testPrimitiveValue(\"foo\", \"foo\");\n\n  if (typeof BigInt !== \"undefined\") {\n    // BigInt -> TypeError\n    testPrimitiveValue(BigInt(0), \"0\");\n  }\n\n  // toString of a few objects\n  test([], \"\");\n  test([\"foo\", \"bar\"], \"foo,bar\");\n  test({}, \"[object Object]\");\n}\n\nfunction testNotCoercibleToString(test) {\n  function testPrimitiveValue(value) {\n    test(TypeError, value);\n    // ToPrimitive\n    testPrimitiveWrappers(value, \"string\", function(value) {\n      test(TypeError, value);\n    });\n  }\n\n  // Symbol -> TypeError\n  if (typeof Symbol !== \"undefined\") {\n    testPrimitiveValue(Symbol(\"1\"));\n  }\n\n  // ToPrimitive\n  testNotCoercibleToPrimitive(\"string\", test);\n}\n\nfunction testCoercibleToBooleanTrue(test) {\n  test(true);\n  test(1);\n  test(\"string\");\n  if (typeof Symbol !== \"undefined\") {\n    test(Symbol(\"1\"));\n  }\n  test({});\n}\n\nfunction testCoercibleToBooleanFalse(test) {\n  test(undefined);\n  test(null);\n  test(false);\n  test(0);\n  test(-0);\n  test(NaN);\n  test(\"\");\n}\n\nfunction testCoercibleToBigIntZero(test) {\n  function testPrimitiveValue(value) {\n    test(value);\n    // ToPrimitive\n    testPrimitiveWrappers(value, \"number\", test);\n  }\n\n  testCoercibleToBigIntFromBigInt(BigInt(0), test);\n  testPrimitiveValue(-BigInt(0));\n  testPrimitiveValue(\"-0\");\n  testPrimitiveValue(false);\n  testPrimitiveValue(\"\");\n  testPrimitiveValue(\"   \");\n\n  // toString() returns \"\"\n  test([]);\n\n  // toString() returns \"0\"\n  test([0]);\n}\n\nfunction testCoercibleToBigIntOne(test) {\n  function testPrimitiveValue(value) {\n    test(value);\n    // ToPrimitive\n    testPrimitiveWrappers(value, \"number\", test);\n  }\n\n  testCoercibleToBigIntFromBigInt(BigInt(1), test);\n  testPrimitiveValue(true);\n\n  // toString() returns \"1\"\n  test([1]);\n}\n\nfunction testCoercibleToBigIntFromBigInt(nominalBigInt, test) {\n  function testPrimitiveValue(value) {\n    test(value);\n    // ToPrimitive\n    testPrimitiveWrappers(value, \"number\", test);\n  }\n\n  testPrimitiveValue(nominalBigInt);\n  testPrimitiveValue(nominalBigInt.toString());\n  testPrimitiveValue(\"0b\" + nominalBigInt.toString(2));\n  testPrimitiveValue(\"0o\" + nominalBigInt.toString(8));\n  testPrimitiveValue(\"0x\" + nominalBigInt.toString(16));\n  testPrimitiveValue(\"   \" + nominalBigInt.toString() + \"   \");\n\n  // toString() returns the decimal string representation\n  test([nominalBigInt]);\n  test([nominalBigInt.toString()]);\n}\n\nfunction testNotCoercibleToBigInt(test) {\n  function testPrimitiveValue(error, value) {\n    test(error, value);\n    // ToPrimitive\n    testPrimitiveWrappers(value, \"number\", function(value) {\n      test(error, value);\n    });\n  }\n\n  // Undefined, Null, Number, Symbol -> TypeError\n  testPrimitiveValue(TypeError, undefined);\n  testPrimitiveValue(TypeError, null);\n  testPrimitiveValue(TypeError, 0);\n  testPrimitiveValue(TypeError, NaN);\n  testPrimitiveValue(TypeError, Infinity);\n  if (typeof Symbol !== \"undefined\") {\n    testPrimitiveValue(TypeError, Symbol(\"1\"));\n  }\n\n  // when a String parses to NaN -> SyntaxError\n  function testStringValue(string) {\n    testPrimitiveValue(SyntaxError, string);\n    testPrimitiveValue(SyntaxError, \"   \" + string);\n    testPrimitiveValue(SyntaxError, string + \"   \");\n    testPrimitiveValue(SyntaxError, \"   \" + string + \"   \");\n  }\n  testStringValue(\"a\");\n  testStringValue(\"0b2\");\n  testStringValue(\"0o8\");\n  testStringValue(\"0xg\");\n  testStringValue(\"1n\");\n}\n",
  "wellKnownIntrinsicObjects.js": "// Copyright (C) 2018 the V8 project authors. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n/*---\ndescription: |\n    An Array of all representable Well-Known Intrinsic Objects\ndefines: [WellKnownIntrinsicObjects, getWellKnownIntrinsicObject]\n---*/\n\nconst WellKnownIntrinsicObjects = [\n  {\n    name: '%AggregateError%',\n    source: 'AggregateError',\n  },\n  {\n    name: '%Array%',\n    source: 'Array',\n  },\n  {\n    name: '%ArrayBuffer%',\n    source: 'ArrayBuffer',\n  },\n  {\n    name: '%ArrayIteratorPrototype%',\n    source: 'Object.getPrototypeOf([][Symbol.iterator]())',\n  },\n  {\n    // Not currently accessible to ECMAScript user code\n    name: '%AsyncFromSyncIteratorPrototype%',\n    source: '',\n  },\n  {\n    name: '%AsyncFunction%',\n    source: '(async function() {}).constructor',\n  },\n  {\n    name: '%AsyncGeneratorFunction%',\n    source: '(async function* () {}).constructor',\n  },\n  {\n    name: '%AsyncGeneratorPrototype%',\n    source: 'Object.getPrototypeOf(async function* () {}).prototype',\n  },\n  {\n    name: '%AsyncIteratorPrototype%',\n    source: 'Object.getPrototypeOf(Object.getPrototypeOf(async function* () {}).prototype)',\n  },\n  {\n    name: '%Atomics%',\n    source: 'Atomics',\n  },\n  {\n    name: '%BigInt%',\n    source: 'BigInt',\n  },\n  {\n    name: '%BigInt64Array%',\n    source: 'BigInt64Array',\n  },\n  {\n    name: '%BigUint64Array%',\n    source: 'BigUint64Array',\n  },\n  {\n    name: '%Boolean%',\n    source: 'Boolean',\n  },\n  {\n    name: '%DataView%',\n    source: 'DataView',\n  },\n  {\n    name: '%Date%',\n    source: 'Date',\n  },\n  {\n    name: '%decodeURI%',\n    source: 'decodeURI',\n  },\n  {\n    name: '%decodeURIComponent%',\n    source: 'decodeURIComponent',\n  },\n  {\n    name: '%encodeURI%',\n    source: 'encodeURI',\n  },\n  {\n    name: '%encodeURIComponent%',\n    source: 'encodeURIComponent',\n  },\n  {\n    name: '%Error%',\n    source: 'Error',\n  },\n  {\n    name: '%eval%',\n    source: 'eval',\n  },\n  {\n    name: '%EvalError%',\n    source: 'EvalError',\n  },\n  {\n    name: '%FinalizationRegistry%',\n    source: 'FinalizationRegistry',\n  },\n  {\n    name: '%Float32Array%',\n    source: 'Float32Array',\n  },\n  {\n    name: '%Float64Array%',\n    source: 'Float64Array',\n  },\n  {\n    // Not currently accessible to ECMAScript user code\n    name: '%ForInIteratorPrototype%',\n    source: '',\n  },\n  {\n    name: '%Function%',\n    source: 'Function',\n  },\n  {\n    name: '%GeneratorFunction%',\n    source: '(function* () {}).constructor',\n  },\n  {\n    name: '%GeneratorPrototype%',\n    source: 'Object.getPrototypeOf(function * () {}).prototype',\n  },\n  {\n    name: '%Int8Array%',\n    source: 'Int8Array',\n  },\n  {\n    name: '%Int16Array%',\n    source: 'Int16Array',\n  },\n  {\n    name: '%Int32Array%',\n    source: 'Int32Array',\n  },\n  {\n    name: '%isFinite%',\n    source: 'isFinite',\n  },\n  {\n    name: '%isNaN%',\n    source: 'isNaN',\n  },\n  {\n    name: '%Iterator%',\n    source: 'typeof Iterator !== \"undefined\" ? Iterator : Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())).constructor',\n  },\n  {\n    name: '%IteratorHelperPrototype%',\n    source: 'Object.getPrototypeOf(Iterator.from([]).drop(0))',\n  },\n  {\n    name: '%JSON%',\n    source: 'JSON',\n  },\n  {\n    name: '%Map%',\n    source: 'Map',\n  },\n  {\n    name: '%MapIteratorPrototype%',\n    source: 'Object.getPrototypeOf(new Map()[Symbol.iterator]())',\n  },\n  {\n    name: '%Math%',\n    source: 'Math',\n  },\n  {\n    name: '%Number%',\n    source: 'Number',\n  },\n  {\n    name: '%Object%',\n    source: 'Object',\n  },\n  {\n    name: '%parseFloat%',\n    source: 'parseFloat',\n  },\n  {\n    name: '%parseInt%',\n    source: 'parseInt',\n  },\n  {\n    name: '%Promise%',\n    source: 'Promise',\n  },\n  {\n    name: '%Proxy%',\n    source: 'Proxy',\n  },\n  {\n    name: '%RangeError%',\n    source: 'RangeError',\n  },\n  {\n    name: '%ReferenceError%',\n    source: 'ReferenceError',\n  },\n  {\n    name: '%Reflect%',\n    source: 'Reflect',\n  },\n  {\n    name: '%RegExp%',\n    source: 'RegExp',\n  },\n  {\n    name: '%RegExpStringIteratorPrototype%',\n    source: 'Object.getPrototypeOf(RegExp.prototype[Symbol.matchAll](\"\"))',\n  },\n  {\n    name: '%Set%',\n    source: 'Set',\n  },\n  {\n    name: '%SetIteratorPrototype%',\n    source: 'Object.getPrototypeOf(new Set()[Symbol.iterator]())',\n  },\n  {\n    name: '%SharedArrayBuffer%',\n    source: 'SharedArrayBuffer',\n  },\n  {\n    name: '%String%',\n    source: 'String',\n  },\n  {\n    name: '%StringIteratorPrototype%',\n    source: 'Object.getPrototypeOf(new String()[Symbol.iterator]())',\n  },\n  {\n    name: '%Symbol%',\n    source: 'Symbol',\n  },\n  {\n    name: '%SyntaxError%',\n    source: 'SyntaxError',\n  },\n  {\n    name: '%ThrowTypeError%',\n    source: '(function() { \"use strict\"; return Object.getOwnPropertyDescriptor(arguments, \"callee\").get })()',\n  },\n  {\n    name: '%TypedArray%',\n    source: 'Object.getPrototypeOf(Uint8Array)',\n  },\n  {\n    name: '%TypeError%',\n    source: 'TypeError',\n  },\n  {\n    name: '%Uint8Array%',\n    source: 'Uint8Array',\n  },\n  {\n    name: '%Uint8ClampedArray%',\n    source: 'Uint8ClampedArray',\n  },\n  {\n    name: '%Uint16Array%',\n    source: 'Uint16Array',\n  },\n  {\n    name: '%Uint32Array%',\n    source: 'Uint32Array',\n  },\n  {\n    name: '%URIError%',\n    source: 'URIError',\n  },\n  {\n    name: '%WeakMap%',\n    source: 'WeakMap',\n  },\n  {\n    name: '%WeakRef%',\n    source: 'WeakRef',\n  },\n  {\n    name: '%WeakSet%',\n    source: 'WeakSet',\n  },\n  {\n    name: '%WrapForValidIteratorPrototype%',\n    source: 'Object.getPrototypeOf(Iterator.from({ [Symbol.iterator](){ return {}; } }))',\n  },\n\n  // Extensions to well-known intrinsic objects.\n  //\n  // https://tc39.es/ecma262/#sec-additional-properties-of-the-global-object\n  {\n    name: \"%escape%\",\n    source: \"escape\",\n  },\n  {\n    name: \"%unescape%\",\n    source: \"unescape\",\n  },\n\n  // Extensions to well-known intrinsic objects.\n  //\n  // https://tc39.es/ecma402/#sec-402-well-known-intrinsic-objects\n  {\n    name: \"%Intl%\",\n    source: \"Intl\",\n  },\n  {\n    name: \"%Intl.Collator%\",\n    source: \"Intl.Collator\",\n  },\n  {\n    name: \"%Intl.DateTimeFormat%\",\n    source: \"Intl.DateTimeFormat\",\n  },\n  {\n    name: \"%Intl.DisplayNames%\",\n    source: \"Intl.DisplayNames\",\n  },\n  {\n    name: \"%Intl.DurationFormat%\",\n    source: \"Intl.DurationFormat\",\n  },\n  {\n    name: \"%Intl.ListFormat%\",\n    source: \"Intl.ListFormat\",\n  },\n  {\n    name: \"%Intl.Locale%\",\n    source: \"Intl.Locale\",\n  },\n  {\n    name: \"%Intl.NumberFormat%\",\n    source: \"Intl.NumberFormat\",\n  },\n  {\n    name: \"%Intl.PluralRules%\",\n    source: \"Intl.PluralRules\",\n  },\n  {\n    name: \"%Intl.RelativeTimeFormat%\",\n    source: \"Intl.RelativeTimeFormat\",\n  },\n  {\n    name: \"%Intl.Segmenter%\",\n    source: \"Intl.Segmenter\",\n  },\n  {\n    name: \"%IntlSegmentIteratorPrototype%\",\n    source: \"Object.getPrototypeOf(new Intl.Segmenter().segment()[Symbol.iterator]())\",\n  },\n  {\n    name: \"%IntlSegmentsPrototype%\",\n    source: \"Object.getPrototypeOf(new Intl.Segmenter().segment())\",\n  },\n\n  // Extensions to well-known intrinsic objects.\n  //\n  // https://tc39.es/proposal-temporal/#sec-well-known-intrinsic-objects\n  {\n    name: \"%Temporal%\",\n    source: \"Temporal\",\n  },\n];\n\nWellKnownIntrinsicObjects.forEach((wkio) => {\n  var actual;\n\n  try {\n    actual = new Function(\"return \" + wkio.source)();\n  } catch (exception) {\n    // Nothing to do here.\n  }\n\n  wkio.value = actual;\n});\n\n/**\n * Returns a well-known intrinsic object, if the implementation provides it.\n * Otherwise, throws.\n * @param {string} key - the specification's name for the intrinsic, for example\n *   \"%Array%\"\n * @returns {object} the well-known intrinsic object.\n */\nfunction getWellKnownIntrinsicObject(key) {\n  for (var ix = 0; ix < WellKnownIntrinsicObjects.length; ix++) {\n    if (WellKnownIntrinsicObjects[ix].name === key) {\n      var value = WellKnownIntrinsicObjects[ix].value;\n      if (value !== undefined)\n        return value;\n      throw new Test262Error('this implementation could not obtain ' + key);\n    }\n  }\n  throw new Test262Error('unknown well-known intrinsic ' + key);\n}\n",
  "sm/assertThrowsValue.js": "/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\n/*---\ndefines: [assertThrowsValue]\n---*/\n\nfunction assertThrowsValue(f, val, msg) {\n  try {\n    f();\n  } catch (exc) {\n    assert.sameValue(exc, val, msg);\n    return;\n  }\n\n  var fullmsg = \"Assertion failed: expected exception, no exception thrown\";\n  if (msg !== void 0) {\n    fullmsg += \" - \" + msg;\n  }\n  throw new Test262Error(fullmsg);\n}\n",
  "sm/non262-Date-shell.js": "/*---\ndefines: [runDSTOffsetCachingTestsFraction]\n---*/\n\nfunction runDSTOffsetCachingTestsFraction(part, parts)\n{\n  var BUGNUMBER = 563938;\n  var summary = 'Cache DST offsets to improve SunSpider score';\n\n  var MAX_UNIX_TIMET = 2145859200; // \"2037-12-31T08:00:00.000Z\" (PST8PDT based!)\n  var RANGE_EXPANSION_AMOUNT = 30 * 24 * 60 * 60;\n\n  /**\n   * Computes the time zone offset in minutes at the given timestamp.\n   */\n  function tzOffsetFromUnixTimestamp(timestamp)\n  {\n    var d = new Date(NaN);\n    d.setTime(timestamp); // local slot = NaN, UTC slot = timestamp\n    return d.getTimezoneOffset(); // get UTC, calculate local => diff in minutes\n  }\n\n  /**\n   * Clear the DST offset cache, leaving it initialized to include a timestamp\n   * completely unlike the provided one (i.e. one very, very far away in time\n   * from it).  Thus an immediately following lookup for the provided timestamp\n   * will cache-miss and compute a clean value.\n   */\n  function clearDSTOffsetCache(undesiredTimestamp)\n  {\n    var opposite = (undesiredTimestamp + MAX_UNIX_TIMET / 2) % MAX_UNIX_TIMET;\n\n    // Generic purge to known, but not necessarily desired, state\n    tzOffsetFromUnixTimestamp(0);\n    tzOffsetFromUnixTimestamp(MAX_UNIX_TIMET);\n\n    // Purge to desired state.  Cycle 2x in case opposite or undesiredTimestamp\n    // is close to 0 or MAX_UNIX_TIMET.\n    tzOffsetFromUnixTimestamp(opposite);\n    tzOffsetFromUnixTimestamp(undesiredTimestamp);\n    tzOffsetFromUnixTimestamp(opposite);\n    tzOffsetFromUnixTimestamp(undesiredTimestamp);\n  }\n\n  function computeCanonicalTZOffset(timestamp)\n  {\n    clearDSTOffsetCache(timestamp);\n    return tzOffsetFromUnixTimestamp(timestamp);\n  }\n\n  var TEST_TIMESTAMPS_SECONDS =\n    [\n     // Special-ish timestamps\n     0,\n     RANGE_EXPANSION_AMOUNT,\n     MAX_UNIX_TIMET,\n    ];\n\n  var ONE_DAY = 24 * 60 * 60;\n  var EIGHTY_THREE_HOURS = 83 * 60 * 60;\n  var NINETY_EIGHT_HOURS = 98 * 60 * 60;\n  function nextIncrement(i)\n  {\n    return i === EIGHTY_THREE_HOURS ? NINETY_EIGHT_HOURS : EIGHTY_THREE_HOURS;\n  }\n\n  // Now add a long sequence of non-special timestamps, from a fixed range, that\n  // overlaps a DST change by \"a bit\" on each side.  67 days should be enough\n  // displacement that we can occasionally exercise the implementation's\n  // thirty-day expansion and the DST-offset-change logic.  Use two different\n  // increments just to be safe and catch something a single increment might not.\n  var DST_CHANGE_DATE = 1268553600; // March 14, 2010\n  for (var t = DST_CHANGE_DATE - 67 * ONE_DAY,\n           i = nextIncrement(NINETY_EIGHT_HOURS),\n           end = DST_CHANGE_DATE + 67 * ONE_DAY;\n       t < end;\n       i = nextIncrement(i), t += i)\n  {\n    TEST_TIMESTAMPS_SECONDS.push(t);\n  }\n\n  var TEST_TIMESTAMPS =\n    TEST_TIMESTAMPS_SECONDS.map(function(v) { return v * 1000; });\n\n  /**************\n   * BEGIN TEST *\n   **************/\n\n  // Compute the correct time zone offsets for all timestamps to be tested.\n  var CORRECT_TZOFFSETS = TEST_TIMESTAMPS.map(computeCanonicalTZOffset);\n\n  // Intentionally and knowingly invoking every single logic path in the cache\n  // isn't easy for a human to get right (and know he's gotten it right), so\n  // let's do it the easy way: exhaustively try all possible four-date sequences\n  // selecting from our array of possible timestamps.\n\n  var sz = TEST_TIMESTAMPS.length;\n  var start = Math.floor((part - 1) / parts * sz);\n  var end = Math.floor(part / parts * sz);\n\n  for (var i = start; i < end; i++)\n  {\n    var t1 = TEST_TIMESTAMPS[i];\n    for (var j = 0; j < sz; j++)\n    {\n      var t2 = TEST_TIMESTAMPS[j];\n      for (var k = 0; k < sz; k++)\n      {\n        var t3 = TEST_TIMESTAMPS[k];\n        for (var w = 0; w < sz; w++)\n        {\n          var t4 = TEST_TIMESTAMPS[w];\n\n          clearDSTOffsetCache(t1);\n\n          var tzo1 = tzOffsetFromUnixTimestamp(t1);\n          var tzo2 = tzOffsetFromUnixTimestamp(t2);\n          var tzo3 = tzOffsetFromUnixTimestamp(t3);\n          var tzo4 = tzOffsetFromUnixTimestamp(t4);\n\n          assert.sameValue(tzo1, CORRECT_TZOFFSETS[i]);\n          assert.sameValue(tzo2, CORRECT_TZOFFSETS[j]);\n          assert.sameValue(tzo3, CORRECT_TZOFFSETS[k]);\n          assert.sameValue(tzo4, CORRECT_TZOFFSETS[w]);\n        }\n      }\n    }\n  }\n}\n",
  "sm/non262-JSON-shell.js": "/*---\ndefines: [testJSON, testJSONSyntaxError]\n---*/\n\nfunction testJSON(str) {\n  // Leading and trailing whitespace never affect parsing, so test the string\n  // multiple times with and without whitespace around it as it's easy and can\n  // potentially detect bugs.\n\n  // Try the provided string\n  try {\n    JSON.parse(str);\n  } catch (e) {\n    throw new Test262Error(\"string <\" + str + \"> should have parsed as JSON\");\n  }\n\n  // Now try the provided string with trailing whitespace\n  try {\n    JSON.parse(str + \" \");\n  } catch (e) {\n    throw new Test262Error(\"string <\" + str + \" > should have parsed as JSON\");\n  }\n\n  // Now try the provided string with leading whitespace\n  try {\n    JSON.parse(\" \" + str);\n  } catch (e) {\n    throw new Test262Error(\"string < \" + str + \"> should have parsed as JSON\");\n  }\n\n  // Now try the provided string with whitespace surrounding it\n  try {\n    JSON.parse(\" \" + str + \" \");\n  } catch (e) {\n    throw new Test262Error(\"string < \" + str + \" > should have parsed as JSON\");\n  }\n}\n\nfunction testJSONSyntaxError(str) {\n  // Leading and trailing whitespace never affect parsing, so test the string\n  // multiple times with and without whitespace around it as it's easy and can\n  // potentially detect bugs.\n\n  // Try the provided string\n  assert.throws(SyntaxError, function() {\n    JSON.parse(str);\n  }, \"string <\" + str + \"> shouldn't have parsed as JSON\");\n\n  // Now try the provided string with trailing whitespace\n  assert.throws(SyntaxError, function() {\n    JSON.parse(str + \" \");\n  }, \"string <\" + str + \" > shouldn't have parsed as JSON\");\n\n  // Now try the provided string with leading whitespace\n  assert.throws(SyntaxError, function() {\n    JSON.parse(\" \" + str);\n  }, \"string < \" + str + \"> shouldn't have parsed as JSON\");\n\n  // Now try the provided string with whitespace surrounding it\n  assert.throws(SyntaxError, function() {\n    JSON.parse(\" \" + str + \" \");\n  }, \"string < \" + str + \" > shouldn't have parsed as JSON\");\n}\n",
  "sm/non262-Math-shell.js": "/*---\ndefines: [assertNear, ONE_PLUS_EPSILON, ONE_MINUS_EPSILON]\n---*/\n\n// The nearest representable values to +1.0.\nconst ONE_PLUS_EPSILON = 1 + Math.pow(2, -52);  // 0.9999999999999999\nconst ONE_MINUS_EPSILON = 1 - Math.pow(2, -53);  // 1.0000000000000002\n\n{\n    const fail = function (msg) {\n        var exc = new Error(msg);\n        try {\n            // Try to improve on exc.fileName and .lineNumber; leave exc.stack\n            // alone. We skip two frames: fail() and its caller, an assertX()\n            // function.\n            var frames = exc.stack.trim().split(\"\\n\");\n            if (frames.length > 2) {\n                var m = /@([^@:]*):([0-9]+)$/.exec(frames[2]);\n                if (m) {\n                    exc.fileName = m[1];\n                    exc.lineNumber = +m[2];\n                }\n            }\n        } catch (ignore) { throw ignore;}\n        throw exc;\n    };\n\n    let ENDIAN;  // 0 for little-endian, 1 for big-endian.\n\n    // Return the difference between the IEEE 754 bit-patterns for a and b.\n    //\n    // This is meaningful when a and b are both finite and have the same\n    // sign. Then the following hold:\n    //\n    //   * If a === b, then diff(a, b) === 0.\n    //\n    //   * If a !== b, then diff(a, b) === 1 + the number of representable values\n    //                                         between a and b.\n    //\n    const f = new Float64Array([0, 0]);\n    const u = new Uint32Array(f.buffer);\n    const diff = function (a, b) {\n        f[0] = a;\n        f[1] = b;\n        //print(u[1].toString(16) + u[0].toString(16) + \" \" + u[3].toString(16) + u[2].toString(16));\n        return Math.abs((u[3-ENDIAN] - u[1-ENDIAN]) * 0x100000000 + u[2+ENDIAN] - u[0+ENDIAN]);\n    };\n\n    // Set ENDIAN to the platform's endianness.\n    ENDIAN = 0;  // try little-endian first\n    if (diff(2, 4) === 0x100000)  // exact wrong answer we'll get on a big-endian platform\n        ENDIAN = 1;\n    // For test262-harness compatibility,\n    // avoid `assert.sameValue` while still defining functions.\n    // https://github.com/bocoup/test262-stream/issues/34\n    const assertDiffResult = (a, b, expect, detail) => {\n        const result = diff(a, b);\n        if (result === expect) return;\n        throw new Error(\n            `Expected diff(${a}, ${b}) to be ${expect} but got ${result} [${detail}]`\n        );\n    };\n    assertDiffResult(2, 4, 0x10000000000000, \"wanted 0x10000000000000\");\n    assertDiffResult(0, Number.MIN_VALUE, 1, \"0 vs. Number.MIN_VALUE\");\n    assertDiffResult(1, ONE_PLUS_EPSILON, 1, \"1 vs. ONE_PLUS_EPSILON\");\n    assertDiffResult(1, ONE_MINUS_EPSILON, 1, \"1 vs. ONE_MINUS_EPSILON\");\n\n    var assertNear = function assertNear(a, b, tolerance=1) {\n        if (!Number.isFinite(b)) {\n            fail(\"second argument to assertNear (expected value) must be a finite number\");\n        } else if (Number.isNaN(a)) {\n            fail(\"got NaN, expected a number near \" + b);\n        } else if (!Number.isFinite(a)) {\n            if (b * Math.sign(a) < Number.MAX_VALUE)\n                fail(\"got \" + a + \", expected a number near \" + b);\n        } else {\n            // When the two arguments do not have the same sign bit, diff()\n            // returns some huge number. So if b is positive or negative 0,\n            // make target the zero that has the same sign bit as a.\n            var target = b === 0 ? a * 0 : b;\n            var err = diff(a, target);\n            if (err > tolerance) {\n                fail(\"got \" + a + \", expected a number near \" + b +\n                     \" (relative error: \" + err + \")\");\n            }\n        }\n    };\n}\n",
  "sm/non262-Reflect-shell.js": "/*---\ndefines: [SOME_PRIMITIVE_VALUES]\n---*/\n\n// List of a few values that are not objects.\nvar SOME_PRIMITIVE_VALUES = [\n    undefined, null,\n    false,\n    -Infinity, -1.6e99, -1, -0, 0, Math.pow(2, -1074), 1, 4294967295,\n    Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER + 1, 1.6e99, Infinity, NaN,\n    \"\", \"Phaedo\",\n    Symbol(), Symbol(\"iterator\"), Symbol.for(\"iterator\"), Symbol.iterator\n];\n",
  "sm/non262-Set-shell.js": "/*---\ndefines: [assertSetContainsExactOrderedItems, SetLike, SetIteratorLike, LoggingProxy]\n---*/\n(function(global) {\n  // Save the primordial values.\n  const {Array, Error, Object, Proxy, Reflect, Set} = global;\n\n  const ArrayIsArray = Array.isArray;\n  const ReflectApply = Reflect.apply;\n  const ReflectDefineProperty = Reflect.defineProperty;\n  const ReflectGet = Reflect.get;\n  const ReflectGetPrototypeOf = Reflect.getPrototypeOf;\n  const SetPrototype = Set.prototype;\n  const SetPrototypeHas = SetPrototype.has;\n  const SetPrototypeSize = Object.getOwnPropertyDescriptor(SetPrototype, \"size\").get;\n  const SetPrototypeKeys = SetPrototype.keys;\n  const SetIteratorPrototypeNext = new Set().values().next;\n\n  function assertSetContainsExactOrderedItems(actual, expected) {\n    assert.sameValue(ReflectGetPrototypeOf(actual), SetPrototype, \"actual is a native Set object\");\n    assert.sameValue(ArrayIsArray(expected), true, \"expected is an Array object\");\n\n    assert.sameValue(ReflectApply(SetPrototypeSize, actual, []), expected.length);\n\n    let index = 0;\n    let keys = ReflectApply(SetPrototypeKeys, actual, []);\n\n    while (true) {\n      let {done, value: item} = ReflectApply(SetIteratorPrototypeNext, keys, []);\n      if (done) {\n        break;\n      }\n      assert.sameValue(item, expected[index], `Element at index ${index}:`);\n      index++;\n    }\n  }\n  global.assertSetContainsExactOrderedItems = assertSetContainsExactOrderedItems;\n\n  class SetLike {\n    #set;\n\n    constructor(values) {\n      this.#set = new Set(values);\n    }\n\n    get size() {\n      return ReflectApply(SetPrototypeSize, this.#set, []);\n    }\n\n    has(value) {\n      return ReflectApply(SetPrototypeHas, this.#set, [value]);\n    }\n\n    keys() {\n      let keys = ReflectApply(SetPrototypeKeys, this.#set, []);\n      return new SetIteratorLike(keys);\n    }\n  }\n  global.SetLike = SetLike;\n\n  class SetIteratorLike {\n    #keys;\n\n    constructor(keys) {\n      this.#keys = keys;\n    }\n\n    next() {\n      return ReflectApply(SetIteratorPrototypeNext, this.#keys, []);\n    }\n\n    // The |return| method of the iterator protocol is never called.\n    return() {\n      throw new Error(\"Unexpected call to |return| method\");\n    }\n\n    // The |throw| method of the iterator protocol is never called.\n    throw() {\n      throw new Error(\"Unexpected call to |throw| method\");\n    }\n  }\n\n  function LoggingProxy(obj, log) {\n    assert.sameValue(ArrayIsArray(log), true);\n\n    let handler = new Proxy({\n      get(t, pk, r) {\n        ReflectDefineProperty(log, log.length, {\n          value: pk, writable: true, enumerable: true, configurable: true,\n        });\n        return ReflectGet(t, pk, r);\n      }\n    }, {\n      get(t, pk, r) {\n        ReflectDefineProperty(log, log.length, {\n          value: `[[${pk}]]`, writable: true, enumerable: true, configurable: true,\n        });\n        return ReflectGet(t, pk, r);\n      }\n    });\n\n    return {obj, proxy: new Proxy(obj, handler)};\n  }\n  global.LoggingProxy = LoggingProxy;\n})(this);\n",
  "sm/non262-Temporal-PlainMonthDay-shell.js": "/*---\ndefines: [ISOFields, assertSameISOFields]\n---*/\n\nfunction ISOFields(monthDay) {\n  let re = /^(?<year>-?\\d{4,6})-(?<month>\\d{2})-(?<day>\\d{2})\\[u-ca=(?<calendar>[\\w\\-]+)\\]$/;\n\n  let str = monthDay.toString({calendarName: \"always\"});\n  let match = str.match(re);\n  assert.sameValue(match !== null, true, `can't match: ${str}`);\n\n  let {year, month, day, calendar} = match.groups;\n  let isoYear = Number(year);\n  let isoMonth = Number(month);\n  let isoDay = Number(day);\n\n  let date = Temporal.PlainDate.from(str);\n  let isoDate = date.withCalendar(\"iso8601\");\n\n  assert.sameValue(calendar, date.calendarId);\n  assert.sameValue(isoYear, isoDate.year);\n  assert.sameValue(isoMonth, isoDate.month);\n  assert.sameValue(isoDay, isoDate.day);\n\n  return {\n    isoYear,\n    isoMonth,\n    isoDay,\n    calendar,\n  };\n}\n\nfunction assertSameISOFields(actual, expected) {\n  let actualFields = ISOFields(actual);\n  let expectedFields = ISOFields(expected);\n\n  assert.sameValue(typeof actualFields.isoYear, \"number\");\n  assert.sameValue(typeof actualFields.isoMonth, \"number\");\n  assert.sameValue(typeof actualFields.isoDay, \"number\");\n\n  assert.sameValue(actualFields.isoMonth > 0, true);\n  assert.sameValue(actualFields.isoDay > 0, true);\n\n  assert.sameValue(actualFields.isoYear, expectedFields.isoYear);\n  assert.sameValue(actualFields.isoMonth, expectedFields.isoMonth);\n  assert.sameValue(actualFields.isoDay, expectedFields.isoDay);\n  assert.sameValue(actualFields.calendar, expectedFields.calendar);\n}\n",
  "sm/non262-TypedArray-shell.js": "/*---\ndefines: [typedArrayConstructors, sharedTypedArrayConstructors, anyTypedArrayConstructors, isSharedConstructor, isFloatConstructor, isUnsignedConstructor]\n---*/\n(function(global) {\n    \"use strict\";\n\n    const {\n        Float16Array, Float32Array, Float64Array, Object, Reflect, SharedArrayBuffer, WeakMap,\n    } = global;\n    const {\n        apply: Reflect_apply,\n        construct: Reflect_construct,\n    } = Reflect;\n    const {\n        get: WeakMap_prototype_get,\n        has: WeakMap_prototype_has,\n    } = WeakMap.prototype;\n\n    const sharedConstructors = new WeakMap();\n\n    // Synthesize a constructor for a shared memory array from the constructor\n    // for unshared memory. This has \"good enough\" fidelity for many uses. In\n    // cases where it's not good enough, call isSharedConstructor for local\n    // workarounds.\n    function sharedConstructor(baseConstructor) {\n        // Create SharedTypedArray as a subclass of %TypedArray%, following the\n        // built-in %TypedArray% subclasses.\n        class SharedTypedArray extends Object.getPrototypeOf(baseConstructor) {\n            constructor(...args) {\n                var array = Reflect_construct(baseConstructor, args);\n                var {buffer, byteOffset, length} = array;\n                var sharedBuffer = new SharedArrayBuffer(buffer.byteLength);\n                var sharedArray = Reflect_construct(baseConstructor,\n                                                    [sharedBuffer, byteOffset, length],\n                                                    new.target);\n                for (var i = 0; i < length; i++)\n                    sharedArray[i] = array[i];\n                assert.sameValue(sharedArray.buffer, sharedBuffer);\n                return sharedArray;\n            }\n        }\n\n        // 22.2.5.1 TypedArray.BYTES_PER_ELEMENT\n        Object.defineProperty(SharedTypedArray, \"BYTES_PER_ELEMENT\",\n                              {__proto__: null, value: baseConstructor.BYTES_PER_ELEMENT});\n\n        // 22.2.6.1 TypedArray.prototype.BYTES_PER_ELEMENT\n        Object.defineProperty(SharedTypedArray.prototype, \"BYTES_PER_ELEMENT\",\n                              {__proto__: null, value: baseConstructor.BYTES_PER_ELEMENT});\n\n        // Share the same name with the base constructor to avoid calling\n        // isSharedConstructor() in multiple places.\n        Object.defineProperty(SharedTypedArray, \"name\",\n                              {__proto__: null, value: baseConstructor.name});\n\n        sharedConstructors.set(SharedTypedArray, baseConstructor);\n\n        return SharedTypedArray;\n    }\n\n    /**\n     * All TypedArray constructors for unshared memory.\n     */\n    const typedArrayConstructors = Object.freeze([\n        Int8Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Int16Array,\n        Uint16Array,\n        Int32Array,\n        Uint32Array,\n        Float32Array,\n        Float64Array,\n    ].concat(Float16Array ?? []));\n\n    /**\n     * All TypedArray constructors for shared memory.\n     */\n    const sharedTypedArrayConstructors = Object.freeze(\n        typeof SharedArrayBuffer === \"function\"\n        ? typedArrayConstructors.map(sharedConstructor)\n        : []\n    );\n\n    /**\n     * All TypedArray constructors for unshared and shared memory.\n     */\n    const anyTypedArrayConstructors = Object.freeze([\n        ...typedArrayConstructors, ...sharedTypedArrayConstructors,\n    ]);\n\n    /**\n     * Returns `true` if `constructor` is a TypedArray constructor for shared\n     * memory.\n     */\n    function isSharedConstructor(constructor) {\n        return Reflect_apply(WeakMap_prototype_has, sharedConstructors, [constructor]);\n    }\n\n    /**\n     * Returns `true` if `constructor` is a TypedArray constructor for shared\n     * or unshared memory, with an underlying element type of one of Float16, Float32\n     * or Float64.\n     */\n    function isFloatConstructor(constructor) {\n        if (isSharedConstructor(constructor))\n            constructor = Reflect_apply(WeakMap_prototype_get, sharedConstructors, [constructor]);\n        return constructor == Float32Array || constructor == Float64Array || (Float16Array && constructor == Float16Array);\n    }\n\n    /**\n     * Returns `true` if `constructor` is a TypedArray constructor for shared\n     * or unshared memory, with an underlying element type of one of Uint8,\n     * Uint8Clamped, Uint16, or Uint32.\n     */\n    function isUnsignedConstructor(constructor) {\n        if (isSharedConstructor(constructor))\n            constructor = Reflect_apply(WeakMap_prototype_get, sharedConstructors, [constructor]);\n        return constructor == Uint8Array ||\n               constructor == Uint8ClampedArray ||\n               constructor == Uint16Array ||\n               constructor == Uint32Array;\n    }\n\n    global.typedArrayConstructors = typedArrayConstructors;\n    global.sharedTypedArrayConstructors = sharedTypedArrayConstructors;\n    global.anyTypedArrayConstructors = anyTypedArrayConstructors;\n    global.isSharedConstructor = isSharedConstructor;\n    global.isFloatConstructor = isFloatConstructor;\n    global.isUnsignedConstructor = isUnsignedConstructor;\n})(this);\n",
  "sm/non262-expressions-shell.js": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\n/*---\ndefines: [testDestructuringArrayDefault]\n---*/\n\n(function(global) {\n    function func() {\n    }\n    class C {\n        foo() {\n        }\n        static foo() {\n        }\n    }\n\n    function test_one(pattern, val, opt) {\n        var stmts = [];\n        var i = 0;\n        var c;\n\n        stmts.push(`var ${pattern} = ${val};`);\n\n        for (var stmt of stmts) {\n            if (!opt.no_plain) {\n                eval(`\n${stmt}\n`);\n            }\n\n            if (!opt.no_func) {\n                eval(`\nfunction f${i}() {\n  ${stmt}\n}\nf${i}();\n`);\n                i++;\n\n                eval(`\nvar f${i} = function foo() {\n  ${stmt}\n};\nf${i}();\n`);\n                i++;\n\n                eval(`\nvar f${i} = () => {\n  ${stmt}\n};\nf${i}();\n`);\n                i++;\n            }\n\n            if (!opt.no_gen) {\n                eval(`\nfunction* g${i}() {\n  ${stmt}\n}\n[...g${i}()];\n`);\n                i++;\n\n                eval(`\nvar g${i} = function* foo() {\n  ${stmt}\n};\n[...g${i}()];\n`);\n                i++;\n            }\n\n            if (!opt.no_ctor) {\n                eval(`\nclass D${i} {\n  constructor() {\n    ${stmt}\n  }\n}\nnew D${i}();\n`);\n                i++;\n            }\n\n            if (!opt.no_derived_ctor) {\n                if (opt.no_pre_super) {\n                    eval(`\nclass D${i} extends C {\n  constructor() {\n    ${stmt}\n    try { super(); } catch (e) {}\n  }\n}\nnew D${i}();\n`);\n                    i++;\n                } else {\n                    eval(`\nclass D${i} extends C {\n  constructor() {\n    super();\n    ${stmt}\n  }\n}\nnew D${i}();\n`);\n                    i++;\n                }\n            }\n\n            if (!opt.no_method) {\n                eval(`\nclass D${i} extends C {\n  method() {\n    ${stmt}\n  }\n  static staticMethod() {\n    ${stmt}\n  }\n}\nnew D${i}().method();\nD${i}.staticMethod();\n`);\n                i++;\n            }\n        }\n\n        if (!opt.no_func_arg) {\n            eval(`\nfunction f${i}(${pattern}) {}\nf${i}(${val});\n`);\n            i++;\n\n            eval(`\nvar f${i} = function foo(${pattern}) {};\nf${i}(${val});\n`);\n            i++;\n\n            eval(`\nvar f${i} = (${pattern}) => {};\nf${i}(${val});\n`);\n            i++;\n        }\n\n        if (!opt.no_gen_arg) {\n            eval(`\nfunction* g${i}(${pattern}) {}\n[...g${i}(${val})];\n`);\n            i++;\n\n            eval(`\nvar g${i} = function* foo(${pattern}) {};\n[...g${i}(${val})];\n`);\n            i++;\n        }\n    }\n\n    function test(expr, opt={}) {\n        var pattern = `[a=${expr}, ...c]`;\n        test_one(pattern, \"[]\", opt);\n        test_one(pattern, \"[1]\", opt);\n\n        pattern = `[,a=${expr}]`;\n        test_one(pattern, \"[]\", opt);\n        test_one(pattern, \"[1]\", opt);\n        test_one(pattern, \"[1, 2]\", opt);\n\n        pattern = `[{x: [a=${expr}]}]`;\n        test_one(pattern, \"[{x: [1]}]\", opt);\n\n        pattern = `[x=[a=${expr}]=[]]`;\n        test_one(pattern, \"[]\", opt);\n        test_one(pattern, \"[1]\", opt);\n\n        pattern = `[x=[a=${expr}]=[1]]`;\n        test_one(pattern, \"[]\", opt);\n        test_one(pattern, \"[1]\", opt);\n    }\n\n    global.testDestructuringArrayDefault = test;\n})(this);\n",
  "sm/non262-generators-shell.js": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n/*---\ndefines: [assertIteratorResult, assertIteratorNext, assertIteratorDone]\n---*/\n\nfunction assertIteratorResult(result, value, done) {\n    assert.sameValue(result.value, value);\n    assert.sameValue(result.done, done);\n}\nfunction assertIteratorNext(iter, value) {\n    assertIteratorResult(iter.next(), value, false);\n}\nfunction assertIteratorDone(iter, value) {\n    assertIteratorResult(iter.next(), value, true);\n}\n",
  "sm/non262-strict-shell.js": "/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */\n\n/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\n/*---\ndefines: [completesNormally, raisesException, testLenientAndStrict, parsesSuccessfully, parseRaisesException, returns]\n---*/\n(function(global) {\n\n  /*\n   * completesNormally(CODE) returns true if evaluating CODE (as eval\n   * code) completes normally (rather than throwing an exception).\n   */\n  globalThis.completesNormally = function completesNormally(code) {\n    try {\n      eval(code);\n      return true;\n    } catch (exception) {\n      return false;\n    }\n  }\n\n  /*\n   * raisesException(EXCEPTION)(CODE) returns true if evaluating CODE (as\n   * eval code) throws an exception object that is an instance of EXCEPTION,\n   * and returns false if it throws any other error or evaluates\n   * successfully. For example: raises(TypeError)(\"0()\") == true.\n   */\n  globalThis.raisesException = function raisesException(exception) {\n    return function (code) {\n      try {\n        eval(code);\n        return false;\n      } catch (actual) {\n        return actual instanceof exception;\n      }\n    };\n  };\n\n  /*\n   * Return true if both of these return true:\n   * - LENIENT_PRED applied to CODE\n   * - STRICT_PRED applied to CODE with a use strict directive added to the front\n   *\n   * Run STRICT_PRED first, for testing code that affects the global environment\n   * in loose mode, but fails in strict mode.\n   */\n  global.testLenientAndStrict = function testLenientAndStrict(code, lenient_pred, strict_pred) {\n    return (strict_pred(\"'use strict'; \" + code) && \n            lenient_pred(code));\n  }\n\n  /*\n   * parsesSuccessfully(CODE) returns true if CODE parses as function\n   * code without an error.\n   */\n  global.parsesSuccessfully = function parsesSuccessfully(code) {\n    try {\n      Function(code);\n      return true;\n    } catch (exception) {\n      return false;\n    }\n  };\n\n  /*\n   * parseRaisesException(EXCEPTION)(CODE) returns true if parsing CODE\n   * as function code raises EXCEPTION.\n   */\n  global.parseRaisesException = function parseRaisesException(exception) {\n    return function (code) {\n      try {\n        Function(code);\n        return false;\n      } catch (actual) {\n        return exception.prototype.isPrototypeOf(actual);\n      }\n    };\n  };\n\n  /*\n   * returns(VALUE)(CODE) returns true if evaluating CODE (as eval code)\n   * completes normally (rather than throwing an exception), yielding a value\n   * strictly equal to VALUE.\n   */\n  global.returns = function returns(value) {\n    return function(code) {\n      try {\n        return eval(code) === value;\n      } catch (exception) {\n        return false;\n      }\n    }\n  }\n\n})(this);\n"
}